diff options
author | Mark Hung <marklh9@gmail.com> | 2018-03-09 22:41:34 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2018-03-25 06:55:27 +0200 |
commit | 1401f5fbc8427178371b2d6add11510e06e6414f (patch) | |
tree | 97eeccb1a597f406bfbc38e1a4c8770f8bc1b7d1 /xmloff | |
parent | 1fbe46cf08f525e78016feef83f4c38b79b337ba (diff) |
xmloff: export ruby-position in a more compatible way.
Export both style:ruby-position and loext:ruby-position.
The later one only allows "above" and "below", obeying
ODF standard while the former one allows "inter-character",
which is added lately. Also use ODFVER_012_EXT_COMPAT
so that loext:ruby-position isn't exported only in
extended mode.
Change-Id: I7b9208f289f8253a835b2f7751549206361274e0
Reviewed-on: https://gerrit.libreoffice.org/51007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/text/txtprmap.cxx | 6 |
2 files changed, 5 insertions, 10 deletions
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 482dd4f02aee..4ca595d30691 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -209,13 +209,6 @@ static SvXMLEnumMapEntry<sal_Int16> const pXML_RubyPosition_Enum[] = { XML_TOKEN_INVALID, 0 } }; -static SvXMLEnumMapEntry<sal_Int16> const pXML_RubyIsAbove_Enum[] = -{ - { XML_ABOVE, RubyPosition::ABOVE}, - { XML_BELOW, RubyPosition::BELOW}, - { XML_TOKEN_INVALID, 0 } -}; - static SvXMLEnumMapEntry<sal_uInt16> const pXML_FontRelief_Enum[] = { { XML_NONE, FontRelief::NONE }, @@ -1309,7 +1302,7 @@ static const XMLPropertyHandler *GetPropertyHandler pHdl = new XMLConstantsPropertyHandler( pXML_RubyPosition_Enum, XML_TOKEN_INVALID ); break; case XML_TYPE_TEXT_RUBY_IS_ABOVE: - pHdl = new XMLConstantsPropertyHandler( pXML_RubyIsAbove_Enum, XML_TOKEN_INVALID ); + pHdl = new XMLNamedBoolPropertyHdl(::xmloff::token::XML_ABOVE, ::xmloff::token::XML_BELOW); break; // OD 2004-05-05 #i28701# case XML_TYPE_WRAP_INFLUENCE_ON_POSITION: diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index ae484f236f5b..99693da63e21 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -65,6 +65,8 @@ using namespace ::xmloff::token; // ruby properties #define MR_E( a, p, l, t, c ) \ M_E_( a, p, l, (t|XML_TYPE_PROP_RUBY), c ) +#define MR_EV( a, p, l, t, c, v ) \ + M_EV_( a, p, l, (t|XML_TYPE_PROP_RUBY), c, v ) // cell properties #define MC_E( a, p, l, t, c ) \ @@ -964,8 +966,8 @@ XMLPropertyMapEntry const aXMLSectionPropMap[] = XMLPropertyMapEntry const aXMLRubyPropMap[] = { MR_E( "RubyAdjust", STYLE, RUBY_ALIGN, XML_TYPE_TEXT_RUBY_ADJUST, 0 ), - MR_E( "RubyPosition", STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_IS_ABOVE, 0 ), - MR_E( "RubyPosition", LO_EXT, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION | MID_FLAG_MERGE_PROPERTY, 0 ), + MR_E( "RubyIsAbove", STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_IS_ABOVE, 0 ), + MR_EV( "RubyPosition", LO_EXT, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT), M_END() }; |