diff options
author | Eike Rathke <erack@redhat.com> | 2016-10-17 21:01:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-10-17 21:09:54 +0200 |
commit | c3f096c7630994450625307091a0e6009fb02bc4 (patch) | |
tree | a071d96ee8333109e5fcb65768ebd1d3fcda3c23 /sc/source | |
parent | 50f08e87346f684666fce484f5b80f0189172366 (diff) |
Resolves: tdf#102357 export correct locale attribution, not just country
So all XMLPropertyHandler derived XMLCharLanguageHdl, XMLCharScriptHdl,
XMLCharCountryHdl and XMLCharRfcLanguageTagHdl are actually called.
Broken since
commit 21661ebfbec9ea162582bbc7ab46607eb9095f1a
Date: Wed Aug 21 19:16:23 2013 -0400
fdo#60740: Populate auto styles from edit cells without using UNO API.
Change-Id: If0523752a4dea4e18d3d86ca5a2735fbcf39c3e3
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index c9aeb29fa3dc..bfd1efdee41a 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1218,7 +1218,34 @@ const SvxFieldData* toXMLPropertyStates( if (!static_cast<const SvxLanguageItem*>(p)->QueryValue(aAny, pEntry->mnFlag)) continue; - rPropStates.push_back(XMLPropertyState(nIndex, aAny)); + // Export multiple entries. + sal_Int32 nIndexLanguage, nIndexCountry, nIndexScript, nIndexTag; + switch (p->Which()) + { + case EE_CHAR_LANGUAGE: + nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_FO, "language", 0); + nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_FO, "country", 0); + nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_FO, "script", 0); + nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "rfc-language-tag", 0); + break; + case EE_CHAR_LANGUAGE_CJK: + nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "language-asian", 0); + nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "country-asian", 0); + nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "script-asian", 0); + nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "rfc-language-tag-asian", 0); + break; + case EE_CHAR_LANGUAGE_CTL: + nIndexLanguage = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "language-complex", 0); + nIndexCountry = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "country-complex", 0); + nIndexScript = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "script-complex", 0); + nIndexTag = xMapper->GetEntryIndex( XML_NAMESPACE_STYLE, "rfc-language-tag-complex", 0); + break; + } + assert( nIndexLanguage >= 0 && nIndexCountry >= 0 && nIndexScript >= 0 && nIndexTag >= 0); + rPropStates.push_back( XMLPropertyState( nIndexLanguage, aAny)); + rPropStates.push_back( XMLPropertyState( nIndexCountry, aAny)); + rPropStates.push_back( XMLPropertyState( nIndexScript, aAny)); + rPropStates.push_back( XMLPropertyState( nIndexTag, aAny)); } break; default: |