[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - embeddedobj/source

Caolán McNamara caolanm at redhat.com
Thu Sep 8 14:00:26 UTC 2016


 embeddedobj/source/general/docholder.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 3c51f207747150933c6725fa22af1682cf066d8c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 15 21:13:01 2016 +0100

    Resolves: tdf#96451 do magic to enable embedded chart sidebar only for chart
    
    objects, and do the normal thing for other objects, e.g. math
    
    Change-Id: Ifb786a841b843b0317713769cb214a44dceaf546
    (cherry picked from commit c5977a89c28b285dfface71ca71e07bb0463ed19)
    Reviewed-on: https://gerrit.libreoffice.org/28153
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index e89695e..c9e931e 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -709,10 +709,17 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >&
                     // this must be done after merging menus as we won't get the container menu otherwise
                     xContainerLM->setDockingAreaAcceptor( uno::Reference < ui::XDockingAreaAcceptor >() );
 
+                    bool bIsChart = false;
+                    uno::Reference< lang::XServiceInfo> xServiceInfo(m_xComponent, uno::UNO_QUERY);
+                    if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument"))
+                        bIsChart = true;
                     // prevent further changes at this LM
                     // TODO: moggi: why is this necessary?
-                    // xContainerLM->setVisible( sal_False );
-                    // xContainerLM->lock();
+                    if (!bIsChart)
+                    {
+                        xContainerLM->setVisible( false );
+                        xContainerLM->lock();
+                    }
                     bUnlock = true;
 
                     // by unlocking the LM each layout change will now resize the containers window; pending layouts will be processed now


More information about the Libreoffice-commits mailing list