summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-02 17:19:49 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-02 19:32:27 -0500
commit4ba42fc8dfb085ffc1a79365917a05e007d5be32 (patch)
tree5db45ea0aa7cc4952f2a1ba9ce8b03254ae6de8f /sax
parent56cdaa186971eedbac1b494b46c2622862386e1a (diff)
Move this out of the namespace scope.
Change-Id: I4aec1d45edb47ea16adaa8d2ac23340b8f421bae
Diffstat (limited to 'sax')
-rw-r--r--sax/source/fastparser/fastparser.cxx77
-rw-r--r--sax/source/fastparser/fastparser.hxx4
2 files changed, 41 insertions, 40 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index afe9454605c7..caf4ec1aa577 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -40,6 +40,45 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::io;
+extern "C" {
+
+static void call_callbackStartElement(void *userData, const XML_Char *name , const XML_Char **atts)
+{
+ sax_fastparser::FastSaxParser* pFastParser = reinterpret_cast<sax_fastparser::FastSaxParser*>( userData );
+ pFastParser->callbackStartElement( name, atts );
+}
+
+static void call_callbackEndElement(void *userData, const XML_Char *name)
+{
+ sax_fastparser::FastSaxParser* pFastParser = reinterpret_cast<sax_fastparser::FastSaxParser*>( userData );
+ pFastParser->callbackEndElement( name );
+}
+
+static void call_callbackCharacters( void *userData , const XML_Char *s , int nLen )
+{
+ sax_fastparser::FastSaxParser* pFastParser = reinterpret_cast<sax_fastparser::FastSaxParser*>( userData );
+ pFastParser->callbackCharacters( s, nLen );
+}
+
+static void call_callbackEntityDecl(void *userData, const XML_Char *entityName,
+ int is_parameter_entity, const XML_Char *value, int value_length,
+ const XML_Char *base, const XML_Char *systemId,
+ const XML_Char *publicId, const XML_Char *notationName)
+{
+ sax_fastparser::FastSaxParser* pFastParser = reinterpret_cast<sax_fastparser::FastSaxParser*>(userData);
+ pFastParser->callbackEntityDecl(entityName, is_parameter_entity, value,
+ value_length, base, systemId, publicId, notationName);
+}
+
+static int call_callbackExternalEntityRef( XML_Parser parser,
+ const XML_Char *openEntityNames, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId )
+{
+ sax_fastparser::FastSaxParser* pFastParser = reinterpret_cast<sax_fastparser::FastSaxParser*>( XML_GetUserData( parser ) );
+ return pFastParser->callbackExternalEntityRef( parser, openEntityNames, base, systemId, publicId );
+}
+
+} // extern "C"
+
namespace sax_fastparser {
SaxContext::SaxContext( sal_Int32 nElementToken, const OUString& aNamespace, const OUString& aElementName ):
@@ -115,44 +154,6 @@ private:
// the implementation part
//---------------------------------------------
-extern "C" {
-
-static void call_callbackStartElement(void *userData, const XML_Char *name , const XML_Char **atts)
-{
- FastSaxParser* pFastParser = reinterpret_cast< FastSaxParser* >( userData );
- pFastParser->callbackStartElement( name, atts );
-}
-
-static void call_callbackEndElement(void *userData, const XML_Char *name)
-{
- FastSaxParser* pFastParser = reinterpret_cast< FastSaxParser* >( userData );
- pFastParser->callbackEndElement( name );
-}
-
-static void call_callbackCharacters( void *userData , const XML_Char *s , int nLen )
-{
- FastSaxParser* pFastParser = reinterpret_cast< FastSaxParser* >( userData );
- pFastParser->callbackCharacters( s, nLen );
-}
-
-static void call_callbackEntityDecl(void *userData, const XML_Char *entityName,
- int is_parameter_entity, const XML_Char *value, int value_length,
- const XML_Char *base, const XML_Char *systemId,
- const XML_Char *publicId, const XML_Char *notationName)
-{
- FastSaxParser* pFastParser = reinterpret_cast<FastSaxParser*>(userData);
- pFastParser->callbackEntityDecl(entityName, is_parameter_entity, value,
- value_length, base, systemId, publicId, notationName);
-}
-
-static int call_callbackExternalEntityRef( XML_Parser parser,
- const XML_Char *openEntityNames, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId )
-{
- FastSaxParser* pFastParser = reinterpret_cast< FastSaxParser* >( XML_GetUserData( parser ) );
- return pFastParser->callbackExternalEntityRef( parser, openEntityNames, base, systemId, publicId );
-}
-
-} // extern "C"
// --------------------------------------------------------------------
// FastLocatorImpl implementation
diff --git a/sax/source/fastparser/fastparser.hxx b/sax/source/fastparser/fastparser.hxx
index d2bf1a73c354..6888cef91b37 100644
--- a/sax/source/fastparser/fastparser.hxx
+++ b/sax/source/fastparser/fastparser.hxx
@@ -193,8 +193,8 @@ public:
const XML_Char *systemId, const XML_Char *publicId,
const XML_Char *notationName);
- inline void pushEntity( const Entity& rEntity ) { maEntities.push( rEntity ); }
- inline void popEntity() { maEntities.pop(); }
+ void pushEntity( const Entity& rEntity ) { maEntities.push( rEntity ); }
+ void popEntity() { maEntities.pop(); }
Entity& getEntity() { return maEntities.top(); }
void parse();
void produce( CallbackType aType );