27#include <com/sun/star/drawing/XShapes.hpp>
28#include <com/sun/star/frame/CommandGroup.hpp>
32#include <editeng/editids.hrc>
44using ::com::sun::star::uno::Reference;
45using ::com::sun::star::uno::Sequence;
53 ,m_pChartController( pController )
77 bool bWritable =
false;
83 bWritable = !xStorable->isReadonly();
145 switch ( nFeatureId )
221 rDialog.GetName(
aName );
223 if ( !
aName.isEmpty() )
225 DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : nullptr );
243 if ( !(pChartWindow && pDrawModelWrapper && pDrawViewWrapper) )
256 pSelectedObj, bHasMarked));
257 if ( pDlg->Execute() ==
RET_OK )
259 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
280 if ( !(pChartWindow && pDrawModelWrapper && pDrawViewWrapper) )
292 if ( pDlg->Execute() ==
RET_OK )
294 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
314 if ( !(pChartWindow && pDrawViewWrapper) )
326 if ( pDlg->Execute() ==
RET_OK )
328 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
348 if ( !(pChartWindow && pDrawViewWrapper) )
352 if ( pSelectedObj && pSelectedObj->
GetObjIdentifier() == SdrObjKind::Caption )
364 aCombAttr.
Put( aAttr );
365 aCombAttr.
Put( aGeoAttr );
366 pDlg->SetInputSet( &aCombAttr );
367 if ( pDlg->Execute() ==
RET_OK )
369 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
380 if ( pDlg->Execute() ==
RET_OK )
382 const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet();
402 OUString aTitle( pSelectedObj->
GetTitle() );
409 if ( pDlg->Execute() ==
RET_OK )
411 pDlg->GetTitle( aTitle );
412 pDlg->GetDescription( aDescription );
413 pDlg->IsDecorative(isDecorative);
440 if ( pDlg->Execute() ==
RET_OK )
442 pDlg->GetName(
aName);
454 if ( !pDrawViewWrapper )
508 if ( pChartWindow && pDrawModelWrapper && pDrawViewWrapper )
530 if ( !(pChartWindow && pDrawViewWrapper) )
539 SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS> aNewAttr(rPool);
540 aNewAttr.Put( aAttr );
562 if ( pDrawModelWrapper )
567 sal_Int32
nCount = xDrawPage->getCount();
571 if ( xDrawPage->getByIndex(
i ) >>= xShape )
573 if ( xShape.is() && xShape != xChartRoot )
575 xFirstShape = xShape;
580 if ( xFirstShape.is() )
586 catch (
const uno::Exception& )
601 if ( pDrawModelWrapper )
606 sal_Int32
nCount = xDrawPage->getCount();
607 for ( sal_Int32
i =
nCount - 1;
i >= 0; --
i )
610 if ( xDrawPage->getByIndex(
i ) >>= xShape )
612 if ( xShape.is() && xShape != xChartRoot )
619 if ( xLastShape.is() )
625 catch (
const uno::Exception& )
639 if ( pDrawViewWrapper )
643 if ( pSelectedObj && pFirstObj && pSelectedObj != pFirstObj )
658 if ( pDrawViewWrapper )
662 if ( pSelectedObj && pLastObj && pSelectedObj != pLastObj )
@ ShapeObjectTitleDescription
void PutMarkedBehindObj(const SdrObject *pRefObj)
void SetAttrToMarked(const SfxItemSet &rAttr, bool bReplaceAll)
void SetGeoAttrToMarked(const SfxItemSet &rAttr, bool addPageMargin=false)
void MergeAttrFromMarked(SfxItemSet &rAttr, bool bOnlyHardAttr) const
SfxItemSet GetGeoAttrFromMarked() const
bool AreObjectsMarked() const
size_t GetMarkedObjectCount() const
const SfxItemPool & GetItemPool() const
virtual OUString GetTitle() const
virtual void SetTitle(const OUString &rStr)
virtual void SetDescription(const OUString &rStr)
virtual OUString GetDescription() const
virtual const OUString & GetName() const
virtual SdrObjKind GetObjIdentifier() const
virtual void SetDecorative(bool isDecorative)
virtual void SetName(const OUString &rStr, const bool bSetChanged=true)
virtual bool IsDecorative() const
const SfxItemSet & GetDefaultAttr() const
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
SdrModel & GetModel() const
bool SetAttributes(const SfxItemSet &rSet, bool bReplaceAll=false)
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr=false) const
SfxItemPool * GetPool() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual short run() override
const SfxItemSet * GetOutputItemSet() const
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow, bool bSlideBackground)=0
virtual VclPtr< AbstractSvxObjectTitleDescDialog > CreateSvxObjectTitleDescDialog(weld::Window *pParent, const OUString &rTitle, const OUString &rDescription, bool isDecorative)=0
virtual VclPtr< SfxAbstractTabDialog > CreateTextTabDialog(weld::Window *pParent, const SfxItemSet *pAttrSet, SdrView *pView)=0
virtual VclPtr< AbstractSvxTransformTabDialog > CreateSvxTransformTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
virtual VclPtr< AbstractSvxCaptionDialog > CreateCaptionDialog(weld::Window *pParent, const SdrView *pView, SvxAnchorIds nAnchorTypes=SvxAnchorIds::NONE)=0
virtual VclPtr< AbstractSvxObjectNameDialog > CreateSvxObjectNameDialog(weld::Window *pParent, const OUString &rName)=0
virtual VclPtr< SfxAbstractTabDialog > CreateSvxLineTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, const SdrObject *pObj, bool bHasObj)=0
static SvxAbstractDialogFactory * Create()
rtl::Reference<::chart::ChartModel > getChartModel()
DrawViewWrapper * GetDrawViewWrapper()
bool isAdditionalShapeSelected() const
weld::Window * GetChartFrame()
DrawModelWrapper * GetDrawModelWrapper()
static rtl::Reference< SvxShapeGroupAnyD > getChartRootShape(const rtl::Reference< SvxDrawPage > &xPage)
const rtl::Reference< SvxDrawPage > & getMainDrawPage()
static SdrObject * getSdrObject(const css::uno::Reference< css::drawing::XShape > &xShape)
SdrObject * getNamedSdrObject(const OUString &rName) const
SdrObject * getSelectedObject() const
This is a base class for CommandDispatch implementations with feature support.
SupportedFeatures m_aSupportedFeatures
void implDescribeSupportedFeature(const char *pAsciiCommandURL, ChartCommandID nId, sal_Int16 nGroup)
describes a feature supported by the controller
This is a CommandDispatch implementation for shapes.
virtual ~ShapeController() override
void executeDispatch_ChangeZOrder(ChartCommandID nId)
void executeDispatch_FormatLine()
SdrObject * getFirstAdditionalShape()
ShapeController(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ChartController *pController)
bool isBackwardPossible()
virtual void execute(const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rArgs) override
ChartController * m_pChartController
void executeDispatch_FormatArea()
void executeDispatch_TextAttributes()
void executeDispatch_ParagraphDialog()
virtual void disposing(std::unique_lock< std::mutex > &rGuard) override
is called when this is disposed
virtual FeatureState getState(const OUString &rCommand) override
void executeDispatch_FontDialog()
void executeDispatch_RenameObject()
void executeDispatch_ObjectTitleDescription()
virtual void describeSupportedFeatures() override
void executeDispatch_TransformDialog()
SdrObject * getLastAdditionalShape()
dialog for font properties of shapes
dialog for paragraph properties of shapes
#define DBG_UNHANDLED_EXCEPTION(...)
constexpr sal_uInt16 EE_ITEMS_END(EE_FEATURE_END)
constexpr sal_uInt16 EE_ITEMS_START(OWN_ATTR_VALUE_END+1)
#define LINK(Instance, Class, Member)
IMPL_LINK(StackingResourceGroup, StackingChangeHdl, weld::Toggleable &, rRadio, void)