From 3b02908486c52a815b65efe93f41cbc53d5452c3 Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Mon, 14 Dec 2015 14:22:20 +0100 Subject: tdf#89999: Fix ODF export of sub|superscript text it needs special treatment due to 1 attribute but 2 different MIDs, much like under|overline (fcf5b5c081ded93b) and fonts (48eccfb812284f4) Change-Id: Ib336e8d4de0c3833103d8d13b64971f7c15c725c Reviewed-on: https://gerrit.libreoffice.org/20702 Reviewed-by: Eike Rathke Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens --- sc/source/filter/xml/xmlexprt.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index c000b1dd0056..3822f7659cf0 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1181,10 +1181,22 @@ const SvxFieldData* toXMLPropertyStates( break; case EE_CHAR_ESCAPEMENT: { - if (!static_cast(p)->QueryValue(aAny, pEntry->mnFlag)) - continue; + sal_Int32 nIndexEsc = xMapper->FindEntryIndex("CharEscapement", XML_NAMESPACE_STYLE, "text-position"); + if (nIndexEsc == -1 || nIndexEsc > nEntryCount) + break; + + sal_Int32 nIndexEscHeight = xMapper->FindEntryIndex("CharEscapementHeight", XML_NAMESPACE_STYLE, "text-position"); + if (nIndexEscHeight == -1 || nIndexEscHeight > nEntryCount) + break; + + const SvxEscapementItem* pEsc = static_cast(p); + + pEsc->QueryValue(aAny, MID_ESC); + rPropStates.push_back(XMLPropertyState(nIndexEsc, aAny)); + + pEsc->QueryValue(aAny, MID_ESC_HEIGHT); + rPropStates.push_back(XMLPropertyState(nIndexEscHeight, aAny)); - rPropStates.push_back(XMLPropertyState(nIndex, aAny)); } break; case EE_CHAR_EMPHASISMARK: -- cgit