diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index efc5a0e41fcc..611b365cf8f6 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -413,13 +413,19 @@ protected: private: static SdrItemPool* mpGlobalItemPool; boost::optional mnRelativeWidth; + sal_Int16 meRelativeWidthRelation; boost::optional mnRelativeHeight; + sal_Int16 meRelativeHeightRelation; public: static SdrItemPool& GetGlobalDrawObjectItemPool(); void SetRelativeWidth( double nValue ) { mnRelativeWidth.reset( nValue ); } + void SetRelativeWidthRelation( sal_Int16 eValue ) { meRelativeWidthRelation = eValue; } void SetRelativeHeight( double nValue ) { mnRelativeHeight.reset( nValue ); } + void SetRelativeHeightRelation( sal_Int16 eValue ) { meRelativeHeightRelation = eValue; } boost::optional GetRelativeWidth( ) const { return mnRelativeWidth; } + sal_Int16 GetRelativeWidthRelation() const { return meRelativeWidthRelation; } boost::optional GetRelativeHeight( ) const { return mnRelativeHeight; } + sal_Int16 GetRelativeHeightRelation() const { return meRelativeHeightRelation; } // evil calc grid/shape drawlayer syncing Point GetGridOffset() const { return aGridOffset; } void SetGridOffset( const Point& rGridOffset ){ aGridOffset = rGridOffset; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 9999a4671c72..4a0d63c894ef 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -20,6 +20,7 @@ #include "sal/config.h" #include +#include #include "svdconv.hxx" @@ -437,6 +438,8 @@ SdrObject::SdrObject() ,pGrabBagItem(NULL) ,mnNavigationPosition(SAL_MAX_UINT32) ,mnLayerID(0) + ,meRelativeWidthRelation(text::RelOrientation::PAGE_FRAME) + ,meRelativeHeightRelation(text::RelOrientation::PAGE_FRAME) ,mpSvxShape( NULL ) ,maWeakUnoShape() ,mbDoNotInsertIntoPageAutomatically(false) @@ -1615,6 +1618,8 @@ void SdrObject::Resize(const Point& rRef, const Fraction& xFact, const Fraction& if (bUnsetRelative) { mnRelativeWidth.reset( ); + meRelativeWidthRelation = text::RelOrientation::PAGE_FRAME; + meRelativeHeightRelation = text::RelOrientation::PAGE_FRAME; mnRelativeHeight.reset( ); } Rectangle aBoundRect0; if (pUserCall!=NULL) aBoundRect0=GetLastBoundRect();