schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng | 32 ++++++------ sd/qa/unit/data/odp/shape-text-glow-effect.odp |binary sd/qa/unit/export-tests.cxx | 8 +-- xmloff/source/draw/sdpropls.cxx | 7 +- 4 files changed, 24 insertions(+), 23 deletions(-)
New commits: commit 5bb5a7ea60c4496d7ad21ad81a0f37f6f5fd2288 Author: Balazs Varga <balazs.varga.ext...@allotropia.de> AuthorDate: Mon Sep 2 15:40:29 2024 +0200 Commit: Balazs Varga <balazs.varga.ext...@allotropia.de> CommitDate: Tue Sep 3 22:52:53 2024 +0200 Related: tdf#161826 - Add uniform Glow effect for texts in shapes Using text-properties for the glow-text attributes in odf import/export instead of graphic-properties. Change-Id: I94f5a76f33a03891fa0bfed988e7e3cd0e842cc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172741 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de> diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng index 9ec0e09f5a6d..0af6bb20301e 100644 --- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng +++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng @@ -954,22 +954,6 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. <rng:ref name="length"/> </rng:attribute> </rng:optional> - <!-- TODO: no proposal for loext:glow-text* --> - <rng:optional> - <rng:attribute name="loext:glow-text-radius"> - <rng:ref name="length"/> - </rng:attribute> - </rng:optional> - <rng:optional> - <rng:attribute name="loext:glow-text-color"> - <rng:ref name="color"/> - </rng:attribute> - </rng:optional> - <rng:optional> - <rng:attribute name="loext:glow-text-transparency"> - <rng:ref name="zeroToHundredPercent"/> - </rng:attribute> - </rng:optional> </rng:interleave> </rng:define> @@ -2551,6 +2535,22 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1. <rng:ref name="zeroToHundredPercent"/> </rng:attribute> </rng:optional> + <!-- TODO: no proposal for loext:glow-text* --> + <rng:optional> + <rng:attribute name="loext:glow-text-radius"> + <rng:ref name="length"/> + </rng:attribute> + </rng:optional> + <rng:optional> + <rng:attribute name="loext:glow-text-color"> + <rng:ref name="color"/> + </rng:attribute> + </rng:optional> + <rng:optional> + <rng:attribute name="loext:glow-text-transparency"> + <rng:ref name="zeroToHundredPercent"/> + </rng:attribute> + </rng:optional> </rng:define> <rng:define name="style-text-properties-attlist" combine="interleave"> diff --git a/sd/qa/unit/data/odp/shape-text-glow-effect.odp b/sd/qa/unit/data/odp/shape-text-glow-effect.odp index 944d281cf99d..0efe19f72eba 100644 Binary files a/sd/qa/unit/data/odp/shape-text-glow-effect.odp and b/sd/qa/unit/data/odp/shape-text-glow-effect.odp differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index c5630158f0d7..ae501d2c5802 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1560,18 +1560,18 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testGlowTextInShape) // check that we actually test graphic style assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[3]"_ostr, "family"_ostr, u"graphic"_ustr); - // check loext graphic attributes for th + // check loext text attributes for text in shapes assertXPath( pXmlDoc, - "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr, + "/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr, "glow-text-radius"_ostr, u"0.706cm"_ustr); assertXPath( pXmlDoc, - "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr, + "/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr, "glow-text-color"_ostr, u"#4ea72e"_ustr); assertXPath( pXmlDoc, - "/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties"_ostr, + "/office:document-content/office:automatic-styles/style:style[3]/style:text-properties"_ostr, "glow-text-transparency"_ostr, u"5%"_ustr); } diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index b3c24a495d44..b30585b5541f 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -81,6 +81,7 @@ using namespace ::xmloff::token; #define GMAPV(name,prefix,token,type,context,version) MAPV_(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version) #define DPMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context) #define TMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context) +#define TMAPV(name,prefix,token,type,context,version) MAPV_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context,version) #define PMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context) #define MAP_END() { nullptr } @@ -175,9 +176,9 @@ const XMLPropertyMapEntry aXMLSDProperties[] = GMAPV( PROP_SoftEdgeRadius, XML_NAMESPACE_LO_EXT, XML_SOFTEDGE_RADIUS, XML_TYPE_MEASURE , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), // glow text attributes - GMAPV(PROP_GlowTextEffectRadius, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_RADIUS, XML_TYPE_MEASURE , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), - GMAPV(PROP_GlowTextEffectColor, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_COLOR, XML_TYPE_COLOR , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), - GMAPV(PROP_GlowTextEffectTransparency, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_TRANSPARENCY, XML_TYPE_PERCENT16, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), + TMAPV( PROP_GlowTextEffectRadius, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_RADIUS, XML_TYPE_MEASURE , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), + TMAPV( PROP_GlowTextEffectColor, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_COLOR, XML_TYPE_COLOR , 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), + TMAPV( PROP_GlowTextEffectTransparency, XML_NAMESPACE_LO_EXT, XML_GLOW_TEXT_TRANSPARENCY, XML_TYPE_PERCENT16, 0, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED), // graphic attributes GMAP( PROP_GraphicColorMode, XML_NAMESPACE_DRAW, XML_COLOR_MODE, XML_TYPE_COLOR_MODE, 0 ), // exists in SW, too, with same property name