summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------.gitattributes1
-rw-r--r--hwpfilter/Library_hwp.mk14
-rw-r--r--oox/Library_oox.mk30
-rw-r--r--oox/Makefile2
-rw-r--r--oox/Package_source.mk29
-rw-r--r--oox/source/token/Makefile126
-rw-r--r--unoxml/JunitTest_unordf_complex.mk2
-rw-r--r--unoxml/JunitTest_unoxml_complex.mk2
-rw-r--r--unoxml/Library_unordf.mk16
-rw-r--r--unoxml/Library_unoxml.mk14
-rw-r--r--writerfilter/JunitTest_writerfilter_complex.mk55
-rw-r--r--writerfilter/Library_doctok.mk151
-rw-r--r--writerfilter/Library_ooxml.mk294
-rw-r--r--writerfilter/Library_resourcemodel.mk104
-rw-r--r--writerfilter/Library_rtftok.mk72
-rw-r--r--writerfilter/Library_writerfilter.mk112
-rw-r--r--writerfilter/Library_writerfilter_debug.mk60
-rw-r--r--writerfilter/Library_writerfilter_uno.mk72
-rw-r--r--writerfilter/Module_writerfilter.mk11
-rw-r--r--writerfilter/Package_generated.mk32
-rw-r--r--writerfilter/Package_inc.mk35
-rw-r--r--writerfilter/Package_writerfilter_generated.mk80
-rw-r--r--writerfilter/debug_setup.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
53 files changed, 1185 insertions, 1261 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 120000
index 000000000000..f18402b73cb9
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+/striped/bjoern/.jenkins/jobs/gnumake4/workspace/.gitattributes \ No newline at end of file
diff --git a/hwpfilter/Library_hwp.mk b/hwpfilter/Library_hwp.mk
index 90685b10a6f3..ee337a47a2a7 100644
--- a/hwpfilter/Library_hwp.mk
+++ b/hwpfilter/Library_hwp.mk
@@ -47,19 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,hwp,\
$(gb_STDLIBS) \
))
-ifeq ($(SYSTEM_ZLIB),YES)
-$(eval $(call gb_Library_set_cxxflags,hwp,\
- $$(CXXFLAGS) \
- -DSYSTEM_ZLIB \
-))
-$(eval $(call gb_Library_add_linked_libs,hwp,\
- z \
-))
-else
-$(eval $(call gb_Library_add_linked_static_libs,hwp,\
- zlib \
-))
-endif
+$(call gb_Library_use_external,hwp,zlib)
ifeq ($(OS),WNT)
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 282d84546506..69ddb25d65ea 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -35,13 +35,10 @@ $(eval $(call gb_Library_set_include,oox,\
$$(INCLUDE) \
-I$(OUTDIR)/inc \
-I$(realpath $(SRCDIR)/oox/inc) \
- $(if $(filter YES,$(SYSTEM_OPENSSL)),$(filter -I%,$(OPENSSL_CFLAGS))) \
))
-$(eval $(call gb_Library_set_defs,oox,\
- $$(DEFS) \
+$(eval $(call gb_Library_add_defs,oox,\
-DOOX_DLLIMPLEMENTATION \
- $(if $(filter YES,$(SYSTEM_OPENSSL)),$(filter-out -I%,$(OPENSSL_CFLAGS))) \
))
$(eval $(call gb_Library_add_api,oox,\
@@ -65,33 +62,10 @@ $(eval $(call gb_Library_add_linked_libs,oox,\
vcl \
xo \
xcr \
- $(if $(filter SOLARIS,$(OS)),dl nsl socket) \
$(gb_STDLIBS) \
))
-ifeq ($(SYSTEM_OPENSSL),YES)
-$(eval $(call gb_Library_add_linked_libs,oox,\
- crypto \
- ssl \
-))
-else
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_add_linked_static_libs,oox,\
- libeay32 \
- ssleay32 \
-))
-else
-$(eval $(call gb_Library_add_linked_static_libs,oox,\
- crypto \
- ssl \
-))
-endif
-endif
-
-$(eval $(call gb_Library_set_ldflags,oox,\
- $$(LDFLAGS) \
- $(if $(filter YES,$(SYSTEM_OPENSSL)),$(OPENSSL_LIBS)) \
-))
+$(eval $(call gb_Library_use_external,oox,openssl))
$(eval $(call gb_Library_set_componentfile,oox,oox/util/oox))
diff --git a/oox/Makefile b/oox/Makefile
index a79aff831024..90947b2e5f48 100644
--- a/oox/Makefile
+++ b/oox/Makefile
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
diff --git a/oox/Package_source.mk b/oox/Package_source.mk
new file mode 100644
index 000000000000..95917616602a
--- /dev/null
+++ b/oox/Package_source.mk
@@ -0,0 +1,29 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,oox_source,$(SRCDIR)/oox/source))
+$(eval $(call gb_Package_add_file,oox_source,inc/oox/token/tokens.txt,token/tokens.txt))
diff --git a/oox/source/token/Makefile b/oox/source/token/Makefile
new file mode 100644
index 000000000000..cdd94e794e98
--- /dev/null
+++ b/oox/source/token/Makefile
@@ -0,0 +1,126 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+# generate source and header files from text files ----------------------------
+
+SRCDIR_TOKEN := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+WORKDIR_TOKEN := .
+
+include $(GBUILDDIR)/Output.mk
+include $(GBUILDDIR)/BuildDirs.mk
+include $(GBUILDDIR)/Helper.mk
+
+# XML namespace identifiers and names
+
+$(WORKDIR_TOKEN)/namespaces.hxx : $(SRCDIR_TOKEN)/namespaces.hxx.head $(WORKDIR_TOKEN)/namespaceids.inc $(SRCDIR_TOKEN)/namespaces.hxx.tail
+ $(call gb_Output_announce,$@,build,CAT,1)
+ $(call gb_Helper_abbreviate_dirs,cat $^ > $@)
+
+$(WORKDIR_TOKEN)/namespaceids.inc : $(SRCDIR_TOKEN)/namespaces.txt $(SRCDIR_TOKEN)/namespaces.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/namespaces.pl 1 < $< > $@ \
+ )
+
+$(WORKDIR_TOKEN)/namespacenames.inc : $(SRCDIR_TOKEN)/namespaces.txt $(SRCDIR_TOKEN)/namespaces.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/namespaces.pl 2 < $< > $@ \
+ )
+
+$(WORKDIR_TOKEN)/namespaces.txt : $(SRCDIR_TOKEN)/namespaces.txt $(SRCDIR_TOKEN)/namespaces.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/namespaces.pl 3 < $< > $@ \
+ )
+
+# XML token identifiers and names
+
+$(WORKDIR_TOKEN)/tokens.hxx : $(SRCDIR_TOKEN)/tokens.hxx.head $(WORKDIR_TOKEN)/tokenids.inc $(SRCDIR_TOKEN)/tokens.hxx.tail
+ $(call gb_Output_announce,$@,build,CAT,1)
+ $(call gb_Helper_abbreviate_dirs,cat $^ > $@)
+
+$(WORKDIR_TOKEN)/tokenids.inc : $(SRCDIR_TOKEN)/tokens.txt $(SRCDIR_TOKEN)/tokens.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/tokens.pl 1 < $< > $@ \
+ )
+
+$(WORKDIR_TOKEN)/tokennames.inc : $(SRCDIR_TOKEN)/tokens.txt $(SRCDIR_TOKEN)/tokens.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/tokens.pl 2 < $< > $@ \
+ )
+
+$(WORKDIR_TOKEN)/tokenhash.inc : $(WORKDIR_TOKEN)/tokenhash.gperf
+ $(call gb_Output_announce,$@,build,GPF,3)
+ $(call gb_Helper_abbreviate_dirs, \
+ gperf $< | $(gb_AWK) -- '{ if ($$0 !~ /^#line/){ gsub("\\(char\\*\\)0", "0", $$0); print; } }' > $@ \
+ )
+
+$(WORKDIR_TOKEN)/tokenhash.gperf : $(SRCDIR_TOKEN)/tokens.txt $(SRCDIR_TOKEN)/tokens.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/tokens.pl 3 < $< > $@ \
+ )
+
+# UNO property identifiers and names
+
+$(WORKDIR_TOKEN)/properties.hxx : $(SRCDIR_TOKEN)/properties.hxx.head $(WORKDIR_TOKEN)/propertyids.inc $(SRCDIR_TOKEN)/properties.hxx.tail
+ $(call gb_Output_announce,$@,build,CAT,1)
+ $(call gb_Helper_abbreviate_dirs,cat $^ > $@)
+
+$(WORKDIR_TOKEN)/propertyids.inc : $(SRCDIR_TOKEN)/properties.txt $(SRCDIR_TOKEN)/properties.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/properties.pl 1 < $< > $@ \
+ )
+
+$(WORKDIR_TOKEN)/propertynames.inc : $(SRCDIR_TOKEN)/properties.txt $(SRCDIR_TOKEN)/properties.pl
+ $(call gb_Output_announce,$@,build,PRL,1)
+ $(call gb_Helper_abbreviate_dirs, \
+ mkdir -p $(dir $@) && $(PERL) $(SRCDIR_TOKEN)/properties.pl 2 < $< > $@ \
+ )
+
+.DEFAULT_GOAL:=all
+.PHONY: all
+all : \
+ namespaces.hxx \
+ namespaceids.inc \
+ namespacenames.inc \
+ namespaces.txt \
+ tokens.hxx \
+ tokenids.inc \
+ tokennames.inc \
+ tokenhash.inc \
+ tokenhash.gperf \
+ properties.hxx \
+ propertyids.inc \
+ propertynames.inc \
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/unoxml/JunitTest_unordf_complex.mk b/unoxml/JunitTest_unordf_complex.mk
index 7637eef13a82..7f4b7729dcb4 100644
--- a/unoxml/JunitTest_unordf_complex.mk
+++ b/unoxml/JunitTest_unordf_complex.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,unordf_complex))
+$(eval $(call gb_JunitTest_JunitTest,unordf_complex,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,unordf_complex,\
$$(DEFS) \
diff --git a/unoxml/JunitTest_unoxml_complex.mk b/unoxml/JunitTest_unoxml_complex.mk
index 09eaa32e7bbe..cb6ce8521e6e 100644
--- a/unoxml/JunitTest_unoxml_complex.mk
+++ b/unoxml/JunitTest_unoxml_complex.mk
@@ -25,7 +25,7 @@
#
#*************************************************************************
-$(eval $(call gb_JunitTest_JunitTest,unoxml_complex))
+$(eval $(call gb_JunitTest_JunitTest,unoxml_complex,SRCDIR))
$(eval $(call gb_JunitTest_set_defs,unoxml_complex,\
$$(DEFS) \
diff --git a/unoxml/Library_unordf.mk b/unoxml/Library_unordf.mk
index bc993fb022b6..f716cf2afa59 100644
--- a/unoxml/Library_unordf.mk
+++ b/unoxml/Library_unordf.mk
@@ -33,10 +33,6 @@ $(eval $(call gb_Library_set_include,unordf,\
$$(INCLUDE) \
))
-$(eval $(call gb_Library_set_defs,unordf,\
- $$(DEFS) \
-))
-
$(eval $(call gb_Library_add_api,unordf,\
udkapi \
offapi \
@@ -46,11 +42,14 @@ $(eval $(call gb_Library_add_linked_libs,unordf,\
cppuhelper \
cppu \
sal \
- rdf \
- xslt \
$(gb_STDLIBS) \
))
+$(call gb_Library_use_externals,unordf,\
+ librdf \
+ libxslt \
+)
+
$(eval $(call gb_Library_add_exception_objects,unordf,\
unoxml/source/rdf/CBlankNode \
unoxml/source/rdf/CURI \
@@ -59,12 +58,7 @@ $(eval $(call gb_Library_add_exception_objects,unordf,\
unoxml/source/rdf/librdf_services \
))
-$(eval $(call gb_Library_set_cxxflags,unordf,\
- $$(CXXFLAGS) \
$$(REDLAND_CFLAGS) \
- $$(LIBXSLT_CFLAGS) \
$$(LIBXML_CFLAGS) \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/unoxml/Library_unoxml.mk b/unoxml/Library_unoxml.mk
index 907ee0f0fdf8..b51253a44036 100644
--- a/unoxml/Library_unoxml.mk
+++ b/unoxml/Library_unoxml.mk
@@ -33,15 +33,11 @@ $(eval $(call gb_Library_set_include,unoxml,\
$$(INCLUDE) \
))
-$(eval $(call gb_Library_set_defs,unoxml,\
- $$(DEFS) \
))
$(eval $(call gb_Library_add_api,unoxml,\
udkapi \
offapi \
-))
-
$(eval $(call gb_Library_add_linked_libs,unoxml,\
ucbhelper \
sax \
@@ -49,10 +45,11 @@ $(eval $(call gb_Library_add_linked_libs,unoxml,\
cppuhelper \
cppu \
sal \
- xml2 \
$(gb_STDLIBS) \
))
+$(call gb_Library_use_external,unoxml,libxml2)
+
$(eval $(call gb_Library_add_exception_objects,unoxml,\
unoxml/source/dom/node \
unoxml/source/dom/document \
@@ -88,12 +85,5 @@ $(eval $(call gb_Library_add_exception_objects,unoxml,\
unoxml/source/service/services \
))
-ifeq ($(SYSTEM_LIBXML),YES)
-$(eval $(call gb_Library_set_cxxflags,unoxml,\
- $$(CXXFLAGS) \
- -DSYSTEM_LIBXML $$(LIBXML_CFLAGS) \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/JunitTest_writerfilter_complex.mk b/writerfilter/JunitTest_writerfilter_complex.mk
new file mode 100644
index 000000000000..5262f0a0fc43
--- /dev/null
+++ b/writerfilter/JunitTest_writerfilter_complex.mk
@@ -0,0 +1,55 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_JunitTest_JunitTest,writerfilter_complex,SRCDIR))
+
+$(eval $(call gb_JunitTest_set_defs,writerfilter_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/writerfilter/qa/complex/ooxml/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_jars,writerfilter_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,writerfilter_complex,\
+ writerfilter/qa/complex/ooxml/TestDocument \
+ writerfilter/qa/complex/ooxml/LoadDocuments \
+))
+
+# #i113098# currently fails in non-pro
+ifeq ($(gb_PRODUCT),$(true))
+$(eval $(call gb_JunitTest_add_classes,writerfilter_complex,\
+ complex.ooxml.LoadDocuments \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Library_doctok.mk b/writerfilter/Library_doctok.mk
deleted file mode 100644
index 95eb1fdd3e4f..000000000000
--- a/writerfilter/Library_doctok.mk
+++ /dev/null
@@ -1,151 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,doctok))
-
-$(eval $(call gb_Library_set_include,doctok,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(realpath $(SRCDIR)/writerfilter/source/doctok) \
- -I$(WORKDIR)/writerfilter/inc \
- -I$(WORKDIR)/writerfilter/inc/doctok \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
-))
-
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,doctok,\
- $$(DEFS) \
- -DWRITERFILTER_DOCTOK_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_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
deleted file mode 100644
index e3d06ba6c6c9..000000000000
--- a/writerfilter/Library_ooxml.mk
+++ /dev/null
@@ -1,294 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,ooxml))
-
-$(eval $(call gb_Library_set_include,ooxml,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(realpath $(SRCDIR)/writerfilter/source/ooxml) \
- -I$(realpath $(SRCDIR)/writerfilter/source/dmapper) \
- -I$(WORKDIR)/writerfilter/inc \
- -I$(WORKDIR)/writerfilter/inc/ooxml \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
-))
-
-include $(realpath $(SRCDIR)/writerfilter/debug_setup.mk)
-
-$(eval $(call gb_Library_set_defs,ooxml,\
- $$(DEFS) \
- -DWRITERFILTER_OOXML_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_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
deleted file mode 100644
index 04a1b365a95f..000000000000
--- a/writerfilter/Library_resourcemodel.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,resourcemodel))
-
-$(eval $(call gb_Library_set_include,resourcemodel,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- -I$(WORKDIR)/writerfilter/inc \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
-))
-
-include $(SRCDIR)/writerfilter/debug_setup.mk
-
-$(eval $(call gb_Library_set_defs,resourcemodel,\
- $$(DEFS) \
- -DWRITERFILTER_RESOURCEMODEL_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_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
deleted file mode 100644
index 33002803154c..000000000000
--- a/writerfilter/Library_rtftok.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-# Not built
-$(eval $(call gb_Library_Library,rtftok))
-
-$(eval $(call gb_Library_set_include,rtftok,\
- $$(INCLUDE) \
- -I$(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_set_defs,rtftok,\
- $$(DEFS) \
- -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 679511bd263b..6e3f6d8e18d0 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -25,13 +25,26 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
+include $(SRCDIR)/writerfilter/source/generated.mk
+
$(eval $(call gb_Library_Library,writerfilter))
+$(eval $(call gb_Library_add_package_headers,writerfilter,writerfilter_inc writerfilter_generated))
+
+$(eval $(call gb_Library_add_precompiled_header,writerfilter,$(SRCDIR)/writerfilter/PCH_FILE))
+
+$(eval $(call gb_Library_set_componentfile,writerfilter,writerfilter/util/writerfilter))
+
$(eval $(call gb_Library_set_include,writerfilter,\
$$(INCLUDE) \
+))
-I$(realpath $(SRCDIR)/writerfilter/inc) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source/ooxml \
+ -I$(WORKDIR)/CustomTarget/writerfilter/source/doctok \
+ -I$(realpath $(SRCDIR)/writerfilter/source/doctok) \
+ -I$(realpath $(SRCDIR)/writerfilter/source/ooxml) \
+ -I$(realpath $(SRCDIR)/writerfilter/source/dmapper) \
))
$(eval $(call gb_Library_add_api,writerfilter,\
@@ -41,40 +54,113 @@ $(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_set_defs,writerfilter,\
- $$(DEFS) \
- -DWRITERFILTER_WRITERFILTER_DLLIMPLEMENTATION \
- $(writerfilter_debug_flags) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
+$(eval $(call gb_Library_add_defs,writerfilter,\
+ -DWRITERFILTER_DLLIMPLEMENTATION \
))
+$(call gb_Library_use_external,writerfilter,libxml2)
+
$(eval $(call gb_Library_add_linked_libs,writerfilter,\
- resourcemodel \
comphelper \
cppu \
cppuhelper \
- doctok \
i18nisolang1 \
i18npaper \
oox \
- ooxml \
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
new file mode 100644
index 000000000000..dabf1f98b346
--- /dev/null
+++ b/writerfilter/Library_writerfilter_debug.mk
@@ -0,0 +1,60 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,writerfilter_debug))
+
+$(eval $(call gb_Library_set_include,writerfilter_debug,\
+ $$(INCLUDE) \
+ -I$(OUTDIR)/inc/offuh \
+ -I$(SRCDIR)/writerfilter/inc \
+))
+
+$(eval $(call gb_Library_add_linked_libs,writerfilter_debug,\
+ writerfilter \
+ comphelper \
+ ucbhelper \
+ cppuhelper \
+ cppu \
+ sal \
+ stl \
+ $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Library_add_exception_objects,writerfilter_debug,\
+ writerfilter/unocomponent/debugservices/doctok/DocTokTestService \
+ writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService \
+ writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService \
+ writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService \
+ writerfilter/unocomponent/component \
+))
+
+# disabled
+# writerfilter/unocomponent/debugservices/rtftok/ScannerTestService \
+# writerfilter/unocomponent/debugservices/rtftok/XMLScanner \
+
+# vim: set noet sw=4 ts=4:
+
diff --git a/writerfilter/Library_writerfilter_uno.mk b/writerfilter/Library_writerfilter_uno.mk
deleted file mode 100644
index e6ba6c25e1bf..000000000000
--- a/writerfilter/Library_writerfilter_uno.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,writerfilter_uno))
-
-$(eval $(call gb_Library_set_include,writerfilter_uno,\
- $$(INCLUDE) \
- -I$(realpath $(SRCDIR)/writerfilter/inc) \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter -I%,$(LIBXML_CFLAGS))) \
- -I$(OUTDIR)/inc \
-))
-
-$(eval $(call gb_Library_set_defs,writerfilter_uno,\
- $$(DEFS) \
- -DWRITERFILTER_WRITERFILTER_UNO_DLLIMPLEMENTATION \
- $(if $(filter YES,$(SYSTEM_LIBXML)),$(filter-out -I%,$(LIBXML_CFLAGS))) \
-))
-
-$(eval $(call gb_Library_add_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 6f2c5320f5c5..01f149b8cac8 100644
--- a/writerfilter/Module_writerfilter.mk
+++ b/writerfilter/Module_writerfilter.mk
@@ -28,13 +28,14 @@
$(eval $(call gb_Module_Module,writerfilter))
$(eval $(call gb_Module_add_targets,writerfilter,\
- Library_doctok \
- Library_ooxml \
Library_rtftok \
- Library_resourcemodel \
Library_writerfilter \
- Library_writerfilter_uno \
- Package_generated \
+ Package_inc \
+ Package_writerfilter_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
deleted file mode 100644
index 682c3c6bbacc..000000000000
--- a/writerfilter/Package_generated.mk
+++ /dev/null
@@ -1,32 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# David Tardon, Red Hat Inc. <dtardon@redhat.com>
-# Portions created by the Initial Developer are Copyright (C) 2010 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Package_Package,writerfilter_generated,$(WORKDIR)/writerfilter/inc/doctok))
-
-$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/sprmids.hxx,sprmids.hxx))
-
-# vim: set noet ts=4 sw=4:
diff --git a/writerfilter/Package_inc.mk b/writerfilter/Package_inc.mk
new file mode 100644
index 000000000000..57ec0bea2c98
--- /dev/null
+++ b/writerfilter/Package_inc.mk
@@ -0,0 +1,35 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,writerfilter_inc,$(SRCDIR)/writerfilter/inc))
+
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/WriterFilterDllApi.hxx,WriterFilterDllApi.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/resourcemodel/OutputWithDepth.hxx,resourcemodel/OutputWithDepth.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/resourcemodel/WW8ResourceModel.hxx,resourcemodel/WW8ResourceModel.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_inc,inc/writerfilter/dmapper/DomainMapper.hxx,dmapper/DomainMapper.hxx))
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerfilter/Package_writerfilter_generated.mk b/writerfilter/Package_writerfilter_generated.mk
new file mode 100644
index 000000000000..6f557e56e78b
--- /dev/null
+++ b/writerfilter/Package_writerfilter_generated.mk
@@ -0,0 +1,80 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+$(eval $(call \
+ gb_Package_Package,writerfilter_generated,$(WORKDIR)/CustomTarget/writerfilter/source))
+
+$(eval $(call \
+ gb_Package_add_customtarget,writerfilter_generated,writerfilter/source,SRCDIR))
+
+$(eval $(call \
+ gb_CustomTarget_add_outdir_dependencies,writerfilter/source,\
+ $(gb_XSLTPROCTARGET) \
+ $(OUTDIR)/inc/oox/tokens.txt \
+ $(OUTDIR)/inc/oox/namespaces.txt \
+))
+
+$(eval $(call \
+ gb_CustomTarget_add_dependencies,writerfilter/source,\
+ writerfilter/source/doctok/resources.xmi \
+ writerfilter/source/doctok/resources.xsl \
+ writerfilter/source/doctok/resourcesimpl.xsl \
+ writerfilter/source/doctok/resourceids.xsl \
+ writerfilter/source/doctok/sprmids.xsl \
+ writerfilter/source/doctok/resourcetools.xsl \
+ writerfilter/source/ooxml/model.xml \
+ writerfilter/source/ooxml/modelpreprocess.xsl \
+ writerfilter/source/ooxml/factorytools.xsl \
+ writerfilter/source/ooxml/fasttokens.xsl \
+ writerfilter/source/ooxml/namespaceids.xsl \
+ writerfilter/source/ooxml/factory_values.xsl \
+ writerfilter/source/ooxml/factoryimpl_values.xsl \
+ writerfilter/source/ooxml/resourceids.xsl \
+ writerfilter/source/ooxml/gperffasttokenhandler.xsl \
+ writerfilter/source/ooxml/gperffasttokenhandler.xsl \
+ writerfilter/source/ooxml/tokenxmlheader \
+ writerfilter/source/ooxml/tokenxmlfooter \
+ writerfilter/source/ooxml/factoryinc.xsl \
+ writerfilter/source/ooxml/factoryimpl.xsl \
+ writerfilter/source/ooxml/factoryimpl_ns.xsl \
+ writerfilter/source/ooxml/factory_ns.xsl \
+ writerfilter/source/rtftok/RTFScanner.lex \
+ writerfilter/source/rtftok/RTFScanner.skl \
+ writerfilter/source/doctok/sprmcodetostr.xsl \
+ writerfilter/source/doctok/qnametostr.xsl \
+ writerfilter/source/ooxml/qnametostr.xsl \
+ writerfilter/source/resourcemodel/namespace_preprocess.pl \
+ writerfilter/source/resourcemodel/qnametostrheader \
+ writerfilter/source/resourcemodel/qnametostrfooter \
+ writerfilter/source/resourcemodel/sprmcodetostrheader \
+ writerfilter/source/resourcemodel/sprmcodetostrfooter \
+))
+
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/sprmids.hxx,doctok/sprmids.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/doctok/resourceids.hxx,doctok/resourceids.hxx))
+$(eval $(call gb_Package_add_file,writerfilter_generated,inc/writerfilter/ooxml/resourceids.hxx,ooxml/resourceids.hxx))
+
diff --git a/writerfilter/debug_setup.mk b/writerfilter/debug_setup.mk
deleted file mode 100644
index ed336756e2b2..000000000000
--- a/writerfilter/debug_setup.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-define writerfilter_debug_flags
-$(if $(filter-out 0 1,$(strip $(gb_DEBUGLEVEL))),\
- -DDEBUG_DOMAINMAPPER \
- -DDEBUG_ELEMENT \
- -DDEBUG_RESOLVE \
- -DDEBUG_CONTEXT_STACK \
- -DDEBUG_ATTRIBUTES \
- -DDEBUG_PROPERTIES \
- -DDEBUG_CONTEXT_HANDLER \
- -DDEBUG_IMPORT \
- -DDEBUG_LOGGING \
-)
-endef
diff --git a/writerfilter/inc/WriterFilterDllApi.hxx b/writerfilter/inc/WriterFilterDllApi.hxx
index b128cdf1103d..358e5cd624bc 100644
--- a/writerfilter/inc/WriterFilterDllApi.hxx
+++ b/writerfilter/inc/WriterFilterDllApi.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,45 +30,17 @@
#include "sal/types.h"
-#if defined(WRITERFILTER_DOCTOK_DLLIMPLEMENTATION)
-#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#if defined(WRITERFILTER_DLLIMPLEMENTATION)
+#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define WRITERFILTER_DOCTOK_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define WRITERFILTER_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
-
-#if defined(WRITERFILTER_OOXML_DLLIMPLEMENTATION)
-#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define WRITERFILTER_OOXML_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
#if defined(WRITERFILTER_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 4713763905d2..71190a158e1e 100644
--- a/writerfilter/inc/dmapper/DomainMapper.hxx
+++ b/writerfilter/inc/dmapper/DomainMapper.hxx
@@ -78,7 +78,7 @@ enum SourceDocumentType
DOCUMENT_OOXML,
DOCUMENT_RTF
};
-class WRITERFILTER_OOXML_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
+class WRITERFILTER_DLLPUBLIC DomainMapper : public LoggedProperties, public LoggedTable,
public BinaryObj, public LoggedStream
{
DomainMapper_Impl *m_pImpl;
diff --git a/writerfilter/inc/doctok/WW8Document.hxx b/writerfilter/inc/doctok/WW8Document.hxx
index 8fc3d1aca1f3..5ae1e5890c57 100644
--- a/writerfilter/inc/doctok/WW8Document.hxx
+++ b/writerfilter/inc/doctok/WW8Document.hxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star;
stream consists of substreams that are identified by string
identifiers.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Stream
+class WRITERFILTER_DLLPUBLIC WW8Stream
{
public:
/**
@@ -107,7 +107,7 @@ public:
A property.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Property
+class WRITERFILTER_DLLPUBLIC WW8Property
{
public:
/**
@@ -154,7 +154,7 @@ public:
}
\endcode
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySetIterator
+class WRITERFILTER_DLLPUBLIC WW8PropertySetIterator
{
public:
typedef boost::shared_ptr<WW8PropertySetIterator> Pointer_t;
@@ -191,7 +191,7 @@ bool operator != (const WW8PropertySetIterator & rA,
/**
A set of properties.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8PropertySet
+class WRITERFILTER_DLLPUBLIC WW8PropertySet
{
public:
typedef boost::shared_ptr<WW8PropertySet> Pointer_t;
@@ -278,7 +278,7 @@ enum PropertyType {
The use of the iterator is analogous to WW8PropertySetIterator.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentIterator
+class WRITERFILTER_DLLPUBLIC WW8DocumentIterator
{
public:
typedef boost::shared_ptr<WW8DocumentIterator> Pointer_t;
@@ -393,7 +393,7 @@ public:
/**
A Word 8 document.
*/
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8Document :
+class WRITERFILTER_DLLPUBLIC WW8Document :
public writerfilter::Reference<Stream>
{
public:
@@ -425,7 +425,7 @@ public:
virtual WW8DocumentIterator::Pointer_t end() = 0;
};
-class WRITERFILTER_DOCTOK_DLLPUBLIC WW8DocumentFactory
+class WRITERFILTER_DLLPUBLIC WW8DocumentFactory
{
public:
static WW8Stream::Pointer_t
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 7ce8052da2a5..6a8d7df80a7d 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -80,7 +80,7 @@ namespace ooxml
using namespace com::sun::star;
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLStream
+class WRITERFILTER_DLLPUBLIC OOXMLStream
{
public:
enum StreamType_t { UNKNOWN, DOCUMENT, STYLES, FONTTABLE, NUMBERING,
@@ -124,7 +124,7 @@ public:
};
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
+class WRITERFILTER_DLLPUBLIC OOXMLDocument : public writerfilter::Reference<Stream>
{
public:
/**
@@ -251,7 +251,7 @@ public:
};
-class WRITERFILTER_OOXML_DLLPUBLIC OOXMLDocumentFactory
+class WRITERFILTER_DLLPUBLIC OOXMLDocumentFactory
{
public:
static OOXMLStream::Pointer_t
diff --git a/writerfilter/inc/resourcemodel/Fraction.hxx b/writerfilter/inc/resourcemodel/Fraction.hxx
index 152e6a694d6d..9fc07b316946 100644
--- a/writerfilter/inc/resourcemodel/Fraction.hxx
+++ b/writerfilter/inc/resourcemodel/Fraction.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
namespace resourcemodel {
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Fraction
+class WRITERFILTER_DLLPUBLIC Fraction
{
public:
explicit Fraction(sal_Int32 nNumerator, sal_Int32 nDenominator = 1);
diff --git a/writerfilter/inc/resourcemodel/LoggedResources.hxx b/writerfilter/inc/resourcemodel/LoggedResources.hxx
index 23129b8b4c93..8b5aadb3e3a1 100644
--- a/writerfilter/inc/resourcemodel/LoggedResources.hxx
+++ b/writerfilter/inc/resourcemodel/LoggedResources.hxx
@@ -36,7 +36,7 @@
namespace writerfilter
{
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedResourcesHelper
+class WRITERFILTER_DLLPUBLIC LoggedResourcesHelper
{
public:
explicit LoggedResourcesHelper(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -56,7 +56,7 @@ private:
string msPrefix;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedStream : public Stream
+class WRITERFILTER_DLLPUBLIC LoggedStream : public Stream
{
public:
explicit LoggedStream(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -96,7 +96,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedProperties : public Properties
+class WRITERFILTER_DLLPUBLIC LoggedProperties : public Properties
{
public:
explicit LoggedProperties(TagLogger::Pointer_t pLogger, const string & sPrefix);
@@ -112,7 +112,7 @@ protected:
LoggedResourcesHelper mHelper;
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC LoggedTable : public Table
+class WRITERFILTER_DLLPUBLIC LoggedTable : public Table
{
public:
explicit LoggedTable(TagLogger::Pointer_t pLogger, const string & sPrefix);
diff --git a/writerfilter/inc/resourcemodel/QNameToString.hxx b/writerfilter/inc/resourcemodel/QNameToString.hxx
index 7a8932b13bcb..580dade8a423 100644
--- a/writerfilter/inc/resourcemodel/QNameToString.hxx
+++ b/writerfilter/inc/resourcemodel/QNameToString.hxx
@@ -39,7 +39,7 @@ namespace writerfilter
{
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString
+class WRITERFILTER_DLLPUBLIC QNameToString
{
typedef boost::shared_ptr<QNameToString> Pointer_t;
typedef map < Id, string > Map;
@@ -63,7 +63,7 @@ public:
string operator()(Id qName);
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC SprmIdToString
+class WRITERFILTER_DLLPUBLIC SprmIdToString
{
typedef boost::shared_ptr<SprmIdToString> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
index 0289085dbe79..f581dad2a49c 100644
--- a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
+++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx
@@ -33,8 +33,8 @@
namespace writerfilter {
namespace resourcemodel {
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
+void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm);
+void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue);
}}
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx
index a0525d1b45d9..ad43cd998de5 100644
--- a/writerfilter/inc/resourcemodel/TableManager.hxx
+++ b/writerfilter/inc/resourcemodel/TableManager.hxx
@@ -53,7 +53,7 @@ template <typename T, typename PropertiesPointer>
/**
Class to handle events generated by TableManager::resolveCurrentTable
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TableDataHandler
+class WRITERFILTER_DLLPUBLIC TableDataHandler
{
public:
typedef boost::shared_ptr<TableDataHandler> Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx
index 4f47c67ca694..ffe3daca71e0 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -47,7 +47,7 @@ namespace writerfilter
virtual std::string toString(const Id & id) const = 0;
};
- class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC TagLogger
+ class WRITERFILTER_DLLPUBLIC TagLogger
{
public:
typedef TagLogger* Pointer_t;
diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index 246b203ce120..9acec7f4fee8 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,8 +25,8 @@
*
************************************************************************/
-#ifndef INCLUDED_WW8RESOURCEMODEL_HXX
-#define INCLUDED_WW8RESOURCEMODEL_HXX
+#ifndef INCLUDED_WW8_EVENT_HANDLER_HXX
+#define INCLUDED_WW8_EVENT_HANDLER_HXX
#include <string>
#include <memory>
@@ -90,7 +89,7 @@ using namespace ::std;
*/
template <class T>
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
+class WRITERFILTER_DLLPUBLIC Reference
{
public:
/**
@@ -125,7 +124,7 @@ class Sprm;
/**
Handler for properties.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties
+class WRITERFILTER_DLLPUBLIC Properties
{
public:
/**
@@ -148,7 +147,7 @@ public:
/**
Handler for tables.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table
+class WRITERFILTER_DLLPUBLIC Table
{
public:
typedef boost::shared_ptr<Table> Pointer_t;
@@ -164,7 +163,7 @@ public:
/**
Handler for binary objects.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj
+class WRITERFILTER_DLLPUBLIC BinaryObj
{
public:
/**
@@ -181,7 +180,7 @@ public:
/**
Handler for a stream.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream
+class WRITERFILTER_DLLPUBLIC Stream
{
public:
/**
@@ -285,7 +284,7 @@ public:
makes no sense for a certain value, e.g. the integer value of a
string.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Value
+class WRITERFILTER_DLLPUBLIC Value
{
public:
/**
@@ -333,7 +332,7 @@ public:
An SPRM.
*/
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Sprm
+class WRITERFILTER_DLLPUBLIC Sprm
{
public:
typedef auto_ptr<Sprm> Pointer_t;
@@ -383,21 +382,48 @@ public:
/**
Creates handler for a stream.
*/
-Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createStreamHandler();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds();
- Stream::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC createAnalyzer();
+void WRITERFILTER_DLLPUBLIC analyzerIds();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC logger(string prefix, string message);
+void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
- const rtl::OUString & /*str*/);
- void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+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;
+};
}
-#endif // INCLUDED_WW8RESOURCEMODEL_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+#endif // INCLUDED_WW8_EVENT_HANDLER_HXX
diff --git a/writerfilter/inc/resourcemodel/XPathLogger.hxx b/writerfilter/inc/resourcemodel/XPathLogger.hxx
index d5e97a2be563..0173e9c8cdde 100644
--- a/writerfilter/inc/resourcemodel/XPathLogger.hxx
+++ b/writerfilter/inc/resourcemodel/XPathLogger.hxx
@@ -41,7 +41,7 @@ using ::std::stack;
using ::std::string;
using ::std::vector;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC XPathLogger
+class WRITERFILTER_DLLPUBLIC XPathLogger
{
typedef boost::unordered_map<string, unsigned int> TokenMap_t;
typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
diff --git a/writerfilter/inc/resourcemodel/exceptions.hxx b/writerfilter/inc/resourcemodel/exceptions.hxx
index c6d3b5821758..d09e23bf1e6f 100644
--- a/writerfilter/inc/resourcemodel/exceptions.hxx
+++ b/writerfilter/inc/resourcemodel/exceptions.hxx
@@ -35,7 +35,7 @@
namespace writerfilter {
using namespace ::std;
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Exception
+class WRITERFILTER_DLLPUBLIC Exception
{
string mText;
@@ -45,13 +45,13 @@ public:
const string & getText() const { return mText; }
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionNotFound : public Exception
+class WRITERFILTER_DLLPUBLIC ExceptionNotFound : public Exception
{
public:
ExceptionNotFound(string text) : Exception(text) {}
};
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC ExceptionOutOfBounds : public Exception
+class WRITERFILTER_DLLPUBLIC ExceptionOutOfBounds : public Exception
{
public:
ExceptionOutOfBounds(string text) : Exception(text) {}
diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx
index d89a4c063a91..be7dae0150a7 100644
--- a/writerfilter/inc/resourcemodel/util.hxx
+++ b/writerfilter/inc/resourcemodel/util.hxx
@@ -38,10 +38,10 @@ namespace writerfilter
using namespace ::std;
using namespace ::com::sun::star;
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC xmlify(const string & str);
+ string WRITERFILTER_DLLPUBLIC xmlify(const string & str);
#if OSL_DEBUG_LEVEL > 1
- string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC propertysetToString
+ string WRITERFILTER_DLLPUBLIC propertysetToString
(uno::Reference<beans::XPropertySet> const & rProps);
string toString(uno::Reference< text::XTextRange > textRange);
diff --git a/writerfilter/prj/build.lst b/writerfilter/prj/build.lst
index 0553bc3e082f..61d0c5f8f515 100644
--- a/writerfilter/prj/build.lst
+++ b/writerfilter/prj/build.lst
@@ -1,3 +1,2 @@
wf writerfilter : soltools sal BOOST:boost cppu cppuhelper ucbhelper tools svx LIBXSLT:libxslt oox NULL
-wf writerfilter usr1 - all wf_mkout NULL
wf writerfilter\prj nmake - all wf_prj NULL
diff --git a/writerfilter/prj/makefile.mk b/writerfilter/prj/makefile.mk
index e312a7ccab65..bcb4970389b5 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 6f05391b6d21..fe9f8f81afb7 100644
--- a/writerfilter/qa/complex/ooxml/LoadDocuments.java
+++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java
@@ -1,9 +1,19 @@
package complex.ooxml;
+
+import com.sun.star.lang.XComponent;
import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.uno.UnoRuntime;
import complexlib.ComplexTestCase;
import java.io.File;
-import com.sun.star.text.XTextDocument;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.Argument;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
/*
* To change this template, choose Tools | Templates
@@ -14,38 +24,54 @@ import com.sun.star.text.XTextDocument;
*
* @author hb137859
*/
-public class LoadDocuments extends ComplexTestCase {
- private XMultiServiceFactory m_xMSF;
-
- @Override
- public String[] getTestMethodNames() {
- return new String [] {
- "test1"
- };
- }
-
- public void before() throws Exception {
- m_xMSF = (XMultiServiceFactory) param.getMSF();
- }
-
- public void test1() {
- String testDocumentsPath = util.utils.getFullTestDocName("");
- log.println("Test documents in:" + testDocumentsPath);
+public class LoadDocuments {
+ @Test public void test1() {
+ String testDocumentsPath = Argument.get("tdoc");
+ System.out.println("Test documents in:" + testDocumentsPath);
File dir = new File(testDocumentsPath);
String [] files = dir.list();
- if (files != null) {
- for (int i = 0; i < files.length; ++i) {
- log.println(files[i]);
- String url = util.utils.getFullTestURL(files[i]);
- log.println(url);
+ 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);
- XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url);
- util.DesktopTools.closeDoc(xDoc);
+ XComponent xDoc = util.DesktopTools.loadDoc(getMSF(), url, null);
+ System.out.println("loaded.");
+ util.DesktopTools.closeDoc(xDoc);
+ System.out.println("done.");
+ }
+ } else {
+ fail("Files not found");
}
- } else {
- failed();
}
+ catch (Exception e) {
+ System.out.println(e);
+ fail("failed");
+ }
+ }
+
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
+ }
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception
+ {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
}
+ private static final OfficeConnection connection = new OfficeConnection();
}
diff --git a/writerfilter/qa/complex/ooxml/TestDocument.java b/writerfilter/qa/complex/ooxml/TestDocument.java
new file mode 100644
index 000000000000..95c5fe50b344
--- /dev/null
+++ b/writerfilter/qa/complex/ooxml/TestDocument.java
@@ -0,0 +1,40 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+package complex.ooxml;
+
+import java.io.File;
+import org.openoffice.test.OfficeFileUrl;
+import org.openoffice.test.Argument;
+
+final class TestDocument {
+ public static String getUrl(String name) {
+ return OfficeFileUrl.getAbsolute(new File(Argument.get("tdoc"), name));
+ }
+
+ private TestDocument() {}
+}
diff --git a/writerfilter/qa/complex/ooxml/makefile.mk b/writerfilter/qa/complex/ooxml/makefile.mk
deleted file mode 100644
index 77df9fe09dcd..000000000000
--- a/writerfilter/qa/complex/ooxml/makefile.mk
+++ /dev/null
@@ -1,86 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..$/..
-TARGET = PropertyValues
-PRJNAME = $(TARGET)
-PACKAGE = complex$/ooxml
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-JAVAFILES = LoadDocuments.java
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
-.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
-
-# build package name with "." instead of $/
-CT_PACKAGE = -o $(PACKAGE:s\$/\.\)
-
-# start the runner application
-CT_APP = org.openoffice.Runner
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(depend)" == ""
-ALL: ALLTAR
-.ELSE
-ALL: ALLDEP
-.ENDIF
-
-.INCLUDE : target.mk
-
-run: \
- LoadDocuments
-
-RUN: run
-
-LoadDocuments:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).LoadDocuments
-
diff --git a/writerfilter/qa/cppunittests/doctok/makefile.mk b/writerfilter/qa/cppunittests/doctok/makefile.mk
deleted file mode 100644
index 2896e297a43f..000000000000
--- a/writerfilter/qa/cppunittests/doctok/makefile.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-PRJ=..$/..$/..
-
-PRJNAME=writerfilter
-TARGET=test-doctok
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-# BEGIN ----------------------------------------------------------------
-# auto generated Target:doctok by codegen.pl
-SHL1OBJS= \
- $(SLO)$/testdoctok.obj
-
-SHL1TARGET= testdoctok
-SHL1STDLIBS=\
- $(SALLIB) \
- $(UCBHELPERLIB) \
- $(CPPUHELPERLIB) \
- $(CPPULIB) \
- $(CPPUNITLIB)
-
-SHL1LIBS=\
- $(SLB)$/doctok.lib
-SHL1DEPS= \
- $(SHL1LIBS)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-# DEF1EXPORTFILE= export.exp
-SHL1VERSIONMAP= export.map
-# auto generated Target:doctok
-# END ------------------------------------------------------------------
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
diff --git a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
index 250a7804d15e..27b9feef32a5 100644
--- a/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
+++ b/writerfilter/qa/cppunittests/doctok/testdoctok.cxx
@@ -1,227 +1,176 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// autogenerated file with codegen.pl
-#include <testshl/simpleheader.hxx>
-
+#include <sal/cppunit.h>
#include <osl/process.h>
-#include <ucbhelper/contentbroker.hxx>
#include <cppuhelper/bootstrap.hxx>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <ucbhelper/contentbroker.hxx>
#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XMultiComponentFactory.hpp>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/container/XNameContainer.hpp>
+#include <iostream>
-#include <doctok/exceptions.hxx>
#include <doctok/WW8Document.hxx>
-#include <resourcemodel/WW8ResourceModel.hxx>
-
-#include <iostream>
namespace testdoctok
{
- using namespace ::std;
- using namespace ::com::sun::star;
- using namespace doctok;
+using namespace ::std;
+using namespace ::com::sun::star;
+using namespace ::writerfilter::doctok;
- uno::Reference<io::XInputStream> xStream;
- uno::Reference<uno::XComponentContext> xContext;
- WW8Document::Pointer_t pDocument;
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess;
+uno::Reference<io::XInputStream> xStream;
+uno::Reference<uno::XComponentContext> xContext;
+WW8Document::Pointer_t pDocument;
+uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess;
- class test : public CppUnit::TestFixture
+class test : public CppUnit::TestFixture
+{
+
+public:
+ // initialise your test code values here.
+ void setUp()
{
+ }
- public:
- // initialise your test code values here.
- void setUp()
- {
- }
+ void tearDown()
+ {
+ }
- void tearDown()
- {
- }
+ void testInitUno()
+ {
+ bool bResult = false;
- void testInitUno()
- {
- bool bResult = false;
+ // initialise UCB-Broker
+ uno::Reference<uno::XComponentContext>
+ xComponentContext
+ (::cppu::defaultBootstrap_InitialComponentContext());
+ OSL_ASSERT( xComponentContext.is() );
- // initialise UCB-Broker
- uno::Reference<uno::XComponentContext>
- xComponentContext
- (::cppu::defaultBootstrap_InitialComponentContext());
- OSL_ASSERT( xComponentContext.is() );
+ xContext = xComponentContext;
- xContext = xComponentContext;
+ uno::Reference<lang::XMultiComponentFactory>
+ xFactory(xComponentContext->getServiceManager() );
+ OSL_ASSERT(xFactory.is());
- uno::Reference<lang::XMultiComponentFactory>
- xFactory(xComponentContext->getServiceManager() );
- OSL_ASSERT(xFactory.is());
+ uno::Sequence<uno::Any> aUcbInitSequence(2);
+ aUcbInitSequence[0] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
+ aUcbInitSequence[1] <<=
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
- uno::Sequence<uno::Any> aUcbInitSequence(2);
- aUcbInitSequence[0] <<=
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local"));
- aUcbInitSequence[1] <<=
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
+ uno::Reference<lang::XMultiServiceFactory>
+ xServiceFactory(xFactory, uno::UNO_QUERY);
+ OSL_ASSERT( xServiceFactory.is() );
- uno::Reference<lang::XMultiServiceFactory>
- xServiceFactory(xFactory, uno::UNO_QUERY);
- OSL_ASSERT( xServiceFactory.is() );
+ if (xServiceFactory.is())
+ {
+ sal_Bool bRet =
+ ::ucbhelper::ContentBroker::initialize(xServiceFactory,
+ aUcbInitSequence);
- if (xServiceFactory.is())
+ OSL_ASSERT(bRet);
+ if (bRet)
{
- sal_Bool bRet =
- ::ucb::ContentBroker::initialize(xServiceFactory,
- aUcbInitSequence);
-
- OSL_ASSERT(bRet);
- if (bRet)
- {
- uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
- xNameContainer(xFactory->createInstanceWithContext
+ uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
+ xNameContainer(xFactory->createInstanceWithContext
(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.ucb.SimpleFileAccess" )),
- xComponentContext), uno::UNO_QUERY );
+ xComponentContext), uno::UNO_QUERY );
- if (xNameContainer.is())
- {
- xSimpleFileAccess = xNameContainer;
+ if (xNameContainer.is())
+ {
+ xSimpleFileAccess = xNameContainer;
- bResult = true;
- }
+ bResult = true;
}
}
-
- CPPUNIT_ASSERT_MESSAGE("UNO initialization failed",
- bResult);
}
- // insert your test code here.
- void testOpenFile()
+ CPPUNIT_ASSERT_MESSAGE("UNO initialization failed",
+ bResult);
+ }
+
+ // insert your test code here.
+ void testOpenFile()
+ {
+ try
{
- try
- {
- rtl_uString *dir=NULL;
- osl_getProcessWorkingDir(&dir);
- rtl_uString *fname=NULL;
- rtl_uString_newFromAscii(&fname, "/test.doc");
- rtl_uString *absfile=NULL;
- rtl_uString_newConcat(&absfile, dir, fname);
+ rtl_uString *dir=NULL;
+ osl_getProcessWorkingDir(&dir);
+ rtl_uString *fname=NULL;
+ rtl_uString_newFromAscii(&fname, "/test.doc");
+ rtl_uString *absfile=NULL;
+ rtl_uString_newConcat(&absfile, dir, fname);
- rtl::OUString sInputFileURL( absfile );
+ rtl::OUString sInputFileURL( absfile );
- for (sal_uInt32 n = 0; n < sInputFileURL.getLength(); ++n)
- {
- sal_uChar nC = sInputFileURL[n];
+ for (sal_Int32 n = 0; n < sInputFileURL.getLength(); ++n)
+ {
+ sal_uChar nC = sInputFileURL[n];
- if (nC < 0xff && isprint(nC))
- clog << static_cast<char>(nC);
- else
- clog << ".";
- }
+ if (nC < 0xff && isprint(nC))
+ clog << static_cast<char>(nC);
+ else
+ clog << ".";
+ }
- clog << endl;
+ clog << endl;
- xStream = xSimpleFileAccess->openFileRead(sInputFileURL);
+ xStream = xSimpleFileAccess->openFileRead(sInputFileURL);
- WW8Stream::Pointer_t pStream =
- WW8DocumentFactory::createStream(xContext, xStream);
+ WW8Stream::Pointer_t pStream =
+ WW8DocumentFactory::createStream(xContext, xStream);
- pDocument = WW8DocumentFactory::createDocument(pStream);
- }
- catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
-
- CPPUNIT_ASSERT_MESSAGE("creating document failed",
- pDocument != NULL);
-
-#if 1
+ pDocument.reset(WW8DocumentFactory::createDocument(pStream));
}
-
- void testTraversal()
+ catch (doctok::Exception)
{
-#endif
- sal_uInt32 nResult = 0;
-
- try
- {
- WW8DocumentIterator::Pointer_t pIt = pDocument->begin();
- WW8DocumentIterator::Pointer_t pItEnd = pDocument->end();
-
- while (! pIt->equal(*pItEnd))
- {
- pIt->dump(clog);
-
- clog << endl;
-
- WW8PropertySet::Pointer_t pAttrs = pIt->getProperties();
-
- if (pAttrs != NULL)
- {
- pAttrs->dump(clog);
- }
+ clog << "Exception!!" << endl;
+ }
- pIt->getText().dump(clog);
- ++(*pIt);
- ++nResult;
- }
- }
+ CPPUNIT_ASSERT_MESSAGE("creating document failed",
+ pDocument != NULL);
catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
-
- char sBuffer[256];
- snprintf(sBuffer, 255, "%d", nResult);
- clog << "Iterator steps:" << sBuffer << endl;
-
- CPPUNIT_ASSERT_MESSAGE("traversing document failed",
- nResult > 0);
- }
+ }
- void testEvents()
+ void testEvents()
+ {
+ try
{
- try
- {
- Stream::Pointer_t pStream = doctok::createStreamHandler();
+ ::writerfilter::Stream::Pointer_t pStream = ::writerfilter::createStreamHandler();
- pDocument->resolve(*pStream);
- }
- catch (doctok::Exception)
- {
- clog << "Exception!!" << endl;
- }
+ pDocument->resolve(*pStream);
}
-
- void testEnd()
+ catch (doctok::Exception)
{
- ::ucb::ContentBroker::deinitialize();
+ clog << "Exception!!" << endl;
}
+ }
- // Change the following lines only, if you add, remove or rename
- // member functions of the current class,
- // because these macros are need by auto register mechanism.
+ void testEnd()
+ {
+ ::ucbhelper::ContentBroker::deinitialize();
+ }
+
+ // Change the following lines only, if you add, remove or rename
+ // member functions of the current class,
+ // because these macros are need by auto register mechanism.
- CPPUNIT_TEST_SUITE(test);
- CPPUNIT_TEST(testInitUno);
- CPPUNIT_TEST(testOpenFile);
- CPPUNIT_TEST(testEvents);
- CPPUNIT_TEST(testEnd);
- CPPUNIT_TEST_SUITE_END();
- }; // class test
+ CPPUNIT_TEST_SUITE(test);
+ CPPUNIT_TEST(testInitUno);
+ CPPUNIT_TEST(testOpenFile);
+ CPPUNIT_TEST(testEvents);
+ CPPUNIT_TEST(testEnd);
+ CPPUNIT_TEST_SUITE_END();
+}; // class test
- // -----------------------------------------------------------------------------
- CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testdoctok::test, "doctok");
+// -----------------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(testdoctok::test, "doctok");
} // namespace doctok
// -----------------------------------------------------------------------------
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/Makefile b/writerfilter/source/Makefile
new file mode 100644
index 000000000000..7132007be04d
--- /dev/null
+++ b/writerfilter/source/Makefile
@@ -0,0 +1,231 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+WFDIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(WFDIR)generated.mk
+include $(GBUILDDIR)/gbuild_simple.mk
+
+# doctok
+
+doctok :
+ mkdir doctok
+
+wf_SRC_doctok_Model=$(WFDIR)doctok/resources.xmi
+wf_SRC_doctok_Resources_xsl=$(WFDIR)doctok/resources.xsl
+wf_SRC_doctok_ResourcesImpl_xsl=$(WFDIR)doctok/resourcesimpl.xsl
+wf_SRC_doctok_ResourceIds_xsl=$(WFDIR)doctok/resourceids.xsl
+wf_SRC_doctok_SprmIds_xsl=$(WFDIR)doctok/sprmids.xsl
+wf_SRC_doctok_ResourceTools_xsl=$(WFDIR)doctok/resourcetools.xsl
+
+wf_GEN_doctok_SprmIds_hxx=doctok/sprmids.hxx
+wf_GEN_doctok_ResourceIds_hxx=doctok/resourceids.hxx
+wf_GEN_doctok_Resources_hxx=doctok/resources.hxx
+wf_GEN_doctok_Resources_cxx=resources.cxx
+
+$(wf_GEN_doctok_SprmIds_hxx) : doctok $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_SprmIds_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_ResourceIds_hxx) : doctok $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourceIds_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_Resources_hxx) : doctok $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_Resources_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_doctok_Resources_cxx) : doctok $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model) $(wf_SRC_doctok_ResourceTools_xsl)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_ResourcesImpl_xsl) $(wf_SRC_doctok_Model)) > $@
+
+# ooxml
+
+ooxml :
+ mkdir ooxml
+
+wf_SRC_ooxml_Model=$(WFDIR)ooxml/model.xml
+wf_SRC_ooxml_Preprocess_xsl=$(WFDIR)ooxml/modelpreprocess.xsl
+wf_SRC_ooxml_FactoryTools_xsl=$(WFDIR)ooxml/factorytools.xsl
+wf_SRC_ooxml_FastTokens_xsl=$(WFDIR)ooxml/fasttokens.xsl
+wf_SRC_ooxml_NamespaceIds_xsl=$(WFDIR)ooxml/namespaceids.xsl
+wf_SRC_ooxml_FactoryValues_xsl=$(WFDIR)ooxml/factory_values.xsl
+wf_SRC_ooxml_FactoryValuesImpl_xsl=$(WFDIR)ooxml/factoryimpl_values.xsl
+wf_SRC_ooxml_ResourceIds_xsl=$(WFDIR)ooxml/resourceids.xsl
+wf_SRC_ooxml_GperfFastTokenHandler_xsl=$(WFDIR)ooxml/gperffasttokenhandler.xsl
+wf_SRC_ooxml_Analyze_model_xsl=$(WFDIR)ooxml/analyzemodel.xsl
+wf_SRC_ooxml_Status_stage1_sh=$(WFDIR)ooxml/stage1.sh
+wf_SRC_ooxml_Status_stage2_xsl=$(WFDIR)ooxml/analyzestage2.xsl
+wf_SRC_ooxml_Status_stage3_xsl=$(WFDIR)ooxml/analyzestage3.xsl
+wf_SRC_ooxml_Status_todo_xsl=$(WFDIR)ooxml/todo.xsl
+wf_SRC_ooxml_Status_efforts_xsl=$(WFDIR)ooxml/effort.xsl
+
+wf_GEN_ooxml_ResourceIds_hxx=ooxml/resourceids.hxx
+
+wf_GEN_ooxml_token_xml=token.xml
+wf_GEN_ooxml_token_tmp=token.tmp
+
+wf_GEN_ooxml_Factory_hxx=OOXMLFactory_generated.hxx
+wf_GEN_ooxml_Factory_cxx=OOXMLFactory_generated.cxx
+wf_GEN_ooxml_FastTokens_hxx=ooxml/OOXMLFastTokens.hxx
+wf_GEN_ooxml_NamespaceIds_hxx=ooxml/OOXMLnamespaceids.hxx
+wf_GEN_ooxml_FactoryValues_hxx=OOXMLFactory_values.hxx
+wf_GEN_ooxml_FactoryValues_cxx=OOXMLFactory_values.cxx
+wf_GEN_ooxml_GperfFastToken_hxx=gperffasttoken.hxx
+wf_GEN_ooxml_Model_processed=model_preprocessed.xml
+wf_GEN_ooxml_Model_analyzed=ooxml/model_analyzed.xml
+wf_GEN_ooxml_Status_stage1=ooxml/status_stage1.xml
+wf_GEN_ooxml_Status_stage2=ooxml/status_stage2.xml
+wf_GEN_ooxml_Status_stage3=ooxml/status_stage3.xml
+wf_GEN_ooxml_Status_todo=ooxml/todo.xml
+wf_GEN_ooxml_Status_efforts=ooxml/efforts.csv
+
+$(wf_GEN_ooxml_token_tmp) : $(OUTDIR)/inc$(UPDMINOREXT)/oox/token/tokens.txt
+ cat $(OUTDIR)/inc$(UPDMINOREXT)/oox/token/tokens.txt \
+ | sed "s#\(.*\)#<fasttoken>\1</fasttoken>#" > $@
+
+$(wf_GEN_ooxml_token_xml) : $(WFDIR)ooxml/tokenxmlheader $(wf_GEN_ooxml_token_tmp) $(WFDIR)ooxml/tokenxmlfooter
+ cat $(WFDIR)ooxml/tokenxmlheader $(wf_GEN_ooxml_token_tmp) $(WFDIR)ooxml/tokenxmlfooter > $@
+
+$(wf_GEN_ooxml_FastTokens_hxx) : $(wf_SRC_ooxml_FastTokens_xsl) $(wf_GEN_ooxml_token_xml)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FastTokens_xsl) $(wf_GEN_ooxml_token_xml)) > $@
+
+$(wf_GEN_ooxml_Factory_hxx) : $(WFDIR)ooxml/factoryinc.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_Factory_cxx) : $(WFDIR)ooxml/factoryimpl.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+OOXMLFactory%.cxx : $(WFDIR)ooxml/factoryimpl_ns.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+OOXMLFactory%.hxx : $(WFDIR)ooxml/factory_ns.xsl $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) --stringparam file $@ $< $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_FactoryValues_hxx) : $(wf_SRC_ooxml_FactoryValues_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FactoryValues_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_FactoryValues_cxx) : $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_FactoryValuesImpl_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_ResourceIds_hxx) : ooxml $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_ResourceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_NamespaceIds_hxx) : $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_NamespaceIds_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_ooxml_GperfFastToken_hxx) : $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_GperfFastTokenHandler_xsl) $(wf_GEN_ooxml_Model_processed)) \
+ | tr -d '\r' | gperf -I -t -E -S1 -c -G -LC++ > $@
+
+$(wf_GEN_ooxml_Model_analyzed): $(wf_SRC_ooxml_Analyze_model_xsl) $(wf_SRC_ooxml_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_stage1) : $(wf_GEN_ooxml_Model_analyzed) $(wf_SRC_ooxml_stage1_sh)
+ $(wf_SRC_ooxml_Status_stage1_sh) $(wf_GEN_ooxml_Model_analyzed) $(WFDIR)dmapper > $@
+
+$(wf_GEN_ooxml_Status_stage2) : $(wf_SRC_ooxml_Status_stage2_xsl) $(wf_GEN_ooxml_Status_stage1)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_stage3) : $(wf_SRC_ooxml_Status_stage3_xsl) $(wf_GEN_ooxml_Status_stage2)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_todo) : $(wf_SRC_ooxml_Status_todo_xsl) $(wf_GEN_ooxml_Status_stage3)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+$(wf_GEN_ooxml_Status_efforts) : $(wf_SRC_ooxml_Status_efforts_xsl) $(wf_GEN_ooxml_Status_todo)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $^) > $@
+
+# rtftok
+
+wf_SRC_rtftok_scanner_lex=$(WFDIR)rtftok/RTFScanner.lex
+wf_SRC_rtftok_scanner_skl=$(WFDIR)rtftok/RTFScanner.skl
+
+wf_GEN_rtftok_scanner_cxx=RTFScanner.cxx
+
+# does not build, currently unused
+#$(wf_GEN_rtftok_scanner_cxx) : $(wf_SRC_rtftok_scanner_lex) $(wf_SRC_rtftok_scanner_skl)
+# flex -+ -S$(wf_SRC_rtftok_scanner_skl) -o$@ $(wf_SRC_rtftok_scanner_lex)
+
+# resourcemodel
+
+wf_GEN_model_QNameToStr_cxx=qnametostr.cxx
+wf_GEN_ooxml_QNameToStr_tmp=OOXMLqnameToStr.tmp
+wf_GEN_model_SprmCodeToStr_cxx=sprmcodetostr.cxx
+wf_GEN_model_SprmCodeToStr_tmp=sprmcodetostr.tmp
+wf_GEN_doctok_QnameToStr_tmp=DOCTOKqnameToStr.tmp
+wf_SRC_doctok_SprmCodeToStr_xsl=$(WFDIR)doctok/sprmcodetostr.xsl
+wf_SRC_doctok_QNameToStr_xsl=$(WFDIR)doctok/qnametostr.xsl
+wf_SRC_ooxml_QNameToStr_xsl=$(WFDIR)ooxml/qnametostr.xsl
+wf_SRC_model_NamespacePreprocess=$(WFDIR)resourcemodel/namespace_preprocess.pl
+wf_GEN_ooxml_Namespacesmap_xsl=namespacesmap.xsl
+wf_DEP_ooxml_namespaces_txt=$(OUTDIR)/inc/oox/namespaces.txt
+wf_GEN_ooxml_preprocess_xsl=modelpreprocess.xsl
+
+$(wf_GEN_ooxml_QNameToStr_tmp): $(wf_SRC_ooxml_QNameToStr_xsl) $(wf_GEN_ooxml_Model_processed)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_ooxml_QNameToStr_xsl) $(wf_GEN_ooxml_Model_processed)) > $@
+
+$(wf_GEN_doctok_QnameToStr_tmp): $(wf_SRC_doctok_QNameToStr_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_QNameToStr_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_model_QNameToStr_cxx): $(wf_GEN_ooxml_QNameToStr_tmp) $(wf_GEN_doctok_QnameToStr_tmp) $(WFDIR)resourcemodel/qnametostrheader $(WFDIR)resourcemodel/qnametostrfooter $(wf_SRC_ooxml_FactoryTools_xsl) $(wf_SRC_doctok_ResourceTools_xsl)
+ cat $(WFDIR)resourcemodel/qnametostrheader $(wf_GEN_ooxml_QNameToStr_tmp) $(wf_GEN_doctok_QnameToStr_tmp) $(WFDIR)resourcemodel/qnametostrfooter > $@
+
+$(wf_GEN_model_SprmCodeToStr_tmp) : $(wf_SRC_doctok_SprmCodeToStr_xsl) $(wf_SRC_doctok_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_SRC_doctok_SprmCodeToStr_xsl) $(wf_SRC_doctok_Model)) > $@
+
+$(wf_GEN_model_SprmCodeToStr_cxx): $(WFDIR)resourcemodel/sprmcodetostrheader $(wf_GEN_model_SprmCodeToStr_tmp) $(WFDIR)resourcemodel/sprmcodetostrfooter
+ cat $^ > $@
+
+$(wf_GEN_ooxml_Namespacesmap_xsl) : $(wf_SRC_ooxml_Model) $(wf_DEP_ooxml_namespaces_txt) $(wf_SRC_model_NamespacePreprocess)
+ $(PERL) $(wf_SRC_model_NamespacePreprocess) $(wf_DEP_ooxml_namespaces_txt) > $@
+
+$(wf_GEN_ooxml_preprocess_xsl) : $(wf_SRC_ooxml_Preprocess_xsl)
+ cp -f $(wf_SRC_ooxml_Preprocess_xsl) $@
+
+$(wf_GEN_ooxml_Model_processed) : $(wf_GEN_ooxml_Namespacesmap_xsl) $(wf_GEN_ooxml_preprocess_xsl) $(wf_SRC_ooxml_Model)
+ $(call gb_Helper_abbreviate_dirs_native, $(gb_XSLTPROC) $(wf_GEN_ooxml_Namespacesmap_xsl) $(wf_SRC_ooxml_Model)) > $@
+
+# all
+
+.DEFAULT_GOAL:=all
+.PHONY: all
+all : \
+ $(wf_GEN_doctok_SprmIds_hxx) \
+ $(wf_GEN_doctok_ResourceIds_hxx) \
+ $(wf_GEN_doctok_Resources_hxx) \
+ $(wf_GEN_doctok_Resources_cxx) \
+ $(wf_GEN_ooxml_ResourceIds_hxx) \
+ $(wf_GEN_ooxml_Factory_hxx) \
+ $(wf_GEN_ooxml_Factory_cxx) \
+ $(wf_GEN_ooxml_FactoryValues_hxx) \
+ $(wf_GEN_ooxml_FactoryValues_cxx) \
+ $(wf_GEN_ooxml_FastTokens_hxx) \
+ $(wf_GEN_ooxml_GperfFastToken_hxx) \
+ $(wf_GEN_ooxml_NamespaceIds_hxx) \
+ $(wf_GEN_model_QNameToStr_cxx) \
+ $(wf_GEN_model_SprmCodeToStr_cxx) \
+ $(patsubst %,OOXMLFactory_%.hxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
+ $(patsubst %,OOXMLFactory_%.cxx,$(WRITERFILTER_OOXMLNAMESPACES)) \
+
+# $(wf_GEN_ooxml_Status_efforts) \
diff --git a/writerfilter/source/filter/RtfFilter.hxx b/writerfilter/source/filter/RtfFilter.hxx
index 03488db64ff1..aada3c609f72 100644
--- a/writerfilter/source/filter/RtfFilter.hxx
+++ b/writerfilter/source/filter/RtfFilter.hxx
@@ -39,7 +39,7 @@
#include <WriterFilterDllApi.hxx>
/// Common RTF filter, calls RtfImportFilter and RtfExportFilter via UNO.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC RtfFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_DLLPUBLIC RtfFilter : public cppu::WeakImplHelper5
<
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
diff --git a/writerfilter/source/filter/WriterFilter.hxx b/writerfilter/source/filter/WriterFilter.hxx
index a2b2fb7a4b5b..b883ca1e91d7 100644
--- a/writerfilter/source/filter/WriterFilter.hxx
+++ b/writerfilter/source/filter/WriterFilter.hxx
@@ -39,7 +39,7 @@
#include <WriterFilterDllApi.hxx>
/// Common DOC/DOCX filter, calls DocxExportFilter via UNO or does the DOC (currently unused) / DOCX import.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
+class WRITERFILTER_DLLPUBLIC WriterFilter : public cppu::WeakImplHelper5
<
com::sun::star::document::XFilter,
com::sun::star::document::XImporter,
diff --git a/writerfilter/source/filter/WriterFilterDetection.hxx b/writerfilter/source/filter/WriterFilterDetection.hxx
index f7caa549d6d8..f84252e05d1a 100644
--- a/writerfilter/source/filter/WriterFilterDetection.hxx
+++ b/writerfilter/source/filter/WriterFilterDetection.hxx
@@ -35,7 +35,7 @@
#include <WriterFilterDllApi.hxx>
/// File format detection service for DOC (unused) / DOCX.
-class WRITERFILTER_WRITERFILTER_DLLPUBLIC WriterFilterDetection : public cppu::WeakImplHelper2
+class WRITERFILTER_DLLPUBLIC WriterFilterDetection : public cppu::WeakImplHelper2
<
com::sun::star::document::XExtendedFilterDetection,
com::sun::star::lang::XServiceInfo
diff --git a/writerfilter/source/generated.mk b/writerfilter/source/generated.mk
new file mode 100644
index 000000000000..39895d59f5b6
--- /dev/null
+++ b/writerfilter/source/generated.mk
@@ -0,0 +1,55 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# this namespace list is needed both in the library and the custom makefile
+WRITERFILTER_OOXMLNAMESPACES= \
+ wml \
+ dml-stylesheet \
+ dml-styleDefaults \
+ dml-shape3DLighting \
+ dml-shape3DScene \
+ dml-shape3DStyles \
+ dml-shape3DCamera \
+ dml-baseStylesheet \
+ dml-textCharacter \
+ dml-shapeEffects \
+ dml-shapeLineProperties \
+ dml-shapeProperties \
+ dml-baseTypes \
+ dml-documentProperties \
+ dml-graphicalObject \
+ dml-shapeGeometry \
+ dml-wordprocessingDrawing \
+ sml-customXmlMappings \
+ shared-math \
+ shared-relationshipReference \
+ dml-chartDrawing \
+ vml-main \
+ vml-officeDrawing \
+ vml-wordprocessingDrawing \
+
+
diff --git a/writerfilter/source/ooxml/stage1.sh b/writerfilter/source/ooxml/stage1.sh
new file mode 100755
index 000000000000..9c8355db5b7b
--- /dev/null
+++ b/writerfilter/source/ooxml/stage1.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+SEARCHIN=$2
+
+echo '<?xml version="1.0"?>'
+echo "<stage1>"
+
+cat $1 | tail -n +2
+
+find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; |
+grep -v "//.*case NS_" |
+sed 's#'$SEARCHIN'##' |
+sed 's#\(^[^:]*\):\([0-9]*\):#<qname file="\1" line="\2"#' |
+sed 's#[/* ]*case \(NS_.*\):.*# qname="\1"/>#' |
+sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*#<status done="\1" planned="\2" spent="\3"/>#' |
+sed 's#.*WRITERFILTERSTATUS:.*#<status done="100"/>#' |
+sed 's#^.*-[0-9][0-9]*-.*$#<nostatus/>#' |
+grep -v "^--"
+
+echo "</stage1>"
diff --git a/writerfilter/source/resourcemodel/Token.cxx b/writerfilter/source/resourcemodel/Token.cxx
new file mode 100644
index 000000000000..57ae54a1f2cf
--- /dev/null
+++ b/writerfilter/source/resourcemodel/Token.cxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <iostream>
+#include "resourcemodel/WW8ResourceModel.hxx"
+#include "ooxml/OOXMLFastTokens.hxx"
+
+namespace writerfilter
+{
+
+size_t TokenHash::operator()(const Token_t & rToken) const
+{
+ return rToken.getId();
+}
+
+Token_t::Token_t()
+{
+ assign(ooxml::OOXML_FAST_TOKENS_END);
+}
+
+Token_t::Token_t(sal_Int32 nId)
+{
+ assign(nId);
+}
+
+void Token_t::assign(sal_Int32 nId)
+{
+ m_nId = nId;
+}
+
+Token_t::~Token_t()
+{
+}
+
+sal_Int32 Token_t::getId() const
+{
+ return m_nId;
+}
+
+Token_t::operator sal_Int32() const
+{
+ return getId();
+}
+
+Token_t & Token_t::operator = (sal_Int32 nId)
+{
+ assign(nId);
+
+ return *this;
+}
+
+#ifdef DEBUG
+::std::string Token_t::toString() const
+{
+ return m_string;
+}
+#endif
+}
diff --git a/writerfilter/source/resourcemodel/qnametostrfooter b/writerfilter/source/resourcemodel/qnametostrfooter
index 4cba68b6f852..d0af0f6fa30f 100644
--- a/writerfilter/source/resourcemodel/qnametostrfooter
+++ b/writerfilter/source/resourcemodel/qnametostrfooter
@@ -4,7 +4,7 @@ QNameToString::QNameToString()
init_ooxml();
}
-void WRITERFILTER_RESOURCEMODEL_DLLPUBLIC analyzerIds()
+void WRITERFILTER_DLLPUBLIC analyzerIds()
{
cout << "<ids type=\"sprm\">" << endl;
diff --git a/writerfilter/source/resourcemodel/qnametostrheader b/writerfilter/source/resourcemodel/qnametostrheader
index 2705bb30cc73..6cbd0b3fec10 100644
--- a/writerfilter/source/resourcemodel/qnametostrheader
+++ b/writerfilter/source/resourcemodel/qnametostrheader
@@ -35,7 +35,7 @@ namespace writerfilter
QNameToString::Pointer_t QNameToString::pInstance;
-QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Instance()
+QNameToString::Pointer_t WRITERFILTER_DLLPUBLIC QNameToString::Instance()
{
if (pInstance.get() == NULL)
pInstance = QNameToString::Pointer_t(new QNameToString());
@@ -43,7 +43,7 @@ QNameToString::Pointer_t WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::Ins
return pInstance;
}
-string WRITERFILTER_RESOURCEMODEL_DLLPUBLIC QNameToString::operator()(Id qName)
+string WRITERFILTER_DLLPUBLIC QNameToString::operator()(Id qName)
{
string sResult;