diff -urN ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par.cxx ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par.cxx --- ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par.cxx 2005-08-05 20:33:47.000000000 +0200 +++ ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par.cxx 2005-08-05 21:05:33.000000000 +0200 @@ -2456,6 +2456,33 @@ eSrcCharSet = pCollA[nCharFmt].GetCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) eSrcCharSet = pCollA[nAktColl].GetCharSet(); + if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) + { + /* + #i22206#/#i52786# + The (default) character set used for a run of text is the default + character set for the version of Word that last saved the document. + + This is a bit tentative, more might be required if the concept is correct. + When later version of word write older 6/95 documents the charset is + correctly set in the character runs involved, so its hard to reproduce + documents that require this to be sure of the process involved. + */ + const SvxLanguageItem *pLang = + (const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE); + if (pLang) + { + switch (pLang->GetLanguage()) + { + case LANGUAGE_CZECH: + eSrcCharSet = RTL_TEXTENCODING_MS_1250; + break; + default: + eSrcCharSet = RTL_TEXTENCODING_MS_1252; + break; + } + } + } } return eSrcCharSet; } diff -urN ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par2.cxx ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par2.cxx --- ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par2.cxx 2005-08-05 20:33:47.000000000 +0200 +++ ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par2.cxx 2005-08-05 21:05:33.000000000 +0200 @@ -3871,34 +3871,6 @@ pIo->nColls = cstd; } -void SetStyleCharSet(SwWW8StyInf &rStyle) -{ - /* - #i22206# - The (default) character set used for a run of text is the default - character set for the version of Word that last saved the document. - - This is a bit tentative, more might be required if the concept is correct. - When later version of word write older 6/95 documents the charset is - correctly set in the character runs involved, so its hard to reproduce - documents that require this to be sure of the process involved. - */ - const SvxLanguageItem *pLang = - sw::util::HasItem(*(rStyle.pFmt), RES_CHRATR_LANGUAGE); - if (pLang) - { - switch (pLang->GetLanguage()) - { - case LANGUAGE_CZECH: - rStyle.eLTRFontSrcCharSet = RTL_TEXTENCODING_MS_1250; - break; - default: - rStyle.eLTRFontSrcCharSet = RTL_TEXTENCODING_MS_1252; - break; - } - } -} - void WW8RStyle::Set1StyleDefaults() { if (!bCJKFontChanged) // Style no CJK Font? set the default @@ -3909,11 +3881,7 @@ //#88976# western 2nd to make western charset conversion the default if (!bFontChanged) // Style has no Font? set the default, - { pIo->SetNewFontAttr(ftcStandardChpStsh, true, RES_CHRATR_FONT); - if (pIo->bVer67) - SetStyleCharSet(pIo->pCollA[pIo->nAktColl]); - } if( !pIo->bNoAttrImport ) { diff -urN ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par6.cxx ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par6.cxx --- ooo_SRC680_m122_src.orig/sw/source/filter/ww8/ww8par6.cxx 2005-08-05 20:33:47.000000000 +0200 +++ ooo_SRC680_m122_src/sw/source/filter/ww8/ww8par6.cxx 2005-08-05 21:05:33.000000000 +0200 @@ -3525,7 +3525,15 @@ if( 77 == pF->chs ) // Mac-Font im Mac-Charset oder reCharSet = eTextCharSet; // auf ANSI-Charset uebersetzt else - reCharSet = rtl_getTextEncodingFromWindowsCharset( pF->chs ); + { + // #i52786#, for word 67 we'll assume that ANSI is basically invalid, + // might be true for (above) mac as well, but would need a mac example + // that exercises this to be sure + if (bVer67 && pF->chs == 0) + reCharSet = RTL_TEXTENCODING_DONTKNOW; + else + reCharSet = rtl_getTextEncodingFromWindowsCharset( pF->chs ); + } // pF->ff : Family BYTE b = pF->ff;