From 9f6a99e4a34c1bb7688900abfd683250f66fcff1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 29 Jan 2014 17:39:08 +0100 Subject: swpagerelsize: fix RelativeWidthRelation UNO API Code was missing to handle the case when properties are set before the frame is attached. Change-Id: I22389a8a162cb37b365b7655e048b1ece9774813 --- sw/source/core/unocore/unoframe.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sw/source') 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(aFrmSz).PutValue(*pRelWRelation, MID_FRMSIZE_REL_WIDTH_RELATION); if(pSyncWidth) bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pSyncWidth, MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT); if(pSyncHeight) -- cgit v1.2.3