summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-15 20:32:05 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-15 20:34:10 -0400
commit48eccfb812284f43ba24c3be3903537ce954944d (patch)
treedcfeacba51fdacc85d0907cc4a9734d41422789f /sc
parent90f7bd61fb1c4665051f721bb7721277a79eb267 (diff)
fdo#77537: Exporting font names in edit text needs special handling.
Change-Id: Ia9c29d37eaf962e0245920e50f534dd779af72dc
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index b1f831d1f34c..737a8813b77f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1116,10 +1116,18 @@ const SvxFieldData* toXMLPropertyStates(
case EE_CHAR_FONTINFO_CJK:
case EE_CHAR_FONTINFO_CTL:
{
- if (!static_cast<const SvxFontItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
- continue;
+ // Apparently font info needs special handling.
+ const SvxFontItem* pItem = static_cast<const SvxFontItem*>(p);
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ sal_Int32 nIndexFontName = xMapper->GetEntryIndex(XML_NAMESPACE_STYLE, "font-name", 0);
+
+ if (nIndexFontName == -1 || nIndexFontName >= nEntryCount)
+ break;
+
+ if (!pItem->QueryValue(aAny, MID_FONT_FAMILY_NAME))
+ break;
+
+ rPropStates.push_back(XMLPropertyState(nIndexFontName, aAny));
}
break;
case EE_CHAR_WEIGHT: