summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtexppr.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-30 10:25:16 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-30 11:52:11 +0100
commit0b20f01a8817867d7657ed2ee29321de9af15843 (patch)
tree008e6ff80c8c4e9f9e10f974eefac739a6ab95a9 /xmloff/source/text/txtexppr.cxx
parent25d089e09d94a86c615bf641d59846a65323e495 (diff)
swpagerelsize: implement ODF import/export
Export rel-height-rel / rel-width-rel only in case rel-height / rel-width is non-zero, though. Change-Id: I36120cbd8679ac4fc072d1e7cf4dfc024836b5ac
Diffstat (limited to 'xmloff/source/text/txtexppr.cxx')
-rw-r--r--xmloff/source/text/txtexppr.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 6c560cc2ac7f..aa67367ba566 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -626,6 +626,8 @@ void XMLTextExportPropertySetMapper::ContextFilter(
XMLPropertyState* pVertOrientRelPageState = NULL;
XMLPropertyState* pVertOrientRelFrameState = NULL;
XMLPropertyState* pVertOrientRelAsCharState = NULL;
+ XMLPropertyState* pRelWidthRel = NULL;
+ XMLPropertyState* pRelHeightRel = NULL;
// Vertical position and relation for shapes (#i28749#)
XMLPropertyState* pShapeVertOrientState = NULL;
@@ -738,12 +740,14 @@ void XMLTextExportPropertySetMapper::ContextFilter(
case CTF_HORIZONTALREL: pHoriOrientRelState = propertie; bNeedsAnchor = sal_True; break;
case CTF_HORIZONTALREL_FRAME: pHoriOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
case CTF_HORIZONTALMIRROR: pHoriOrientMirrorState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_RELWIDTHREL: pRelWidthRel = propertie; break;
case CTF_VERTICALPOS: pVertOrientState = propertie; bNeedsAnchor = sal_True; break;
case CTF_VERTICALPOS_ATCHAR: pVertOrientAtCharState = propertie; bNeedsAnchor = sal_True; break;
case CTF_VERTICALREL: pVertOrientRelState = propertie; bNeedsAnchor = sal_True; break;
case CTF_VERTICALREL_PAGE: pVertOrientRelPageState = propertie; bNeedsAnchor = sal_True; break;
case CTF_VERTICALREL_FRAME: pVertOrientRelFrameState = propertie; bNeedsAnchor = sal_True; break;
case CTF_VERTICALREL_ASCHAR: pVertOrientRelAsCharState = propertie; bNeedsAnchor = sal_True; break;
+ case CTF_RELHEIGHTREL: pRelHeightRel = propertie; break;
// Handle new CTFs for shape positioning properties (#i28749#)
case CTF_SHAPE_HORIZONTALPOS: pShapeHoriOrientState = propertie; bNeedsAnchor = sal_True; break;
@@ -975,6 +979,13 @@ void XMLTextExportPropertySetMapper::ContextFilter(
pHoriOrientRelState->mnIndex = -1;
if( pHoriOrientRelFrameState && TextContentAnchorType_AT_FRAME != eAnchor )
pHoriOrientRelFrameState->mnIndex = -1;
+ if (pRelWidthRel)
+ {
+ sal_Int16 nRelWidth = 0;
+ rPropSet->getPropertyValue("RelativeWidth") >>= nRelWidth;
+ if (!nRelWidth)
+ pRelWidthRel->mnIndex = -1;
+ }
if( pVertOrientState && TextContentAnchorType_AT_CHARACTER == eAnchor )
pVertOrientState->mnIndex = -1;
@@ -989,6 +1000,13 @@ void XMLTextExportPropertySetMapper::ContextFilter(
pVertOrientRelFrameState->mnIndex = -1;
if( pVertOrientRelAsCharState && TextContentAnchorType_AS_CHARACTER != eAnchor )
pVertOrientRelAsCharState->mnIndex = -1;
+ if (pRelHeightRel)
+ {
+ sal_Int16 nRelHeight = 0;
+ rPropSet->getPropertyValue("RelativeHeight") >>= nRelHeight;
+ if (!nRelHeight)
+ pRelHeightRel->mnIndex = -1;
+ }
}
// States for shape positioning properties (#i28749#)