35#include <svx/svxids.hrc>
59 nPosX = pPosXItem->GetValue();
61 nPosY = pPosYItem->GetValue();
64 nSizX = pWidthItem->GetValue();
66 nSizY = pHeightItem->GetValue();
68 eRP=
static_cast<RectPoint>(pSizeItem->GetValue());
75 nPosX += ( rOriginalSize.Width - nSizX ) / 2;
78 nPosX += rOriginalSize.Width - nSizX;
81 nPosY += ( rOriginalSize.Height - nSizY ) / 2;
84 nPosX += ( rOriginalSize.Width - nSizX ) / 2;
85 nPosY += ( rOriginalSize.Height - nSizY ) / 2;
88 nPosX += rOriginalSize.Width - nSizX;
89 nPosY += ( rOriginalSize.Height - nSizY ) / 2;
92 nPosY += rOriginalSize.Height - nSizY;
95 nPosX += ( rOriginalSize.Width - nSizX ) / 2;
96 nPosY += rOriginalSize.Height - nSizY;
99 nPosX += rOriginalSize.Width - nSizX;
100 nPosY += rOriginalSize.Height - nSizY;
106 rPosAndSize = awt::Rectangle(nPosX,nPosY,nSizX,nSizY);
139 if( pDlg->Execute() ==
RET_OK )
141 pOutItemSet = pDlg->GetOutputItemSet();
143 aItemSet.
Put(*pOutItemSet);
152 for (
const auto& aProp: *pArgs)
156 if (aProp.Name ==
"TransformPosX") {
159 else if (aProp.Name ==
"TransformPosY") {
162 else if (aProp.Name ==
"TransformWidth") {
165 else if (aProp.Name ==
"TransformHeight") {
171 if(pOutItemSet || pArgs)
173 awt::Rectangle aOldObjectRect;
175 aOldObjectRect =
m_xChartView->getRectangleOfObject(aCID);
177 awt::Rectangle aNewObjectRect;
180 awt::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
182 bool bChanged =
false;
189 , aNewObjectRect, aOldObjectRect, aPageRect );
190 if( bMoved || bChanged )
194 catch(
const uno::Exception&)
static OUString createDescription(ActionType eActionType, std::u16string_view rObjectName)
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual VclPtr< SfxAbstractTabDialog > CreateSchTransformTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, const SdrView *pSdrView, bool bSizeTabPage)=0
static SvxAbstractDialogFactory * Create()
rtl::Reference<::chart::ChartModel > getChartModel()
std::unique_ptr< DrawViewWrapper > m_pDrawViewWrapper
css::uno::Reference< css::document::XUndoManager > m_xUndoManager
rtl::Reference<::chart::ChartView > m_xChartView
weld::Window * GetChartFrame()
void executeDispatch_PositionAndSize(const ::css::uno::Sequence< ::css::beans::PropertyValue > *pArgs=nullptr)
static css::awt::Size getPageSize(const rtl::Reference<::chart::ChartModel > &xModel)
static bool switchDiagramPositioningToExcludingPositioning(ChartModel &rModel, bool bResetModifiedState, bool bConvertAlsoFromAutoPositioning)
ObjectType getObjectType() const
static OUString getName(ObjectType eObjectType, bool bPlural=false)
static bool moveObject(ObjectType eObjectType, const css::uno::Reference< css::beans::XPropertySet > &xObjectProp, const css::awt::Rectangle &rNewPositionAndSize, const css::awt::Rectangle &rOldPositionAndSize, const css::awt::Rectangle &rPageRectangle)
OUString const & getSelectedCID() const
bool isResizeableObjectSelected() const
A guard which does nothing, unless you explicitly call commitAction.
#define TOOLS_WARN_EXCEPTION(area, stream)
OOO_DLLPUBLIC_CHARTTOOLS css::awt::Size ToSize(const css::awt::Rectangle &rRectangle)
awt::Rect --> awt::Size (2D)
static void lcl_getPositionAndSizeFromItemSet(const SfxItemSet &rItemSet, awt::Rectangle &rPosAndSize, const awt::Size &rOriginalSize)