diff options
author | Armin Le Grand <alg@apache.org> | 2013-04-09 11:22:48 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-04-09 11:22:48 +0000 |
commit | c73f0e910fcf3a940c24a639dba9b4ced2057399 (patch) | |
tree | b79b3ec26ce84f234e07364c1692cae28bfc8f5d /sc | |
parent | d7fa73b25f75796291432496d9bb8d7c80e82c8b (diff) |
i121538 Disable FontWork dialog entries (slots) when CustomShapes are selected to avoid unwanted FontWork editing on these shapes
Notes
Notes:
merged as: 0994eb59a1bd1a993c7b6650570454ecad6077b0
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh4.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob2.cxx | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/sc/source/ui/drawfunc/drawsh4.cxx b/sc/source/ui/drawfunc/drawsh4.cxx index 2a5fb843436e..59d8b56f53ce 100644 --- a/sc/source/ui/drawfunc/drawsh4.cxx +++ b/sc/source/ui/drawfunc/drawsh4.cxx @@ -35,7 +35,7 @@ #include <svx/xdef.hxx> #include <sfx2/objsh.hxx> #include <sfx2/viewfrm.hxx> - +#include <svx/svdoashp.hxx> #include "drawsh.hxx" #include "drawview.hxx" #include "viewdata.hxx" @@ -60,8 +60,14 @@ void ScDrawShell::GetFormTextState(SfxItemSet& rSet) if ( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if ( pObj == NULL || !pObj->ISA(SdrTextObj) || - !((SdrTextObj*) pObj)->HasText() ) + const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj); + const bool bDeactivate( + !pObj || + !pTextObj || + !pTextObj->HasText() || + dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes + + if(bDeactivate) { if ( pDlg ) pDlg->SetActive(sal_False); diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx index d20b8795f621..228de0c81c57 100644 --- a/sc/source/ui/drawfunc/drtxtob2.cxx +++ b/sc/source/ui/drawfunc/drtxtob2.cxx @@ -39,7 +39,7 @@ #include <sfx2/request.hxx> #include <sot/formats.hxx> #include <svl/whiter.hxx> - +#include <svx/svdoashp.hxx> #include "sc.hrc" #include "drtxtob.hxx" #include "viewdata.hxx" @@ -242,8 +242,14 @@ void ScDrawTextObjectBar::GetFormTextState(SfxItemSet& rSet) if ( rMarkList.GetMarkCount() == 1 ) pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if ( pObj == NULL || !pObj->ISA(SdrTextObj) || - !((SdrTextObj*) pObj)->HasText() ) + const SdrTextObj* pTextObj = dynamic_cast< const SdrTextObj* >(pObj); + const bool bDeactivate( + !pObj || + !pTextObj || + !pTextObj->HasText() || + dynamic_cast< const SdrObjCustomShape* >(pObj)); // #121538# no FontWork for CustomShapes + + if(bDeactivate) { if ( pDlg ) pDlg->SetActive(sal_False); |