sw/source/core/layout/fly.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit fe51aaffe8019c3866f183ca9ce967dee71c7f33 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jan 29 18:06:41 2014 +0100 swpagerelsize: fix RelativeHeightRelation UNO API Change-Id: I0c1969785d7e6a0e9082f628d9c490123f287000 diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index e77180f..a295b82 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -484,6 +484,8 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SwDoc* pDoc, SfxItemSet& rToSe { const ::uno::Any* pRelH = 0; GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_HEIGHT, pRelH); + const ::uno::Any* pRelHRelation = 0; + GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_HEIGHT_RELATION, pRelHRelation); const ::uno::Any* pRelW = 0; GetProperty(RES_FRM_SIZE, MID_FRMSIZE_REL_WIDTH, pRelW); const ::uno::Any* pRelWRelation = 0; @@ -502,7 +504,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 || pRelWRelation || pSize ||pSizeType || + if( pWidth || pHeight ||pRelH || pRelHRelation || 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(*pHeight, MID_FRMSIZE_HEIGHT|CONVERT_TWIPS); if(pRelH ) bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelH, MID_FRMSIZE_REL_HEIGHT); + if (pRelHRelation) + bRet &= const_cast<SwFmtFrmSize&>(aFrmSz).PutValue(*pRelHRelation, MID_FRMSIZE_REL_HEIGHT_RELATION); if(pRelW ) bRet &= ((SfxPoolItem&)aFrmSz).PutValue(*pRelW, MID_FRMSIZE_REL_WIDTH); if (pRelWRelation) commit ce01a206cbc445974053c8ba8b6cd7fe30f8fb02 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jan 29 18:01:50 2014 +0100 swpagerelsize: fix typo in SwFlyFrm::CalcRel() Change-Id: Ie371919e67261cdc021fc5487b35cc45f7f4105e diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 1aa75a5..677677b 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2499,7 +2499,7 @@ Size SwFlyFrm::CalcRel( const SwFmtFrmSize &rSz ) const nRelWidth = std::min( nRelWidth, pPage->Frm().Width() ); else nRelWidth = std::min( nRelWidth, pPage->Prt().Width() ); - if (rSz.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) + if (rSz.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) // Ignore margins of pPage. nRelHeight = std::min( nRelHeight, pPage->Frm().Height() ); else commit 9f6a99e4a34c1bb7688900abfd683250f66fcff1 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jan 29 17:39:08 2014 +0100 swpagerelsize: fix RelativeWidthRelation UNO API Code was missing to handle the case when properties are set before the frame is attached. Change-Id: I22389a8a162cb37b365b7655e048b1ece9774813 diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 890f615..e77180f 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits