[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sd/source

Julien Nabet serval2412 at yahoo.fr
Thu Oct 29 02:37:51 PDT 2015


 sd/source/ui/table/tablefunction.cxx |   22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

New commits:
commit 53b8f63d0a8a8d1f99e2f4bf20934cf52c2b6bcd
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Sep 27 22:11:59 2015 +0200

    tdf#93587: insert table in draw ole object
    
    Don't disable "Insert table" option in case of Ole object
    
    Change-Id: Ibe87d35db320f4a9d5c971e3f7b25199fcacbde4
    Reviewed-on: https://gerrit.libreoffice.org/18897
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 2135b4a88d755c0b79a3b93b2269f08b709220c5)
    Reviewed-on: https://gerrit.libreoffice.org/19067

diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index d78cfff..c0c4aef 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -224,24 +224,16 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
 
 void DrawViewShell::GetTableMenuState( SfxItemSet &rSet )
 {
-    bool bIsUIActive = GetDocSh()->IsUIActive();
-    if( bIsUIActive )
+    OUString aActiveLayer = mpDrawView->GetActiveLayer();
+    SdrPageView* pPV = mpDrawView->GetSdrPageView();
+
+    if(
+        ( !aActiveLayer.isEmpty() && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
+        !pPV->IsLayerVisible(aActiveLayer) ) ) ||
+        SD_MOD()->GetWaterCan() )
     {
         rSet.DisableItem( SID_INSERT_TABLE );
     }
-    else
-    {
-        OUString aActiveLayer = mpDrawView->GetActiveLayer();
-        SdrPageView* pPV = mpDrawView->GetSdrPageView();
-
-        if( bIsUIActive ||
-            ( !aActiveLayer.isEmpty() && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
-            !pPV->IsLayerVisible(aActiveLayer) ) ) ||
-            SD_MOD()->GetWaterCan() )
-        {
-            rSet.DisableItem( SID_INSERT_TABLE );
-        }
-    }
 }
 
 void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel )


More information about the Libreoffice-commits mailing list