diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2018-12-17 21:13:00 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-01-17 14:58:25 +0100 |
commit | 4811e562c20cc13194035271ccaa58bdfc358d26 (patch) | |
tree | 0c260b6a7fdda2d6adae9864ce56286fe5fe5ed1 | |
parent | 1822bb92ca3e48f2397e80cf06327944557d13cb (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.
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/65414
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit ba7435e5914a713730265c3378ce616de543667f)
Change-Id: I87481bc9c26651fd15dd39a58a92f467e8311256
-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 8ab160755531..8c3ec28eefa3 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -203,6 +203,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): |