Kaydet (Commit) c3f096c7 authored tarafından Eike Rathke's avatar Eike Rathke

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 21661ebf
    Date:   Wed Aug 21 19:16:23 2013 -0400

        fdo#60740: Populate auto styles from edit cells without using UNO API.

Change-Id: If0523752a4dea4e18d3d86ca5a2735fbcf39c3e3
üst 50f08e87
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment