diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-11 13:31:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-11 13:31:33 +0000 |
commit | 6c01edfe66d6e350b20178d9ab367806d956cb46 (patch) | |
tree | 8a53e097566f30163a4a0832ec5fb161e092ba28 /sw | |
parent | 22bbb0b879314e423c494db927997a070ef46771 (diff) |
Resolves: #i25247#, #i25561#, #i48064#, #i92341# CTL/Other Default Font
Diffstat (limited to 'sw')
-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 95fe188faa..9fa424f2b5 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3920,28 +3920,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 469ded1a61..f93686ca87 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3690,18 +3690,18 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen ) { // (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: @@ -5914,8 +5914,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 4dee7371b1..ccb84ca0e8 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -5995,7 +5995,7 @@ rtl_TextEncoding WW8Fib::GetFIBCharset(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; @@ -6040,17 +6040,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 350ffdb5cf..25acb83103 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -1464,11 +1464,13 @@ protected: UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there? UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames // ftc used by StandardChpStsh for this document - UINT16 ftcStandardChpStsh; + UINT16 ftcAsci; // CJK ftc used by StandardChpStsh for this document - UINT16 ftcStandardChpCJKStsh; + UINT16 ftcFE; + // CTL/Other ftc used by StandardChpStsh for this document + UINT16 ftcOther; // CTL ftc used by StandardChpStsh for this document - UINT16 ftcStandardChpCTLStsh; + UINT16 ftcBi; //No copying WW8Style(const WW8Style&); |