diff options
-rw-r--r-- | include/xmloff/xmltoken.hxx | 2 | ||||
-rw-r--r-- | schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng | 2 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/data/page-content-top.odt | bin | 0 -> 8561 bytes | |||
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/token/tokens.txt | 1 |
8 files changed, 24 insertions, 0 deletions
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 1b7a932f9399..99b94be7e2cc 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -3368,6 +3368,8 @@ namespace xmloff::token { XML_RESOLVED, + XML_PAGE_CONTENT_TOP, + XML_PAGE_CONTENT_BOTTOM, XML_TOKEN_END diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng index 9167044ca87e..0c0b41ef4ca9 100644 --- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng +++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng @@ -2291,11 +2291,13 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. </rng:optional> </rng:define> + <!-- TODO: no proposal for loext:vertical-rel="page-content-top" --> <!-- https://issues.oasis-open.org/browse/OFFICE-4073 --> <rng:define name="common-vertical-rel-attlist" combine="interleave"> <rng:optional> <rng:attribute name="loext:vertical-rel"> <rng:choice> + <rng:value>page-content-top</rng:value> <rng:value>page-content-bottom</rng:value> </rng:choice> </rng:attribute> diff --git a/sw/qa/extras/odfexport/data/page-content-top.odt b/sw/qa/extras/odfexport/data/page-content-top.odt Binary files differnew file mode 100644 index 000000000000..755d50242e4e --- /dev/null +++ b/sw/qa/extras/odfexport/data/page-content-top.odt diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 6c1f2d6ccff8..8767b76110bb 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2624,6 +2624,15 @@ DECLARE_ODFEXPORT_TEST(testRovasNumbering, "rovas-numbering.odt") aMap["NumberingType"].get<sal_uInt16>()); } +DECLARE_ODFEXPORT_TEST(testPageContentTop, "page-content-top.odt") +{ + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY); + sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_TOP; + CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation")); +} + DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt") { CPPUNIT_ASSERT_EQUAL(1, getShapes()); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index d78de79842aa..23186f625a75 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3365,6 +3365,8 @@ namespace xmloff::token { // For recording whether comments/annotations are resolved TOKEN( "resolved", XML_RESOLVED ), + TOKEN( "page-content-top", XML_PAGE_CONTENT_TOP ), + TOKEN( "page-content-bottom", XML_PAGE_CONTENT_BOTTOM ), #if OSL_DEBUG_LEVEL > 0 diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index b65669aed3c3..893e0fb36ee4 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -1080,6 +1080,12 @@ void SvXMLExportPropertyMapper::_exportXML( XML_NAMESPACE_LO_EXT, mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex)); } + if (IsXMLToken(aValue, XML_PAGE_CONTENT_TOP)) + { + sName = rNamespaceMap.GetQNameByKey( + XML_NAMESPACE_LO_EXT, + mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex)); + } } rAttrList.AddAttribute( sName, aValue ); diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index d430c09a8878..77dbcb1bdd27 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -153,6 +153,7 @@ SvXMLEnumMapEntry<sal_uInt16> const pXML_VertRel_Enum[] = // DVO, OD 17.09.2003 #i18732# - allow vertical alignment at page { XML_PAGE, RelOrientation::PAGE_FRAME }, { XML_PAGE_CONTENT, RelOrientation::PAGE_PRINT_AREA }, + { XML_PAGE_CONTENT_TOP, RelOrientation::PAGE_PRINT_AREA_TOP }, { XML_PAGE_CONTENT_BOTTOM, RelOrientation::PAGE_PRINT_AREA_BOTTOM }, { XML_FRAME, RelOrientation::FRAME }, // import only { XML_FRAME_CONTENT, RelOrientation::PRINT_AREA }, // import only @@ -167,6 +168,7 @@ SvXMLEnumMapEntry<sal_uInt16> const pXML_VertRelPage_Enum[] = { XML_PAGE_CONTENT, RelOrientation::PRINT_AREA }, { XML_PAGE, RelOrientation::PAGE_FRAME }, { XML_PAGE_CONTENT, RelOrientation::PAGE_PRINT_AREA }, + { XML_PAGE_CONTENT_TOP, RelOrientation::PAGE_PRINT_AREA_TOP }, { XML_PAGE_CONTENT_BOTTOM, RelOrientation::PAGE_PRINT_AREA_BOTTOM }, { XML_TOKEN_INVALID, 0 } }; diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index 762879a26c27..a0019db4bf85 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -3124,5 +3124,6 @@ newline creator-initials transliteration-spellout resolved +page-content-top page-content-bottom TOKEN_END_DUMMY |