diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2011-02-22 15:30:06 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-17 15:54:15 +0200 |
commit | 77c2da07468768ceb59e0c849b30f3609ef8ebfd (patch) | |
tree | 79576feb5ef1c84ee7cd3af28759a391f7663c84 /writerfilter/source/ooxml | |
parent | eb0427b2dcbd0ee728493267d5859b8394a1813b (diff) |
redefined Token_t, used sal_Int32 where old definition was needed [hg:3fe69983f7be]
Diffstat (limited to 'writerfilter/source/ooxml')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFactory.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFactory.hxx | 18 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 54 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 56 | ||||
-rw-r--r-- | writerfilter/source/ooxml/factory_ns.xsl | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/factoryimpl.xsl | 6 | ||||
-rw-r--r-- | writerfilter/source/ooxml/factoryimpl_ns.xsl | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/fasttokens.xsl | 7 | ||||
-rw-r--r-- | writerfilter/source/ooxml/gperffasttokenhandler.xsl | 2 |
9 files changed, 73 insertions, 84 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 5d5392b81..4c59e8f6c 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -259,7 +259,7 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, uno::Reference< xml::sax::XFastContextHandler> OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, - Token_t Element) + sal_Int32 Element) { #ifdef DEBUG_FACTORY debug_logger->startElement("factory.createFastChildContext"); @@ -304,7 +304,7 @@ void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, #endif } -void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) +void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, sal_Int32 /*nToken*/) { Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -321,7 +321,7 @@ void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nTo } } -void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) +void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, sal_Int32 /*nToken*/) { Id nDefine = pHandler->getDefine(); OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); @@ -350,7 +350,7 @@ void OOXMLFactory_ns::charactersAction(OOXMLFastContextHandler *, const ::rtl::O { } -void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t) +void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, sal_Int32, OOXMLValue::Pointer_t) { } diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx index 581fee369..f1d9267cf 100644 --- a/writerfilter/source/ooxml/OOXMLFactory.hxx +++ b/writerfilter/source/ooxml/OOXMLFactory.hxx @@ -78,7 +78,7 @@ struct AttributeInfo AttributeInfo(); }; -typedef hash_map<Token_t, AttributeInfo> AttributeToResourceMap; +typedef hash_map<sal_Int32, AttributeInfo, TokenHash> AttributeToResourceMap; typedef boost::shared_ptr<AttributeToResourceMap> AttributeToResourceMapPointer; typedef hash_map<Id, AttributeToResourceMapPointer> AttributesMap; @@ -95,13 +95,13 @@ struct CreateElement CreateElement(); }; -typedef hash_map<Token_t, CreateElement> CreateElementMap; +typedef hash_map<sal_Int32, CreateElement, TokenHash> CreateElementMap; typedef boost::shared_ptr<CreateElementMap> CreateElementMapPointer; typedef hash_map<Id, CreateElementMapPointer> CreateElementsMap; typedef hash_map<Id, string> IdToStringMap; typedef boost::shared_ptr<IdToStringMap> IdToStringMapPointer; -typedef hash_map<Id, Token_t> TokenToIdMap; +typedef hash_map<Id, sal_Int32> TokenToIdMap; typedef boost::shared_ptr<TokenToIdMap> TokenToIdMapPointer; typedef hash_map<Id, TokenToIdMapPointer> TokenToIdsMap; @@ -112,7 +112,7 @@ public: virtual void startAction(OOXMLFastContextHandler * pHandler); virtual void charactersAction(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString); virtual void endAction(OOXMLFastContextHandler * pHandler); - virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + virtual void attributeAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue); virtual string getDefineName(Id nId) const; #ifdef DEBUG_FACTORY virtual string getName() const; @@ -145,10 +145,10 @@ public: static Pointer_t getInstance(); uno::Reference< xml::sax::XFastContextHandler> createFastChildContext - (OOXMLFastContextHandler * pHandler, Token_t Element); + (OOXMLFastContextHandler * pHandler, sal_Int32 Element); uno::Reference< xml::sax::XFastContextHandler> createFastChildContextFromStart - (OOXMLFastContextHandler * pHandler, Token_t Element); + (OOXMLFastContextHandler * pHandler, sal_Int32 Element); void attributes(OOXMLFastContextHandler * pHandler, const uno::Reference< xml::sax::XFastAttributeList > & Attribs); @@ -156,8 +156,8 @@ public: void characters(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString); - void startAction(OOXMLFastContextHandler * pHandler, Token_t nToken); - void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken); + void startAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken); + void endAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken); virtual ~OOXMLFactory(); @@ -170,7 +170,7 @@ private: uno::Reference< xml::sax::XFastContextHandler> createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, - Token_t Element); + sal_Int32 Element); }; } diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 84622ab57..34894406d 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -185,7 +185,7 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler() // ::com::sun::star::xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -220,7 +220,7 @@ throw (uno::RuntimeException, xml::sax::SAXException) #endif } -void SAL_CALL OOXMLFastContextHandler::endFastElement(Token_t Element) +void SAL_CALL OOXMLFastContextHandler::endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { #ifdef DEBUG_CONTEXT_HANDLER @@ -240,7 +240,7 @@ throw (uno::RuntimeException, xml::sax::SAXException) } void OOXMLFastContextHandler::lcl_startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -248,7 +248,7 @@ void OOXMLFastContextHandler::lcl_startFastElement } void OOXMLFastContextHandler::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { OOXMLFactory::getInstance()->endAction(this, Element); @@ -266,7 +266,7 @@ throw (uno::RuntimeException, xml::sax::SAXException) uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastContextHandler::createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -288,7 +288,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL uno::Reference< xml::sax::XFastContextHandler > OOXMLFastContextHandler::lcl_createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -367,7 +367,7 @@ void OOXMLFastContextHandler::attributes OOXMLFactory::getInstance()->attributes(this, Attribs); } -void OOXMLFastContextHandler::startAction(Token_t Element) +void OOXMLFastContextHandler::startAction(sal_Int32 Element) { #ifdef DEBUG_CONTEXT_HANDLER debug_logger->startElement("contexthandler.startAction"); @@ -378,12 +378,12 @@ void OOXMLFastContextHandler::startAction(Token_t Element) #endif } -void OOXMLFastContextHandler::lcl_startAction(Token_t Element) +void OOXMLFastContextHandler::lcl_startAction(sal_Int32 Element) { OOXMLFactory::getInstance()->startAction(this, Element); } -void OOXMLFastContextHandler::endAction(Token_t Element) +void OOXMLFastContextHandler::endAction(sal_Int32 Element) { #ifdef DEBUG_CONTEXT_HANDLER debug_logger->startElement("contexthandler.endAction"); @@ -394,7 +394,7 @@ void OOXMLFastContextHandler::endAction(Token_t Element) #endif } -void OOXMLFastContextHandler::lcl_endAction(Token_t Element) +void OOXMLFastContextHandler::lcl_endAction(sal_Int32 Element) { OOXMLFactory::getInstance()->endAction(this, Element); } @@ -495,10 +495,6 @@ OOXMLParserState::Pointer_t OOXMLFastContextHandler::getParserState() const void OOXMLFastContextHandler::setToken(Token_t nToken) { mnToken = nToken; - -#ifdef DEBUG_CONTEXT_HANDLER - msTokenString = fastTokenToId(mnToken); -#endif } Token_t OOXMLFastContextHandler::getToken() const @@ -1260,7 +1256,7 @@ OOXMLFastContextHandlerProperties::~OOXMLFastContextHandlerProperties() } void OOXMLFastContextHandlerProperties::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { endAction(Element); @@ -1430,7 +1426,7 @@ OOXMLFastContextHandlerPropertyTable::~OOXMLFastContextHandlerPropertyTable() } void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone()); @@ -1486,7 +1482,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const } void OOXMLFastContextHandlerValue::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { sendPropertyToParent(); @@ -1561,7 +1557,7 @@ OOXMLFastContextHandlerTable::~OOXMLFastContextHandlerTable() uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastContextHandlerTable::createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -1574,7 +1570,7 @@ OOXMLFastContextHandlerTable::createFastChildContext } void OOXMLFastContextHandlerTable::lcl_endFastElement -(Token_t /*Element*/) +(sal_Int32 /*Element*/) throw (uno::RuntimeException, xml::sax::SAXException) { addCurrentChild(); @@ -1629,7 +1625,7 @@ OOXMLFastContextHandlerXNote::~OOXMLFastContextHandlerXNote() } void OOXMLFastContextHandlerXNote::lcl_startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -1644,7 +1640,7 @@ void OOXMLFastContextHandlerXNote::lcl_startFastElement } void OOXMLFastContextHandlerXNote::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { endAction(Element); @@ -1801,7 +1797,7 @@ OOXMLFastContextHandlerTextTable::~OOXMLFastContextHandlerTextTable() } void OOXMLFastContextHandlerTextTable::lcl_startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -1822,7 +1818,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement } void OOXMLFastContextHandlerTextTable::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { endAction(Element); @@ -1884,7 +1880,7 @@ OOXMLFastContextHandlerShape::~OOXMLFastContextHandlerShape() } void OOXMLFastContextHandlerShape::lcl_startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -1939,7 +1935,7 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element ) } void OOXMLFastContextHandlerShape::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { if (mrShapeContext.is()) @@ -1967,7 +1963,7 @@ void SAL_CALL OOXMLFastContextHandlerShape::endUnknownElement uno::Reference< xml::sax::XFastContextHandler > OOXMLFastContextHandlerShape::lcl_createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -2118,7 +2114,7 @@ void OOXMLFastContextHandlerWrapper::addToken( Token_t Token ) } void OOXMLFastContextHandlerWrapper::lcl_startFastElement -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { @@ -2127,7 +2123,7 @@ void OOXMLFastContextHandlerWrapper::lcl_startFastElement } void OOXMLFastContextHandlerWrapper::lcl_endFastElement -(Token_t Element) +(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException) { if (mxContext.is()) @@ -2136,7 +2132,7 @@ void OOXMLFastContextHandlerWrapper::lcl_endFastElement uno::Reference< xml::sax::XFastContextHandler > OOXMLFastContextHandlerWrapper::lcl_createFastChildContext -(Token_t Element, +(sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 87aa0c6ad..62e796896 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -73,7 +73,7 @@ public: // ::com::sun::star::xml::sax::XFastContextHandler: virtual void SAL_CALL startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -83,7 +83,7 @@ public: const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void SAL_CALL endFastElement(Token_t Element) + virtual void SAL_CALL endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual void SAL_CALL endUnknownElement @@ -92,7 +92,7 @@ public: virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -159,7 +159,7 @@ public: uno::Reference < xml::sax::XFastContextHandler > createFromStart - (Token_t Element, + (sal_uInt32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs); void setDocument(OOXMLDocument * pDocument); @@ -236,10 +236,6 @@ protected: Id mnDefine; Token_t mnToken; -#ifdef DEBUG_CONTEXT_HANDLER - string msTokenString; -#endif - // the stream to send the stream events to. Stream * mpStream; @@ -250,26 +246,26 @@ protected: unsigned int mnTableDepth; virtual void lcl_startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual uno::Reference< xml::sax::XFastContextHandler > lcl_createFastChildContext - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); virtual void lcl_characters(const ::rtl::OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException); - void startAction(Token_t Element); - virtual void lcl_startAction(Token_t Element); - void endAction(Token_t Element); - virtual void lcl_endAction(Token_t Element); + void startAction(sal_Int32 Element); + virtual void lcl_startAction(sal_Int32 Element); + void endAction(sal_Int32 Element); + virtual void lcl_endAction(sal_Int32 Element); // Returns string for resource of this context. (debug) @@ -344,7 +340,7 @@ protected: /// the properties OOXMLPropertySet::Pointer_t mpPropertySet; - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual void setParent(OOXMLFastContextHandler * pParent); @@ -363,7 +359,7 @@ public: protected: OOXMLTableImpl mTable; - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); }; @@ -378,7 +374,7 @@ public: virtual void setValue(OOXMLValue::Pointer_t pValue); virtual OOXMLValue::Pointer_t getValue() const; - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual string getType() const { return "Value"; } @@ -400,7 +396,7 @@ public: virtual uno::Reference< xml::sax::XFastContextHandler > SAL_CALL createFastChildContext - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -410,7 +406,7 @@ protected: RefAndPointer_t mCurrentChild; - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual ResourceEnum_t getResource() const { return TABLE; } @@ -435,11 +431,11 @@ private: ::rtl::OUString msMyXNoteId; virtual void lcl_startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual ResourceEnum_t getResource() const { return STREAM; } @@ -483,11 +479,11 @@ public: protected: virtual void lcl_startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); }; @@ -534,16 +530,16 @@ protected: ShapeContextRef mrShapeContext; virtual void lcl_startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual uno::Reference< xml::sax::XFastContextHandler > lcl_createFastChildContext - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -603,16 +599,16 @@ public: protected: virtual void lcl_startFastElement - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) + virtual void lcl_endFastElement(sal_Int32 Element) throw (uno::RuntimeException, xml::sax::SAXException); virtual uno::Reference< xml::sax::XFastContextHandler > lcl_createFastChildContext - (Token_t Element, + (sal_Int32 Element, const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); diff --git a/writerfilter/source/ooxml/factory_ns.xsl b/writerfilter/source/ooxml/factory_ns.xsl index 0349d8321..a65d51247 100644 --- a/writerfilter/source/ooxml/factory_ns.xsl +++ b/writerfilter/source/ooxml/factory_ns.xsl @@ -104,7 +104,7 @@ public: virtual TokenToIdMapPointer createTokenToIdMap(Id nId); virtual string getDefineName(Id nId) const;</xsl:text> <xsl:call-template name="factoryactiondecls"/> - virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + virtual void attributeAction(OOXMLFastContextHandler * pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue); #ifdef DEBUG_FACTORY virtual string getName() const; diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl index 781883b76..61ca828c3 100644 --- a/writerfilter/source/ooxml/factoryimpl.xsl +++ b/writerfilter/source/ooxml/factoryimpl.xsl @@ -73,7 +73,7 @@ <xsl:template name="factorycreatecontextfromfactory"> <xsl:text> uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromFactory -(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element) +(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, sal_Int32 Element) { uno::Reference < xml::sax::XFastContextHandler > aResult; Id nDefine = pHandler->getDefine(); @@ -182,7 +182,7 @@ OOXMLFactory_ns::Pointer_t OOXMLFactory::getFactoryForNamespace(Id nId) <xsl:template name="factorycreatefromstart"> <xsl:text> uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromStart -(OOXMLFastContextHandler * pHandler, Token_t Element) +(OOXMLFastContextHandler * pHandler, sal_Int32 Element) { #ifdef DEBUG_FACTORY debug_logger->startElement("factory.createFastChildContextFromStart"); @@ -215,7 +215,7 @@ uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastCh <xsl:template name="fasttokentoid"> <xsl:text> namespace tokenmap { -struct token { const char * name; Token_t nToken; }; +struct token { const char * name; sal_Int32 nToken; }; class Perfect_Hash { private: diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl index adc4c977e..1c2af9b92 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.xsl +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -863,7 +863,7 @@ TokenToIdMapPointer </xsl:text> <xsl:text> void </xsl:text> <xsl:call-template name="factoryclassname"/> -<xsl:text>::attributeAction(OOXMLFastContextHandler * _pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue) +<xsl:text>::attributeAction(OOXMLFastContextHandler * _pHandler, sal_Int32 nToken, OOXMLValue::Pointer_t pValue) { switch(_pHandler->getDefine()) {</xsl:text> @@ -879,7 +879,7 @@ void </xsl:text> <xsl:text> void </xsl:text> <xsl:call-template name="factoryclassname"/> -<xsl:text>::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t) +<xsl:text>::attributeAction(OOXMLFastContextHandler *, sal_Int32, OOXMLValue::Pointer_t) { } </xsl:text> diff --git a/writerfilter/source/ooxml/fasttokens.xsl b/writerfilter/source/ooxml/fasttokens.xsl index 4014df0ee..f8621a6a1 100644 --- a/writerfilter/source/ooxml/fasttokens.xsl +++ b/writerfilter/source/ooxml/fasttokens.xsl @@ -64,19 +64,16 @@ <xsl:include href="factorytools.xsl"/> <xsl:template name="fasttokens"> - <xsl:text> -typedef sal_Int32 Token_t; - </xsl:text> <xsl:for-each select="/model/fasttoken"> <xsl:text> -const Token_t OOXML_</xsl:text> +const sal_Int32 OOXML_</xsl:text> <xsl:value-of select="translate(., '-', '_')"/> <xsl:text> = </xsl:text> <xsl:value-of select="position() - 1"/> <xsl:text>;</xsl:text> </xsl:for-each> <xsl:text> -const Token_t OOXML_FAST_TOKENS_END =</xsl:text> +const sal_Int32 OOXML_FAST_TOKENS_END = </xsl:text> <xsl:value-of select="count(/model/fasttoken)"/> <xsl:text>;
</xsl:text> </xsl:template> diff --git a/writerfilter/source/ooxml/gperffasttokenhandler.xsl b/writerfilter/source/ooxml/gperffasttokenhandler.xsl index d14db0486..f6a987e8f 100644 --- a/writerfilter/source/ooxml/gperffasttokenhandler.xsl +++ b/writerfilter/source/ooxml/gperffasttokenhandler.xsl @@ -75,7 +75,7 @@ namespace writerfilter { namespace ooxml { namespace tokenmap { %} -struct token { const char * name; Token_t nToken; }; +struct token { const char * name; sal_Int32 nToken; }; %%</xsl:text> <xsl:for-each select=".//rng:element|.//rng:attribute"> <xsl:if test="generate-id(.) = generate-id(key('same-token-name', @localname)[1])"> |