diff options
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 19 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 8 |
4 files changed, 26 insertions, 30 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 8bd86b4bbe05..cccb669e513c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3934,28 +3934,17 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI) void WW8RStyle::Set1StyleDefaults() { + // see #i25247#, #i25561#, #i48064#, #i92341# for default font if (!bCJKFontChanged) // Style no CJK Font? set the default - pIo->SetNewFontAttr(ftcStandardChpCJKStsh, true, RES_CHRATR_CJK_FONT); - - // see i25247 - const WW8_FFN* pF = pIo->pFonts->GetFont(3); - if (pF) - { - rtl_TextEncoding eEnc = WW8Fib::GetFIBCharset(pF->chs); - if ((ftcStandardChpCTLStsh == 0) && (eEnc == RTL_TEXTENCODING_MS_1255)) - ftcStandardChpCTLStsh = 3; - } - - if (ftcStandardChpCJKStsh == 0) - ftcStandardChpCJKStsh = 2; + pIo->SetNewFontAttr(ftcFE, true, RES_CHRATR_CJK_FONT); if (!bCTLFontChanged) // Style no CTL Font? set the default - pIo->SetNewFontAttr(ftcStandardChpCTLStsh, true, RES_CHRATR_CTL_FONT); + pIo->SetNewFontAttr(ftcBi, true, RES_CHRATR_CTL_FONT); //#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); + pIo->SetNewFontAttr(ftcAsci, true, RES_CHRATR_FONT); /* removed by a patch from cmc for #i52786# if (pIo->bVer67) SetStyleCharSet(pIo->pCollA[pIo->nAktColl]); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 57c04a5226cf..89c8a2bcfec7 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3675,18 +3675,18 @@ void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, sho { // (siehe sprmCSymbol) gesetzte Font ! switch( nId ) { - // case 0x4a51: //font to bias towards all else being equal ? case 113: - case 0x4a5E: + case 0x4A51: //"Other" font, override with BiDi if it exists + case 0x4A5E: //BiDi Font nId = RES_CHRATR_CTL_FONT; break; case 93: case 111: - case 0x4a4f: + case 0x4A4f: nId = RES_CHRATR_FONT; break; case 112: - case 0x4a50: + case 0x4A50: nId = RES_CHRATR_CJK_FONT; break; default: @@ -5867,8 +5867,8 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() {0x085B, 0}, //"sprmCFDiacColor" {0x085C, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFBoldBi" {0x085D, &SwWW8ImplReader::Read_BoldBiDiUsw},//"sprmCFItalicBi" - {0x4A5E, &SwWW8ImplReader::Read_FontCode}, - {0x485F, &SwWW8ImplReader::Read_Language}, // "sprmCLidBi" + {0x4A5E, &SwWW8ImplReader::Read_FontCode}, //"sprmCFtcBi" + {0x485F, &SwWW8ImplReader::Read_Language}, //"sprmCLidBi" //0x4A60, ? ? ?, //"sprmCIcoBi", {0x4A61, &SwWW8ImplReader::Read_FontSize}, //"sprmCHpsBi" {0xCA62, 0}, //"sprmCDispFldRMark" diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index da83e8617025..24f864652bb0 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -5988,7 +5988,7 @@ rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs) WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara) : rFib(rFibPara), rSt(rStream), cstd(0), cbSTDBaseInFile(0), stiMaxWhenSaved(0), istdMaxFixedWhenSaved(0), nVerBuiltInNamesWhenSaved(0), - ftcStandardChpStsh(0), ftcStandardChpCJKStsh(0), ftcStandardChpCTLStsh(0) + ftcAsci(0), ftcFE(0), ftcOther(0), ftcBi(0) { nStyleStart = rFib.fcStshf; nStyleLen = rFib.lcbStshf; @@ -6033,17 +6033,22 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara) rSt >> nVerBuiltInNamesWhenSaved; if( 14 > nRead ) break; - rSt >> ftcStandardChpStsh; + rSt >> ftcAsci; if( 16 > nRead ) break; - rSt >> ftcStandardChpCJKStsh; + rSt >> ftcFE; if ( 18 > nRead ) break; - rSt >> ftcStandardChpCTLStsh; + rSt >> ftcOther; + + ftcBi = ftcOther; + + if ( 20 > nRead ) break; + rSt >> ftcBi; // ggfs. den Rest ueberlesen - if( 18 < nRead ) - rSt.SeekRel( nRead-18 ); + if( 20 < nRead ) + rSt.SeekRel( nRead-20 ); } while( !this ); // Trick: obiger Block wird genau einmal durchlaufen // und kann vorzeitig per "break" verlassen werden. diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 369f1199a2bd..89f9449213ba 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -1463,11 +1463,13 @@ protected: sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there? sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames // ftc used by StandardChpStsh for this document - sal_uInt16 ftcStandardChpStsh; + sal_uInt16 ftcAsci; // CJK ftc used by StandardChpStsh for this document - sal_uInt16 ftcStandardChpCJKStsh; + sal_uInt16 ftcFE; + // CTL/Other ftc used by StandardChpStsh for this document + sal_uInt16 ftcOther; // CTL ftc used by StandardChpStsh for this document - sal_uInt16 ftcStandardChpCTLStsh; + sal_uInt16 ftcBi; //No copying WW8Style(const WW8Style&); |