From 0b20f01a8817867d7657ed2ee29321de9af15843 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 30 Jan 2014 10:25:16 +0100 Subject: [PATCH] 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 --- include/xmloff/txtprmap.hxx | 2 ++ include/xmloff/xmltoken.hxx | 2 ++ sw/qa/extras/odfexport/data/relh-page.odt | Bin 0 -> 10183 bytes sw/qa/extras/odfexport/data/relw-page.odt | Bin 0 -> 10221 bytes sw/qa/extras/odfexport/odfexport.cxx | 19 +++++++++++++++++++ xmloff/source/core/xmltoken.cxx | 2 ++ xmloff/source/text/txtexppr.cxx | 18 ++++++++++++++++++ xmloff/source/text/txtprmap.cxx | 2 ++ 8 files changed, 45 insertions(+) create mode 100644 sw/qa/extras/odfexport/data/relh-page.odt create mode 100644 sw/qa/extras/odfexport/data/relw-page.odt diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx index 0eebd9bca1df..dc8de7026395 100644 --- a/include/xmloff/txtprmap.hxx +++ b/include/xmloff/txtprmap.hxx @@ -194,6 +194,8 @@ #define CTF_CHARRIGHTBORDER (XML_TEXT_CTF_START + 165) #define CTF_CHARTOPBORDER (XML_TEXT_CTF_START + 166) #define CTF_CHARBOTTOMBORDER (XML_TEXT_CTF_START + 167) +#define CTF_RELWIDTHREL (XML_TEXT_CTF_START + 168) +#define CTF_RELHEIGHTREL (XML_TEXT_CTF_START + 169) #define TEXT_PROP_MAP_TEXT 0 diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index f804744e09ce..16ddf69ec475 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -1495,7 +1495,9 @@ namespace xmloff { namespace token { XML_REJECTION, XML_REL_COLUMN_WIDTH, XML_REL_HEIGHT, + XML_REL_HEIGHT_REL, XML_REL_WIDTH, + XML_REL_WIDTH_REL, XML_RELATIVE, XML_RELATIVE_TAB_STOP_POSITION, XML_RELN, diff --git a/sw/qa/extras/odfexport/data/relh-page.odt b/sw/qa/extras/odfexport/data/relh-page.odt new file mode 100644 index 0000000000000000000000000000000000000000..2dcf6412431df583b81be8a55250410a36aeeb80 GIT binary patch literal 10183 zcmeHtWmH_r)^_7QXmEFTcY;HJ4({GSdsuVs-^*9fEnJER5tC*Cw;>0NKeycGB2X}q{kvG1}yr# z3NY}7LL#cFLqdzRt8_e-hoaqP^Z7Aj8%9W}n*HT7e8d0c@sra(@GWZZm|dbx1-^nWS+vbh1QI{tDD@t zy#@8jsAT@aNsM#^4TFnY)-Q9$j)+8AXsTowoP1>^T?GRrQ-+?p? z-%X*>8LPkJ^K_3q#qdF@|H)eWA1%!Pd-%WK#Q$HmY6X04-Fu@07;C)aBY>i;s?6Jm zrqBPyb;!ubzZ2*Eo$rEnSFmt$gxs^@69@Zh-C4(Fek|WT9c0uQ0sR)*xld8ek|gkK zu>jcwSYLw?96D^}7tD$ar(2#1N_ZfHXkfnIez04J+p1C@X2ux;T8)fCUq48YD5^66 z%B5!Wnys^SA$`R6-0P$hPECV2LAGOAMM^2y+?e?sU9u61#$psg@|ayPQIlQC5UU<| z@LVUyz6xL5+suCYLE&%q1MFT1vmGn^q>kDJaHZLj zaRuw-O-DF+#U~zpKckR(^-1b*kH$G00TP!u*@TOywxT>8~e{trjvyo>zQ@^8|}bwgEH}{!LVt1@THhhp*7HL$BrS| zRzs|#?B|>o2VxK44%b#?gFgt45l;00sdr)tUW znw&)5hO%u{_RnVVj4+uEb~&@B&4svWDlk&o;2E=t?(AMrhF_QOK-~6e#pVxefL-cC z6ZPItE?LI7b7JHL0k+EX)uzO6lSKm3D7anGm_8!_!!4fU;PBLYmsfsfLprTpZAPa+ z$XDDCS0)mTXJdB>K}ZXN8Q7Q0&fG3X_wRU+)S4P>@R$&?ZNmnQ!+8UHB)3}tHG{nF zcX~BiooO9e8}EnvoS<%-l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{t`tPJawe+6{d8cnbjg98-EWc{&KlA*#H>SVg z`Kh)4%<|{nB>#rxSMB|0o|wfH|QKc?+hA-PlIpN4Y(AG8?)M!bzM0suI- Ne-5|$V@`Wl`#;OU`6U1V literal 0 HcmV?d00001 diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 5ef7ca408499..333f00d802de 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -13,6 +13,7 @@ #include #include #include +#include class Test : public SwModelTestBase { @@ -310,6 +311,24 @@ DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, "textframe-transparent-sh CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty(xPicture, "ShadowTransparence")); } +DECLARE_ODFEXPORT_TEST(testRelhPage, "relh-page.odt") +{ + uno::Reference xTextFrame = getShape(1); + // This was text::RelOrientation::FRAME (the default), RelativeHeightRelation was not handled in xmloff. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xTextFrame, "RelativeHeightRelation")); + // Make sure rel-height-rel doesn't affect width. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xTextFrame, "RelativeWidthRelation")); +} + +DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt") +{ + uno::Reference xTextFrame = getShape(1); + // This was text::RelOrientation::FRAME (the default), RelativeWidthRelation was not handled in xmloff. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty(xTextFrame, "RelativeWidthRelation")); + // Make sure rel-width-rel doesn't affect height. + CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty(xTextFrame, "RelativeHeightRelation")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 27fb252fb860..8ff43ec827d4 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1500,7 +1500,9 @@ namespace xmloff { namespace token { TOKEN( "rejection", XML_REJECTION ), TOKEN( "rel-column-width", XML_REL_COLUMN_WIDTH ), TOKEN( "rel-height", XML_REL_HEIGHT ), + TOKEN( "rel-height-rel", XML_REL_HEIGHT_REL ), TOKEN( "rel-width", XML_REL_WIDTH ), + TOKEN( "rel-width-rel", XML_REL_WIDTH_REL ), TOKEN( "relative", XML_RELATIVE ), TOKEN( "relative-tab-stop-position", XML_RELATIVE_TAB_STOP_POSITION ), TOKEN( "reln", XML_RELN ), 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#) diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 2eacad24214d..a1f9898f2f91 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -784,6 +784,8 @@ XMLPropertyMapEntry aXMLFramePropMap[] = MG_E( "", DRAW, VISIBLE_AREA_HEIGHT, XML_TYPE_MEASURE|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_VIS_AREA_HEIGHT ), MG_E( "", DRAW, DRAW_ASPECT, XML_TYPE_TEXT_DRAW_ASPECT|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_OLE_DRAW_ASPECT ), MG_E( "UserDefinedAttributes", TEXT, XMLNS, XML_TYPE_ATTRIBUTE_CONTAINER | MID_FLAG_SPECIAL_ITEM, 0 ), + MAP_EXT("RelativeWidthRelation", XML_NAMESPACE_LO_EXT, XML_REL_WIDTH_REL, XML_TYPE_TEXT_HORIZONTAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELWIDTHREL), + MAP_EXT("RelativeHeightRelation", XML_NAMESPACE_LO_EXT, XML_REL_HEIGHT_REL, XML_TYPE_TEXT_VERTICAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_RELHEIGHTREL), M_END() };