#100793# Word 95 has an extra sprm over ww97 that has no asian equivalent

This commit is contained in:
Caolán McNamara 2002-06-27 10:07:41 +00:00
parent cf78452bd2
commit 6d5ff0fe80
5 changed files with 39 additions and 16 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: wrtw8esh.cxx,v $
*
* $Revision: 1.35 $
* $Revision: 1.36 $
*
* last change: $Author: cmc $ $Date: 2002-06-13 14:19:04 $
* last change: $Author: cmc $ $Date: 2002-06-27 11:07:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -824,7 +824,7 @@ void WW8_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
nWhich != nSlotId &&
0 != ( pOut = aWW8AttrFnTab[ nWhich - RES_CHRATR_BEGIN ] ) )
{
if (SwWW8Writer::CollapseScriptsforWordOk(nScript,nWhich))
if (rWrt.CollapseScriptsforWordOk(nScript,nWhich))
{
// use always the SW-Which Id !
SfxPoolItem* pI = rHt.pAttr->Clone();
@ -926,7 +926,7 @@ void WW8_SdrAttrIter::OutParaAttr( BOOL bCharAttr )
// use always the SW-Which Id !
SfxPoolItem* pI = pItem->Clone();
pI->SetWhich( nWhich );
if (SwWW8Writer::CollapseScriptsforWordOk(nScript,nWhich))
if (rWrt.CollapseScriptsforWordOk(nScript,nWhich))
(*pOut)( rWrt, *pI );
delete pI;
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: wrtw8nds.cxx,v $
*
* $Revision: 1.28 $
* $Revision: 1.29 $
*
* last change: $Author: cmc $ $Date: 2002-06-25 09:43:11 $
* last change: $Author: cmc $ $Date: 2002-06-27 11:07:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -458,7 +458,7 @@ void WW8_SwAttrIter::OutAttr( xub_StrLen nSwPos )
if( pEnd ? ( nSwPos >= *pHt->GetStart() && nSwPos < *pEnd )
: nSwPos == *pHt->GetStart() )
{
if (SwWW8Writer::CollapseScriptsforWordOk(nScript,
if (rWrt.CollapseScriptsforWordOk(nScript,
pHt->GetAttr().Which()))
{
Out(aWW8AttrFnTab, pHt->GetAttr(), rWrt);

View file

@ -2,9 +2,9 @@
*
* $RCSfile: wrtw8sty.cxx,v $
*
* $Revision: 1.15 $
* $Revision: 1.16 $
*
* last change: $Author: cmc $ $Date: 2002-06-11 12:42:49 $
* last change: $Author: cmc $ $Date: 2002-06-27 11:07:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -72,6 +72,10 @@
#include <functional>
#endif
#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
#endif
#define _SVSTDARR_STRINGSSORTDTOR
#ifndef _HINTIDS_HXX
@ -479,8 +483,19 @@ void WW8WrtStyle::Set1StyleDefaults( const SwFmt& rFmt, BOOL bPap )
const BOOL* pFlags = aFlags + ( nStt - RES_CHRATR_BEGIN );
for( n = nStt; n < nEnd; ++n, ++pFlags )
{
if( *pFlags && SFX_ITEM_SET != rFmt.GetItemState( n, FALSE ))
Out( aWW8AttrFnTab, rFmt.GetAttr( n, TRUE ), rWrt );
{
//If we are a character property then see if it is one of the
//western/asian ones that must be collapsed together for export to
//word. If so default to the western varient.
if ( !bPap && rWrt.CollapseScriptsforWordOk(
::com::sun::star::i18n::ScriptType::LATIN, n) )
{
Out(aWW8AttrFnTab, rFmt.GetAttr(n, TRUE), rWrt);
}
}
}
rWrt.SetCurItemSet( pOldI );
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: wrtww8.hxx,v $
*
* $Revision: 1.27 $
* $Revision: 1.28 $
*
* last change: $Author: cmc $ $Date: 2002-06-25 11:31:09 $
* last change: $Author: cmc $ $Date: 2002-06-27 11:07:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -574,7 +574,7 @@ public:
static void InsAsString16( WW8Bytes& rO, const String& );
static void InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet );
static BOOL CollapseScriptsforWordOk(USHORT nScript, USHORT nWhich);
BOOL CollapseScriptsforWordOk(USHORT nScript, USHORT nWhich);
USHORT DupNumRuleWithLvlStart(const SwNumRule *pRule,BYTE nLvl,USHORT nVal);
void InsUInt16( UINT16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }

View file

@ -2,9 +2,9 @@
*
* $RCSfile: ww8atr.cxx,v $
*
* $Revision: 1.38 $
* $Revision: 1.39 $
*
* last change: $Author: cmc $ $Date: 2002-06-17 10:19:03 $
* last change: $Author: cmc $ $Date: 2002-06-27 11:07:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -373,11 +373,13 @@ Sadly word does not have two different sizes for asian font size and western
font size, it has to different fonts, but not sizes, so we have to use our
guess as to the script used and disable the export of one type. The same
occurs for font weight and posture (bold and italic)
In addition WW7- has only one character language identifier while WW8+ has two
*/
BOOL SwWW8Writer::CollapseScriptsforWordOk(USHORT nScript, USHORT nWhich)
{
BOOL bRet=TRUE;
if ( nScript != com::sun::star::i18n::ScriptType::ASIAN)
if (nScript != com::sun::star::i18n::ScriptType::ASIAN)
{
switch (nWhich)
{
@ -386,6 +388,9 @@ BOOL SwWW8Writer::CollapseScriptsforWordOk(USHORT nScript, USHORT nWhich)
case RES_CHRATR_CJK_WEIGHT:
bRet = FALSE;
break;
case RES_CHRATR_CJK_LANGUAGE:
if (bWrtWW8 == 0)
bRet = FALSE;
default:
break;
}
@ -399,6 +404,9 @@ BOOL SwWW8Writer::CollapseScriptsforWordOk(USHORT nScript, USHORT nWhich)
case RES_CHRATR_WEIGHT:
bRet = FALSE;
break;
case RES_CHRATR_LANGUAGE:
if (bWrtWW8 == 0)
bRet = FALSE;
default:
break;
}