diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-24 11:21:10 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-24 12:16:14 +0100 |
commit | 4e0f9a35faf9e8114c9f4c8280207edd70a470bb (patch) | |
tree | ee41df13f8d6a36ff1c65f9184edda1837b8d17d /sw | |
parent | 146c7c5c89d9ce26c3de951ff049d36df1b5857b (diff) |
SwXShape: implement reading of the RelativeHeight property
Change-Id: I479eabcd45b741a633d7d00b2bdcbd3d0dcbf0ff
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b3c7c0c7db6c..ef6d29338386 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1574,6 +1574,19 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName) // without conversion to layout direction as below aRet = _getPropAtAggrObj( OUString("EndPosition") ); } + else if (pEntry->nWID == RES_FRM_SIZE && pEntry->nMemberId == MID_FRMSIZE_REL_HEIGHT) + { + SvxShape* pSvxShape = GetSvxShape(); + SAL_WARN_IF(!pSvxShape, "sw.uno", "No SvxShape found!"); + sal_Int16 nPercent = 0; + if (pSvxShape) + { + SdrObject* pObj = pSvxShape->GetSdrObject(); + if (pObj->GetRelativeHeight()) + nPercent = *pObj->GetRelativeHeight() * 100; + } + aRet = uno::makeAny(nPercent); + } else { const SwAttrSet& rSet = pFmt->GetAttrSet(); |