sc/source/filter/xml/xmlexprt.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
New commits: commit 181084cb110fefb13200d8a645bca9857964f378 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Thu May 15 20:32:05 2014 -0400 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 <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 0f157a1..f7c6787 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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits