diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-12-17 21:13:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2018-12-18 09:08:16 +0100 |
commit | dafbc86037d63e938967c0f501bdfe3ae19fa992 (patch) | |
tree | 120a5bf1763e4aa0aac0bb9d15f48663ac71f19f /oox | |
parent | 7a46f18d30285c7632eac70bedcb9f339c3aaa9c (diff) |
tdf#121804 DOCX import: handle sub/superscript inside group shapes
Regression from commit d5c934d150cb6cea5f96cbbee4fb5e8312bf027e
(n#792778 DOCX import: parse group shapes in oox only, 2012-12-14),
where where manual wordprocessingML -> drawingML translation did not
handle this character property.
Change-Id: I87481bc9c26651fd15dd39a58a92f467e8311256
Reviewed-on: https://gerrit.libreoffice.org/65289
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textcharacterpropertiescontext.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 2b63f9f5237b..236219d844cf 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -205,6 +205,17 @@ ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl mrTextCharacterProperties.moCaseMap = XML_none; } break; + case W_TOKEN(vertAlign): + { + // Map wordprocessingML <w:vertAlign w:val="..."/> to drawingML + // <a:rPr baseline="...">. + sal_Int32 nVal = rAttribs.getToken(W_TOKEN(val), 0); + if (nVal == XML_superscript) + mrTextCharacterProperties.moBaseline = 30000; + else if (nVal == XML_subscript) + mrTextCharacterProperties.moBaseline = -25000; + break; + } case OOX_TOKEN(w14, glow): case OOX_TOKEN(w14, shadow): case OOX_TOKEN(w14, reflection): |