Kaydet (Commit) 94f99a6b authored tarafından Matúš Kukan's avatar Matúš Kukan

sax: build fix: don't prefix enum values

Change-Id: I6f4eac6103821227bc72de8c3bb0fb89a7a8bc9d
üst dd35d93d
...@@ -76,8 +76,8 @@ private: ...@@ -76,8 +76,8 @@ private:
} }
catch (const SAXParseException& e) catch (const SAXParseException& e)
{ {
mpParser->getEntity().getEvent( CallbackType::EXCEPTION ); mpParser->getEntity().getEvent( EXCEPTION );
mpParser->produce( CallbackType::EXCEPTION ); mpParser->produce( EXCEPTION );
} }
} }
}; };
...@@ -798,8 +798,8 @@ void FastSaxParser::deleteUsedEvents() ...@@ -798,8 +798,8 @@ void FastSaxParser::deleteUsedEvents()
void FastSaxParser::produce( CallbackType aType ) void FastSaxParser::produce( CallbackType aType )
{ {
Entity& rEntity = getEntity(); Entity& rEntity = getEntity();
if (aType == CallbackType::DONE || if (aType == DONE ||
aType == CallbackType::EXCEPTION || aType == EXCEPTION ||
rEntity.mnProducedEventsSize == rEntity.mnEventListSize) rEntity.mnProducedEventsSize == rEntity.mnEventListSize)
{ {
osl::ResettableMutexGuard aGuard(rEntity.maEventProtector); osl::ResettableMutexGuard aGuard(rEntity.maEventProtector);
...@@ -829,18 +829,18 @@ bool FastSaxParser::consume(EventList *pEventList) ...@@ -829,18 +829,18 @@ bool FastSaxParser::consume(EventList *pEventList)
{ {
switch ((*aEventIt).maType) switch ((*aEventIt).maType)
{ {
case CallbackType::START_ELEMENT: case START_ELEMENT:
rEntity.startElement( &(*aEventIt) ); rEntity.startElement( &(*aEventIt) );
break; break;
case CallbackType::END_ELEMENT: case END_ELEMENT:
rEntity.endElement(); rEntity.endElement();
break; break;
case CallbackType::CHARACTERS: case CHARACTERS:
rEntity.characters( (*aEventIt).msChars ); rEntity.characters( (*aEventIt).msChars );
break; break;
case CallbackType::DONE: case DONE:
return false; return false;
case CallbackType::EXCEPTION: case EXCEPTION:
{ {
assert( rEntity.maSavedException.hasValue() ); assert( rEntity.maSavedException.hasValue() );
// Error during parsing ! // Error during parsing !
...@@ -918,9 +918,9 @@ void FastSaxParser::parse() ...@@ -918,9 +918,9 @@ void FastSaxParser::parse()
} }
} }
while( nRead > 0 ); while( nRead > 0 );
rEntity.getEvent( CallbackType::DONE ); rEntity.getEvent( DONE );
if (rEntity.mbEnableThreads) if (rEntity.mbEnableThreads)
produce( CallbackType::DONE ); produce( DONE );
} }
//------------------------------------------ //------------------------------------------
...@@ -943,7 +943,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char ...@@ -943,7 +943,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char
} }
// create attribute map and process namespace instructions // create attribute map and process namespace instructions
Event& rEvent = getEntity().getEvent( CallbackType::START_ELEMENT ); Event& rEvent = getEntity().getEvent( START_ELEMENT );
if (rEvent.mxAttributes.is()) if (rEvent.mxAttributes.is())
rEvent.mxAttributes->clear(); rEvent.mxAttributes->clear();
else else
...@@ -1038,7 +1038,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char ...@@ -1038,7 +1038,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char
rEntity.maNamespaceStack.push( NameWithToken(rEvent.msNamespace, nNamespaceToken) ); rEntity.maNamespaceStack.push( NameWithToken(rEvent.msNamespace, nNamespaceToken) );
rEvent.msElementName = OUString(pName, nNameLen, RTL_TEXTENCODING_UTF8); rEvent.msElementName = OUString(pName, nNameLen, RTL_TEXTENCODING_UTF8);
if (rEntity.mbEnableThreads) if (rEntity.mbEnableThreads)
produce( CallbackType::START_ELEMENT ); produce( START_ELEMENT );
else else
rEntity.startElement( &rEvent ); rEntity.startElement( &rEvent );
} }
...@@ -1059,9 +1059,9 @@ void FastSaxParser::callbackEndElement( SAL_UNUSED_PARAMETER const XML_Char* ) ...@@ -1059,9 +1059,9 @@ void FastSaxParser::callbackEndElement( SAL_UNUSED_PARAMETER const XML_Char* )
if( !rEntity.maNamespaceStack.empty() ) if( !rEntity.maNamespaceStack.empty() )
rEntity.maNamespaceStack.pop(); rEntity.maNamespaceStack.pop();
rEntity.getEvent( CallbackType::END_ELEMENT ); rEntity.getEvent( END_ELEMENT );
if (rEntity.mbEnableThreads) if (rEntity.mbEnableThreads)
produce( CallbackType::END_ELEMENT ); produce( END_ELEMENT );
else else
rEntity.endElement(); rEntity.endElement();
} }
...@@ -1070,10 +1070,10 @@ void FastSaxParser::callbackEndElement( SAL_UNUSED_PARAMETER const XML_Char* ) ...@@ -1070,10 +1070,10 @@ void FastSaxParser::callbackEndElement( SAL_UNUSED_PARAMETER const XML_Char* )
void FastSaxParser::callbackCharacters( const XML_Char* s, int nLen ) void FastSaxParser::callbackCharacters( const XML_Char* s, int nLen )
{ {
Entity& rEntity = getEntity(); Entity& rEntity = getEntity();
Event& rEvent = rEntity.getEvent( CallbackType::CHARACTERS ); Event& rEvent = rEntity.getEvent( CHARACTERS );
rEvent.msChars = OUString(s, nLen, RTL_TEXTENCODING_UTF8); rEvent.msChars = OUString(s, nLen, RTL_TEXTENCODING_UTF8);
if (rEntity.mbEnableThreads) if (rEntity.mbEnableThreads)
produce( CallbackType::CHARACTERS ); produce( CHARACTERS );
else else
rEntity.characters( rEvent.msChars ); rEntity.characters( rEvent.msChars );
} }
......
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