diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 532c4f524164..ac98faf14201 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7760,22 +7760,15 @@ void DocxAttributeOutput::FontAlternateName( const OUString& rName ) const m_pSerializer->singleElementNS(XML_w, XML_altName, FSNS(XML_w, XML_val), rName); } -void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const +void DocxAttributeOutput::FontCharset( sal_uInt8 nCharSet ) const { - rtl::Reference pAttr = FastSerializerHelper::createAttrList(); - OString aCharSet( OString::number( nCharSet, 16 ) ); if ( aCharSet.getLength() == 1 ) aCharSet = "0" + aCharSet; - pAttr->add(FSNS(XML_w, XML_val), aCharSet); - if (GetExport().GetFilter().getVersion() != oox::core::ECMA_376_1ST_EDITION) - { - if( const char* charset = rtl_getMimeCharsetFromTextEncoding( nEncoding )) - pAttr->add( FSNS( XML_w, XML_characterSet ), charset ); - } - - m_pSerializer->singleElementNS( XML_w, XML_charset, pAttr ); + // An old change also added w:characterSet to the export conditionally, but it's only for + // strict OOXML that LO doesn't support and the condition couldn't cover, so it's removed now + m_pSerializer->singleElementNS( XML_w, XML_charset, FSNS(XML_w, XML_val), aCharSet ); } void DocxAttributeOutput::FontFamilyType( FontFamily eFamily ) const diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index fe72836b49bc..92fdc89c1f45 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -409,7 +409,7 @@ public: void FontAlternateName( const OUString& rName ) const; /// Font charset. - void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const; + void FontCharset( sal_uInt8 nCharSet ) const; /// Font family. void FontFamilyType( FontFamily eFamily ) const; diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 01040c2adeb7..c985b555ef8a 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -875,7 +875,7 @@ void wwFont::WriteDocx( DocxAttributeOutput* rAttrOutput ) const if ( mbAlt ) rAttrOutput->FontAlternateName( msAltNm ); - rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ), meChrSet ); + rAttrOutput->FontCharset( sw::ms::rtl_TextEncodingToWinCharset( meChrSet ) ); rAttrOutput->FontFamilyType( meFamily ); rAttrOutput->FontPitchType( mePitch ); rAttrOutput->EmbedFont( msFamilyNm, meFamily, mePitch );