summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-29 17:39:08 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-29 18:14:39 +0100
commit9f6a99e4a34c1bb7688900abfd683250f66fcff1 (patch)
tree131922a0a2eddd450e86ed06dd77310e56c1a903 /sw/source
parent29aa5166e56e32f6a5471d375fd5fe9aac084d30 (diff)
swpagerelsize: fix RelativeWidthRelation UNO API
Code was missing to handle the case when properties are set before the frame is attached. Change-Id: I22389a8a162cb37b365b7655e048b1ece9774813
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unoframe.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 890f61552161..e77180fdc164 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -486,6 +486,8 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSe
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_HEIGHT, pRelH);
const ::uno::Any* pRelW = 0;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_WIDTH, pRelW);
+ const ::uno::Any* pRelWRelation = 0;
+ GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_WIDTH_RELATION, pRelWRelation);
const ::uno::Any* pSyncWidth = 0;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT, pSyncWidth);
const ::uno::Any* pSyncHeight = 0;
@@ -500,7 +502,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSe
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_SIZE_TYPE, pSizeType);
const ::uno::Any* pWidthType = 0;
GetProperty(RES_FRM_SIZE, MID_FRMSIZE_WIDTH_TYPE, pWidthType);
- if( pWidth || pHeight ||pRelH || pRelW || pSize ||pSizeType ||
+ if( pWidth || pHeight ||pRelH || pRelW || pRelWRelation || pSize ||pSizeType ||
pWidthType ||pSyncWidth || pSyncHeight )
{
rSizeFound = true;
@@ -513,6 +515,8 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSe
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelH, MID_FRMSIZE_REL_HEIGHT);
if(pRelW )
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelW, MID_FRMSIZE_REL_WIDTH);
+ if (pRelWRelation)
+ bRet &= const_cast<SwFmtFrmSize&>(aFrmSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION);
if(pSyncWidth)
bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSyncWidth, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT);
if(pSyncHeight)