Kaydet (Commit) 2135b4a8 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Katarina Behrens

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/18897Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst 25de5cfa
...@@ -222,24 +222,16 @@ void DrawViewShell::FuTable(SfxRequest& rReq) ...@@ -222,24 +222,16 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
void DrawViewShell::GetTableMenuState( SfxItemSet &rSet ) void DrawViewShell::GetTableMenuState( SfxItemSet &rSet )
{ {
bool bIsUIActive = GetDocSh()->IsUIActive(); OUString aActiveLayer = mpDrawView->GetActiveLayer();
if( bIsUIActive ) SdrPageView* pPV = mpDrawView->GetSdrPageView();
if(
( !aActiveLayer.isEmpty() && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
!pPV->IsLayerVisible(aActiveLayer) ) ) ||
SD_MOD()->GetWaterCan() )
{ {
rSet.DisableItem( SID_INSERT_TABLE ); 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 ) void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment