[Libreoffice-commits] core.git: sd/source
Julien Nabet
serval2412 at yahoo.fr
Thu Oct 1 02:21:50 PDT 2015
sd/source/ui/table/tablefunction.cxx | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
New commits:
commit 2135b4a88d755c0b79a3b93b2269f08b709220c5
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>
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index e2129cc..d1f9261 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -222,24 +222,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