You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/11/14 22:53:32 UTC
svn commit: r1409452 - in /incubator/ooo/branches/gbuild/main/writerfilter:
inc/resourcemodel/ source/ooxml/
Author: arist
Date: Wed Nov 14 21:53:31 2012
New Revision: 1409452
URL: http://svn.apache.org/viewvc?rev=1409452&view=rev
Log:
writerfilter10_19_3fe69983f7be.patch
# HG changeset patch
# User Henning Brinkmann <hb...@openoffice.org>
# Date 1298385006 -3600
# Node ID 3fe69983f7beb8556ef0b27467127035da5372ce
# Parent da333da977c6d8f73a20d5c33007186340808518
redefined Token_t, used sal_Int32 where old definition was needed
Modified:
incubator/ooo/branches/gbuild/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.cxx
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.hxx
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factory_ns.xsl
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl.xsl
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl_ns.xsl
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/fasttokens.xsl
incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/gperffasttokenhandler.xsl
Modified: incubator/ooo/branches/gbuild/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx Wed Nov 14 21:53:31 2012
@@ -391,17 +391,45 @@ public:
*/
Stream::Pointer_t WRITERFILTER_DLLPUBLIC createStreamHandler();
- void WRITERFILTER_DLLPUBLIC analyzerIds();
- Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
-
- void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
-
- void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
- void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
- void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
- const rtl::OUString & /*str*/);
- void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
-
+void WRITERFILTER_DLLPUBLIC analyzerIds();
+Stream::Pointer_t WRITERFILTER_DLLPUBLIC createAnalyzer();
+
+void WRITERFILTER_DLLPUBLIC logger(string prefix, string message);
+
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<Properties>::Pointer_t props);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, sal_uInt32 n);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & /*o*/, const char * /*name*/,
+ const rtl::OUString & /*str*/);
+void WRITERFILTER_DLLPUBLIC dump(OutputWithDepth<string> & o, const char * name, writerfilter::Reference<BinaryObj>::Pointer_t binary);
+
+class Token_t
+{
+ sal_Int32 m_nId;
+#ifdef DEBUG
+ ::std::string m_string;
+#endif
+
+ void assign(sal_Int32 nId);
+
+public:
+ Token_t();
+ Token_t(sal_Int32 nId);
+ virtual ~Token_t();
+
+ sal_Int32 getId() const;
+ operator sal_Int32() const;
+ Token_t & operator = (sal_Int32 n);
+
+#ifdef DEBUG
+ ::std::string toString() const;
+#endif
+};
+
+struct TokenHash
+{
+ size_t operator()(const Token_t & rToken) const;
+};
+
}
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.cxx?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.cxx Wed Nov 14 21:53:31 2012
@@ -255,7 +255,7 @@ void OOXMLFactory::attributes(OOXMLFastC
uno::Reference< xml::sax::XFastContextHandler>
OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler,
- Token_t Element)
+ sal_Int32 Element)
{
#ifdef DEBUG_FACTORY
debug_logger->startElement("factory.createFastChildContext");
@@ -300,7 +300,7 @@ void OOXMLFactory::characters(OOXMLFastC
#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);
@@ -317,7 +317,7 @@ void OOXMLFactory::startAction(OOXMLFast
}
}
-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);
@@ -346,7 +346,7 @@ void OOXMLFactory_ns::charactersAction(O
{
}
-void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
+void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, sal_Int32, OOXMLValue::Pointer_t)
{
}
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.hxx?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFactory.hxx Wed Nov 14 21:53:31 2012
@@ -74,7 +74,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;
@@ -91,13 +91,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;
@@ -108,7 +108,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;
@@ -141,10 +141,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);
@@ -152,8 +152,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();
@@ -166,7 +166,7 @@ private:
uno::Reference< xml::sax::XFastContextHandler>
createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler,
OOXMLFactory_ns::Pointer_t pFactory,
- Token_t Element);
+ sal_Int32 Element);
};
}
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx Wed Nov 14 21:53:31 2012
@@ -181,7 +181,7 @@ OOXMLFastContextHandler::~OOXMLFastConte
// ::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)
{
@@ -216,7 +216,7 @@ throw (uno::RuntimeException, xml::sax::
#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
@@ -236,7 +236,7 @@ throw (uno::RuntimeException, xml::sax::
}
void OOXMLFastContextHandler::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
@@ -244,7 +244,7 @@ void OOXMLFastContextHandler::lcl_startF
}
void OOXMLFastContextHandler::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
OOXMLFactory::getInstance()->endAction(this, Element);
@@ -262,7 +262,7 @@ throw (uno::RuntimeException, xml::sax::
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)
{
@@ -284,7 +284,7 @@ uno::Reference< xml::sax::XFastContextHa
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)
{
@@ -363,7 +363,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");
@@ -374,12 +374,12 @@ void OOXMLFastContextHandler::startActio
#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");
@@ -390,7 +390,7 @@ void OOXMLFastContextHandler::endAction(
#endif
}
-void OOXMLFastContextHandler::lcl_endAction(Token_t Element)
+void OOXMLFastContextHandler::lcl_endAction(sal_Int32 Element)
{
OOXMLFactory::getInstance()->endAction(this, Element);
}
@@ -491,10 +491,6 @@ OOXMLParserState::Pointer_t OOXMLFastCon
void OOXMLFastContextHandler::setToken(Token_t nToken)
{
mnToken = nToken;
-
-#ifdef DEBUG_CONTEXT_HANDLER
- msTokenString = fastTokenToId(mnToken);
-#endif
}
Token_t OOXMLFastContextHandler::getToken() const
@@ -1256,7 +1252,7 @@ OOXMLFastContextHandlerProperties::~OOXM
}
void OOXMLFastContextHandlerProperties::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
endAction(Element);
@@ -1426,7 +1422,7 @@ OOXMLFastContextHandlerPropertyTable::~O
}
void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone());
@@ -1482,7 +1478,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHa
}
void OOXMLFastContextHandlerValue::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
sendPropertyToParent();
@@ -1557,7 +1553,7 @@ OOXMLFastContextHandlerTable::~OOXMLFast
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)
{
@@ -1570,7 +1566,7 @@ OOXMLFastContextHandlerTable::createFast
}
void OOXMLFastContextHandlerTable::lcl_endFastElement
-(Token_t /*Element*/)
+(sal_Int32 /*Element*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
addCurrentChild();
@@ -1625,7 +1621,7 @@ OOXMLFastContextHandlerXNote::~OOXMLFast
}
void OOXMLFastContextHandlerXNote::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
@@ -1640,7 +1636,7 @@ void OOXMLFastContextHandlerXNote::lcl_s
}
void OOXMLFastContextHandlerXNote::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
endAction(Element);
@@ -1797,7 +1793,7 @@ OOXMLFastContextHandlerTextTable::~OOXML
}
void OOXMLFastContextHandlerTextTable::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/)
throw (uno::RuntimeException, xml::sax::SAXException)
{
@@ -1818,7 +1814,7 @@ void OOXMLFastContextHandlerTextTable::l
}
void OOXMLFastContextHandlerTextTable::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
endAction(Element);
@@ -1880,7 +1876,7 @@ OOXMLFastContextHandlerShape::~OOXMLFast
}
void OOXMLFastContextHandlerShape::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException)
{
@@ -1935,7 +1931,7 @@ void OOXMLFastContextHandlerShape::sendS
}
void OOXMLFastContextHandlerShape::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
if (mrShapeContext.is())
@@ -1963,7 +1959,7 @@ void SAL_CALL OOXMLFastContextHandlerSha
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)
{
@@ -2114,7 +2110,7 @@ void OOXMLFastContextHandlerWrapper::add
}
void OOXMLFastContextHandlerWrapper::lcl_startFastElement
-(Token_t Element,
+(sal_Int32 Element,
const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
throw (uno::RuntimeException, xml::sax::SAXException)
{
@@ -2123,7 +2119,7 @@ void OOXMLFastContextHandlerWrapper::lcl
}
void OOXMLFastContextHandlerWrapper::lcl_endFastElement
-(Token_t Element)
+(sal_Int32 Element)
throw (uno::RuntimeException, xml::sax::SAXException)
{
if (mxContext.is())
@@ -2132,7 +2128,7 @@ void OOXMLFastContextHandlerWrapper::lcl
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)
{
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx Wed Nov 14 21:53:31 2012
@@ -69,7 +69,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);
@@ -79,7 +79,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
@@ -88,7 +88,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);
@@ -155,7 +155,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);
@@ -232,10 +232,6 @@ protected:
Id mnDefine;
Token_t mnToken;
-#ifdef DEBUG_CONTEXT_HANDLER
- string msTokenString;
-#endif
-
// the stream to send the stream events to.
Stream * mpStream;
@@ -246,26 +242,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)
@@ -340,7 +336,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);
@@ -359,7 +355,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);
};
@@ -374,7 +370,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"; }
@@ -396,7 +392,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);
@@ -406,7 +402,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; }
@@ -431,11 +427,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; }
@@ -479,11 +475,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);
};
@@ -530,16 +526,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);
@@ -599,16 +595,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);
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factory_ns.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factory_ns.xsl?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factory_ns.xsl (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factory_ns.xsl Wed Nov 14 21:53:31 2012
@@ -91,7 +91,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;
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl.xsl?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl.xsl (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl.xsl Wed Nov 14 21:53:31 2012
@@ -60,7 +60,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();
@@ -169,7 +169,7 @@ OOXMLFactory_ns::Pointer_t OOXMLFactory:
<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");
@@ -202,7 +202,7 @@ uno::Reference< xml::sax::XFastContex
<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:
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl_ns.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl_ns.xsl?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl_ns.xsl (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/factoryimpl_ns.xsl Wed Nov 14 21:53:31 2012
@@ -850,7 +850,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>
@@ -866,7 +866,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>
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/fasttokens.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/fasttokens.xsl?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/fasttokens.xsl (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/fasttokens.xsl Wed Nov 14 21:53:31 2012
@@ -57,19 +57,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>
Modified: incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/gperffasttokenhandler.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/gperffasttokenhandler.xsl?rev=1409452&r1=1409451&r2=1409452&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/gperffasttokenhandler.xsl (original)
+++ incubator/ooo/branches/gbuild/main/writerfilter/source/ooxml/gperffasttokenhandler.xsl Wed Nov 14 21:53:31 2012
@@ -68,7 +68,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])">