From dafbc86037d63e938967c0f501bdfe3ae19fa992 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 17 Dec 2018 21:13:00 +0100 Subject: 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 --- oox/source/drawingml/textcharacterpropertiescontext.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'oox') 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 to drawingML + // . + 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): -- cgit