SdrObject: add meRelativeWidth/HeightRelation
Similar to Writer TextBoxes, this member is supposed to store the "relation" (text::RelOrientation constants) of the relative width/height, so far the layout always assumed "relative to page". Change-Id: I5100745314e45ad322bff2b761e3722459aba014
This commit is contained in:
parent
b74870f275
commit
b0bf124360
@ -413,13 +413,19 @@ protected:
|
||||
private:
|
||||
static SdrItemPool* mpGlobalItemPool;
|
||||
boost::optional<double> mnRelativeWidth;
|
||||
sal_Int16 meRelativeWidthRelation;
|
||||
boost::optional<double> 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<double> GetRelativeWidth( ) const { return mnRelativeWidth; }
|
||||
sal_Int16 GetRelativeWidthRelation() const { return meRelativeWidthRelation; }
|
||||
boost::optional<double> 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; }
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "sal/config.h"
|
||||
|
||||
#include <com/sun/star/lang/XComponent.hpp>
|
||||
#include <com/sun/star/text/RelOrientation.hpp>
|
||||
|
||||
#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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user