diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 8023f3d5cc08..39ce8943fcc2 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1463,8 +1463,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
handleUnderlineType(nIntValue, rContext);
}
break;
- case NS_sprm::LN_CLid:
- break; // sprmCLid
case NS_sprm::LN_CIco:
{
sal_Int32 nColor = 0;
@@ -1604,30 +1602,6 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
break;
}
- case NS_sprm::LN_CLidBi: // sprmCLidBi language complex
- case NS_sprm::LN_CRgLid0: // sprmCRgLid0 language Western
- case NS_sprm::LN_CRgLid1: // sprmCRgLid1 language Asian
- {
- lang::Locale aLocale( LanguageTag( (LanguageType)nIntValue).getLocale());
-
- PropertyIds aPropId;
- switch (nSprmId)
- {
- case NS_sprm::LN_CRgLid0:
- aPropId = PROP_CHAR_LOCALE;
- break;
- case NS_sprm::LN_CRgLid1:
- aPropId = PROP_CHAR_LOCALE_ASIAN;
- break;
- default:
- aPropId = PROP_CHAR_LOCALE_COMPLEX;
- break;
- }
-
- rContext->Insert(aPropId, uno::makeAny( aLocale ) );
- }
- break;
-
case NS_ooxml::LN_EG_SectPrContents_type:
/* break type
0 - No break
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index f4561e7e7de9..4d0b7ddf1305 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -131,37 +131,6 @@
-
-
-
-
-
-
-
- 0x4A41
-
-
-
-
-
-
-
- rtf:sprmCLid
-
-
-
-
-
-
-
- character
-
-
-
-
-
-
-
@@ -286,37 +255,6 @@
-
-
-
-
-
-
-
- 0x485F
-
-
-
-
-
-
-
- rtf:sprmCLidBi
-
-
-
-
-
-
-
- character
-
-
-
-
-
-
-
@@ -394,36 +332,6 @@
-
-
-
-
-
-
-
- 0x4873
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0x4874
-
-
-
-
-
-
-
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 712690dfce7b..6dbe1fb27fdb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2988,17 +2988,29 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_EXPNDTW: nSprm = NS_ooxml::LN_EG_RPrBase_spacing; break;
case RTF_KERNING: nSprm = NS_ooxml::LN_EG_RPrBase_kern; break;
case RTF_CHARSCALEX: nSprm = NS_ooxml::LN_EG_RPrBase_w; break;
- case RTF_LANG: nSprm = NS_sprm::LN_CRgLid0; break;
- case RTF_LANGFE: nSprm = NS_sprm::LN_CRgLid1; break;
- case RTF_ALANG: nSprm = NS_sprm::LN_CLidBi; break;
default: break;
}
if (nSprm > 0)
{
m_aStates.top().aCharacterSprms.set(nSprm, pIntValue);
+ return 0;
+ }
+ // Trivial character attributes.
+ switch (nKeyword)
+ {
+ case RTF_LANG: nSprm = NS_ooxml::LN_CT_Language_val; break;
+ case RTF_LANGFE: nSprm = NS_ooxml::LN_CT_Language_eastAsia; break;
+ case RTF_ALANG: nSprm = NS_ooxml::LN_CT_Language_bidi; break;
+ default: break;
+ }
+ if (nSprm > 0)
+ {
+ LanguageTag aTag((LanguageType)nParam);
+ RTFValue::Pointer_t pValue(new RTFValue(aTag.getBcp47()));
+ lcl_putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm, pValue);
// Language is a character property, but we should store it at a paragraph level as well for fields.
if (nKeyword == RTF_LANG && m_bNeedPap)
- m_aStates.top().aParagraphSprms.set(nSprm, pIntValue);
+ lcl_putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm, pValue);
return 0;
}
// Trivial paragraph sprms.
@@ -3221,10 +3233,12 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aDefaultState.aCharacterSprms.set(NS_sprm::LN_CRgFtc0, pIntValue);
break;
case RTF_DEFLANG:
- m_aDefaultState.aCharacterSprms.set(NS_sprm::LN_CRgLid0, pIntValue);
- break;
case RTF_ADEFLANG:
- m_aDefaultState.aCharacterSprms.set(NS_sprm::LN_CLidBi, pIntValue);
+ {
+ LanguageTag aTag((LanguageType)nParam);
+ RTFValue::Pointer_t pValue(new RTFValue(aTag.getBcp47()));
+ lcl_putNestedAttribute(m_aStates.top().aCharacterSprms, (nKeyword == RTF_DEFLANG ? NS_ooxml::LN_EG_RPrBase_lang : NS_ooxml::LN_CT_Language_bidi), nSprm, pValue);
+ }
break;
case RTF_CHCBPAT:
{