summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2000-11-13 07:44:24 +0000
committerMichael Brauer <mib@openoffice.org>2000-11-13 07:44:24 +0000
commit59253c6b24f82b64df221346e17a982561cad651 (patch)
treede26045d6f3fc999fa44f19475a358434cc8bf30
parent387a6c81032207dce64bc448bbfcdad47e27d02b (diff)
font declarations and asian/complex font properties
-rw-r--r--sw/source/filter/xml/makefile.mk15
-rw-r--r--sw/source/filter/xml/wrtxml.cxx13
-rw-r--r--sw/source/filter/xml/xmlexp.cxx11
-rw-r--r--sw/source/filter/xml/xmlexp.hxx6
-rw-r--r--sw/source/filter/xml/xmlimp.cxx19
5 files changed, 48 insertions, 16 deletions
diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk
index c5801866364b..94683007033d 100644
--- a/sw/source/filter/xml/makefile.mk
+++ b/sw/source/filter/xml/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.2 $
+# $Revision: 1.3 $
#
-# last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+# last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -95,7 +95,8 @@ CXXFILES = \
xmlitemi.cxx \
xmliteme.cxx \
swxmlat.cxx \
- xmlbrsh.cxx
+ xmlbrsh.cxx \
+ xmlfonte.cxx
SLOFILES = \
$(SLO)$/swxml.obj \
@@ -112,25 +113,25 @@ SLOFILES = \
$(SLO)$/xmlitemi.obj \
$(SLO)$/xmliteme.obj \
$(SLO)$/swxmlat.obj \
- $(SLO)$/xmlbrsh.obj
+ $(SLO)$/xmlbrsh.obj \
+ $(SLO)$/xmlfonte.obj
EXCEPTIONSFILES= \
$(SLO)$/swxml.obj \
$(SLO)$/xmlimp.obj \
$(SLO)$/wrtxml.obj \
$(SLO)$/xmlexp.obj \
- $(SLO)$/xmlectxt.obj \
$(SLO)$/xmltext.obj \
$(SLO)$/xmltbli.obj \
$(SLO)$/xmltble.obj \
$(SLO)$/xmlfmt.obj \
$(SLO)$/xmlfmte.obj \
$(SLO)$/xmlmeta.obj \
- $(SLO)$/xmlnum.obj \
$(SLO)$/xmlitemi.obj \
$(SLO)$/xmliteme.obj \
$(SLO)$/swxmlat.obj \
- $(SLO)$/xmlbrsh.obj
+ $(SLO)$/xmlbrsh.obj \
+ $(SLO)$/xmlfonte.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index feb0e8237350..eaf5ebc6ade9 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wrtxml.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:59 $
+ * last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -142,6 +142,10 @@ sal_uInt32 SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
if( !xModel.is() )
return ERR_SWG_WRITE_ERROR;
+ pDoc = rPaM.GetDoc();
+ PutNumFmtFontsInAttrPool();
+ PutEditEngFontsInAttrPool();
+
Reference< io::XOutputStream > xOut = rMed.GetDataSink();
Reference< io::XActiveDataSource > xSrc( xWriter, UNO_QUERY );
xSrc->setOutputStream( xOut );
@@ -174,11 +178,14 @@ void GetXMLWriter( const String&, WriterRef& xRet )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/xml/wrtxml.cxx,v 1.1.1.1 2000-09-18 17:14:59 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/xml/wrtxml.cxx,v 1.2 2000-11-13 08:44:24 mib Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/18 17:14:59 hr
+ initial import
+
Revision 1.17 2000/09/18 16:05:04 willem.vandorp
OpenOffice header added.
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index e9515be6fe39..0658b3a67e80 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -232,6 +232,7 @@ XMLTextParagraphExport* SwXMLExport::CreateTextParagraphExport()
{
return new SwXMLTextParagraphExport( *this, *GetAutoStylePool().get() );
}
+
XMLShapeExport* SwXMLExport::CreateShapeExport()
{
return new XMLShapeExport( *this, XMLTextParagraphExport::CreateShapeExtPropMapper( *this ) );
@@ -255,6 +256,12 @@ __EXPORT SwXMLExport::~SwXMLExport()
}
+void SwXMLExport::_ExportFontDecls()
+{
+ GetFontAutoStylePool(); // make sure the pool is created
+ SvXMLExport::_ExportFontDecls();
+}
+
void SwXMLExport::_ExportContent()
{
#ifdef XML_CORE_API
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 2151ba585caa..477820c894f9 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexp.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -151,6 +151,7 @@ class SwXMLExport : public SvXMLExport
sal_Bool bHeadline=sal_False );
// virtual void _ExportMeta();
+ virtual void _ExportFontDecls();
virtual void _ExportStyles( sal_Bool bUsed );
virtual void _ExportAutoStyles();
virtual void _ExportMasterStyles();
@@ -166,6 +167,7 @@ protected:
virtual SvXMLAutoStylePoolP* CreateAutoStylePool();
virtual XMLPageExport* CreatePageExport();
virtual XMLShapeExport* CreateShapeExport();
+ virtual XMLFontAutoStylePool* CreateFontAutoStylePool();
public:
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 5ba92efe3c9e..d5dcdf8b1739 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlimp.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: mib $ $Date: 2000-11-07 14:05:53 $
+ * last change: $Author: mib $ $Date: 2000-11-13 08:44:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -90,6 +90,9 @@
#ifndef _XMLOFF_XMLTEXTSHAPEIMPORTHELPER_HXX_
#include <xmloff/XMLTextShapeImportHelper.hxx>
#endif
+#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX_
+#include <xmloff/XMLFontStylesContext.hxx>
+#endif
#ifndef _DOC_HXX
#include <doc.hxx>
@@ -127,6 +130,7 @@ sal_Char __READONLY_DATA sXML_np__table[] = "table";
enum SwXMLDocTokens
{
+ XML_TOK_DOC_FONTDECLS,
XML_TOK_DOC_STYLES,
XML_TOK_DOC_AUTOSTYLES,
XML_TOK_DOC_MASTERSTYLES,
@@ -137,6 +141,7 @@ enum SwXMLDocTokens
static __FAR_DATA SvXMLTokenMapEntry aDocTokenMap[] =
{
+ { XML_NAMESPACE_OFFICE, sXML_font_decls, XML_TOK_DOC_FONTDECLS },
{ XML_NAMESPACE_OFFICE, sXML_styles, XML_TOK_DOC_STYLES },
{ XML_NAMESPACE_OFFICE, sXML_automatic_styles, XML_TOK_DOC_AUTOSTYLES },
{ XML_NAMESPACE_OFFICE, sXML_master_styles, XML_TOK_DOC_MASTERSTYLES },
@@ -184,6 +189,16 @@ SvXMLImportContext *SwXMLDocContext_Impl::CreateChildContext(
const SvXMLTokenMap& rTokenMap = GetSwImport().GetDocElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLocalName ) )
{
+ case XML_TOK_DOC_FONTDECLS:
+ {
+ XMLFontStylesContext *pFSContext =
+ new XMLFontStylesContext( GetImport(), nPrefix,
+ rLocalName, xAttrList,
+ gsl_getSystemTextEncoding() );
+ GetImport().GetTextImport()->SetFontDecls( pFSContext );
+ pContext = pFSContext;
+ }
+ break;
case XML_TOK_DOC_STYLES:
pContext = GetSwImport().CreateStylesContext( rLocalName, xAttrList,
sal_False );