diff options
author | Gulsah Kose <gulsah.1004@gmail.com> | 2017-03-03 00:41:09 +0300 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-03-03 10:32:38 +0000 |
commit | f5c4e9dec5a67dbb7d5e42e8956d3f9d74c54fcc (patch) | |
tree | 2e17e80ca45db6450b520c4c8380e1884a185b93 | |
parent | tdf#99352: ensure ChartController is disposing its VclPtrs on DeInitVCL (diff) | |
download | core-f5c4e9dec5a67dbb7d5e42e8956d3f9d74c54fcc.tar.gz core-f5c4e9dec5a67dbb7d5e42e8956d3f9d74c54fcc.zip |
tdf#90856 Hide "Format Area" command for line objects in Calc
Change-Id: If9e4828f5f0073fba126f9e017a596034efd6348
Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/34834
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 5ec9cb43cf0c..3188e05394dd 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -347,6 +347,22 @@ void ScDrawShell::GetAttrFuncState(SfxItemSet &rSet) ScDrawView* pDrView = pViewData->GetScDrawView(); SfxItemSet aViewSet = pDrView->GetAttrFromMarked(false); + const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList(); + + if ( rMarkList.GetMarkCount() == 1 ) + { + SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); + sal_uInt16 nObjType = pObj->GetObjIdentifier(); + + // If marked object is 2D, disable format area command. + if ( nObjType == OBJ_PLIN || + nObjType == OBJ_LINE || + nObjType == OBJ_PATHLINE || + nObjType == OBJ_FREELINE || + nObjType == OBJ_EDGE || + nObjType == OBJ_CARC ) + rSet.DisableItem( SID_ATTRIBUTES_AREA ); + } if ( aViewSet.GetItemState( XATTR_LINESTYLE ) == SfxItemState::DEFAULT ) { |