summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-11-13 16:30:15 +0000
committerjp <jp@openoffice.org>2000-11-13 16:30:15 +0000
commitf8990bbfbb549c7567930dda1842a5f0cd5d6da3 (patch)
treedfb84c1e5357f865004e83a90d531bf434cfe92c
parent49cdab9ea5b894469083244250c842eae59c5d4a (diff)
new method PutCJKandCTLFontsInAttrPool
-rw-r--r--sw/inc/shellio.hxx8
-rw-r--r--sw/source/filter/writer/writer.cxx54
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx23
3 files changed, 48 insertions, 37 deletions
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 1df0fadf20b1..1b6bcf35471b 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: shellio.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-11-01 19:26:54 $
+ * last change: $Author: jp $ $Date: 2000-11-13 17:26:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -442,6 +442,7 @@ class Writer : public SvRefBase
SwAsciiOptions aAscOpts;
void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
+ void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
protected:
Writer_Impl* pImpl;
@@ -454,7 +455,8 @@ protected:
BOOL CopyNextPam( SwPaM ** );
void PutNumFmtFontsInAttrPool();
- void PutEditEngFontsInAttrPool();
+ void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
+ void PutCJKandCTLFontsInAttrPool();
virtual ULONG WriteStream() = 0;
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index bd001335bb19..0b784325f334 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: writer.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jp $ $Date: 2000-11-01 19:31:51 $
+ * last change: $Author: jp $ $Date: 2000-11-13 17:26:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,10 +94,6 @@
#include <svx/eeitem.hxx>
#endif
-
-#ifndef _TOOLS_TEMPFILE_HXX
-#include <tools/tempfile.hxx>
-#endif
#ifndef _SHELLIO_HXX
#include <shellio.hxx>
#endif
@@ -503,23 +499,40 @@ void Writer::PutNumFmtFontsInAttrPool()
}
}
-void Writer::PutEditEngFontsInAttrPool()
+void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL )
{
- SfxItemPool& rPool = pDoc->GetAttrPool();
- if( rPool.GetSecondaryPool() )
+ SfxItemPool* pPool = pDoc->GetAttrPool().GetSecondaryPool();
+ if( pPool )
{
- USHORT nW = EE_CHAR_FONTINFO;
- const SvxFontItem* pFont = (const SvxFontItem*)&rPool.GetDefaultItem( nW );
+ _AddFontItems( *pPool, EE_CHAR_FONTINFO );
+ if( bIncl_CJK_CTL )
+ {
+ _AddFontItems( *pPool, EE_CHAR_FONTINFO_CJK );
+ _AddFontItems( *pPool, EE_CHAR_FONTINFO_CTL );
+ }
+ }
+}
+
+void Writer::PutCJKandCTLFontsInAttrPool()
+{
+ SfxItemPool& rPool = pDoc->GetAttrPool();
+ _AddFontItems( rPool, RES_CHRATR_CJK_FONT );
+ _AddFontItems( rPool, RES_CHRATR_CTL_FONT );
+}
+
+
+void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW )
+{
+ const SvxFontItem* pFont = (const SvxFontItem*)&rPool.GetDefaultItem( nW );
+ _AddFontItem( rPool, *pFont );
+
+ if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) )
_AddFontItem( rPool, *pFont );
- if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) )
+ USHORT nMaxItem = rPool.GetItemCount( nW );
+ for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
+ if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) )
_AddFontItem( rPool, *pFont );
-
- USHORT nMaxItem = rPool.GetItemCount( nW );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) )
- _AddFontItem( rPool, *pFont );
- }
}
void Writer::_AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont )
@@ -636,11 +649,14 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/writer/writer.cxx,v 1.3 2000-11-01 19:31:51 jp Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/writer/writer.cxx,v 1.4 2000-11-13 17:26:24 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.3 2000/11/01 19:31:51 jp
+ Writer:CopyLocalFileToINet: export of mail graphics removed and SvFileStream access removed
+
Revision 1.2 2000/10/17 15:13:50 os
Change: SfxMedium Ctor
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 03bf8af38b73..3930182bdc5c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wrtww8.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: cmc $ $Date: 2000-10-10 16:54:06 $
+ * last change: $Author: jp $ $Date: 2000-11-13 17:30:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -100,15 +100,12 @@
#ifndef _SVX_HYZNITEM_HXX //autogen
#include <svx/hyznitem.hxx>
#endif
-
-#if SUPD>593
#ifndef _MSOLEEXP_HXX
#include <svx/msoleexp.hxx>
#endif
#ifndef _MSOCXIMEX_HXX
#include <svx/msocximex.hxx>
#endif
-#endif
#ifndef _OFA_FLTRCFG_HXX
#include <offmgr/fltrcfg.hxx>
@@ -1732,7 +1729,6 @@ ULONG SwWW8Writer::StoreDoc()
if( aTOXArr.Count() )
aTOXArr.Remove( 0, aTOXArr.Count() );
-#if SUPD>593
if( !pOLEExp )
{
UINT32 nSvxMSDffOLEConvFlags = 0;
@@ -1751,12 +1747,12 @@ ULONG SwWW8Writer::StoreDoc()
if( !pOCXExp )
pOCXExp = new SwMSConvertControls(pDoc->GetDocShell(),pCurPam);
-#endif
PrepareStorage();
PutNumFmtFontsInAttrPool();
PutEditEngFontsInAttrPool();
+ PutCJKandCTLFontsInAttrPool();
pFib = new WW8Fib( bWrtWW8 ? 8 : 6 );
@@ -2029,10 +2025,7 @@ ULONG SwWW8Writer::WriteStorage()
SwWW8Writer::SwWW8Writer( const String& rFltName )
: pChpIter( 0 ), aMainStg( sMainStream ), pPapPlc( 0 ), pChpPlc( 0 ),
pO( 0 ), pAktPageDesc( 0 ), pISet( 0 ), pUsedNumTbl( 0 ), pBmpPal( 0 ),
- pKeyMap( 0 )
-#if SUPD>593
- , pOLEExp( 0 ), pOCXExp(0)
-#endif
+ pKeyMap( 0 ), pOLEExp( 0 ), pOCXExp(0)
{
bWrtWW8 = rFltName.EqualsAscii( FILTER_WW8 );
}
@@ -2046,13 +2039,10 @@ SwWW8Writer::~SwWW8Writer()
NfKeywordTable* pDel = (NfKeywordTable*)pKeyMap;
delete [] pDel;
}
-#if SUPD>593
if( pOLEExp )
delete pOLEExp;
if( pOCXExp )
delete pOCXExp;
-
-#endif
}
void GetWW8Writer( const String& rFltName, WriterRef& xRet )
@@ -2066,11 +2056,14 @@ void GetWW8Writer( const String& rFltName, WriterRef& xRet )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/wrtww8.cxx,v 1.2 2000-10-10 16:54:06 cmc Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/ww8/wrtww8.cxx,v 1.3 2000-11-13 17:30:15 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.2 2000/10/10 16:54:06 cmc
+ MSOffice 97/2000 Controls {Im|Ex}port
+
Revision 1.1.1.1 2000/09/18 17:14:58 hr
initial import