diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-09-27 22:11:59 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2015-10-01 09:21:29 +0000 |
commit | 2135b4a88d755c0b79a3b93b2269f08b709220c5 (patch) | |
tree | 745903b88388a77d16d4f97c81c588487eb5cd54 /sd | |
parent | 25de5cfa43b2b1cb7d7214470acc7719839e13fe (diff) |
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@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/table/tablefunction.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index e2129cc80373..d1f92617f968 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 ) |