summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-02-13 15:18:30 +0100
committerMichael Stahl <mstahl@redhat.com>2013-02-13 16:31:55 +0100
commit4db5b17c78c3a6567abfcd3cb43a46c1c4c80cf4 (patch)
tree17f65ef1490f250a2d3d46cf056dfbf6d0883cf5 /sax
parented09e6b233eac719744b32daf0ea47cea423bcc3 (diff)
sax: convert some legacy assertions
Change-Id: I3b4f1caa2c2d7a0fd88ea53bf05d01b2c7cc115a
Diffstat (limited to 'sax')
-rw-r--r--sax/source/expatwrap/sax_expat.cxx6
-rw-r--r--sax/source/fastparser/fastparser.cxx15
2 files changed, 10 insertions, 11 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index db17402d1e51..7d4d79298f21 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -794,7 +794,7 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis ,
pImpl->pAttrList->clear();
while( awAttributes[i] ) {
- OSL_ASSERT( awAttributes[i+1] );
+ assert(awAttributes[i+1]);
pImpl->pAttrList->addAttribute(
XML_CHAR_TO_OUSTRING( awAttributes[i] ) ,
pImpl->sCDATA, // expat doesn't know types
@@ -853,10 +853,10 @@ void SaxExpatParser_Impl::callbackEntityDecl(
{
SaxExpatParser_Impl *pImpl = ((SaxExpatParser_Impl*)pvThis);
if (value) { // value != 0 means internal entity
- OSL_TRACE("SaxExpatParser: internal entity declaration, stopping");
+ SAL_INFO("sax","SaxExpatParser: internal entity declaration, stopping");
XML_StopParser(pImpl->getEntity().pParser, XML_FALSE);
pImpl->exception = SAXParseException(
- ::rtl::OUString( "SaxExpatParser: internal entity declaration, stopping"),
+ "SaxExpatParser: internal entity declaration, stopping",
0, Any(),
pImpl->rDocumentLocator->getPublicId(),
pImpl->rDocumentLocator->getSystemId(),
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 4f63130f1393..fc27f107aab6 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -235,7 +235,7 @@ void FastSaxParser::pushContext()
void FastSaxParser::popContext()
{
Entity& rEntity = getEntity();
- OSL_ENSURE( !rEntity.maContextStack.empty(), "sax::FastSaxParser::popContext(), pop without push?" );
+ assert(!rEntity.maContextStack.empty()); // pop without push?
if( !rEntity.maContextStack.empty() )
rEntity.maContextStack.pop();
}
@@ -245,7 +245,7 @@ void FastSaxParser::popContext()
void FastSaxParser::DefineNamespace( const OString& rPrefix, const sal_Char* pNamespaceURL )
{
Entity& rEntity = getEntity();
- OSL_ENSURE( !rEntity.maContextStack.empty(), "sax::FastSaxParser::DefineNamespace(), I need a context!" );
+ assert(!rEntity.maContextStack.empty()); // need a context!
if( !rEntity.maContextStack.empty() )
{
sal_uInt32 nOffset = rEntity.maContextStack.top()->mnNamespaceCount++;
@@ -743,7 +743,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char
// #158414# first: get namespaces
for( ; awAttributes[i]; i += 2 )
{
- OSL_ASSERT( awAttributes[i+1] );
+ assert(awAttributes[i+1]);
splitName( awAttributes[i], pPrefix, nPrefixLen, pName, nNameLen );
if( nPrefixLen )
@@ -853,7 +853,7 @@ void FastSaxParser::callbackStartElement( const XML_Char* pwName, const XML_Char
void FastSaxParser::callbackEndElement( SAL_UNUSED_PARAMETER const XML_Char* )
{
Entity& rEntity = getEntity();
- OSL_ENSURE( !rEntity.maContextStack.empty(), "FastSaxParser::callbackEndElement - no context" );
+ assert(!rEntity.maContextStack.empty()); // no context?
if( !rEntity.maContextStack.empty() )
{
SaxContextImplPtr pContext = rEntity.maContextStack.top();
@@ -900,18 +900,17 @@ void FastSaxParser::callbackEntityDecl(
SAL_UNUSED_PARAMETER const XML_Char * /*notationName*/)
{
if (value) { // value != 0 means internal entity
- OSL_TRACE("FastSaxParser: internal entity declaration, stopping");
+ SAL_INFO("sax", "FastSaxParser: internal entity declaration, stopping");
XML_StopParser(getEntity().mpParser, XML_FALSE);
getEntity().maSavedException <<= SAXParseException(
- ::rtl::OUString(
- "FastSaxParser: internal entity declaration, stopping"),
+ "FastSaxParser: internal entity declaration, stopping",
static_cast<OWeakObject*>(this), Any(),
mxDocumentLocator->getPublicId(),
mxDocumentLocator->getSystemId(),
mxDocumentLocator->getLineNumber(),
mxDocumentLocator->getColumnNumber() );
} else {
- OSL_TRACE("FastSaxParser: ignoring external entity declaration");
+ SAL_INFO("sax", "FastSaxParser: ignoring external entity declaration");
}
}