diff options
author | Caolán McNamara <cmc@openoffice.org> | 2002-01-14 09:53:53 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2002-01-14 09:53:53 +0000 |
commit | bd541ae29939c9df57759b7d804f7f820bbc0014 (patch) | |
tree | 4581d14d447027da4f19817ce9812733c3009f50 /sw/source/filter | |
parent | 40a0e61313f0f6d9104ba1de69ef45ad54969dee (diff) |
#i2311# undocumented extra sprm for language in word2000
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 28 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 11 |
2 files changed, 27 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 29c05c071d31..f7520d67fe5b 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ww8atr.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: cmc $ $Date: 2002-01-11 17:03:43 $ + * last change: $Author: cmc $ $Date: 2002-01-14 10:53:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -908,21 +908,35 @@ static Writer& OutWW8_SwLanguage( Writer& rWrt, const SfxPoolItem& rHt ) USHORT nId = 0; SwWW8Writer& rWrtWW8 = (SwWW8Writer&)rWrt; if( rWrtWW8.bWrtWW8 ) + { switch( rHt.Which() ) { - case RES_CHRATR_LANGUAGE: nId = 0x486D; break; - case RES_CHRATR_CJK_LANGUAGE: nId = 0x486E; break; + case RES_CHRATR_LANGUAGE: + nId = 0x486D; + break; + case RES_CHRATR_CJK_LANGUAGE: + nId = 0x486E; + break; } + } else nId = 97; - if( nId ) + if (nId) { - if( rWrtWW8.bWrtWW8 ) - rWrtWW8.InsUInt16( nId ); // use sprmCRgLid0 rather than sprmCLid + if( rWrtWW8.bWrtWW8 ) // use sprmCRgLid0 rather than sprmCLid + rWrtWW8.InsUInt16( nId ); else rWrtWW8.pO->Insert( (BYTE)nId, rWrtWW8.pO->Count() ); rWrtWW8.InsUInt16( ((const SvxLanguageItem&)rHt).GetLanguage() ); + + //unknown as to why, but this seems to shadow the other paramater in + //word 2000 and without it spellchecking doesn't work + if (nId == 0x486D) + { + rWrtWW8.InsUInt16(0x4873); + rWrtWW8.InsUInt16( ((const SvxLanguageItem&)rHt).GetLanguage() ); + } } return rWrt; } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index b945c4da48b3..bb34358cf395 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ww8par6.cxx,v $ * - * $Revision: 1.54 $ + * $Revision: 1.55 $ * - * last change: $Author: cmc $ $Date: 2002-01-11 15:14:59 $ + * last change: $Author: cmc $ $Date: 2002-01-14 10:53:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3722,10 +3722,11 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen ) switch( nId ) { case 97: - case 0x486d: + case 0x486D: + case 0x4873: //Methinks, uncertain nId = RES_CHRATR_LANGUAGE; break; - case 0x486e: + case 0x486E: nId = RES_CHRATR_CJK_LANGUAGE; break; default: @@ -5297,7 +5298,7 @@ SprmReadInfo aSprmReadTab[] = { 0xC650, (FNReadRecord)0, //undocumented 0xC651, (FNReadRecord)0, //undocumented 0xF661, (FNReadRecord)0, //undocumented - 0x4873, (FNReadRecord)0, //undocumented + 0x4873, &SwWW8ImplReader::Read_Language, //"sprmCRgLid3?" // chp.rglid[0];LID: for non-Far East text (like a duplicate of 486D);word; 0x4874, (FNReadRecord)0, //undocumented 0x6463, (FNReadRecord)0, //undocumented 0x6870, (FNReadRecord)0, //undocumented |