diff options
| author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-15 20:32:05 -0400 |
|---|---|---|
| committer | Fridrich Strba <fridrich@documentfoundation.org> | 2014-05-16 15:20:27 +0000 |
| commit | 181084cb110fefb13200d8a645bca9857964f378 (patch) | |
| tree | 9c18cd100e7c350afb59d2f168361a0820046fe1 | |
| parent | 5b76a0057a25966f48caed78bcff21b72fdbdda2 (diff) | |
fdo#77537: Exporting font names in edit text needs special handling.
Change-Id: Ia9c29d37eaf962e0245920e50f534dd779af72dc
(cherry picked from commit 48eccfb812284f43ba24c3be3903537ce954944d)
Reviewed-on: https://gerrit.libreoffice.org/9366
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
| -rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 0f157a1c6a00..f7c67877080a 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1109,10 +1109,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: |
