Bugzilla – Attachment 42916 Details for
Bug 33044
WW8: CTL/Thai font convert incorrectly when import from MS Office 2003
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for default ctl font with angsana new
default.ctl.patch (text/plain), 5.81 KB, created by
Tantai
on 2011-02-04 00:34:17 UTC
(
hide
)
Description:
patch for default ctl font with angsana new
Filename:
MIME Type:
Creator:
Tantai
Created:
2011-02-04 00:34:17 UTC
Size:
5.81 KB
patch
obsolete
>commit 6c01edfe66d6e350b20178d9ab367806d956cb46 >Author: Caolán McNamara <caolanm@redhat.com> >Date: Thu Nov 11 13:31:33 2010 +0000 > > Resolves: #i25247#, #i25561#, #i48064#, #i92341# CTL/Other Default Font > >diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx >index 95fe188..9fa424f 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 469ded1..f93686c 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 4dee737..ccb84ca 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 350ffdb..25acb83 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&);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 33044
:
41949
| 42916