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 <vmiklos@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Miklos Vajna 2019-09-24 17:04:21 +02:00
parent 75923e1324
commit a5698f1a0f
7 changed files with 22 additions and 0 deletions

View File

@ -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,

View File

@ -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>

Binary file not shown.

View File

@ -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);

View File

@ -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 ),

View File

@ -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.

View File

@ -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