summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2015-12-14 14:22:20 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2015-12-22 13:12:18 +0000
commit3b02908486c52a815b65efe93f41cbc53d5452c3 (patch)
treeb8e722d7cbe65f75a415149b2e4bbfc6de91bbcf /sc
parent6d230bc989241108bb6b7a53805efcb26aa6b0ea (diff)
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 <erack@redhat.com> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx18
1 files 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<const SvxEscapementItem*>(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<const SvxEscapementItem*>(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: