summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-01-21 21:29:00 +0800
committerMark Hung <marklh9@gmail.com>2018-03-02 12:06:00 +0100
commit1e034575584930c5bfb57838383ac2cf151c1b92 (patch)
treea122c5a1bc4e1fa06cafdffd51751ff6fe0f7e6c /xmloff
parent584fc20be3bb6f90d17ef8a131575af9871cb1c4 (diff)
tdf#35301 xmloff: load / store loext:ruby-position.
Add a new property loext:ruby-position to ODF filter for the new attribute value "inter-character". Change-Id: I193eb93fba0e2e7861b6c8635244cac36eb29a06 Reviewed-on: https://gerrit.libreoffice.org/48328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmltoken.cxx1
-rw-r--r--xmloff/source/text/txtprhdl.cxx22
-rw-r--r--xmloff/source/text/txtprmap.cxx3
-rw-r--r--xmloff/source/token/tokens.txt1
4 files changed, 24 insertions, 3 deletions
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index e4718637eace..e28178afdda5 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -1056,6 +1056,7 @@ namespace xmloff { namespace token {
TOKEN( "institution", XML_INSTITUTION ),
TOKEN( "int", XML_INT ),
TOKEN( "intensity", XML_INTENSITY ),
+ TOKEN( "inter-character", XML_INTER_CHARACTER ),
TOKEN( "intersect", XML_INTERSECT ),
TOKEN( "interval", XML_INTERVAL ),
TOKEN( "interval-major", XML_INTERVAL_MAJOR ),
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 382c283e1a57..993b100976bd 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RubyAdjust.hpp>
+#include <com/sun/star/text/RubyPosition.hpp>
#include <com/sun/star/text/FontEmphasis.hpp>
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include <sax/tools/converter.hxx>
@@ -198,6 +199,21 @@ static SvXMLEnumMapEntry<RubyAdjust> const pXML_RubyAdjust_Enum[] =
{ XML_TOKEN_INVALID, RubyAdjust(0) }
};
+static SvXMLEnumMapEntry<sal_Int16> const pXML_RubyPosition_Enum[] =
+{
+ { XML_ABOVE, RubyPosition::ABOVE},
+ { XML_BELOW, RubyPosition::BELOW},
+ { XML_INTER_CHARACTER, RubyPosition::INTER_CHARACTER},
+ { 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 },
@@ -1256,8 +1272,10 @@ static const XMLPropertyHandler *GetPropertyHandler
pHdl = new XMLConstantsPropertyHandler( pXML_ParaVerticalAlign_Enum, XML_TOKEN_INVALID );
break;
case XML_TYPE_TEXT_RUBY_POSITION:
- pHdl = new XMLNamedBoolPropertyHdl( ::xmloff::token::XML_ABOVE,
- ::xmloff::token::XML_BELOW );
+ 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 );
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 1dac3b40ffe1..b6b90c1c538a 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -964,7 +964,8 @@ XMLPropertyMapEntry const aXMLSectionPropMap[] =
XMLPropertyMapEntry const aXMLRubyPropMap[] =
{
MR_E( "RubyAdjust", STYLE, RUBY_ALIGN, XML_TYPE_TEXT_RUBY_ADJUST, 0 ),
- MR_E( "RubyIsAbove", STYLE, RUBY_POSITION, XML_TYPE_TEXT_RUBY_POSITION, 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 ),
M_END()
};
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index cc0b35ad084c..d977e96c4016 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -974,6 +974,7 @@ inside
institution
int
intensity
+inter-character
intersect
interval
interval-major