Kaydet (Commit) bb19f58e authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: remove now not necessary namespaceids.py

Change-Id: Ic15362b9a7687c7cba2e3b1554f2eac593afab3b
üst 8b0e5be9
...@@ -49,7 +49,6 @@ writerfilter_ALL = \ ...@@ -49,7 +49,6 @@ writerfilter_ALL = \
$(writerfilter_GEN_ooxml_Factory_cxx) \ $(writerfilter_GEN_ooxml_Factory_cxx) \
$(writerfilter_GEN_ooxml_Factory_hxx) \ $(writerfilter_GEN_ooxml_Factory_hxx) \
$(writerfilter_GEN_ooxml_FactoryValues_hxx) \ $(writerfilter_GEN_ooxml_FactoryValues_hxx) \
$(writerfilter_GEN_ooxml_NamespaceIds_hxx) \
$(writerfilter_GEN_ooxml_QNameToStr_cxx) \ $(writerfilter_GEN_ooxml_QNameToStr_cxx) \
$(writerfilter_GEN_ooxml_ResourceIds_hxx) \ $(writerfilter_GEN_ooxml_ResourceIds_hxx) \
$(writerfilter_GEN_ooxml_Model_validated) \ $(writerfilter_GEN_ooxml_Model_validated) \
...@@ -63,7 +62,6 @@ writerfilter_GEN_ooxml_Factory_cxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_gener ...@@ -63,7 +62,6 @@ writerfilter_GEN_ooxml_Factory_cxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_gener
writerfilter_GEN_ooxml_Factory_hxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_generated.hxx writerfilter_GEN_ooxml_Factory_hxx=$(writerfilter_WORK)/ooxml/OOXMLFactory_generated.hxx
writerfilter_GEN_ooxml_Model_validated=$(writerfilter_WORK)/ooxml/model.validated writerfilter_GEN_ooxml_Model_validated=$(writerfilter_WORK)/ooxml/model.validated
writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/ooxml/model_preprocessed.xml writerfilter_GEN_ooxml_Model_processed=$(writerfilter_WORK)/ooxml/model_preprocessed.xml
writerfilter_GEN_ooxml_NamespaceIds_hxx=$(writerfilter_WORK)/ooxml/OOXMLnamespaceids.hxx
writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx writerfilter_GEN_ooxml_QNameToStr_cxx=$(writerfilter_WORK)/ooxml/qnametostr.cxx
writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx writerfilter_GEN_ooxml_ResourceIds_hxx=$(writerfilter_WORK)/ooxml/resourceids.hxx
writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml writerfilter_SRC_ooxml_Model=$(writerfilter_SRC)/ooxml/model.xml
...@@ -89,10 +87,6 @@ $(writerfilter_GEN_ooxml_Model_processed) : $(writerfilter_SRC_ooxml_Preprocess_ ...@@ -89,10 +87,6 @@ $(writerfilter_GEN_ooxml_Model_processed) : $(writerfilter_SRC_ooxml_Preprocess_
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_Preprocess_py) $(writerfilter_DEP_ooxml_Namespaces_txt) $(writerfilter_SRC_ooxml_Model)) > $@ $(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_Preprocess_py) $(writerfilter_DEP_ooxml_Namespaces_txt) $(writerfilter_SRC_ooxml_Model)) > $@
$(writerfilter_GEN_ooxml_NamespaceIds_hxx) : $(writerfilter_SRC)/ooxml/namespaceids.py $(writerfilter_GEN_ooxml_Model_processed) | $(writerfilter_WORK)/ooxml/.dir
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $< $(writerfilter_GEN_ooxml_Model_processed)) > $@
$(writerfilter_GEN_ooxml_QNameToStr_cxx): $(writerfilter_SRC_ooxml_QNameToStr_py) $(writerfilter_GEN_ooxml_Model_processed) $(writerfilter_GEN_ooxml_QNameToStr_cxx): $(writerfilter_SRC_ooxml_QNameToStr_py) $(writerfilter_GEN_ooxml_Model_processed)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1) $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,PY ,1)
$(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_QNameToStr_py) $(writerfilter_GEN_ooxml_Model_processed)) > $@ $(call gb_Helper_abbreviate_dirs, $(writerfilter_PYTHONCOMMAND) $(writerfilter_SRC_ooxml_QNameToStr_py) $(writerfilter_GEN_ooxml_Model_processed)) > $@
......
...@@ -196,7 +196,6 @@ ...@@ -196,7 +196,6 @@
#include <oox/token/namespaces.hxx> #include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx> #include <oox/token/tokens.hxx>
#include <oox/vml/vmlformatting.hxx> #include <oox/vml/vmlformatting.hxx>
#include <ooxml/OOXMLnamespaceids.hxx>
#include <ooxml/resourceids.hxx> #include <ooxml/resourceids.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/file.hxx> #include <osl/file.hxx>
......
#!/usr/bin/env python
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from __future__ import print_function
import xml.sax
import sys
class ContentHandler(xml.sax.handler.ContentHandler):
def __init__(self):
self.tokens = {}
def startDocument(self):
print("""
#ifndef INCLUDED_OOXML_NAMESPACESIDS_HXX
#define INCLUDED_OOXML_NAMESPACESIDS_HXX
#include <sal/types.h>
namespace writerfilter {
namespace ooxml {
""")
def endDocument(self):
for alias in sorted(self.tokens.keys()):
print(self.tokens[alias])
print("""
}}
#endif //INCLUDED_OOXML_NAMESPACESIDS_HXX""")
def startElement(self, name, attrs):
if name == "namespace-alias":
token = """const sal_Int32 NMSP_%s = %s;""" % (attrs["alias"], attrs["id"])
if token not in self.tokens:
self.tokens[attrs["alias"]] = token
parser = xml.sax.make_parser()
parser.setContentHandler(ContentHandler())
parser.parse(sys.argv[1])
# vim:set shiftwidth=4 softtabstop=4 expandtab:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment