summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-23 01:37:57 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-23 01:37:57 +0200
commit82431b3746804c9765e0f89173856028f1e2d4fb (patch)
tree7d185b27b63cd51e46bc730d3e46a8e33c3c8c77
parenteb666a3d095f56104aa14b302a94ed4f8f53fa89 (diff)
gnumake4 writerfilter gbuildization patchfeature/gnumake4_writerfilter
* this is a patch replacing the gbuildization for writerfilter with the one from gnumake4 * all other changes from gnumake4 will be merged with branch feature/gnumake4 into master * only writerfilter was left out as it saw too much action on master and was split out into this commit * this is the diff between: - eb666a3d095f56104aa14b302a94ed4f8f53fa89 - 6df18646dd33ba543c71ca0cffc13a5b66b26905 in module writerfilter only
-rw-r--r--writerfilter/JunitTest_writerfilter_complex.mk55
-rw-r--r--writerfilter/Library_doctok.mk147
-rw-r--r--writerfilter/Library_ooxml.mk290
-rw-r--r--writerfilter/Library_resourcemodel.mk100
-rw-r--r--writerfilter/Library_rtftok.mk63
-rw-r--r--writerfilter/Library_writerfilter.mk113
-rw-r--r--writerfilter/Library_writerfilter_debug.mk60
-rw-r--r--writerfilter/Library_writerfilter_uno.mk68
-rw-r--r--writerfilter/Module_writerfilter.mk11
-rw-r--r--writerfilter/Package_generated.mk32
-rw-r--r--writerfilter/Package_inc.mk35
-rw-r--r--writerfilter/Package_writerfilter_generated.mk80
-rw-r--r--writerfilter/debug_setup.mk12
-rw-r--r--writerfilter/inc/WriterFilterDllApi.hxx35
-rw-r--r--writerfilter/inc/dmapper/DomainMapper.hxx2
-rw-r--r--writerfilter/inc/doctok/WW8Document.hxx14
-rw-r--r--writerfilter/inc/ooxml/OOXMLDocument.hxx6
-rw-r--r--writerfilter/inc/resourcemodel/Fraction.hxx2
-rw-r--r--writerfilter/inc/resourcemodel/LoggedResources.hxx8
-rw-r--r--writerfilter/inc/resourcemodel/QNameToString.hxx4
-rw-r--r--writerfilter/inc/resourcemodel/ResourceModelHelper.hxx4
-rw-r--r--writerfilter/inc/resourcemodel/TableManager.hxx2
-rw-r--r--writerfilter/inc/resourcemodel/TagLogger.hxx2
-rw-r--r--writerfilter/inc/resourcemodel/WW8ResourceModel.hxx74
-rw-r--r--writerfilter/inc/resourcemodel/XPathLogger.hxx2
-rw-r--r--writerfilter/inc/resourcemodel/exceptions.hxx6
-rw-r--r--writerfilter/inc/resourcemodel/util.hxx4
-rw-r--r--writerfilter/prj/build.lst1
-rwxr-xr-xwriterfilter/prj/makefile.mk2
-rw-r--r--writerfilter/qa/complex/ooxml/LoadDocuments.java82
-rw-r--r--writerfilter/qa/complex/ooxml/TestDocument.java40
-rw-r--r--writerfilter/qa/complex/ooxml/makefile.mk86
-rw-r--r--writerfilter/qa/cppunittests/doctok/makefile.mk70
-rw-r--r--writerfilter/qa/cppunittests/doctok/testdoctok.cxx281
-rw-r--r--writerfilter/source/Makefile231
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx2
-rw-r--r--writerfilter/source/filter/RtfFilter.hxx2
-rw-r--r--writerfilter/source/filter/WriterFilter.hxx2
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.hxx2
-rw-r--r--writerfilter/source/generated.mk55
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.hxx46
-rw-r--r--writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx42
-rw-r--r--writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx6
-rw-r--r--writerfilter/source/ooxml/RefAndPointer.hxx4
-rw-r--r--writerfilter/source/ooxml/stage1.sh20
-rw-r--r--writerfilter/source/ooxml/status.sh2
-rw-r--r--writerfilter/source/resourcemodel/Token.cxx82
-rw-r--r--writerfilter/source/resourcemodel/qnametostrfooter2
-rw-r--r--writerfilter/source/resourcemodel/qnametostrheader4
-rw-r--r--writerfilter/unocomponent/component.cxx2
50 files changed, 1072 insertions, 1225 deletions
diff --git a/writerfilter/JunitTest_writerfilter_complex.mk b/writerfilter/JunitTest_writerfilter_complex.mk
new file mode 100644
index 000000000..5262f0a0f
--- /dev/null
+++ b/writerfilter/JunitTest_writerfilter_complex.mk
@@ -0,0 +1,55 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,writerfilter_complex,SRCDIR))
+
+$(eval $(call gb_JunitTest_set_defs,writerfilter_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/writerfilter/qa/complex/ooxml/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_jars,writerfilter_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,writerfilter_complex,\
+ writerfilter/qa/complex/ooxml/TestDocument \
+ writerfilter/qa/complex/ooxml/LoadDocuments \
+))
+
+# #i113098# currently fails in non-pro
+ifeq ($(gb_PRODUCT),$(true))
+$(eval $(call gb_JunitTest_add_classes,writerfilter_complex,\
+ complex.ooxml.LoadDocuments \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Library_doctok.mk b/writerfilter/Library_doctok.mk
deleted file mode 100644
index 2e4afc58e..000000000
--- a/writerfilter/Library_doctok.mk
+++ /dev/null
@@ -1,147 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,doctok))
-
-$(eval $(call gb_Library_set_include,doctok,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(realpath $(SRCDIR)/writerfilter/source/doctok) \
- -I$(WORKDIR)/writerfilter/inc \
- -I$(WORKDIR)/writerfilter/inc/doctok \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
- -I$(OUTDIR)/inc/offuh \
-))
-
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,doctok,\
- $$(DEFS) \
- -DWRITERFILTER_DOCTOK_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_linked_libs,doctok,\
- cppu \
- cppuhelper \
- resourcemodel \
- sal \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,doctok,\
- writerfilter/source/doctok/Dff \
- writerfilter/source/doctok/DffImpl \
- writerfilter/source/doctok/WW8Annotation \
- writerfilter/source/doctok/WW8BinTableImpl \
- writerfilter/source/doctok/WW8Clx \
- writerfilter/source/doctok/WW8CpAndFc \
- writerfilter/source/doctok/WW8DocumentImpl \
- writerfilter/source/doctok/WW8FKPImpl \
- writerfilter/source/doctok/WW8FontTable \
- writerfilter/source/doctok/WW8LFOTable \
- writerfilter/source/doctok/WW8ListTable \
- writerfilter/source/doctok/WW8OutputWithDepth \
- writerfilter/source/doctok/WW8Picture \
- writerfilter/source/doctok/WW8PieceTableImpl \
- writerfilter/source/doctok/WW8PropertySetImpl \
- writerfilter/source/doctok/WW8ResourceModelImpl \
- writerfilter/source/doctok/WW8StreamImpl \
- writerfilter/source/doctok/WW8StructBase \
- writerfilter/source/doctok/WW8Sttbf \
- writerfilter/source/doctok/WW8StyleSheet \
- writerfilter/source/doctok/WW8Table \
- writerfilter/source/doctok/WW8Text \
-))
-
-$(eval $(call gb_Library_add_generated_exception_objects,doctok,\
- writerfilter/source/doctok/resources \
-))
-
-doctok_GENDIR := $(WORKDIR)/writerfilter
-doctok_HXXOUTDIR := $(doctok_GENDIR)/inc/doctok
-doctok_HXXOUTDIRCREATED := $(doctok_HXXOUTDIR)/created
-
-ooxml_BASEDIR := $(realpath $(SRCDIR)/writerfilter)
-
-doctok_QNAMETOSTRXSL := $(ooxml_BASEDIR)/source/doctok/qnametostr.xsl
-doctok_RESOURCEIDSXSL := $(ooxml_BASEDIR)/source/doctok/resourceids.xsl
-doctok_RESOURCESIMPLXSL := $(ooxml_BASEDIR)/source/doctok/resourcesimpl.xsl
-doctok_RESOURCESXSL := $(ooxml_BASEDIR)/source/doctok/resources.xsl
-doctok_RESOURCETOOLSXSL := $(ooxml_BASEDIR)/source/doctok/resourcetools.xsl
-doctok_SPRMCODETOSTRXSL := $(ooxml_BASEDIR)/source/doctok/sprmcodetostr.xsl
-doctok_SPRMIDSXSL := $(ooxml_BASEDIR)/source/doctok/sprmids.xsl
-
-doctok_MODEL := $(ooxml_BASEDIR)/source/doctok/resources.xmi
-
-doctok_RESOURCEIDSHXX := $(doctok_HXXOUTDIR)/resourceids.hxx
-doctok_SPRMIDSHXX := $(doctok_HXXOUTDIR)/sprmids.hxx
-doctok_RESOURCESHXX := $(doctok_HXXOUTDIR)/resources.hxx
-doctok_RESOURCESCXX := $(call gb_GenCxxObject_get_source,writerfilter/source/doctok/resources)
-
-doctok_QNAMETOSTRTMP := $(doctok_GENDIR)/doctok_qnameToStr.tmp
-doctok_SPRPMCODETOSTRTMP := $(doctok_GENDIR)/sprmcodetostr.tmp
-
-doctok_GENHEADERS = \
- $(doctok_RESOURCEIDSHXX) \
- $(doctok_SPRMIDSHXX) \
- $(doctok_RESOURCESHXX)
-
-doctok_GENFILES = \
- $(doctok_GENHEADERS) \
- $(doctok_QNAMETOSTRTMP) \
- $(doctok_RESOURCESCXX) \
- $(doctok_SPRPMCODETOSTRTMP)
-
-$(doctok_HXXOUTDIRCREATED) :
- mkdir -p $(dir $@) && touch $@
-
-$(doctok_GENHEADERS) : $(doctok_HXXOUTDIRCREATED)
-
-define doctok_xsl_process_model
-$(1) : $(2) $(doctok_MODEL)
- mkdir -p $(dir $(1)) && $$(call gb_Helper_abbreviate_dirs_native,$(gb_XSLTPROC) --nonet $(2) $(doctok_MODEL)) > $(1)
-endef
-
-$(eval $(call doctok_xsl_process_model,$(doctok_RESOURCESHXX),$(doctok_RESOURCESXSL)))
-$(eval $(call doctok_xsl_process_model,$(doctok_QNAMETOSTRTMP),$(doctok_QNAMETOSTRXSL)))
-$(eval $(call doctok_xsl_process_model,$(doctok_SPRMIDSHXX),$(doctok_SPRMIDSXSL)))
-$(eval $(call doctok_xsl_process_model,$(doctok_RESOURCESCXX),$(doctok_RESOURCESIMPLXSL)))
-$(eval $(call doctok_xsl_process_model,$(doctok_RESOURCEIDSHXX),$(doctok_RESOURCEIDSXSL)))
-$(eval $(call doctok_xsl_process_model,$(doctok_SPRPMCODETOSTRTMP),$(doctok_SPRMCODETOSTRXSL)))
-
-$(doctok_RESOURCESCXX) : $(doctok_GENHEADERS) $(doctok_RESOURCETOOLSXSL)
-
-doctok_clean:
- rm -rf $(doctok_GENFILES) $(doctok_HXXOUTDIR)
-.PHONY: doctok_clean
-
-$(call gb_Library_get_clean_target,doctok) : doctok_clean
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_ooxml.mk b/writerfilter/Library_ooxml.mk
deleted file mode 100644
index e59c93a11..000000000
--- a/writerfilter/Library_ooxml.mk
+++ /dev/null
@@ -1,290 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,ooxml))
-
-$(eval $(call gb_Library_set_include,ooxml,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(realpath $(SRCDIR)/writerfilter/source/ooxml) \
- -I$(realpath $(SRCDIR)/writerfilter/source/dmapper) \
- -I$(WORKDIR)/writerfilter/inc \
- -I$(WORKDIR)/writerfilter/inc/ooxml \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
- -I$(OUTDIR)/inc/offuh \
-))
-
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,ooxml,\
- $$(DEFS) \
- -DWRITERFILTER_OOXML_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_linked_libs,ooxml,\
- comphelper \
- cppu \
- cppuhelper \
- i18nisolang1 \
- i18npaper \
- resourcemodel \
- sal \
- tl \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,ooxml,\
- writerfilter/source/dmapper/BorderHandler \
- writerfilter/source/dmapper/CellColorHandler \
- writerfilter/source/dmapper/CellMarginHandler \
- writerfilter/source/dmapper/ConversionHelper \
- writerfilter/source/dmapper/DomainMapper \
- writerfilter/source/dmapper/DomainMapper_Impl \
- writerfilter/source/dmapper/DomainMapperTableHandler \
- writerfilter/source/dmapper/DomainMapperTableManager \
- writerfilter/source/dmapper/FFDataHandler \
- writerfilter/source/dmapper/FontTable \
- writerfilter/source/dmapper/FormControlHelper \
- writerfilter/source/dmapper/GraphicHelpers \
- writerfilter/source/dmapper/GraphicImport \
- writerfilter/source/dmapper/MeasureHandler \
- writerfilter/source/dmapper/ModelEventListener \
- writerfilter/source/dmapper/NumberingManager \
- writerfilter/source/dmapper/OLEHandler \
- writerfilter/source/dmapper/PageBordersHandler \
- writerfilter/source/dmapper/PropertyIds \
- writerfilter/source/dmapper/PropertyMap \
- writerfilter/source/dmapper/PropertyMapHelper \
- writerfilter/source/dmapper/SectionColumnHandler \
- writerfilter/source/dmapper/SettingsTable \
- writerfilter/source/dmapper/StyleSheetTable \
- writerfilter/source/dmapper/TablePropertiesHandler \
- writerfilter/source/dmapper/TblStylePrHandler \
- writerfilter/source/dmapper/TDefTableHandler \
- writerfilter/source/dmapper/ThemeTable \
- writerfilter/source/dmapper/WrapPolygonHandler \
- writerfilter/source/ooxml/Handler \
- writerfilter/source/ooxml/OOXMLBinaryObjectReference \
- writerfilter/source/ooxml/OOXMLDocumentImpl \
- writerfilter/source/ooxml/OOXMLFactory \
- writerfilter/source/ooxml/OOXMLFastContextHandler \
- writerfilter/source/ooxml/OOXMLFastDocumentHandler \
- writerfilter/source/ooxml/OOXMLFastTokenHandler \
- writerfilter/source/ooxml/OOXMLParserState \
- writerfilter/source/ooxml/OOXMLPropertySetImpl \
- writerfilter/source/ooxml/OOXMLStreamImpl \
-))
-
-ooxml_NAMESPACES := \
- dml-baseStylesheet \
- dml-baseTypes \
- dml-chartDrawing \
- dml-documentProperties \
- dml-graphicalObject \
- dml-shape3DCamera \
- dml-shape3DLighting \
- dml-shape3DScene \
- dml-shape3DStyles \
- dml-shapeEffects \
- dml-shapeGeometry \
- dml-shapeLineProperties \
- dml-shapeProperties \
- dml-styleDefaults \
- dml-stylesheet \
- dml-textCharacter \
- dml-wordprocessingDrawing \
- shared-math \
- shared-relationshipReference \
- sml-customXmlMappings \
- vml-main \
- vml-officeDrawing \
- vml-wordprocessingDrawing \
- wml
-
-ooxml_factory_source_stem = writerfilter/source/ooxml/OOXMLFactory_$(1)
-
-define ooxml_factory_source
-$(call gb_GenCxxObject_get_source,$(call ooxml_factory_source_stem,$(1)))
-endef
-
-define ooxml_namespace_sources
-$(foreach namespace,$(ooxml_NAMESPACES),$(call ooxml_factory_source,$(namespace)))
-endef
-
-$(eval $(call gb_Library_add_generated_exception_objects,ooxml,\
- writerfilter/source/ooxml/OOXMLFactory_generated \
- writerfilter/source/ooxml/OOXMLFactory_values \
- $(foreach namespace,$(ooxml_NAMESPACES),$(call ooxml_factory_source_stem,$(namespace))) \
-))
-
-SLOFACTORIESNAMESPACES= \
- $(SLO)/ooxml_Factory_{$(NAMESPACES)}.obj
-
-ooxml_HXXOUTDIR := $(WORKDIR)/writerfilter/inc/ooxml
-ooxml_CXXOUTDIR := $(dir $(call ooxml_factory_source,generated))
-ooxml_MISCDIR := $(WORKDIR)/writerfilter/ooxml
-
-ooxml_HXXOUTDIRCREATED := $(ooxml_HXXOUTDIR)/created
-
-define ooxml_factory_header
-$(ooxml_HXXOUTDIR)/OOXMLFactory_$(1).hxx
-endef
-
-define ooxml_namespace_headers
-$(foreach namespace,$(ooxml_NAMESPACES),$(call ooxml_factory_header,$(namespace)))
-endef
-
-ooxml_BASEDIR := $(realpath $(SRCDIR)/writerfilter)
-
-ooxml_MODEL := $(ooxml_BASEDIR)/source/ooxml/model.xml
-
-ooxml_FACTORYIMPLNSXSL := $(ooxml_BASEDIR)/source/ooxml/factoryimpl_ns.xsl
-ooxml_FACTORYIMPLXSL := $(ooxml_BASEDIR)/source/ooxml/factoryimpl.xsl
-ooxml_FACTORYINCXSL := $(ooxml_BASEDIR)/source/ooxml/factoryinc.xsl
-ooxml_FACTORYNSXSL := $(ooxml_BASEDIR)/source/ooxml/factory_ns.xsl
-ooxml_FACTORYTOOLSXSL := $(ooxml_BASEDIR)/source/ooxml/factorytools.xsl
-ooxml_FACTORYVALUESIMPLXSL := $(ooxml_BASEDIR)/source/ooxml/factoryimpl_values.xsl
-ooxml_FACTORYVALUESXSL := $(ooxml_BASEDIR)/source/ooxml/factory_values.xsl
-ooxml_FASTTOKENSXSL := $(ooxml_BASEDIR)/source/ooxml/fasttokens.xsl
-ooxml_GPERFFASTTOKENXSL := $(ooxml_BASEDIR)/source/ooxml/gperffasttokenhandler.xsl
-ooxml_NAMESPACEIDSXSL := $(ooxml_BASEDIR)/source/ooxml/namespaceids.xsl
-ooxml_PREPROCESSXSL := $(ooxml_BASEDIR)/source/ooxml/modelpreprocess.xsl
-ooxml_QNAMETOSTRXSL := $(ooxml_BASEDIR)/source/ooxml/qnametostr.xsl
-ooxml_RESORUCETOKENSXSL := $(ooxml_BASEDIR)/source/ooxml/resourcestokens.xsl
-ooxml_RESOURCEIDSXSL := $(ooxml_BASEDIR)/source/ooxml/resourceids.xsl
-ooxml_RESOURCESIMPLXSL := $(ooxml_BASEDIR)/source/ooxml/resourcesimpl.xsl
-
-ooxml_NSPROCESS := $(SRCDIR)/writerfilter/source/resourcemodel/namespace_preprocess.pl
-
-ooxml_RESOURCEIDSHXX := $(ooxml_HXXOUTDIR)/resourceids.hxx
-
-ooxml_TOKENXML := $(ooxml_MISCDIR)/token.xml
-ooxml_TOKENXMLTMP := $(ooxml_MISCDIR)/token.tmp
-
-ooxml_FACTORYGENERATEDHXX := $(call ooxml_factory_header,generated)
-ooxml_FACTORYGENERATEDCXX := $(call ooxml_factory_source,generated)
-ooxml_FASTTOKENSHXX := $(ooxml_HXXOUTDIR)/OOXMLFastTokens.hxx
-ooxml_NAMESPACEIDSHXX := $(ooxml_HXXOUTDIR)/OOXMLnamespaceids.hxx
-ooxml_FACTORYVALUESHXX := $(call ooxml_factory_header,values)
-ooxml_FACTORYVALUESCXX := $(call ooxml_factory_source,values)
-ooxml_GPERFFASTTOKENHXX := $(ooxml_HXXOUTDIR)/gperffasttoken.hxx
-ooxml_GPERFFASTTOKENTMP := $(ooxml_MISCDIR)/gperffasttoken.tmp
-ooxml_QNAMETOSTRTMP := $(WORKDIR)/writerfilter/ooxml_qnameToStr.tmp
-
-ooxml_MODELPROCESSED := $(ooxml_MISCDIR)/model_preprocessed.xml
-ooxml_NSXSL := $(ooxml_MISCDIR)/namespacesmap.xsl
-ooxml_PREPROCESSXSLCOPIED := $(ooxml_MISCDIR)/modelpreprocess.xsl
-
-ooxml_NAMESPACESTXT := $(OUTDIR)/inc/oox/namespaces.txt
-
-ooxml_GENHEADERS = \
- $(ooxml_FACTORYGENERATEDHXX) \
- $(ooxml_FASTTOKENSHXX) \
- $(ooxml_FACTORYVALUESHXX) \
- $(ooxml_GPERFFASTTOKENHXX) \
- $(ooxml_RESOURCEIDSHXX) \
- $(ooxml_NAMESPACEIDSHXX) \
- $(ooxml_namespace_headers)
-
-ooxml_GENERATEDFILES = \
- $(ooxml_GENHEADERS) \
- $(ooxml_GPERFFASTTOKENTMP) \
- $(ooxml_FACTORYGENERATEDCXX) \
- $(ooxml_MODELPROCESSED) \
- $(ooxml_namespace_sources) \
- $(ooxml_NSXSL) \
- $(ooxml_FACTORYVALUESCXX) \
- $(ooxml_PREPROCESSXSLCOPIED) \
- $(ooxml_QNAMETOSTRTMP) \
- $(ooxml_TOKENXMLTMP) \
- $(ooxml_TOKENXML)
-
-$(ooxml_TOKENXMLTMP) : $(OUTDIR)/inc/oox/tokens.txt
- mkdir -p $(dir $@) && sed -e 's#.*#<fasttoken>&</fasttoken>#' $< > $@
-
-$(ooxml_TOKENXML) : $(SRCDIR)/writerfilter/source/ooxml/tokenxmlheader $(ooxml_TOKENXMLTMP) $(SRCDIR)/writerfilter/source/ooxml/tokenxmlfooter
- mkdir -p $(dir $@) && cat $(SRCDIR)/writerfilter/source/ooxml/tokenxmlheader $(ooxml_TOKENXMLTMP) $(SRCDIR)/writerfilter/source/ooxml/tokenxmlfooter > $@
-
-$(ooxml_HXXOUTDIRCREATED) :
- mkdir -p $(dir $@) && touch $@
-
-$(ooxml_GENHEADERS) : $(ooxml_HXXOUTDIRCREATED)
-
-$(call ooxml_factory_source,%) :| $(call ooxml_factory_header,%)
-
-$(call ooxml_factory_source,%) : $(ooxml_FACTORYIMPLNSXSL) $(ooxml_MODELPROCESSED)
- mkdir -p $(dir $@) && $(call gb_Helper_abbreviate_dirs_native,$(gb_XSLTPROC) --nonet --stringparam file $@ $(ooxml_FACTORYIMPLNSXSL) $(ooxml_MODELPROCESSED)) > $@
-
-$(call ooxml_factory_header,%) : $(ooxml_FACTORYNSXSL) $(ooxml_MODELPROCESSED)
- mkdir -p $(dir $@) && $(call gb_Helper_abbreviate_dirs_native,$(gb_XSLTPROC) --nonet --stringparam file $@ $(ooxml_FACTORYNSXSL) $(ooxml_MODELPROCESSED)) > $@
-
-define ooxml_xsl_process
-$(1) : $(2) $(3)
- mkdir -p $(dir $(1)) && $$(call gb_Helper_abbreviate_dirs_native,$(gb_XSLTPROC) --nonet $(2) $(3)) > $(1)
-endef
-
-define ooxml_xsl_process_model
-$(call ooxml_xsl_process,$(1),$(2),$(ooxml_MODELPROCESSED))
-endef
-
-$(eval $(call ooxml_xsl_process,$(ooxml_MODELPROCESSED),$(ooxml_NSXSL),$(ooxml_MODEL)))
-$(eval $(call ooxml_xsl_process,$(ooxml_FASTTOKENSHXX),$(ooxml_FASTTOKENSXSL),$(ooxml_TOKENXML)))
-
-$(eval $(call ooxml_xsl_process_model,$(ooxml_FACTORYGENERATEDHXX),$(ooxml_FACTORYINCXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_FACTORYGENERATEDCXX),$(ooxml_FACTORYIMPLXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_FACTORYVALUESHXX),$(ooxml_FACTORYVALUESXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_FACTORYVALUESCXX),$(ooxml_FACTORYVALUESIMPLXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_QNAMETOSTRTMP),$(ooxml_QNAMETOSTRXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_RESOURCEIDSHXX),$(ooxml_RESOURCEIDSXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_NAMESPACEIDSHXX),$(ooxml_NAMESPACEIDSXSL)))
-$(eval $(call ooxml_xsl_process_model,$(ooxml_GPERFFASTTOKENTMP),$(ooxml_GPERFFASTTOKENXSL)))
-
-$(ooxml_NSXSL) : $(ooxml_NAMESPACESTXT) $(ooxml_NSPROCESS) $(ooxml_PREPROCESSXSLCOPIED)
- mkdir -p $(dir $@) && perl $(ooxml_NSPROCESS) $(ooxml_NAMESPACESTXT) > $@
-
-# this is included by relative path from $(ooxml_NSXSL)
-$(ooxml_PREPROCESSXSLCOPIED) : $(ooxml_PREPROCESSXSL)
- mkdir -p $(dir $@) && cp $< $@
-
-$(ooxml_GPERFFASTTOKENHXX) : $(ooxml_GPERFFASTTOKENTMP) $(ooxml_HXXOUTDIRCREATED)
- tr -d '\r' < $< | gperf -I -t -E -S1 -c -G -LC++ > $@
-
-$(ooxml_GENERATEDFILES) : $(ooxml_FACTORYTOOLSXSL)
-
-$(ooxml_FACTORYVALUESCXX) :| $(ooxml_FACTORYVALUESHXX)
-$(ooxml_FACTORYGENERATEDCXX) :| $(ooxml_FACTORYGENERATEDHXX) $(ooxml_GENHEADERS)
-
-ooxml_clean :
- rm -rf $(ooxml_GENERATEDFILES) $(ooxml_HXXOUTDIR)
-.PHONY : ooxml_clean
-
-$(call gb_Library_get_clean_target,ooxml) : ooxml_clean
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_resourcemodel.mk b/writerfilter/Library_resourcemodel.mk
deleted file mode 100644
index 1ee3c9e2a..000000000
--- a/writerfilter/Library_resourcemodel.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,resourcemodel))
-
-$(eval $(call gb_Library_set_include,resourcemodel,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(WORKDIR)/writerfilter/inc \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
- -I$(OUTDIR)/inc/offuh \
-))
-
-include $(SRCDIR)/writerfilter/debug_setup.mk
-
-$(eval $(call gb_Library_set_defs,resourcemodel,\
- $$(DEFS) \
- -DWRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_linked_libs,resourcemodel,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
- xml2 \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,resourcemodel,\
- writerfilter/source/resourcemodel/Fraction \
- writerfilter/source/resourcemodel/LoggedResources \
- writerfilter/source/resourcemodel/Protocol \
- writerfilter/source/resourcemodel/resourcemodel \
- writerfilter/source/resourcemodel/ResourceModelHelper \
- writerfilter/source/resourcemodel/TagLogger \
- writerfilter/source/resourcemodel/util \
- writerfilter/source/resourcemodel/WW8Analyzer \
- writerfilter/source/resourcemodel/XPathLogger \
-))
-
-$(eval $(call gb_Library_add_generated_exception_objects,resourcemodel,\
- writerfilter/source/resourcemodel/sprmcodetostr \
-))
-
-$(eval $(call gb_Library_add_generated_cxxobjects,resourcemodel,\
- writerfilter/source/resourcemodel/qnametostr \
- , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
-))
-
-define resourcemodel_gen_source
-$(call gb_GenCxxObject_get_source,$(1)) : $(2) $(SRCDIR)/$(1)header $(SRCDIR)/$(1)footer
- mkdir -p $$(dir $$@) && cat $(SRCDIR)/$(1)header $(2) $(SRCDIR)/$(1)footer > $$@
-endef
-
-# the .tmp files are generated in doctok/ooxml library makefiles
-$(eval $(call resourcemodel_gen_source,writerfilter/source/resourcemodel/qnametostr,\
- $(WORKDIR)/writerfilter/doctok_qnameToStr.tmp \
- $(WORKDIR)/writerfilter/ooxml_qnameToStr.tmp \
-))
-$(eval $(call resourcemodel_gen_source,writerfilter/source/resourcemodel/sprmcodetostr,\
- $(WORKDIR)/writerfilter/sprmcodetostr.tmp \
-))
-
-resourcemodel_clean :
- rm -f \
- $(call gb_GenCxxObject_get_source,writerfilter/source/resourcemodel/qnametostr) \
- $(call gb_GenCxxObject_get_source,writerfilter/source/resourcemodel/sprmcodetostr)
-.PHONY : resourcemodel_clean
-
-$(call gb_Library_get_clean_target,resourcemodel) : resourcemodel_clean
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_rtftok.mk b/writerfilter/Library_rtftok.mk
deleted file mode 100644
index c770e4028..000000000
--- a/writerfilter/Library_rtftok.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-# Not built
-$(eval $(call gb_Library_Library,rtftok))
-
-$(eval $(call gb_Library_set_include,rtftok,\
- $$(INCLUDE) \
- -I$(OUTDIR)/inc \
-))
-
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,rtftok,\
- $$(DEFS) \
- -DWRITERFILTER_RTFTOK_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
-))
-
-$(eval $(call gb_Library_add_linked_libs,rtftok,\
- cppu \
- cppuhelper \
- sal \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,rtftok,\
- writerfilter/source/rtftok/RTFParseException \
-))
-
-$(eval $(call gb_Library_add_generated_exception_objects,rtftok,\
- writerfilter/source/rtftok/RTFScanner \
-))
-
-$(call gb_GenCxxObject_get_source,writerfilter/source/rtftok/RTFScanner) : $(SRCDIR)/writerfilter/source/rtftok/FlexLexer.h $(SRCDIR)/writerfilter/source/rtftok/RTFScanner.skl $(SRCDIR)/writerfilter/source/rtftok/RTFScanner.lex
- mkdir -p $(dir $@) && \
- flex -+ -S$(SRCDIR)/writerfilter/source/rtftok/RTFScanner.skl -o$@ $(SRCDIR)/writerfilter/source/rtftok/RTFScanner.lex
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 3fe26f625..1de3e786f 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -25,50 +25,135 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
+include $(SRCDIR)/writerfilter/source/generated.mk
+
$(eval $(call gb_Library_Library,writerfilter))
+$(eval $(call gb_Library_add_package_headers,writerfilter,writerfilter_inc writerfilter_generated))
+
+$(eval $(call gb_Library_add_precompiled_header,writerfilter,$(SRCDIR)/writerfilter/PCH_FILE))
+
+$(eval $(call gb_Library_set_componentfile,writerfilter,writerfilter/util/writerfilter))
+
$(eval $(call gb_Library_set_include,writerfilter,\
$$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
-I$(OUTDIR)/inc/offuh \
+ -I$(realpath $(SRCDIR)/writerfilter/inc) \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source/ooxml \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source/doctok \
+ -I$(realpath $(SRCDIR)/writerfilter/source/doctok) \
+ -I$(realpath $(SRCDIR)/writerfilter/source/ooxml) \
+ -I$(realpath $(SRCDIR)/writerfilter/source/dmapper) \
))
$(eval $(call gb_Library_set_componentfile,writerfilter,writerfilter/util/writerfilter))
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,writerfilter,\
- $$(DEFS) \
- -DWRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+$(eval $(call gb_Library_add_defs,writerfilter,\
+ -DWRITERFILTER_DLLIMPLEMENTATION \
))
+$(call gb_Library_use_external,writerfilter,libxml2)
+
$(eval $(call gb_Library_add_linked_libs,writerfilter,\
- resourcemodel \
comphelper \
cppu \
cppuhelper \
- doctok \
i18nisolang1 \
i18npaper \
oox \
- ooxml \
sal \
sot \
tl \
utl \
- xml2 \
$(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,writerfilter,\
+ writerfilter/source/dmapper/BorderHandler \
+ writerfilter/source/dmapper/CellColorHandler \
+ writerfilter/source/dmapper/CellMarginHandler \
+ writerfilter/source/dmapper/ConversionHelper \
+ writerfilter/source/dmapper/DomainMapper \
+ writerfilter/source/dmapper/DomainMapperTableHandler \
+ writerfilter/source/dmapper/DomainMapperTableManager \
+ writerfilter/source/dmapper/DomainMapper_Impl \
+ writerfilter/source/dmapper/FFDataHandler \
+ writerfilter/source/dmapper/FontTable \
+ writerfilter/source/dmapper/FormControlHelper \
+ writerfilter/source/dmapper/GraphicHelpers \
+ writerfilter/source/dmapper/GraphicImport \
+ writerfilter/source/dmapper/MeasureHandler \
+ writerfilter/source/dmapper/ModelEventListener \
+ writerfilter/source/dmapper/NumberingManager \
+ writerfilter/source/dmapper/OLEHandler \
+ writerfilter/source/dmapper/PageBordersHandler \
+ writerfilter/source/dmapper/PropertyIds \
+ writerfilter/source/dmapper/PropertyMap \
+ writerfilter/source/dmapper/PropertyMapHelper \
+ writerfilter/source/dmapper/SectionColumnHandler \
+ writerfilter/source/dmapper/SettingsTable \
+ writerfilter/source/dmapper/StyleSheetTable \
+ writerfilter/source/dmapper/TDefTableHandler \
+ writerfilter/source/dmapper/TablePropertiesHandler \
+ writerfilter/source/dmapper/TblStylePrHandler \
+ writerfilter/source/dmapper/ThemeTable \
+ writerfilter/source/dmapper/WrapPolygonHandler \
+ writerfilter/source/doctok/Dff \
+ writerfilter/source/doctok/DffImpl \
+ writerfilter/source/doctok/WW8Annotation \
+ writerfilter/source/doctok/WW8BinTableImpl \
+ writerfilter/source/doctok/WW8Clx \
+ writerfilter/source/doctok/WW8CpAndFc \
+ writerfilter/source/doctok/WW8DocumentImpl \
+ writerfilter/source/doctok/WW8FKPImpl \
+ writerfilter/source/doctok/WW8FontTable \
+ writerfilter/source/doctok/WW8LFOTable \
+ writerfilter/source/doctok/WW8ListTable \
+ writerfilter/source/doctok/WW8OutputWithDepth \
+ writerfilter/source/doctok/WW8Picture \
+ writerfilter/source/doctok/WW8PieceTableImpl \
+ writerfilter/source/doctok/WW8PropertySetImpl \
+ writerfilter/source/doctok/WW8ResourceModelImpl \
+ writerfilter/source/doctok/WW8StreamImpl \
+ writerfilter/source/doctok/WW8StructBase \
+ writerfilter/source/doctok/WW8Sttbf \
+ writerfilter/source/doctok/WW8StyleSheet \
+ writerfilter/source/doctok/WW8Table \
+ writerfilter/source/doctok/WW8Text \
writerfilter/source/filter/ImportFilter \
writerfilter/source/filter/RtfFilter \
writerfilter/source/filter/WriterFilter \
writerfilter/source/filter/WriterFilterDetection \
+ writerfilter/source/ooxml/Handler \
+ writerfilter/source/ooxml/OOXMLBinaryObjectReference \
+ writerfilter/source/ooxml/OOXMLDocumentImpl \
+ writerfilter/source/ooxml/OOXMLFactory \
+ writerfilter/source/ooxml/OOXMLFastContextHandler \
+ writerfilter/source/ooxml/OOXMLFastDocumentHandler \
+ writerfilter/source/ooxml/OOXMLFastTokenHandler \
+ writerfilter/source/ooxml/OOXMLParserState \
+ writerfilter/source/ooxml/OOXMLPropertySetImpl \
+ writerfilter/source/ooxml/OOXMLStreamImpl \
+ writerfilter/source/resourcemodel/Fraction \
+ writerfilter/source/resourcemodel/LoggedResources \
+ writerfilter/source/resourcemodel/Protocol \
+ writerfilter/source/resourcemodel/ResourceModelHelper \
+ writerfilter/source/resourcemodel/TagLogger \
+ writerfilter/source/resourcemodel/Token \
+ writerfilter/source/resourcemodel/WW8Analyzer \
+ writerfilter/source/resourcemodel/XPathLogger \
+ writerfilter/source/resourcemodel/resourcemodel \
+ writerfilter/source/resourcemodel/util \
+ writerfilter/source/rtftok/RTFParseException \
))
+$(eval $(call gb_Library_add_generated_exception_objects,writerfilter,\
+ $(patsubst %,CustomTarget/writerfilter/source/OOXMLFactory_%,$(WRITERFILTER_OOXMLNAMESPACES)) \
+ CustomTarget/writerfilter/source/OOXMLFactory_generated \
+ CustomTarget/writerfilter/source/OOXMLFactory_values \
+ CustomTarget/writerfilter/source/qnametostr \
+ CustomTarget/writerfilter/source/resources \
+ CustomTarget/writerfilter/source/sprmcodetostr \
+))
# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_writerfilter_debug.mk b/writerfilter/Library_writerfilter_debug.mk
new file mode 100644
index 000000000..dabf1f98b
--- /dev/null
+++ b/writerfilter/Library_writerfilter_debug.mk
@@ -0,0 +1,60 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,writerfilter_debug))
+
+$(eval $(call gb_Library_set_include,writerfilter_debug,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(SRCDIR)/writerfilter/inc \
+))
+
+$(eval $(call gb_Library_add_linked_libs,writerfilter_debug,\
+ writerfilter \
+ comphelper \
+ ucbhelper \
+ cppuhelper \
+ cppu \
+ sal \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,writerfilter_debug,\
+ writerfilter/unocomponent/debugservices/doctok/DocTokTestService \
+ writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService \
+ writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService \
+ writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService \
+ writerfilter/unocomponent/component \
+))
+
+# disabled
+# writerfilter/unocomponent/debugservices/rtftok/ScannerTestService \
+# writerfilter/unocomponent/debugservices/rtftok/XMLScanner \
+
+# vim: set noet sw=4 ts=4:
+
diff --git a/writerfilter/Library_writerfilter_uno.mk b/writerfilter/Library_writerfilter_uno.mk
deleted file mode 100644
index 436cd3a0f..000000000
--- a/writerfilter/Library_writerfilter_uno.mk
+++ /dev/null
@@ -1,68 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,writerfilter_uno))
-
-$(eval $(call gb_Library_set_include,writerfilter_uno,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
- -I$(OUTDIR)/inc/offuh \
-))
-
-$(eval $(call gb_Library_set_defs,writerfilter_uno,\
- $$(DEFS) \
- -DWRITERFILTER_WRITERFILTER_UNO_DLLIMPLEMENTATION \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_linked_libs,writerfilter_uno,\
- comphelper \
- cppu \
- cppuhelper \
- doctok \
- ooxml \
- resourcemodel \
- sal \
- ucbhelper \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,writerfilter_uno,\
- writerfilter/unocomponent/component \
- writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService \
- writerfilter/unocomponent/debugservices/doctok/DocTokTestService \
- writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService \
- writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService \
-))
-
-# not used
- # writerfilter/unocomponent/debugservices/rtftok/ScannerTestService \
- # writerfilter/unocomponent/debugservices/rtftok/XMLScanner \
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Module_writerfilter.mk b/writerfilter/Module_writerfilter.mk
index d19925236..d51031d8b 100644
--- a/writerfilter/Module_writerfilter.mk
+++ b/writerfilter/Module_writerfilter.mk
@@ -28,13 +28,14 @@
$(eval $(call gb_Module_Module,writerfilter))
$(eval $(call gb_Module_add_targets,writerfilter,\
- Library_doctok \
- Library_ooxml \
- Library_resourcemodel \
Library_writerfilter \
- Library_writerfilter_uno \
- Package_generated \
+ Package_inc \
+ Package_writerfilter_generated \
))
+# Library_doctok \
+# Library_ooxml \
+# Library_resourcemodel \
+# Library_writerfilter_uno \
# not used
# Library_rtftok
diff --git a/writerfilter/Package_generated.mk b/writerfilter/Package_generated.mk
deleted file mode 100644
index 682c3c6bb..000000000
--- a/writerfilter/Package_generated.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Package_Package,writerfilter_generated,$(WORKDIR)/writerfilter/inc/doctok))
-
-$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/sprmids.hxx,sprmids.hxx))
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Package_inc.mk b/writerfilter/Package_inc.mk
new file mode 100644
index 000000000..57ec0bea2
--- /dev/null
+++ b/writerfilter/Package_inc.mk
@@ -0,0 +1,35 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,writerfilter_inc,$(SRCDIR)/writerfilter/inc))
+
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/WriterFilterDllApi.hxx,WriterFilterDllApi.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/resourcemodel/OutputWithDepth.hxx,resourcemodel/OutputWithDepth.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/resourcemodel/WW8ResourceModel.hxx,resourcemodel/WW8ResourceModel.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/dmapper/DomainMapper.hxx,dmapper/DomainMapper.hxx))
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Package_writerfilter_generated.mk b/writerfilter/Package_writerfilter_generated.mk
new file mode 100644
index 000000000..6f557e56e
--- /dev/null
+++ b/writerfilter/Package_writerfilter_generated.mk
@@ -0,0 +1,80 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call \
+ gb_Package_Package,writerfilter_generated,$(WORKDIR)/CustomTarget/writerfilter/source))
+
+$(eval $(call \
+ gb_Package_add_customtarget,writerfilter_generated,writerfilter/source,SRCDIR))
+
+$(eval $(call \
+ gb_CustomTarget_add_outdir_dependencies,writerfilter/source,\
+ $(gb_XSLTPROCTARGET) \
+ $(OUTDIR)/inc/oox/tokens.txt \
+ $(OUTDIR)/inc/oox/namespaces.txt \
+))
+
+$(eval $(call \
+ gb_CustomTarget_add_dependencies,writerfilter/source,\
+ writerfilter/source/doctok/resources.xmi \
+ writerfilter/source/doctok/resources.xsl \
+ writerfilter/source/doctok/resourcesimpl.xsl \
+ writerfilter/source/doctok/resourceids.xsl \
+ writerfilter/source/doctok/sprmids.xsl \
+ writerfilter/source/doctok/resourcetools.xsl \
+ writerfilter/source/ooxml/model.xml \
+ writerfilter/source/ooxml/modelpreprocess.xsl \
+ writerfilter/source/ooxml/factorytools.xsl \
+ writerfilter/source/ooxml/fasttokens.xsl \
+ writerfilter/source/ooxml/namespaceids.xsl \
+ writerfilter/source/ooxml/factory_values.xsl \
+ writerfilter/source/ooxml/factoryimpl_values.xsl \
+ writerfilter/source/ooxml/resourceids.xsl \
+ writerfilter/source/ooxml/gperffasttokenhandler.xsl \
+ writerfilter/source/ooxml/gperffasttokenhandler.xsl \
+ writerfilter/source/ooxml/tokenxmlheader \
+ writerfilter/source/ooxml/tokenxmlfooter \
+ writerfilter/source/ooxml/factoryinc.xsl \
+ writerfilter/source/ooxml/factoryimpl.xsl \
+ writerfilter/source/ooxml/factoryimpl_ns.xsl \
+ writerfilter/source/ooxml/factory_ns.xsl \
+ writerfilter/source/rtftok/RTFScanner.lex \
+ writerfilter/source/rtftok/RTFScanner.skl \
+ writerfilter/source/doctok/sprmcodetostr.xsl \
+ writerfilter/source/doctok/qnametostr.xsl \
+ writerfilter/source/ooxml/qnametostr.xsl \
+ writerfilter/source/resourcemodel/namespace_preprocess.pl \
+ writerfilter/source/resourcemodel/qnametostrheader \
+ writerfilter/source/resourcemodel/qnametostrfooter \
+ writerfilter/source/resourcemodel/sprmcodetostrheader \
+ writerfilter/source/resourcemodel/sprmcodetostrfooter \
+))
+
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/sprmids.hxx,doctok/sprmids.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/resourceids.hxx,doctok/resourceids.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/ooxml/resourceids.hxx,ooxml/resourceids.hxx))
+
diff --git a/writerfilter/debug_setup.mk b/writerfilter/debug_setup.mk
deleted file mode 100644
index 811d27949..000000000
--- a/writerfilter/debug_setup.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-define writerfilter_debug_flags
-$(if $(filter-out 0 1,$(strip $(gb_DEBUGLEVEL))),\
- -DDEBUG_DOMAINMAPPER \
- -DDEBUG_ELEMENT \
- -DDEBUG_RESOLVE \
- -DDEBUG_CONTEXT_STACK \
- -DDEBUG_ATTRIBUTES \
- -DDEBUG_PROPERTIES \
- -DDEBUG_CONTEXT_HANDLER \
- -DDEBUG_IMPORT \
-)
-endef
diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index 1e6afde10..3e4f62064 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,39 +30,11 @@
#include "sal/types.h"
-#if defined(WRITERFILTER_DOCTOK_DLLIMPLEMENTATION)
-#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#if defined(WRITERFILTER_DLLIMPLEMENTATION)
+#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
-
-#if defined(WRITERFILTER_OOXML_DLLIMPLEMENTATION)
-#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-#if defined(WRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION)
-#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-#if defined(WRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION)
-#define WRITERFILTER_WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-#if defined(WRITERFILTER_WRITERFILTER_UNO_DLLIMPLEMENTATION)
-#define WRITERFILTER_WRITERFILTER_UNO_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_WRITERFILTER_UNO_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-// This one can be shared
#define WRITERFILTER_DLLPRIVATE SAL_DLLPRIVATE
#endif /* INCLUDED_WRITERFILTERDLLAPI_H */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx
index 526cbedb9..bbd19cd1d 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -78,7 +78,7 @@ enum SourceDocumentType
DOCUMENT_OOXML,
DOCUMENT_RTF
};
-class WRITERFILTER_OOXML_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
+class WRITERFILTER_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
public BinaryObj, public LoggedStream
{
DomainMapper_Impl *m_pImpl;
diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx
index 816340206..75ea456c1 100644
--- a/writerfilter/inc/doctok/WW8Document.hxx
+++ b/writerfilter/inc/doctok/WW8Document.hxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star;
stream consists of substreams that are identified by string
identifiers.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Stream
+class WRITERFILTER_DLLPUBLIC WW8Stream
{
public:
/**
@@ -107,7 +107,7 @@ public:
A property.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Property
+class WRITERFILTER_DLLPUBLIC WW8Property
{
public:
/**
@@ -154,7 +154,7 @@ public:
}
\endcode
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySetIterator
+class WRITERFILTER_DLLPUBLIC WW8PropertySetIterator
{
public:
typedef boost::shared_ptr<WW8PropertySetIterator> Pointer_t;
@@ -191,7 +191,7 @@ bool operator != (const WW8PropertySetIterator & rA,
/**
A set of properties.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySet
+class WRITERFILTER_DLLPUBLIC WW8PropertySet
{
public:
typedef boost::shared_ptr<WW8PropertySet> Pointer_t;
@@ -278,7 +278,7 @@ enum PropertyType {
The use of the iterator is analogous to WW8PropertySetIterator.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentIterator
+class WRITERFILTER_DLLPUBLIC WW8DocumentIterator
{
public:
typedef boost::shared_ptr<WW8DocumentIterator> Pointer_t;
@@ -393,7 +393,7 @@ public:
/**
A Word 8 document.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Document :
+class WRITERFILTER_DLLPUBLIC WW8Document :
public writerfilter::Reference<Stream>
{
public:
@@ -425,7 +425,7 @@ public:
virtual WW8DocumentIterator::Pointer_t end() = 0;
};
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentFactory
+class WRITERFILTER_DLLPUBLIC WW8DocumentFactory
{
public:
static WW8Stream::Pointer_t
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index fb4e07863..ab25fb5b2 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -80,7 +80,7 @@ namespace ooxml
using namespace com::sun::star;
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream
+class WRITERFILTER_DLLPUBLIC OOXMLStream
{
public:
enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, FONTTABLE, NUMBERING,
@@ -124,7 +124,7 @@ public:
};
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
+class WRITERFILTER_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
{
public:
/**
@@ -251,7 +251,7 @@ public:
};
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocumentFactory
+class WRITERFILTER_DLLPUBLIC OOXMLDocumentFactory
{
public:
static OOXMLStream::Pointer_t
diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx
index b3546963e..092775d05 100644
--- a/writerfilter/inc/resourcemodel/Fraction.hxx
+++ b/writerfilter/inc/resourcemodel/Fraction.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
namespace resourcemodel {
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Fraction
+class WRITERFILTER_DLLPUBLIC Fraction
{
public:
explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1);
diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx
index c2340ac28..97ca84325 100644
--- a/writerfilter/inc/resourcemodel/LoggedResources.hxx
+++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx
@@ -36,7 +36,7 @@
namespace writerfilter
{
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedResourcesHelper
+class WRITERFILTER_DLLPUBLIC LoggedResourcesHelper
{
public:
explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -56,7 +56,7 @@ private:
string msPrefix;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedStream : public Stream
+class WRITERFILTER_DLLPUBLIC LoggedStream : public Stream
{
public:
explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -96,7 +96,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedProperties : public Properties
+class WRITERFILTER_DLLPUBLIC LoggedProperties : public Properties
{
public:
explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -112,7 +112,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedTable : public Table
+class WRITERFILTER_DLLPUBLIC LoggedTable : public Table
{
public:
explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix);
diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/resourcemodel/QNameToString.hxx
index 293b9d682..67bfdc5c8 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/resourcemodel/QNameToString.hxx
@@ -39,7 +39,7 @@ namespace writerfilter
{
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString
+class WRITERFILTER_DLLPUBLIC QNameToString
{
typedef boost::shared_ptr<QNameToString> Pointer_t;
typedef map < Id, string > Map;
@@ -63,7 +63,7 @@ public:
string operator()(Id qName);
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SprmIdToString
+class WRITERFILTER_DLLPUBLIC SprmIdToString
{
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index c01a1d1c8..fd90575da 100644
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -33,8 +33,8 @@
namespace writerfilter {
namespace resourcemodel {
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
+void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
}}
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx
index cee61d9d2..6ea3da5e1 100644
--- a/writerfilter/inc/resourcemodel/TableManager.hxx
+++ b/writerfilter/inc/resourcemodel/TableManager.hxx
@@ -53,7 +53,7 @@ template <typename T, typename PropertiesPointer>
/**
Class to handle events generated by TableManager::resolveCurrentTable
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TableDataHandler
+class WRITERFILTER_DLLPUBLIC TableDataHandler
{
public:
typedef boost::shared_ptr<TableDataHandler> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index d95103039..ce766b5b1 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -47,7 +47,7 @@ namespace writerfilter
virtual std::string toString(const Id & id) const = 0;
};
- class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
+ class WRITERFILTER_DLLPUBLIC TagLogger
{
public:
typedef TagLogger* Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index c28f63c83..d70c30170 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,8 +25,8 @@
*
************************************************************************/
-#ifndef INCLUDED_WW8RESOURCEMODEL_HXX
-#define INCLUDED_WW8RESOURCEMODEL_HXX
+#ifndef INCLUDED_WW8_EVENT_HANDLER_HXX
+#define INCLUDED_WW8_EVENT_HANDLER_HXX
#include <string>
#include <memory>
@@ -90,7 +89,7 @@ using namespace ::std;
*/
template <class T>
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
+class WRITERFILTER_DLLPUBLIC Reference
{
public:
/**
@@ -125,7 +124,7 @@ class Sprm;
/**
Handler for properties.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
+class WRITERFILTER_DLLPUBLIC Properties
{
public:
/**
@@ -148,7 +147,7 @@ public:
/**
Handler for tables.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
+class WRITERFILTER_DLLPUBLIC Table
{
public:
typedef boost::shared_ptr<Table> Pointer_t;
@@ -164,7 +163,7 @@ public:
/**
Handler for binary objects.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
+class WRITERFILTER_DLLPUBLIC BinaryObj
{
public:
/**
@@ -181,7 +180,7 @@ public:
/**
Handler for a stream.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
+class WRITERFILTER_DLLPUBLIC Stream
{
public:
/**
@@ -285,7 +284,7 @@ public:
makes no sense for a certain value, e.g. the integer value of a
string.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
+class WRITERFILTER_DLLPUBLIC Value
{
public:
/**
@@ -333,7 +332,7 @@ public:
An SPRM.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
+class WRITERFILTER_DLLPUBLIC Sprm
{
public:
typedef auto_ptr<Sprm> Pointer_t;
@@ -383,21 +382,48 @@ public:
/**
Creates handler for a stream.
*/
-Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createStreamHandler();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
+
+void WRITERFILTER_DLLPUBLIC analyzerIds();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+
+void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
+ const rtl::OUString & /*str*/);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+
+class Token_t
+{
+ sal_Int32 m_nId;
+#ifdef DEBUG
+ ::std::string m_string;
+#endif
+
+ void assign(sal_Int32 nId);
+
+public:
+ Token_t();
+ Token_t(sal_Int32 nId);
+ virtual ~Token_t();
+
+ sal_Int32 getId() const;
+ operator sal_Int32() const;
+ Token_t & operator = (sal_Int32 n);
+
+#ifdef DEBUG
+ ::std::string toString() const;
+#endif
+};
+
+struct TokenHash
+{
+ size_t operator()(const Token_t & rToken) const;
+};
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds();
- Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createAnalyzer();
-
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC logger(string prefix, string message);
-
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
- const rtl::OUString & /*str*/);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
-
}
-#endif // INCLUDED_WW8RESOURCEMODEL_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+#endif // INCLUDED_WW8_EVENT_HANDLER_HXX
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx
index f81f059e7..c975ac2ef 100644
--- a/writerfilter/inc/resourcemodel/XPathLogger.hxx
+++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx
@@ -41,7 +41,7 @@ using ::std::stack;
using ::std::string;
using ::std::vector;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC XPathLogger
+class WRITERFILTER_DLLPUBLIC XPathLogger
{
typedef boost::unordered_map<string, unsigned int> TokenMap_t;
typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
diff --git a/writerfilter/inc/resourcemodel/exceptions.hxx b/writerfilter/inc/resourcemodel/exceptions.hxx
index ef70c54d2..af61db5e3 100644
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ b/writerfilter/inc/resourcemodel/exceptions.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Exception
+class WRITERFILTER_DLLPUBLIC Exception
{
string mText;
@@ -45,13 +45,13 @@ public:
const string & getText() const { return mText; }
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionNotFound : public Exception
+class WRITERFILTER_DLLPUBLIC ExceptionNotFound : public Exception
{
public:
ExceptionNotFound(string text) : Exception(text) {}
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionOutOfBounds : public Exception
+class WRITERFILTER_DLLPUBLIC ExceptionOutOfBounds : public Exception
{
public:
ExceptionOutOfBounds(string text) : Exception(text) {}
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx
index 5bfd15bdf..cab0b17b2 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/inc/resourcemodel/util.hxx
@@ -38,10 +38,10 @@ namespace writerfilter
using namespace ::std;
using namespace ::com::sun::star;
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC xmlify(const string & str);
+ string WRITERFILTER_DLLPUBLIC xmlify(const string & str);
#if OSL_DEBUG_LEVEL > 1
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC propertysetToString
+ string WRITERFILTER_DLLPUBLIC propertysetToString
(uno::Reference<beans::XPropertySet> const & rProps);
string toString(uno::Reference< text::XTextRange > textRange);
diff --git a/writerfilter/prj/build.lst b/writerfilter/prj/build.lst
index 0553bc3e0..61d0c5f8f 100644
--- a/writerfilter/prj/build.lst
+++ b/writerfilter/prj/build.lst
@@ -1,3 +1,2 @@
wf writerfilter : soltools sal BOOST:boost cppu cppuhelper ucbhelper tools svx LIBXSLT:libxslt oox NULL
-wf writerfilter usr1 - all wf_mkout NULL
wf writerfilter\prj nmake - all wf_prj NULL
diff --git a/writerfilter/prj/makefile.mk b/writerfilter/prj/makefile.mk
index e312a7cca..bcb497038 100755
--- a/writerfilter/prj/makefile.mk
+++ b/writerfilter/prj/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
diff --git a/writerfilter/qa/complex/ooxml/LoadDocuments.java b/writerfilter/qa/complex/ooxml/LoadDocuments.java
index 6f05391b6..09185e688 100644
--- a/writerfilter/qa/complex/ooxml/LoadDocuments.java
+++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java
@@ -1,9 +1,19 @@
package complex.ooxml;
+
+import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
import complexlib.ComplexTestCase;
import java.io.File;
-import com.sun.star.text.XTextDocument;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.Argument;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/*
* To change this template, choose Tools | Templates
@@ -14,38 +24,54 @@ import com.sun.star.text.XTextDocument;
*
* @author hb137859
*/
-public class LoadDocuments extends ComplexTestCase {
- private XMultiServiceFactory m_xMSF;
-
- @Override
- public String[] getTestMethodNames() {
- return new String [] {
- "test1"
- };
- }
-
- public void before() throws Exception {
- m_xMSF = (XMultiServiceFactory) param.getMSF();
- }
-
- public void test1() {
- String testDocumentsPath = util.utils.getFullTestDocName("");
- log.println("Test documents in:" + testDocumentsPath);
+public class LoadDocuments {
+ @Test public void test1() {
+ String testDocumentsPath = Argument.get("tdoc");
+ System.out.println("Test documents in:" + testDocumentsPath);
File dir = new File(testDocumentsPath);
String [] files = dir.list();
- if (files != null) {
- for (int i = 0; i < files.length; ++i) {
- log.println(files[i]);
- String url = util.utils.getFullTestURL(files[i]);
- log.println(url);
-
- XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url);
- util.DesktopTools.closeDoc(xDoc);
+ try {
+ if (files != null) {
+ for (int i = 0; i < files.length; ++i) {
+ System.out.println(files[i]);
+ String url = TestDocument.getUrl(files[i]);
+ System.out.println(url);
+
+ XComponent xDoc = util.DesktopTools.loadDoc(getMSF(), url, null);
+ System.out.println("loaded.");
+ util.DesktopTools.closeDoc(xDoc);
+ System.out.println("done.");
+ }
+ } else {
+ fail("Files not found");
}
- } else {
- failed();
}
+ catch (Exception e) {
+ System.out.println(e);
+ fail("failed");
+ }
+ }
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception
+ {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
}
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/writerfilter/qa/complex/ooxml/TestDocument.java b/writerfilter/qa/complex/ooxml/TestDocument.java
new file mode 100644
index 000000000..95c5fe50b
--- /dev/null
+++ b/writerfilter/qa/complex/ooxml/TestDocument.java
@@ -0,0 +1,40 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.ooxml;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+import org.openoffice.test.Argument;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/writerfilter/qa/complex/ooxml/makefile.mk b/writerfilter/qa/complex/ooxml/makefile.mk
deleted file mode 100644
index 77df9fe09..000000000
--- a/writerfilter/qa/complex/ooxml/makefile.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = PropertyValues
-PRJNAME = $(TARGET)
-PACKAGE = complex$/ooxml
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = LoadDocuments.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# build package name with "." instead of $/
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-run: \
- LoadDocuments
-
-RUN: run
-
-LoadDocuments:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).LoadDocuments
-
diff --git a/writerfilter/qa/cppunittests/doctok/makefile.mk b/writerfilter/qa/cppunittests/doctok/makefile.mk
deleted file mode 100644
index 2896e297a..000000000
--- a/writerfilter/qa/cppunittests/doctok/makefile.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=writerfilter
-TARGET=test-doctok
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-# BEGIN ----------------------------------------------------------------
-# auto generated Target:doctok by codegen.pl
-SHL1OBJS= \
- $(SLO)$/testdoctok.obj
-
-SHL1TARGET= testdoctok
-SHL1STDLIBS=\
- $(SALLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(CPPUNITLIB)
-
-SHL1LIBS=\
- $(SLB)$/doctok.lib
-SHL1DEPS= \
- $(SHL1LIBS)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-# DEF1EXPORTFILE= export.exp
-SHL1VERSIONMAP= export.map
-# auto generated Target:doctok
-# END ------------------------------------------------------------------
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
diff --git a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
index 7ddabe123..0678831ab 100644
--- a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
+++ b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
@@ -1,227 +1,176 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// autogenerated file with codegen.pl
-#include <testshl/simpleheader.hxx>
-
+#include <sal/cppunit.h>
#include <osl/process.h>
-#include <ucbhelper/contentbroker.hxx>
#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <ucbhelper/contentbroker.hxx>
#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/container/XNameContainer.hpp>
+#include <iostream>
-#include <doctok/exceptions.hxx>
#include <doctok/WW8Document.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
-
-#include <iostream>
namespace testdoctok
{
- using namespace ::std;
- using namespace ::com::sun::star;
- using namespace doctok;
+using namespace ::std;
+using namespace ::com::sun::star;
+using namespace ::writerfilter::doctok;
- uno::Reference<io::XInputStream> xStream;
- uno::Reference<uno::XComponentContext> xContext;
- WW8Document::Pointer_t pDocument;
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess;
+uno::Reference<io::XInputStream> xStream;
+uno::Reference<uno::XComponentContext> xContext;
+WW8Document::Pointer_t pDocument;
+uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess;
- class test : public CppUnit::TestFixture
+class test : public CppUnit::TestFixture
+{
+
+public:
+ // initialise your test code values here.
+ void setUp()
{
+ }
- public:
- // initialise your test code values here.
- void setUp()
- {
- }
+ void tearDown()
+ {
+ }
- void tearDown()
- {
- }
+ void testInitUno()
+ {
+ bool bResult = false;
- void testInitUno()
- {
- bool bResult = false;
+ // initialise UCB-Broker
+ uno::Reference<uno::XComponentContext>
+ xComponentContext
+ (::cppu::defaultBootstrap_InitialComponentContext());
+ OSL_ASSERT( xComponentContext.is() );
- // initialise UCB-Broker
- uno::Reference<uno::XComponentContext>
- xComponentContext
- (::cppu::defaultBootstrap_InitialComponentContext());
- OSL_ASSERT( xComponentContext.is() );
+ xContext = xComponentContext;
- xContext = xComponentContext;
+ uno::Reference<lang::XMultiComponentFactory>
+ xFactory(xComponentContext->getServiceManager() );
+ OSL_ASSERT(xFactory.is());
- uno::Reference<lang::XMultiComponentFactory>
- xFactory(xComponentContext->getServiceManager() );
- OSL_ASSERT(xFactory.is());
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
- uno::Sequence<uno::Any> aUcbInitSequence(2);
- aUcbInitSequence[0] <<=
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
- aUcbInitSequence[1] <<=
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ uno::Reference<lang::XMultiServiceFactory>
+ xServiceFactory(xFactory, uno::UNO_QUERY);
+ OSL_ASSERT( xServiceFactory.is() );
- uno::Reference<lang::XMultiServiceFactory>
- xServiceFactory(xFactory, uno::UNO_QUERY);
- OSL_ASSERT( xServiceFactory.is() );
+ if (xServiceFactory.is())
+ {
+ sal_Bool bRet =
+ ::ucbhelper::ContentBroker::initialize(xServiceFactory,
+ aUcbInitSequence);
- if (xServiceFactory.is())
+ OSL_ASSERT(bRet);
+ if (bRet)
{
- sal_Bool bRet =
- ::ucb::ContentBroker::initialize(xServiceFactory,
- aUcbInitSequence);
-
- OSL_ASSERT(bRet);
- if (bRet)
- {
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
- xNameContainer(xFactory->createInstanceWithContext
+ uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
+ xNameContainer(xFactory->createInstanceWithContext
(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.ucb.SimpleFileAccess" )),
- xComponentContext), uno::UNO_QUERY );
+ xComponentContext), uno::UNO_QUERY );
- if (xNameContainer.is())
- {
- xSimpleFileAccess = xNameContainer;
+ if (xNameContainer.is())
+ {
+ xSimpleFileAccess = xNameContainer;
- bResult = true;
- }
+ bResult = true;
}
}
-
- CPPUNIT_ASSERT_MESSAGE("UNO initialization failed",
- bResult);
}
- // insert your test code here.
- void testOpenFile()
+ CPPUNIT_ASSERT_MESSAGE("UNO initialization failed",
+ bResult);
+ }
+
+ // insert your test code here.
+ void testOpenFile()
+ {
+ try
{
- try
- {
- rtl_uString *dir=NULL;
- osl_getProcessWorkingDir(&dir);
- rtl_uString *fname=NULL;
- rtl_uString_newFromAscii(&fname, "/test.doc");
- rtl_uString *absfile=NULL;
- rtl_uString_newConcat(&absfile, dir, fname);
+ rtl_uString *dir=NULL;
+ osl_getProcessWorkingDir(&dir);
+ rtl_uString *fname=NULL;
+ rtl_uString_newFromAscii(&fname, "/test.doc");
+ rtl_uString *absfile=NULL;
+ rtl_uString_newConcat(&absfile, dir, fname);
- rtl::OUString sInputFileURL( absfile );
+ rtl::OUString sInputFileURL( absfile );
- for (sal_uInt32 n = 0; n < sInputFileURL.getLength(); ++n)
- {
- sal_uChar nC = sInputFileURL[n];
+ for (sal_Int32 n = 0; n < sInputFileURL.getLength(); ++n)
+ {
+ sal_uChar nC = sInputFileURL[n];
- if (nC < 0xff && isprint(nC))
- clog << static_cast<char>(nC);
- else
- clog << ".";
- }
+ if (nC < 0xff && isprint(nC))
+ clog << static_cast<char>(nC);
+ else
+ clog << ".";
+ }
- clog << endl;
+ clog << endl;
- xStream = xSimpleFileAccess->openFileRead(sInputFileURL);
+ xStream = xSimpleFileAccess->openFileRead(sInputFileURL);
- WW8Stream::Pointer_t pStream =
- WW8DocumentFactory::createStream(xContext, xStream);
+ WW8Stream::Pointer_t pStream =
+ WW8DocumentFactory::createStream(xContext, xStream);
- pDocument = WW8DocumentFactory::createDocument(pStream);
- }
- catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
-
- CPPUNIT_ASSERT_MESSAGE("creating document failed",
- pDocument != NULL);
-
-#if 1
+ pDocument.reset(WW8DocumentFactory::createDocument(pStream));
}
-
- void testTraversal()
+ catch (doctok::Exception)
{
-#endif
- sal_uInt32 nResult = 0;
-
- try
- {
- WW8DocumentIterator::Pointer_t pIt = pDocument->begin();
- WW8DocumentIterator::Pointer_t pItEnd = pDocument->end();
-
- while (! pIt->equal(*pItEnd))
- {
- pIt->dump(clog);
-
- clog << endl;
-
- WW8PropertySet::Pointer_t pAttrs = pIt->getProperties();
-
- if (pAttrs != NULL)
- {
- pAttrs->dump(clog);
- }
+ clog << "Exception!!" << endl;
+ }
- pIt->getText().dump(clog);
- ++(*pIt);
- ++nResult;
- }
- }
+ CPPUNIT_ASSERT_MESSAGE("creating document failed",
+ pDocument != NULL);
catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
-
- char sBuffer[256];
- snprintf(sBuffer, 255, "%d", nResult);
- clog << "Iterator steps:" << sBuffer << endl;
-
- CPPUNIT_ASSERT_MESSAGE("traversing document failed",
- nResult > 0);
- }
+ }
- void testEvents()
+ void testEvents()
+ {
+ try
{
- try
- {
- Stream::Pointer_t pStream = doctok::createStreamHandler();
+ ::writerfilter::Stream::Pointer_t pStream = ::writerfilter::createStreamHandler();
- pDocument->resolve(*pStream);
- }
- catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
+ pDocument->resolve(*pStream);
}
-
- void testEnd()
+ catch (doctok::Exception)
{
- ::ucb::ContentBroker::deinitialize();
+ clog << "Exception!!" << endl;
}
+ }
- // Change the following lines only, if you add, remove or rename
- // member functions of the current class,
- // because these macros are need by auto register mechanism.
+ void testEnd()
+ {
+ ::ucbhelper::ContentBroker::deinitialize();
+ }
+
+ // Change the following lines only, if you add, remove or rename
+ // member functions of the current class,
+ // because these macros are need by auto register mechanism.
- CPPUNIT_TEST_SUITE(test);
- CPPUNIT_TEST(testInitUno);
- CPPUNIT_TEST(testOpenFile);
- CPPUNIT_TEST(testEvents);
- CPPUNIT_TEST(testEnd);
- CPPUNIT_TEST_SUITE_END();
- }; // class test
+ CPPUNIT_TEST_SUITE(test);
+ CPPUNIT_TEST(testInitUno);
+ CPPUNIT_TEST(testOpenFile);
+ CPPUNIT_TEST(testEvents);
+ CPPUNIT_TEST(testEnd);
+ CPPUNIT_TEST_SUITE_END();
+}; // class test
- // -----------------------------------------------------------------------------
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testdoctok::test, "doctok");
+// -----------------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testdoctok::test, "doctok");
} // namespace doctok
// -----------------------------------------------------------------------------
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/Makefile b/writerfilter/source/Makefile
new file mode 100644
index 000000000..7132007be
--- /dev/null
+++ b/writerfilter/source/Makefile
@@ -0,0 +1,231 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+WFDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(WFDIR)generated.mk
+include $(GBUILDDIR)/gbuild_simple.mk
+
+# doctok
+
+doctok :
+ mkdir doctok
+
+wf_SRC_doctok_Model=$(WFDIR)doctok/resources.xmi
+wf_SRC_doctok_Resources_xsl=$(WFDIR)doctok/resources.xsl
+wf_SRC_doctok_ResourcesImpl_xsl=$(WFDIR)doctok/resourcesimpl.xsl
+wf_SRC_doctok_ResourceIds_xsl=$(WFDIR)doctok/resourceids.xsl
+wf_SRC_doctok_SprmIds_xsl=$(WFDIR)doctok/sprmids.xsl
+wf_SRC_doctok_ResourceTools_xsl=$(WFDIR)doctok/resourcetools.xsl
+
+wf_GEN_doctok_SprmIds_hxx=doctok/sprmids.hxx
+wf_GEN_doctok_ResourceIds_hxx=doctok/resourceids.hxx
+wf_GEN_doctok_Resources_hxx=doctok/resources.hxx
+wf_GEN_doctok_Resources_cxx=resources.cxx
+
+$(wf_GEN_doctok_SprmIds_hxx) : doctok $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_ResourceIds_hxx) : doctok $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_Resources_hxx) : doctok $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_Resources_cxx) : doctok $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model) $(wf_SRC_doctok_ResourceTools_xsl)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model)) > $@
+
+# ooxml
+
+ooxml :
+ mkdir ooxml
+
+wf_SRC_ooxml_Model=$(WFDIR)ooxml/model.xml
+wf_SRC_ooxml_Preprocess_xsl=$(WFDIR)ooxml/modelpreprocess.xsl
+wf_SRC_ooxml_FactoryTools_xsl=$(WFDIR)ooxml/factorytools.xsl
+wf_SRC_ooxml_FastTokens_xsl=$(WFDIR)ooxml/fasttokens.xsl
+wf_SRC_ooxml_NamespaceIds_xsl=$(WFDIR)ooxml/namespaceids.xsl
+wf_SRC_ooxml_FactoryValues_xsl=$(WFDIR)ooxml/factory_values.xsl
+wf_SRC_ooxml_FactoryValuesImpl_xsl=$(WFDIR)ooxml/factoryimpl_values.xsl
+wf_SRC_ooxml_ResourceIds_xsl=$(WFDIR)ooxml/resourceids.xsl
+wf_SRC_ooxml_GperfFastTokenHandler_xsl=$(WFDIR)ooxml/gperffasttokenhandler.xsl
+wf_SRC_ooxml_Analyze_model_xsl=$(WFDIR)ooxml/analyzemodel.xsl
+wf_SRC_ooxml_Status_stage1_sh=$(WFDIR)ooxml/stage1.sh
+wf_SRC_ooxml_Status_stage2_xsl=$(WFDIR)ooxml/analyzestage2.xsl
+wf_SRC_ooxml_Status_stage3_xsl=$(WFDIR)ooxml/analyzestage3.xsl
+wf_SRC_ooxml_Status_todo_xsl=$(WFDIR)ooxml/todo.xsl
+wf_SRC_ooxml_Status_efforts_xsl=$(WFDIR)ooxml/effort.xsl
+
+wf_GEN_ooxml_ResourceIds_hxx=ooxml/resourceids.hxx
+
+wf_GEN_ooxml_token_xml=token.xml
+wf_GEN_ooxml_token_tmp=token.tmp
+
+wf_GEN_ooxml_Factory_hxx=OOXMLFactory_generated.hxx
+wf_GEN_ooxml_Factory_cxx=OOXMLFactory_generated.cxx
+wf_GEN_ooxml_FastTokens_hxx=ooxml/OOXMLFastTokens.hxx
+wf_GEN_ooxml_NamespaceIds_hxx=ooxml/OOXMLnamespaceids.hxx
+wf_GEN_ooxml_FactoryValues_hxx=OOXMLFactory_values.hxx
+wf_GEN_ooxml_FactoryValues_cxx=OOXMLFactory_values.cxx
+wf_GEN_ooxml_GperfFastToken_hxx=gperffasttoken.hxx
+wf_GEN_ooxml_Model_processed=model_preprocessed.xml
+wf_GEN_ooxml_Model_analyzed=ooxml/model_analyzed.xml
+wf_GEN_ooxml_Status_stage1=ooxml/status_stage1.xml
+wf_GEN_ooxml_Status_stage2=ooxml/status_stage2.xml
+wf_GEN_ooxml_Status_stage3=ooxml/status_stage3.xml
+wf_GEN_ooxml_Status_todo=ooxml/todo.xml
+wf_GEN_ooxml_Status_efforts=ooxml/efforts.csv
+
+$(wf_GEN_ooxml_token_tmp) : $(OUTDIR)/inc$(UPDMINOREXT)/oox/token/tokens.txt
+ cat $(OUTDIR)/inc$(UPDMINOREXT)/oox/token/tokens.txt \
+ | sed "s#\(.*\)#<fasttoken>\1</fasttoken>#" > $@
+
+$(wf_GEN_ooxml_token_xml) : $(WFDIR)ooxml/tokenxmlheader $(wf_GEN_ooxml_token_tmp) $(WFDIR)ooxml/tokenxmlfooter
+ cat $(WFDIR)ooxml/tokenxmlheader $(wf_GEN_ooxml_token_tmp) $(WFDIR)ooxml/tokenxmlfooter > $@
+
+$(wf_GEN_ooxml_FastTokens_hxx) : $(wf_SRC_ooxml_FastTokens_xsl) $(wf_GEN_ooxml_token_xml)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FastTokens_xsl) $(wf_GEN_ooxml_token_xml)) > $@
+
+$(wf_GEN_ooxml_Factory_hxx) : $(WFDIR)ooxml/factoryinc.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_Factory_cxx) : $(WFDIR)ooxml/factoryimpl.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+OOXMLFactory%.cxx : $(WFDIR)ooxml/factoryimpl_ns.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+OOXMLFactory%.hxx : $(WFDIR)ooxml/factory_ns.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_FactoryValues_hxx) : $(wf_SRC_ooxml_FactoryValues_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FactoryValues_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_FactoryValues_cxx) : $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_ResourceIds_hxx) : ooxml $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_NamespaceIds_hxx) : $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_GperfFastToken_hxx) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)) \
+ | tr -d '\r' | gperf -I -t -E -S1 -c -G -LC++ > $@
+
+$(wf_GEN_ooxml_Model_analyzed): $(wf_SRC_ooxml_Analyze_model_xsl) $(wf_SRC_ooxml_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_stage1) : $(wf_GEN_ooxml_Model_analyzed) $(wf_SRC_ooxml_stage1_sh)
+ $(wf_SRC_ooxml_Status_stage1_sh) $(wf_GEN_ooxml_Model_analyzed) $(WFDIR)dmapper > $@
+
+$(wf_GEN_ooxml_Status_stage2) : $(wf_SRC_ooxml_Status_stage2_xsl) $(wf_GEN_ooxml_Status_stage1)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_stage3) : $(wf_SRC_ooxml_Status_stage3_xsl) $(wf_GEN_ooxml_Status_stage2)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_todo) : $(wf_SRC_ooxml_Status_todo_xsl) $(wf_GEN_ooxml_Status_stage3)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_efforts) : $(wf_SRC_ooxml_Status_efforts_xsl) $(wf_GEN_ooxml_Status_todo)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+# rtftok
+
+wf_SRC_rtftok_scanner_lex=$(WFDIR)rtftok/RTFScanner.lex
+wf_SRC_rtftok_scanner_skl=$(WFDIR)rtftok/RTFScanner.skl
+
+wf_GEN_rtftok_scanner_cxx=RTFScanner.cxx
+
+# does not build, currently unused
+#$(wf_GEN_rtftok_scanner_cxx) : $(wf_SRC_rtftok_scanner_lex) $(wf_SRC_rtftok_scanner_skl)
+# flex -+ -S$(wf_SRC_rtftok_scanner_skl) -o$@ $(wf_SRC_rtftok_scanner_lex)
+
+# resourcemodel
+
+wf_GEN_model_QNameToStr_cxx=qnametostr.cxx
+wf_GEN_ooxml_QNameToStr_tmp=OOXMLqnameToStr.tmp
+wf_GEN_model_SprmCodeToStr_cxx=sprmcodetostr.cxx
+wf_GEN_model_SprmCodeToStr_tmp=sprmcodetostr.tmp
+wf_GEN_doctok_QnameToStr_tmp=DOCTOKqnameToStr.tmp
+wf_SRC_doctok_SprmCodeToStr_xsl=$(WFDIR)doctok/sprmcodetostr.xsl
+wf_SRC_doctok_QNameToStr_xsl=$(WFDIR)doctok/qnametostr.xsl
+wf_SRC_ooxml_QNameToStr_xsl=$(WFDIR)ooxml/qnametostr.xsl
+wf_SRC_model_NamespacePreprocess=$(WFDIR)resourcemodel/namespace_preprocess.pl
+wf_GEN_ooxml_Namespacesmap_xsl=namespacesmap.xsl
+wf_DEP_ooxml_namespaces_txt=$(OUTDIR)/inc/oox/namespaces.txt
+wf_GEN_ooxml_preprocess_xsl=modelpreprocess.xsl
+
+$(wf_GEN_ooxml_QNameToStr_tmp): $(wf_SRC_ooxml_QNameToStr_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_QNameToStr_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_doctok_QnameToStr_tmp): $(wf_SRC_doctok_QNameToStr_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_QNameToStr_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_model_QNameToStr_cxx): $(wf_GEN_ooxml_QNameToStr_tmp) $(wf_GEN_doctok_QnameToStr_tmp) $(WFDIR)resourcemodel/qnametostrheader $(WFDIR)resourcemodel/qnametostrfooter $(wf_SRC_ooxml_FactoryTools_xsl) $(wf_SRC_doctok_ResourceTools_xsl)
+ cat $(WFDIR)resourcemodel/qnametostrheader $(wf_GEN_ooxml_QNameToStr_tmp) $(wf_GEN_doctok_QnameToStr_tmp) $(WFDIR)resourcemodel/qnametostrfooter > $@
+
+$(wf_GEN_model_SprmCodeToStr_tmp) : $(wf_SRC_doctok_SprmCodeToStr_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_SprmCodeToStr_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_model_SprmCodeToStr_cxx): $(WFDIR)resourcemodel/sprmcodetostrheader $(wf_GEN_model_SprmCodeToStr_tmp) $(WFDIR)resourcemodel/sprmcodetostrfooter
+ cat $^ > $@
+
+$(wf_GEN_ooxml_Namespacesmap_xsl) : $(wf_SRC_ooxml_Model) $(wf_DEP_ooxml_namespaces_txt) $(wf_SRC_model_NamespacePreprocess)
+ $(PERL) $(wf_SRC_model_NamespacePreprocess) $(wf_DEP_ooxml_namespaces_txt) > $@
+
+$(wf_GEN_ooxml_preprocess_xsl) : $(wf_SRC_ooxml_Preprocess_xsl)
+ cp -f $(wf_SRC_ooxml_Preprocess_xsl) $@
+
+$(wf_GEN_ooxml_Model_processed) : $(wf_GEN_ooxml_Namespacesmap_xsl) $(wf_GEN_ooxml_preprocess_xsl) $(wf_SRC_ooxml_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_GEN_ooxml_Namespacesmap_xsl) $(wf_SRC_ooxml_Model)) > $@
+
+# all
+
+.DEFAULT_GOAL:=all
+.PHONY: all
+all : \
+ $(wf_GEN_doctok_SprmIds_hxx) \
+ $(wf_GEN_doctok_ResourceIds_hxx) \
+ $(wf_GEN_doctok_Resources_hxx) \
+ $(wf_GEN_doctok_Resources_cxx) \
+ $(wf_GEN_ooxml_ResourceIds_hxx) \
+ $(wf_GEN_ooxml_Factory_hxx) \
+ $(wf_GEN_ooxml_Factory_cxx) \
+ $(wf_GEN_ooxml_FactoryValues_hxx) \
+ $(wf_GEN_ooxml_FactoryValues_cxx) \
+ $(wf_GEN_ooxml_FastTokens_hxx) \
+ $(wf_GEN_ooxml_GperfFastToken_hxx) \
+ $(wf_GEN_ooxml_NamespaceIds_hxx) \
+ $(wf_GEN_model_QNameToStr_cxx) \
+ $(wf_GEN_model_SprmCodeToStr_cxx) \
+ $(patsubst %,OOXMLFactory_%.hxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
+ $(patsubst %,OOXMLFactory_%.cxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
+
+# $(wf_GEN_ooxml_Status_efforts) \
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 7e7bdebbc..9f04d0aea 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -54,7 +54,7 @@ void lcl_printProperties( uno::Sequence< beans::PropertyValue > aProps )
sValue = OUString::valueOf( nValue );
#if DEBUG
- fprintf( stderr, "Property %s: %s\n",
+ fprintf( stderr, "Property %s: %s\n",
OUSTR_TO_C( aProps[i].Name ),
OUSTR_TO_C( sValue ) );
#endif
diff --git a/writerfilter/source/filter/RtfFilter.hxx b/writerfilter/source/filter/RtfFilter.hxx
index 03488db64..aada3c609 100644
--- a/writerfilter/source/filter/RtfFilter.hxx
+++ b/writerfilter/source/filter/RtfFilter.hxx
@@ -39,7 +39,7 @@
#include <WriterFilterDllApi.hxx>
/// Common RTF filter, calls RtfImportFilter and RtfExportFilter via UNO.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC RtfFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_DLLPUBLIC RtfFilter : public cppu::WeakImplHelper5
<
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
diff --git a/writerfilter/source/filter/WriterFilter.hxx b/writerfilter/source/filter/WriterFilter.hxx
index 7afb2b765..aa57becfb 100644
--- a/writerfilter/source/filter/WriterFilter.hxx
+++ b/writerfilter/source/filter/WriterFilter.hxx
@@ -39,7 +39,7 @@
#include <WriterFilterDllApi.hxx>
/// Common DOC/DOCX filter, calls DocxExportFilter via UNO or does the DOC (currently unused) / DOCX import.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
<
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
diff --git a/writerfilter/source/filter/WriterFilterDetection.hxx b/writerfilter/source/filter/WriterFilterDetection.hxx
index 7bc6b02ef..07d9ae58d 100644
--- a/writerfilter/source/filter/WriterFilterDetection.hxx
+++ b/writerfilter/source/filter/WriterFilterDetection.hxx
@@ -35,7 +35,7 @@
#include <WriterFilterDllApi.hxx>
/// File format detection service for DOC (unused) / DOCX.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC WriterFilterDetection : public cppu::WeakImplHelper2
+class WRITERFILTER_DLLPUBLIC WriterFilterDetection : public cppu::WeakImplHelper2
<
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XServiceInfo
diff --git a/writerfilter/source/generated.mk b/writerfilter/source/generated.mk
new file mode 100644
index 000000000..39895d59f
--- /dev/null
+++ b/writerfilter/source/generated.mk
@@ -0,0 +1,55 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# this namespace list is needed both in the library and the custom makefile
+WRITERFILTER_OOXMLNAMESPACES= \
+ wml \
+ dml-stylesheet \
+ dml-styleDefaults \
+ dml-shape3DLighting \
+ dml-shape3DScene \
+ dml-shape3DStyles \
+ dml-shape3DCamera \
+ dml-baseStylesheet \
+ dml-textCharacter \
+ dml-shapeEffects \
+ dml-shapeLineProperties \
+ dml-shapeProperties \
+ dml-baseTypes \
+ dml-documentProperties \
+ dml-graphicalObject \
+ dml-shapeGeometry \
+ dml-wordprocessingDrawing \
+ sml-customXmlMappings \
+ shared-math \
+ shared-relationshipReference \
+ dml-chartDrawing \
+ vml-main \
+ vml-officeDrawing \
+ vml-wordprocessingDrawing \
+
+
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 2995e6bec..e943092f1 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -74,7 +74,7 @@ public:
// ::com::sun::star::xml::sax::XFastContextHandler:
virtual void SAL_CALL startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -84,7 +84,7 @@ public:
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void SAL_CALL endFastElement(Token_t Element)
+ virtual void SAL_CALL endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual void SAL_CALL endUnknownElement
@@ -93,7 +93,7 @@ public:
virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
createFastChildContext
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -160,7 +160,7 @@ public:
uno::Reference < xml::sax::XFastContextHandler >
createFromStart
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs);
void setDocument(OOXMLDocument * pDocument);
@@ -242,7 +242,7 @@ protected:
#ifdef DEBUG_CONTEXT_HANDLER
string msTokenString;
#endif
-
+
// the stream to send the stream events to.
Stream * mpStream;
@@ -253,16 +253,16 @@ protected:
unsigned int mnTableDepth;
virtual void lcl_startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual uno::Reference< xml::sax::XFastContextHandler >
lcl_createFastChildContext
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -271,7 +271,7 @@ protected:
void startAction(Token_t Element);
virtual void lcl_startAction(Token_t Element);
- void endAction(Token_t Element);
+ void endAction(Token_t Element);
virtual void lcl_endAction(Token_t Element);
@@ -350,7 +350,7 @@ protected:
/// the properties
OOXMLPropertySet::Pointer_t mpPropertySet;
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual void setParent(OOXMLFastContextHandler * pParent);
@@ -384,7 +384,7 @@ public:
virtual void setValue(OOXMLValue::Pointer_t pValue);
virtual OOXMLValue::Pointer_t getValue() const;
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual string getType() const { return "Value"; }
@@ -406,7 +406,7 @@ public:
virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
createFastChildContext
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -416,7 +416,7 @@ protected:
RefAndPointer_t mCurrentChild;
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual ResourceEnum_t getResource() const { return TABLE; }
@@ -441,11 +441,11 @@ private:
sal_Int32 mnMyXNoteId;
virtual void lcl_startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual ResourceEnum_t getResource() const { return STREAM; }
@@ -489,11 +489,11 @@ public:
protected:
virtual void lcl_startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
};
@@ -540,16 +540,16 @@ protected:
ShapeContextRef mrShapeContext;
virtual void lcl_startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual uno::Reference< xml::sax::XFastContextHandler >
lcl_createFastChildContext
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
@@ -609,16 +609,16 @@ public:
protected:
virtual void lcl_startFastElement
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
- virtual void lcl_endFastElement(Token_t Element)
+ virtual void lcl_endFastElement(Token_t Element)
throw (uno::RuntimeException, xml::sax::SAXException);
virtual uno::Reference< xml::sax::XFastContextHandler >
lcl_createFastChildContext
- (Token_t Element,
+ (Token_t Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException);
diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
index 0a422b914..50d04f561 100644
--- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx
@@ -51,35 +51,35 @@ OOXMLFastDocumentHandler::OOXMLFastDocumentHandler
// ::com::sun::star::xml::sax::XFastContextHandler:
void SAL_CALL OOXMLFastDocumentHandler::startFastElement
-(::sal_Int32
+(::sal_Int32
#ifdef DEBUG_CONTEXT_STACK
Element
#endif
-, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
+, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":start element:"
+ clog << this << ":start element:"
<< fastTokenToId(Element)
<< endl;
#endif
}
void SAL_CALL OOXMLFastDocumentHandler::startUnknownElement
-(const ::rtl::OUString &
+(const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Namespace
#endif
-, const ::rtl::OUString &
+, const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Name
#endif
-,
+,
const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":start unknown element:"
+ clog << this << ":start unknown element:"
<< OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
<< ":"
<< OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
@@ -87,34 +87,34 @@ throw (uno::RuntimeException, xml::sax::SAXException)
#endif
}
-void SAL_CALL OOXMLFastDocumentHandler::endFastElement(::sal_Int32
+void SAL_CALL OOXMLFastDocumentHandler::endFastElement(::sal_Int32
#ifdef DEBUG_CONTEXT_STACK
Element
#endif
-)
+)
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":end element:"
+ clog << this << ":end element:"
<< fastTokenToId(Element)
<< endl;
#endif
}
void SAL_CALL OOXMLFastDocumentHandler::endUnknownElement
-(const ::rtl::OUString &
+(const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Namespace
#endif
-, const ::rtl::OUString &
+, const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Name
#endif
-)
+)
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":end unknown element:"
+ clog << this << ":end unknown element:"
<< OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
<< ":"
<< OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
@@ -145,30 +145,30 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":createFastChildContext:"
+ clog << this << ":createFastChildContext:"
<< fastTokenToId(Element)
<< endl;
#endif
-
+
return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element);
}
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
OOXMLFastDocumentHandler::createUnknownChildContext
-(const ::rtl::OUString &
+(const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Namespace
#endif
-,
- const ::rtl::OUString &
+,
+ const ::rtl::OUString &
#ifdef DEBUG_CONTEXT_STACK
Name
#endif
-, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
+, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
#ifdef DEBUG_CONTEXT_STACK
- clog << this << ":createUnknownChildContext:"
+ clog << this << ":createUnknownChildContext:"
<< OUStringToOString(Namespace, RTL_TEXTENCODING_ASCII_US).getStr()
<< ":"
<< OUStringToOString(Name, RTL_TEXTENCODING_ASCII_US).getStr()
diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
index a5cdd2516..dadc08222 100644
--- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
@@ -58,8 +58,8 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler
nResult = pToken->nToken;
#ifdef DEBUG_TOKEN
- clog << "getToken: "
- << OUStringToOString(Identifier, RTL_TEXTENCODING_ASCII_US).getStr()
+ clog << "getToken: "
+ << OUStringToOString(Identifier, RTL_TEXTENCODING_ASCII_US).getStr()
<< ", " << nResult
<< endl;
#endif
@@ -107,7 +107,7 @@ css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifi
nResult = pToken->nToken;
#ifdef DEBUG_TOKEN
- clog << "getTokenFromUTF8: "
+ clog << "getTokenFromUTF8: "
<< string(reinterpret_cast<const char *>
(Identifier.getConstArray()), Identifier.getLength())
<< ", " << nResult
diff --git a/writerfilter/source/ooxml/RefAndPointer.hxx b/writerfilter/source/ooxml/RefAndPointer.hxx
index bdf29b2a5..e6115002f 100644
--- a/writerfilter/source/ooxml/RefAndPointer.hxx
+++ b/writerfilter/source/ooxml/RefAndPointer.hxx
@@ -65,7 +65,7 @@ public:
mpHandler = dynamic_cast<ChildClass *>(xRef.get());
#ifdef DEBUG_MEMORY
if (mpHandler != NULL)
- clog << "MEMORY:" << mpHandler->getInstanceNumber()
+ clog << "MEMORY:" << mpHandler->getInstanceNumber()
<< ":RefAndPointer" << endl;
#endif
}
@@ -74,7 +74,7 @@ public:
{
#ifdef DEBUG_MEMORY
if (mpHandler != NULL)
- clog << "MEMORY:" << mpHandler->getInstanceNumber()
+ clog << "MEMORY:" << mpHandler->getInstanceNumber()
<< ":~RefAndPointer" << endl;
#endif
}
diff --git a/writerfilter/source/ooxml/stage1.sh b/writerfilter/source/ooxml/stage1.sh
new file mode 100644
index 000000000..b94cc4031
--- /dev/null
+++ b/writerfilter/source/ooxml/stage1.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+SEARCHIN=$2
+
+echo '<?xml version="1.0"?>'
+echo "<stage1>"
+
+cat $1 | tail -n +2
+
+find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; |
+grep -v "//.*case NS_" |
+sed 's#'$SEARCHIN'##' |
+sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
+sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' |
+sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' |
+sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' |
+sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' |
+grep -v "^--"
+
+echo "</stage1>"
diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh
index 61b02bd3a..c36ad0d65 100644
--- a/writerfilter/source/ooxml/status.sh
+++ b/writerfilter/source/ooxml/status.sh
@@ -8,7 +8,7 @@ echo "<stage1>"
xsltproc analyzemodel.xsl model.xml | tail -n +2
-find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; |
+find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; |
grep -v "//.*case NS_" |
sed 's#'$SEARCHIN'##' |
sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
diff --git a/writerfilter/source/resourcemodel/Token.cxx b/writerfilter/source/resourcemodel/Token.cxx
new file mode 100644
index 000000000..1e6ea5a6b
--- /dev/null
+++ b/writerfilter/source/resourcemodel/Token.cxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <iostream>
+#include "resourcemodel/WW8ResourceModel.hxx"
+#include "ooxml/OOXMLFastTokens.hxx"
+
+namespace writerfilter
+{
+
+size_t TokenHash::operator()(const Token_t & rToken) const
+{
+ return rToken.getId();
+}
+
+Token_t::Token_t()
+{
+ assign(ooxml::OOXML_FAST_TOKENS_END);
+}
+
+Token_t::Token_t(sal_Int32 nId)
+{
+ assign(nId);
+}
+
+void Token_t::assign(sal_Int32 nId)
+{
+ m_nId = nId;
+}
+
+Token_t::~Token_t()
+{
+}
+
+sal_Int32 Token_t::getId() const
+{
+ return m_nId;
+}
+
+Token_t::operator sal_Int32() const
+{
+ return getId();
+}
+
+Token_t & Token_t::operator = (sal_Int32 nId)
+{
+ assign(nId);
+
+ return *this;
+}
+
+#ifdef DEBUG
+::std::string Token_t::toString() const
+{
+ return m_string;
+}
+#endif
+}
diff --git a/writerfilter/source/resourcemodel/qnametostrfooter b/writerfilter/source/resourcemodel/qnametostrfooter
index 4cba68b6f..d0af0f6fa 100644
--- a/writerfilter/source/resourcemodel/qnametostrfooter
+++ b/writerfilter/source/resourcemodel/qnametostrfooter
@@ -4,7 +4,7 @@ QNameToString::QNameToString()
init_ooxml();
}
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds()
+void WRITERFILTER_DLLPUBLIC analyzerIds()
{
cout << "<ids type=\"sprm\">" << endl;
diff --git a/writerfilter/source/resourcemodel/qnametostrheader b/writerfilter/source/resourcemodel/qnametostrheader
index 2705bb30c..6cbd0b3fe 100644
--- a/writerfilter/source/resourcemodel/qnametostrheader
+++ b/writerfilter/source/resourcemodel/qnametostrheader
@@ -35,7 +35,7 @@ namespace writerfilter
QNameToString::Pointer_t QNameToString::pInstance;
-QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Instance()
+QNameToString::Pointer_t WRITERFILTER_DLLPUBLIC QNameToString::Instance()
{
if (pInstance.get() == NULL)
pInstance = QNameToString::Pointer_t(new QNameToString());
@@ -43,7 +43,7 @@ QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Ins
return pInstance;
}
-string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::operator()(Id qName)
+string WRITERFILTER_DLLPUBLIC QNameToString::operator()(Id qName)
{
string sResult;
diff --git a/writerfilter/unocomponent/component.cxx b/writerfilter/unocomponent/component.cxx
index 6ac1fc76b..8afdc74c1 100644
--- a/writerfilter/unocomponent/component.cxx
+++ b/writerfilter/unocomponent/component.cxx
@@ -67,7 +67,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(sal_Char const * implN
fprintf(stderr, "Loading service: %s: ", implName);
void * pResult = ::cppu::component_getFactoryHelper(implName, xMgr, xRegistry, s_component_entries );
-
+
fprintf(stderr, "%p\n", pResult);
return pResult;