include/xmloff/xmltoken.hxx | 1 + schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng | 6 ++++++ sw/qa/extras/odfexport/data/allow-overlap.odt |binary sw/qa/extras/odfexport/odfexport.cxx | 11 +++++++++++ xmloff/source/core/xmltoken.cxx | 1 + xmloff/source/text/txtprmap.cxx | 2 ++ xmloff/source/token/tokens.txt | 1 + 7 files changed, 22 insertions(+)
New commits: commit a5698f1a0fb8bf8775f1a098ae9ee09de968d632 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Sep 24 17:04:21 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Sep 24 18:45:40 2019 +0200 Related: tdf#124600 sw anchored object allow overlap: add ODT filter Expose the AllowOverlap shape property as <style:graphic-properties loext:allow-overlap="..."/>. Change-Id: I6b6e08c67224ac7d4fb87046ea8accf94cdb583f Reviewed-on: https://gerrit.libreoffice.org/79462 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 098dc30fecad..3276d0b8b9c2 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -2494,6 +2494,7 @@ namespace xmloff { namespace token { // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) XML_ONCE_SUCCESSIVE, XML_ONCE_CONCURRENT, + XML_ALLOW_OVERLAP, // Names for OOo format only XML_N_OFFICE_OOO, diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng index a8b2b55ef20f..089152aaf23b 100644 --- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng +++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng @@ -914,6 +914,12 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. <rng:ref name="nonNegativeInteger"/> </rng:attribute> </rng:optional> + <!-- TODO no proposal --> + <rng:optional> + <rng:attribute name="loext:allow-overlap"> + <rng:ref name="boolean"/> + </rng:attribute> + </rng:optional> </rng:interleave> </rng:define> diff --git a/sw/qa/extras/odfexport/data/allow-overlap.odt b/sw/qa/extras/odfexport/data/allow-overlap.odt new file mode 100644 index 000000000000..b23f5b360b85 Binary files /dev/null and b/sw/qa/extras/odfexport/data/allow-overlap.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 3d4d0e245451..93f38ca440c1 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2093,6 +2093,17 @@ DECLARE_ODFEXPORT_TEST(testRubyPosition, "ruby-position.odt") } } +DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt") +{ + uno::Reference<drawing::XShape> xShape = getShape(1); + // Without the accompanying fix in place, this test would have failed with: + // - Expression: !getProperty<bool>(xShape, "AllowOverlap") + // i.e. the custom AllowOverlap=false shape property was lost on import/export. + CPPUNIT_ASSERT(!getProperty<bool>(xShape, "AllowOverlap")); + xShape = getShape(2); + CPPUNIT_ASSERT(!getProperty<bool>(xShape, "AllowOverlap")); +} + DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, "signatureline-properties.fodt") { uno::Reference<drawing::XShape> xShape = getShape(1); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 5ce4b8d8f1a5..1063b9ee7791 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -2494,6 +2494,7 @@ namespace xmloff { namespace token { // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) TOKEN( "once-successive", XML_ONCE_SUCCESSIVE ), TOKEN( "once-concurrent", XML_ONCE_CONCURRENT ), + TOKEN( "allow-overlap", XML_ALLOW_OVERLAP ), // Names for OOo format only TOKEN( "http://openoffice.org/2000/office", XML_N_OFFICE_OOO ), diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index 2cd5005dfc64..0136cfee7fce 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -856,6 +856,7 @@ XMLPropertyMapEntry const aXMLFramePropMap[] = MG_E( "IsFollowingTextFlow", STYLE, FLOW_WITH_TEXT, XML_TYPE_BOOL, 0 ), // #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS MG_E( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ), + MAP_EXT("AllowOverlap", XML_NAMESPACE_LO_EXT, XML_ALLOW_OVERLAP, XML_TYPE_BOOL|XML_TYPE_PROP_GRAPHIC, 0), // special entries for floating frames MG_E( "", DRAW, FRAME_DISPLAY_SCROLLBAR, XML_TYPE_BOOL|MID_FLAG_NO_PROPERTY|MID_FLAG_MULTI_PROPERTY, CTF_FRAME_DISPLAY_SCROLLBAR ), @@ -907,6 +908,7 @@ XMLPropertyMapEntry const aXMLShapePropMap[] = MG_E( "HoriOrientRelation", STYLE, HORIZONTAL_REL, XML_TYPE_TEXT_HORIZONTAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_HORIZONTALREL_FRAME ), // RES_WRAP_INFLUENCE_ON_OBJPOS (#i28701#) MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ), + MAP_EXT("AllowOverlap", XML_NAMESPACE_LO_EXT, XML_ALLOW_OVERLAP, XML_TYPE_BOOL|XML_TYPE_PROP_GRAPHIC, 0), // UserDefinedAttributes is already contained in the map this one is // chained to. diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt index dbd6f59945b9..5bce19e510af 100644 --- a/xmloff/source/token/tokens.txt +++ b/xmloff/source/token/tokens.txt @@ -2356,6 +2356,7 @@ shrink-to-fit wrap-influence-on-position once-successive once-concurrent +allow-overlap N_OFFICE_OOO_DUMMY N_META_OOO_DUMMY N_STYLE_OOO_DUMMY _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits