summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhb <hbrinkm@openoffice.org>2009-09-25 17:16:05 +0200
committerhb <hbrinkm@openoffice.org>2009-09-25 17:16:05 +0200
commit3ef341bd5688bc7b27909ba52a224b60f23e137d (patch)
tree617985dcc3b7ad2eb1b4493225d83ac36fb56c67
parenta5cc6c46701c47bd862cd7717208c8673da25f68 (diff)
added values for factory style generation of code
-rw-r--r--writerfilter/source/ooxml/factory_values.xsl79
-rw-r--r--writerfilter/source/ooxml/factoryimpl_ns.xsl3
-rw-r--r--writerfilter/source/ooxml/factoryimpl_values.xsl75
-rw-r--r--writerfilter/source/ooxml/makefile.mk18
4 files changed, 172 insertions, 3 deletions
diff --git a/writerfilter/source/ooxml/factory_values.xsl b/writerfilter/source/ooxml/factory_values.xsl
new file mode 100644
index 000000000000..a95be77fa522
--- /dev/null
+++ b/writerfilter/source/ooxml/factory_values.xsl
@@ -0,0 +1,79 @@
+<!--
+/*************************************************************************
+ *
+ 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
+
+ $RCSfile: fastresources_wml.xsl,v $
+
+ $Revision: 1.3 $
+
+ 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.
+
+ ************************************************************************/
+
+-->
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+ xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+ xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+ xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+ xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+ xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+ xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+ xmlns:math="http://www.w3.org/1998/Math/MathML"
+ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+ xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+ xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+ xmlns:ooo="http://openoffice.org/2004/office"
+ xmlns:ooow="http://openoffice.org/2004/writer"
+ xmlns:oooc="http://openoffice.org/2004/calc"
+ xmlns:dom="http://www.w3.org/2001/xml-events"
+ xmlns:xforms="http://www.w3.org/2002/xforms"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
+ <xsl:output method="text" />
+ <xsl:param name="prefix"/>
+
+ <xsl:include href="resourcestools.xsl"/>
+
+ <xsl:template match="/">
+ <xsl:text>
+#ifndef INCLUDED_FACTORY_VALUES</xsl:text>
+#include &lt;rtl/ustring.hxx&gt;
+
+<xsl:call-template name="valueconstantdecls"/>
+<xsl:text>
+#endif // INCLUDED_FACTORY_VALUES&#xa;</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl
index 53634cef9012..163e58815841 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.xsl
+++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl
@@ -71,8 +71,9 @@
<xsl:variable name="ns" select="substring-before(substring-after($file, 'OOXMLFactory_'), '.cxx')"/>
<xsl:text>
#include "doctok/sprmids.hxx"
+#include "doctok/resourceids.hxx"
#include "ooxml/resourceids.hxx"
-#include "OOXMLfastresources.hxx"
+#include "OOXMLFactory_values.hxx"
#include "OOXMLFactory_</xsl:text>
<xsl:value-of select="$ns"/>
<xsl:text>.hxx"
diff --git a/writerfilter/source/ooxml/factoryimpl_values.xsl b/writerfilter/source/ooxml/factoryimpl_values.xsl
new file mode 100644
index 000000000000..ef976809a6b8
--- /dev/null
+++ b/writerfilter/source/ooxml/factoryimpl_values.xsl
@@ -0,0 +1,75 @@
+<!--
+/*************************************************************************
+ *
+ 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
+
+ $RCSfile: fastresources_wml.xsl,v $
+
+ $Revision: 1.3 $
+
+ 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.
+
+ ************************************************************************/
+
+-->
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+ xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+ xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+ xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+ xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+ xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+ xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+ xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+ xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+ xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+ xmlns:math="http://www.w3.org/1998/Math/MathML"
+ xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+ xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+ xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+ xmlns:ooo="http://openoffice.org/2004/office"
+ xmlns:ooow="http://openoffice.org/2004/writer"
+ xmlns:oooc="http://openoffice.org/2004/calc"
+ xmlns:dom="http://www.w3.org/2001/xml-events"
+ xmlns:xforms="http://www.w3.org/2002/xforms"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
+ <xsl:output method="text" />
+ <xsl:param name="prefix"/>
+
+ <xsl:include href="resourcestools.xsl"/>
+
+ <xsl:template match="/">
+ <xsl:text>
+#include "OOXMLFactory_values.hxx"</xsl:text>
+<xsl:call-template name="valueconstants"/>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/writerfilter/source/ooxml/makefile.mk b/writerfilter/source/ooxml/makefile.mk
index 5913b3365663..3a4763d8aec4 100644
--- a/writerfilter/source/ooxml/makefile.mk
+++ b/writerfilter/source/ooxml/makefile.mk
@@ -74,7 +74,7 @@ NAMESPACES= \
SLOFASTNAMESPACES= \
$(SLO)$/OOXMLfastresources_{$(NAMESPACES)}.obj
-
+
SLOFACTORIESNAMESPACES= \
$(SLO)$/OOXMLFactory_{$(NAMESPACES)}.obj
@@ -86,6 +86,7 @@ SLOFILES= \
$(SLO)$/OOXMLBinaryObjectReference.obj\
$(SLO)$/OOXMLfastresources.obj \
$(SLO)$/OOXMLvalues.obj \
+ $(SLO)$/OOXMLFactory_values.obj \
$(SLO)$/OOXMLPropertySetImpl.obj \
$(SLO)$/OOXMLParserState.obj \
$(SLO)$/Handler.obj \
@@ -95,7 +96,6 @@ SLOFILES= \
$(SLO)$/OOXMLFastContextHandler.obj \
$(SLO)$/OOXMLFastTokenHandler.obj
-
SHL1TARGET=$(TARGET)
.IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC"
@@ -155,6 +155,8 @@ OOXMLFASTRESOURCESIMPLXSL=fastresourcesimpl.xsl
OOXMLNAMESPACEIDSXSL=namespaceids.xsl
OOXMLVALUESXSL=values.xsl
OOXMLVALUESIMPLXSL=valuesimpl.xsl
+OOXMLFACTORYVALUESXSL=factory_values.xsl
+OOXMLFACTORYVALUESIMPLXSL=factoryimpl_values.xsl
OOXMLRESOURCEIDSXSL=resourceids.xsl
OOXMLGPERFFASTTOKENXSL=gperffasttokenhandler.xsl
@@ -171,6 +173,8 @@ OOXMLNAMESPACEIDSHXX=$(OOXMLHXXOUTDIR)$/OOXMLnamespaceids.hxx
OOXMLFASTRESOURCESCXX=$(OOXMLCXXOUTDIR)$/OOXMLfastresources.cxx
OOXMLVALUESHXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.hxx
OOXMLVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.cxx
+OOXMLFACTORYVALUESHXX=$(OOXMLCXXOUTDIR)$/OOXMLFactory_values.hxx
+OOXMLFACTORYVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLFactory_values.cxx
GPERFFASTTOKENHXX=$(OOXMLHXXOUTDIR)$/gperffasttoken.hxx
MODELPROCESSED=$(MISC)$/model_preprocessed.xml
@@ -180,6 +184,7 @@ OOXMLGENHEADERS= \
$(OOXMLFASTRESOURCESHXX) \
$(OOXMLFASTTOKENSHXX) \
$(OOXMLVALUESHXX) \
+ $(OOXMLFACTORYVALUESHXX) \
$(OOXMLFASTRESOURCEHXXS) \
$(GPERFFASTTOKENHXX) \
$(OOXMLRESOURCEIDSHXX) \
@@ -192,6 +197,7 @@ GENERATEDFILES= \
$(OOXMLFACTORYCXXS) \
$(OOXMLFASTRESOURCECXXS) \
$(OOXMLVALUESCXX) \
+ $(OOXMLFACTORYVALUESCXX) \
$(TOKENXMLTMP) \
$(TOKENXML)
@@ -257,6 +263,12 @@ $(OOXMLVALUESCXX): $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) \
$(OOXMLFASTRESOURCESHXX)
$(XSLTPROC) $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) > $@
+$(OOXMLFACTORYVALUESHXX): $(OOXMLFACTORYVALUESXSL) $(MODELPROCESSED)
+ $(XSLTPROC) $(OOXMLFACTORYVALUESXSL) $(MODELPROCESSED) > $@
+
+$(OOXMLFACTORYVALUESCXX): $(OOXMLFACTORYVALUESIMPLXSL) $(MODELPROCESSED)
+ $(XSLTPROC) $(OOXMLFACTORYVALUESIMPLXSL) $(MODELPROCESSED) > $@
+
$(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLRESOURCEIDSXSL) \
$(MODELPROCESSED)
$(XSLTPROC) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) > $@
@@ -280,6 +292,8 @@ $(SLO)/OOXMLfastresources.obj: $(OOXMLFASTRESOURCESCXX) $(OOXMLGENHEADERS)
$(SLO)/OOXMLvalues.obj: $(OOXMLVALUESCXX) $(OOXMLVALUESHXX)
+$(SLO)/OOXMLFactory_values.obj: $(OOXMLFACTORYVALUESCXX) $(OOXMLFACTORYVALUESHXX)
+
$(SLO)$/OOXMLFactory_generated.obj: $(OOXMLFACTORYGENERATEDCXX) $(OOXMLGENHEADERS)
$(SLOFASTNAMESPACES): OOXMLFastHelper.hxx