summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/JunitTest_writerfilter_complex.mk55
-rw-r--r--writerfilter/Library_doctok.mk150
-rw-r--r--writerfilter/Library_ooxml.mk293
-rw-r--r--writerfilter/Library_resourcemodel.mk104
-rw-r--r--writerfilter/Library_rtftok.mk71
-rw-r--r--writerfilter/Library_writerfilter.mk109
-rw-r--r--writerfilter/Library_writerfilter_debug.mk60
-rw-r--r--writerfilter/Library_writerfilter_uno.mk71
-rw-r--r--writerfilter/Module_writerfilter.mk12
-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.mk13
-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.hxx68
-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.java80
-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/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
-rwxr-xr-xwriterfilter/source/ooxml/stage1.sh20
-rw-r--r--writerfilter/source/resourcemodel/Token.cxx82
-rw-r--r--writerfilter/source/resourcemodel/qnametostrfooter2
-rw-r--r--writerfilter/source/resourcemodel/qnametostrheader4
43 files changed, 1190 insertions, 1014 deletions
diff --git a/writerfilter/JunitTest_writerfilter_complex.mk b/writerfilter/JunitTest_writerfilter_complex.mk
deleted file mode 100644
index 5262f0a0fc43..000000000000
--- a/writerfilter/JunitTest_writerfilter_complex.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# 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
new file mode 100644
index 000000000000..0782d5d8c6b9
--- /dev/null
+++ b/writerfilter/Library_doctok.mk
@@ -0,0 +1,150 @@
+# 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 \
+))
+
+include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
+
+$(eval $(call gb_Library_add_defs,doctok,\
+ -DWRITERFILTER_DOCTOK_DLLIMPLEMENTATION \
+ $(writerfilter_debug_flags) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+))
+
+$(eval $(call gb_Library_add_api,doctok,\
+ offapi \
+ udkapi \
+))
+
+$(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
new file mode 100644
index 000000000000..dcfa6784c5d8
--- /dev/null
+++ b/writerfilter/Library_ooxml.mk
@@ -0,0 +1,293 @@
+# 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 \
+))
+
+include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
+
+$(eval $(call gb_Library_add_defs,ooxml,\
+ -DWRITERFILTER_OOXML_DLLIMPLEMENTATION \
+ $(writerfilter_debug_flags) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+))
+
+$(eval $(call gb_Library_add_api,ooxml,\
+ offapi \
+ udkapi \
+))
+
+$(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
new file mode 100644
index 000000000000..adc637e05972
--- /dev/null
+++ b/writerfilter/Library_resourcemodel.mk
@@ -0,0 +1,104 @@
+# 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_add_package_headers,resourcemodel,writerfilter_generated))
+
+$(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 \
+))
+
+include $(SRCDIR)/writerfilter/debug_setup.mk
+
+$(eval $(call gb_Library_add_defs,resourcemodel,\
+ -DWRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION \
+ $(writerfilter_debug_flags) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+))
+
+$(eval $(call gb_Library_add_api,resourcemodel,\
+ offapi \
+ udkapi \
+))
+
+$(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
new file mode 100644
index 000000000000..4c3ecd13ebab
--- /dev/null
+++ b/writerfilter/Library_rtftok.mk
@@ -0,0 +1,71 @@
+# 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$(realpath $(SRCDIR)/writerfilter/inc) \
+ -I$(WORKDIR)/writerfilter/inc \
+ -I$(OUTDIR)/inc \
+ -I$(OUTDIR)/inc/offapi \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(OUTDIR)/inc/udkapi \
+))
+
+include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
+
+$(eval $(call gb_Library_add_defs,rtftok,\
+ -DWRITERFILTER_RTFTOK_DLLIMPLEMENTATION \
+ $(writerfilter_debug_flags) \
+))
+
+$(eval $(call gb_Library_add_linked_libs,rtftok,\
+ cppu \
+ cppuhelper \
+ oox \
+ sal \
+ ucbhelper \
+ utl \
+ tl \
+ resourcemodel \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,rtftok,\
+ writerfilter/source/rtftok/rtfdocumentfactory \
+ writerfilter/source/rtftok/rtfdocumentimpl \
+ writerfilter/source/rtftok/rtfcontrolwords \
+ writerfilter/source/rtftok/rtfcharsets \
+ writerfilter/source/rtftok/rtfreferenceproperties \
+ writerfilter/source/rtftok/rtfreferencetable \
+ writerfilter/source/rtftok/rtfvalue \
+ writerfilter/source/rtftok/rtfsprm \
+))
+
+# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 4a3828c8cb3c..889313398031 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -25,25 +25,13 @@
# 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) \
- -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) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
+ -I$(OUTDIR)/inc \
))
$(eval $(call gb_Library_add_api,writerfilter,\
@@ -53,112 +41,39 @@ $(eval $(call gb_Library_add_api,writerfilter,\
$(eval $(call gb_Library_set_componentfile,writerfilter,writerfilter/util/writerfilter))
+include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
+
$(eval $(call gb_Library_add_defs,writerfilter,\
- -DWRITERFILTER_DLLIMPLEMENTATION \
+ -DWRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION \
+ $(writerfilter_debug_flags) \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
))
-$(call gb_Library_use_external,writerfilter,libxml2)
-
$(eval $(call gb_Library_add_linked_libs,writerfilter,\
+ resourcemodel \
comphelper \
cppu \
cppuhelper \
+ doctok \
i18nisolang1 \
i18npaper \
oox \
+ ooxml \
+ rtftok \
sal \
sot \
svt \
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
deleted file mode 100644
index dabf1f98b346..000000000000
--- a/writerfilter/Library_writerfilter_debug.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# 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
new file mode 100644
index 000000000000..e2cefed909de
--- /dev/null
+++ b/writerfilter/Library_writerfilter_uno.mk
@@ -0,0 +1,71 @@
+# 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 \
+))
+
+$(eval $(call gb_Library_add_defs,writerfilter_uno,\
+ -DWRITERFILTER_WRITERFILTER_UNO_DLLIMPLEMENTATION \
+ $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+))
+
+$(eval $(call gb_Library_add_api,writerfilter_uno,\
+ offapi \
+ udkapi \
+))
+
+$(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 b75e63096d8f..6f2c5320f5c5 100644
--- a/writerfilter/Module_writerfilter.mk
+++ b/writerfilter/Module_writerfilter.mk
@@ -28,13 +28,13 @@
$(eval $(call gb_Module_Module,writerfilter))
$(eval $(call gb_Module_add_targets,writerfilter,\
+ Library_doctok \
+ Library_ooxml \
+ Library_rtftok \
+ Library_resourcemodel \
Library_writerfilter \
- Package_inc \
- Package_writerfilter_generated \
+ Library_writerfilter_uno \
+ Package_generated \
))
-# Library_doctok \
-# Library_ooxml \
-# Library_resourcemodel \
-# Library_writerfilter_uno \
# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Package_generated.mk b/writerfilter/Package_generated.mk
new file mode 100644
index 000000000000..682c3c6bbacc
--- /dev/null
+++ b/writerfilter/Package_generated.mk
@@ -0,0 +1,32 @@
+# 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
deleted file mode 100644
index 57ec0bea2c98..000000000000
--- a/writerfilter/Package_inc.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#*************************************************************************
-#
-# 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
deleted file mode 100644
index 6f557e56e78b..000000000000
--- a/writerfilter/Package_writerfilter_generated.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# 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
new file mode 100644
index 000000000000..ed336756e2b2
--- /dev/null
+++ b/writerfilter/debug_setup.mk
@@ -0,0 +1,13 @@
+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 \
+ -DDEBUG_LOGGING \
+)
+endef
diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index 358e5cd624bc..b128cdf1103d 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,17 +31,45 @@
#include "sal/types.h"
-#if defined(WRITERFILTER_DLLIMPLEMENTATION)
-#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#if defined(WRITERFILTER_DOCTOK_DLLIMPLEMENTATION)
+#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define WRITERFILTER_DOCTOK_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_RTFTOK_DLLIMPLEMENTATION)
#define WRITERFILTER_RTFTOK_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
#define WRITERFILTER_RTFTOK_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 71190a158e1e..4713763905d2 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_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
+class WRITERFILTER_OOXML_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 5ae1e5890c57..8fc3d1aca1f3 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_DLLPUBLIC WW8Stream
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Stream
{
public:
/**
@@ -107,7 +107,7 @@ public:
A property.
*/
-class WRITERFILTER_DLLPUBLIC WW8Property
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Property
{
public:
/**
@@ -154,7 +154,7 @@ public:
}
\endcode
*/
-class WRITERFILTER_DLLPUBLIC WW8PropertySetIterator
+class WRITERFILTER_DOCTOK_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_DLLPUBLIC WW8PropertySet
+class WRITERFILTER_DOCTOK_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_DLLPUBLIC WW8DocumentIterator
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentIterator
{
public:
typedef boost::shared_ptr<WW8DocumentIterator> Pointer_t;
@@ -393,7 +393,7 @@ public:
/**
A Word 8 document.
*/
-class WRITERFILTER_DLLPUBLIC WW8Document :
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Document :
public writerfilter::Reference<Stream>
{
public:
@@ -425,7 +425,7 @@ public:
virtual WW8DocumentIterator::Pointer_t end() = 0;
};
-class WRITERFILTER_DLLPUBLIC WW8DocumentFactory
+class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentFactory
{
public:
static WW8Stream::Pointer_t
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 6a8d7df80a7d..7ce8052da2a5 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_DLLPUBLIC OOXMLStream
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream
{
public:
enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, FONTTABLE, NUMBERING,
@@ -124,7 +124,7 @@ public:
};
-class WRITERFILTER_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
{
public:
/**
@@ -251,7 +251,7 @@ public:
};
-class WRITERFILTER_DLLPUBLIC OOXMLDocumentFactory
+class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocumentFactory
{
public:
static OOXMLStream::Pointer_t
diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx
index 9fc07b316946..152e6a694d6d 100644
--- a/writerfilter/inc/resourcemodel/Fraction.hxx
+++ b/writerfilter/inc/resourcemodel/Fraction.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
namespace resourcemodel {
-class WRITERFILTER_DLLPUBLIC Fraction
+class WRITERFILTER_RESOURCEMODEL_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 8b5aadb3e3a1..23129b8b4c93 100644
--- a/writerfilter/inc/resourcemodel/LoggedResources.hxx
+++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx
@@ -36,7 +36,7 @@
namespace writerfilter
{
-class WRITERFILTER_DLLPUBLIC LoggedResourcesHelper
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedResourcesHelper
{
public:
explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -56,7 +56,7 @@ private:
string msPrefix;
};
-class WRITERFILTER_DLLPUBLIC LoggedStream : public Stream
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedStream : public Stream
{
public:
explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -96,7 +96,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_DLLPUBLIC LoggedProperties : public Properties
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedProperties : public Properties
{
public:
explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -112,7 +112,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_DLLPUBLIC LoggedTable : public Table
+class WRITERFILTER_RESOURCEMODEL_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 580dade8a423..7a8932b13bcb 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/resourcemodel/QNameToString.hxx
@@ -39,7 +39,7 @@ namespace writerfilter
{
using namespace ::std;
-class WRITERFILTER_DLLPUBLIC QNameToString
+class WRITERFILTER_RESOURCEMODEL_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_DLLPUBLIC SprmIdToString
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SprmIdToString
{
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index f581dad2a49c..0289085dbe79 100644
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -33,8 +33,8 @@
namespace writerfilter {
namespace resourcemodel {
-void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
-void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
+void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
}}
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx
index ad43cd998de5..a0525d1b45d9 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_DLLPUBLIC TableDataHandler
+class WRITERFILTER_RESOURCEMODEL_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 ffe3daca71e0..4f47c67ca694 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_DLLPUBLIC TagLogger
+ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
{
public:
typedef TagLogger* Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index 9acec7f4fee8..246b203ce120 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,8 +26,8 @@
*
************************************************************************/
-#ifndef INCLUDED_WW8_EVENT_HANDLER_HXX
-#define INCLUDED_WW8_EVENT_HANDLER_HXX
+#ifndef INCLUDED_WW8RESOURCEMODEL_HXX
+#define INCLUDED_WW8RESOURCEMODEL_HXX
#include <string>
#include <memory>
@@ -89,7 +90,7 @@ using namespace ::std;
*/
template <class T>
-class WRITERFILTER_DLLPUBLIC Reference
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
{
public:
/**
@@ -124,7 +125,7 @@ class Sprm;
/**
Handler for properties.
*/
-class WRITERFILTER_DLLPUBLIC Properties
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
{
public:
/**
@@ -147,7 +148,7 @@ public:
/**
Handler for tables.
*/
-class WRITERFILTER_DLLPUBLIC Table
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
{
public:
typedef boost::shared_ptr<Table> Pointer_t;
@@ -163,7 +164,7 @@ public:
/**
Handler for binary objects.
*/
-class WRITERFILTER_DLLPUBLIC BinaryObj
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
{
public:
/**
@@ -180,7 +181,7 @@ public:
/**
Handler for a stream.
*/
-class WRITERFILTER_DLLPUBLIC Stream
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
{
public:
/**
@@ -284,7 +285,7 @@ public:
makes no sense for a certain value, e.g. the integer value of a
string.
*/
-class WRITERFILTER_DLLPUBLIC Value
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
{
public:
/**
@@ -332,7 +333,7 @@ public:
An SPRM.
*/
-class WRITERFILTER_DLLPUBLIC Sprm
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
{
public:
typedef auto_ptr<Sprm> Pointer_t;
@@ -382,48 +383,21 @@ public:
/**
Creates handler for a stream.
*/
-Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
+Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createStreamHandler();
-void WRITERFILTER_DLLPUBLIC analyzerIds();
-Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+ void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds();
+ Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createAnalyzer();
-void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+ void WRITERFILTER_RESOURCEMODEL_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 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
-#endif // INCLUDED_WW8_EVENT_HANDLER_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx
index 0173e9c8cdde..d5e97a2be563 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_DLLPUBLIC XPathLogger
+class WRITERFILTER_RESOURCEMODEL_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 d09e23bf1e6f..c6d3b5821758 100644
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ b/writerfilter/inc/resourcemodel/exceptions.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
using namespace ::std;
-class WRITERFILTER_DLLPUBLIC Exception
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Exception
{
string mText;
@@ -45,13 +45,13 @@ public:
const string & getText() const { return mText; }
};
-class WRITERFILTER_DLLPUBLIC ExceptionNotFound : public Exception
+class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionNotFound : public Exception
{
public:
ExceptionNotFound(string text) : Exception(text) {}
};
-class WRITERFILTER_DLLPUBLIC ExceptionOutOfBounds : public Exception
+class WRITERFILTER_RESOURCEMODEL_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 be7dae0150a7..d89a4c063a91 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_DLLPUBLIC xmlify(const string & str);
+ string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC xmlify(const string & str);
#if OSL_DEBUG_LEVEL > 1
- string WRITERFILTER_DLLPUBLIC propertysetToString
+ string WRITERFILTER_RESOURCEMODEL_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 61d0c5f8f515..0553bc3e082f 100644
--- a/writerfilter/prj/build.lst
+++ b/writerfilter/prj/build.lst
@@ -1,2 +1,3 @@
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 bcb4970389b5..e312a7ccab65 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 fe9f8f81afb7..6f05391b6d21 100644
--- a/writerfilter/qa/complex/ooxml/LoadDocuments.java
+++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java
@@ -1,19 +1,9 @@
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 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.*;
+import com.sun.star.text.XTextDocument;
/*
* To change this template, choose Tools | Templates
@@ -24,54 +14,38 @@ import static org.junit.Assert.*;
*
* @author hb137859
*/
-public class LoadDocuments {
- @Test public void test1() {
- String testDocumentsPath = Argument.get("tdoc");
- System.out.println("Test documents in:" + testDocumentsPath);
+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);
File dir = new File(testDocumentsPath);
String [] files = dir.list();
- 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);
+ 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);
- 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");
+ XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url);
+ util.DesktopTools.closeDoc(xDoc);
}
+ } 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
deleted file mode 100644
index 95c5fe50b344..000000000000
--- a/writerfilter/qa/complex/ooxml/TestDocument.java
+++ /dev/null
@@ -1,40 +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.
-*
-************************************************************************/
-
-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
new file mode 100644
index 000000000000..77df9fe09dcd
--- /dev/null
+++ b/writerfilter/qa/complex/ooxml/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# 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
new file mode 100644
index 000000000000..2896e297a43f
--- /dev/null
+++ b/writerfilter/qa/cppunittests/doctok/makefile.mk
@@ -0,0 +1,70 @@
+#*************************************************************************
+#
+# 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 27b9feef32a5..250a7804d15e 100644
--- a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
+++ b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
@@ -1,176 +1,227 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// autogenerated file with codegen.pl
-#include <sal/cppunit.h>
+#include <testshl/simpleheader.hxx>
+
#include <osl/process.h>
-#include <cppuhelper/bootstrap.hxx>
#include <ucbhelper/contentbroker.hxx>
-#include <com/sun/star/io/XInputStream.hpp>
+#include <cppuhelper/bootstrap.hxx>
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <iostream>
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/container/XNameContainer.hpp>
+#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 ::writerfilter::doctok;
+ using namespace ::std;
+ using namespace ::com::sun::star;
+ using namespace 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
-{
-
-public:
- // initialise your test code values here.
- void setUp()
+ class test : public CppUnit::TestFixture
{
- }
- void tearDown()
- {
- }
+ public:
+ // initialise your test code values here.
+ void setUp()
+ {
+ }
- void testInitUno()
- {
- bool bResult = false;
+ void tearDown()
+ {
+ }
- // initialise UCB-Broker
- uno::Reference<uno::XComponentContext>
- xComponentContext
- (::cppu::defaultBootstrap_InitialComponentContext());
- OSL_ASSERT( xComponentContext.is() );
+ void testInitUno()
+ {
+ bool bResult = false;
- xContext = xComponentContext;
+ // initialise UCB-Broker
+ uno::Reference<uno::XComponentContext>
+ xComponentContext
+ (::cppu::defaultBootstrap_InitialComponentContext());
+ OSL_ASSERT( xComponentContext.is() );
- uno::Reference<lang::XMultiComponentFactory>
- xFactory(xComponentContext->getServiceManager() );
- OSL_ASSERT(xFactory.is());
+ xContext = xComponentContext;
- 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::XMultiComponentFactory>
+ xFactory(xComponentContext->getServiceManager() );
+ OSL_ASSERT(xFactory.is());
- uno::Reference<lang::XMultiServiceFactory>
- xServiceFactory(xFactory, uno::UNO_QUERY);
- OSL_ASSERT( xServiceFactory.is() );
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
- if (xServiceFactory.is())
- {
- sal_Bool bRet =
- ::ucbhelper::ContentBroker::initialize(xServiceFactory,
- aUcbInitSequence);
+ uno::Reference<lang::XMultiServiceFactory>
+ xServiceFactory(xFactory, uno::UNO_QUERY);
+ OSL_ASSERT( xServiceFactory.is() );
- OSL_ASSERT(bRet);
- if (bRet)
+ if (xServiceFactory.is())
{
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
- xNameContainer(xFactory->createInstanceWithContext
+ sal_Bool bRet =
+ ::ucb::ContentBroker::initialize(xServiceFactory,
+ aUcbInitSequence);
+
+ OSL_ASSERT(bRet);
+ if (bRet)
+ {
+ 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);
- }
+ CPPUNIT_ASSERT_MESSAGE("UNO initialization failed",
+ bResult);
+ }
- // insert your test code here.
- void testOpenFile()
- {
- try
+ // insert your test code here.
+ void testOpenFile()
{
- 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);
+ 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::OUString sInputFileURL( absfile );
+ rtl::OUString sInputFileURL( absfile );
- for (sal_Int32 n = 0; n < sInputFileURL.getLength(); ++n)
- {
- sal_uChar nC = sInputFileURL[n];
+ for (sal_uInt32 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.reset(WW8DocumentFactory::createDocument(pStream));
- }
+ pDocument = WW8DocumentFactory::createDocument(pStream);
+ }
catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
+ {
+ clog << "Exception!!" << endl;
+ }
+
+ CPPUNIT_ASSERT_MESSAGE("creating document failed",
+ pDocument != NULL);
+
+#if 1
}
- CPPUNIT_ASSERT_MESSAGE("creating document failed",
- pDocument != NULL);
+ void testTraversal()
+ {
+#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);
+ }
+
+ pIt->getText().dump(clog);
+ ++(*pIt);
+ ++nResult;
+ }
+ }
catch (doctok::Exception)
- }
+ {
+ clog << "Exception!!" << endl;
+ }
- void testEvents()
- {
- try
- {
- ::writerfilter::Stream::Pointer_t pStream = ::writerfilter::createStreamHandler();
+ char sBuffer[256];
+ snprintf(sBuffer, 255, "%d", nResult);
+ clog << "Iterator steps:" << sBuffer << endl;
- pDocument->resolve(*pStream);
+ CPPUNIT_ASSERT_MESSAGE("traversing document failed",
+ nResult > 0);
}
- catch (doctok::Exception)
+
+ void testEvents()
{
- clog << "Exception!!" << endl;
+ try
+ {
+ Stream::Pointer_t pStream = doctok::createStreamHandler();
+
+ pDocument->resolve(*pStream);
+ }
+ catch (doctok::Exception)
+ {
+ clog << "Exception!!" << endl;
+ }
}
- }
- void testEnd()
- {
- ::ucbhelper::ContentBroker::deinitialize();
- }
+ void testEnd()
+ {
+ ::ucb::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.
+ // 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
// -----------------------------------------------------------------------------
-CPPUNIT_PLUGIN_IMPLEMENT();
+// 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;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/Makefile b/writerfilter/source/Makefile
deleted file mode 100644
index 7132007be04d..000000000000
--- a/writerfilter/source/Makefile
+++ /dev/null
@@ -1,231 +0,0 @@
-#*************************************************************************
-#
-# 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/filter/RtfFilter.hxx b/writerfilter/source/filter/RtfFilter.hxx
index aada3c609f72..03488db64ff1 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_DLLPUBLIC RtfFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_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 b883ca1e91d7..a2b2fb7a4b5b 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_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_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 f84252e05d1a..f7caa549d6d8 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_DLLPUBLIC WriterFilterDetection : public cppu::WeakImplHelper2
+class WRITERFILTER_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
deleted file mode 100644
index 39895d59f5b6..000000000000
--- a/writerfilter/source/generated.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-#*************************************************************************
-#
-# 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/stage1.sh b/writerfilter/source/ooxml/stage1.sh
deleted file mode 100755
index 9c8355db5b7b..000000000000
--- a/writerfilter/source/ooxml/stage1.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/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/resourcemodel/Token.cxx b/writerfilter/source/resourcemodel/Token.cxx
deleted file mode 100644
index 57ae54a1f2cf..000000000000
--- a/writerfilter/source/resourcemodel/Token.cxx
+++ /dev/null
@@ -1,82 +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.
- *
- ************************************************************************/
-
-#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 d0af0f6fa30f..4cba68b6f852 100644
--- a/writerfilter/source/resourcemodel/qnametostrfooter
+++ b/writerfilter/source/resourcemodel/qnametostrfooter
@@ -4,7 +4,7 @@ QNameToString::QNameToString()
init_ooxml();
}
-void WRITERFILTER_DLLPUBLIC analyzerIds()
+void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds()
{
cout << "<ids type=\"sprm\">" << endl;
diff --git a/writerfilter/source/resourcemodel/qnametostrheader b/writerfilter/source/resourcemodel/qnametostrheader
index 6cbd0b3fec10..2705bb30cc73 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_DLLPUBLIC QNameToString::Instance()
+QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Instance()
{
if (pInstance.get() == NULL)
pInstance = QNameToString::Pointer_t(new QNameToString());
@@ -43,7 +43,7 @@ QNameToString::Pointer_t WRITERFILTER_DLLPUBLIC QNameToString::Instance()
return pInstance;
}
-string WRITERFILTER_DLLPUBLIC QNameToString::operator()(Id qName)
+string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::operator()(Id qName)
{
string sResult;