diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-12-17 21:13:00 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-12-19 15:32:27 +0100 |
commit | 248ecee4ea28a3873cdd0ef0c1ef501537be961d (patch) | |
tree | 3aeb921a9ae6c1fca7c2c9ea7d4fe8b5cff04fcb /oox | |
parent | 88d24094200b032cde6eb16b6415b004781e937b (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>
(cherry picked from commit dafbc86037d63e938967c0f501bdfe3ae19fa992)
Reviewed-on: https://gerrit.libreoffice.org/65413
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@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): |