Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B33E99275 for ; Sat, 29 Oct 2011 19:04:30 +0000 (UTC) Received: (qmail 61797 invoked by uid 500); 29 Oct 2011 19:04:30 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 61763 invoked by uid 500); 29 Oct 2011 19:04:30 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 61756 invoked by uid 99); 29 Oct 2011 19:04:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Oct 2011 19:04:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Oct 2011 19:04:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5804D2388978; Sat, 29 Oct 2011 19:04:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1194975 - in /incubator/ooo/trunk/main/sw/source/filter/ww8: ww8par2.cxx ww8par6.cxx ww8scan.cxx ww8scan.hxx Date: Sat, 29 Oct 2011 19:04:05 -0000 To: ooo-commits@incubator.apache.org From: pfg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111029190405.5804D2388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pfg Date: Sat Oct 29 19:04:04 2011 New Revision: 1194975 URL: http://svn.apache.org/viewvc?rev=1194975&view=rev Log: i92341 - WW8: CTL/Thai font convert incorrectly when import from MS Office 2003. Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par2.cxx incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.cxx incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.hxx Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par2.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par2.cxx?rev=1194975&r1=1194974&r2=1194975&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par2.cxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par2.cxx Sat Oct 29 19:04:04 2011 @@ -3934,28 +3934,17 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW 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]); Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx?rev=1194975&r1=1194974&r2=1194975&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx Sat Oct 29 19:04:04 2011 @@ -3675,18 +3675,18 @@ void SwWW8ImplReader::Read_FontCode( sal { // (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 *GetWW8SprmDispat {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" Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.cxx?rev=1194975&r1=1194974&r2=1194975&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.cxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.cxx Sat Oct 29 19:04:04 2011 @@ -5988,7 +5988,7 @@ rtl_TextEncoding WW8Fib::GetFIBCharset(s 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, WW 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. Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.hxx?rev=1194975&r1=1194974&r2=1194975&view=diff ============================================================================== --- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.hxx (original) +++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8scan.hxx Sat Oct 29 19:04:04 2011 @@ -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&);