diff options
Diffstat (limited to 'sc/source/ui/drawfunc/drawsh2.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 9f2f0f2975e3..83d5d51ade9c 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -208,6 +208,8 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions rSet.DisableItem( SID_DRAW_HLINK_EDIT ); rSet.DisableItem( SID_DRAW_HLINK_DELETE ); rSet.DisableItem( SID_OPEN_HYPERLINK ); + // Fit to cell only works with a single graphic + rSet.DisableItem( SID_FITCELLSIZE ); } else if ( nMarkCount == 1 ) { @@ -244,6 +246,11 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions rSet.DisableItem( SID_ANCHOR_TOGGLE ); } } + + // Fit to cell is only available for cell anchored graphics obviously + if (pView->GetAnchorType() != SCA_CELL && + pView->GetAnchorType() != SCA_CELL_RESIZE) + rSet.DisableItem( SID_FITCELLSIZE ); } if ( !bCanRename ) { @@ -267,6 +274,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions // other rSet.DisableItem( SID_ANCHOR_TOGGLE ); rSet.DisableItem( SID_ORIGINALSIZE ); + rSet.DisableItem( SID_FITCELLSIZE ); rSet.DisableItem( SID_ATTR_TRANSFORM ); } |