Kaydet (Commit) e29a17ed authored tarafından Michael Stahl's avatar Michael Stahl

xmloff: convert legacy assertions in SvXMLNamespaceMap

Change-Id: I9771bf3b727168bad6aeb07a2eb55eb08b1b6408
üst a80da8e6
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <tools/debug.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
...@@ -103,8 +102,7 @@ sal_uInt16 SvXMLNamespaceMap::Add( const OUString& rPrefix, const OUString& rNam ...@@ -103,8 +102,7 @@ sal_uInt16 SvXMLNamespaceMap::Add( const OUString& rPrefix, const OUString& rNam
if( XML_NAMESPACE_UNKNOWN == nKey ) if( XML_NAMESPACE_UNKNOWN == nKey )
nKey = GetKeyByName( rName ); nKey = GetKeyByName( rName );
DBG_ASSERT( XML_NAMESPACE_NONE != nKey, assert(XML_NAMESPACE_NONE != nKey);
"SvXMLNamespaceMap::Add: invalid namespace key" );
if( XML_NAMESPACE_NONE == nKey ) if( XML_NAMESPACE_NONE == nKey )
return USHRT_MAX; return USHRT_MAX;
...@@ -119,8 +117,7 @@ sal_uInt16 SvXMLNamespaceMap::AddIfKnown( const OUString& rPrefix, const OUStrin ...@@ -119,8 +117,7 @@ sal_uInt16 SvXMLNamespaceMap::AddIfKnown( const OUString& rPrefix, const OUStrin
{ {
sal_uInt16 nKey = GetKeyByName( rName ); sal_uInt16 nKey = GetKeyByName( rName );
DBG_ASSERT( XML_NAMESPACE_NONE != nKey, assert(XML_NAMESPACE_NONE);
"SvXMLNamespaceMap::AddIfKnown: invalid namespace key" );
if( XML_NAMESPACE_NONE == nKey ) if( XML_NAMESPACE_NONE == nKey )
return XML_NAMESPACE_UNKNOWN; return XML_NAMESPACE_UNKNOWN;
...@@ -197,7 +194,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, ...@@ -197,7 +194,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
{ {
case XML_NAMESPACE_UNKNOWN: case XML_NAMESPACE_UNKNOWN:
// ...if it's a completely unknown namespace, assert and return the local name // ...if it's a completely unknown namespace, assert and return the local name
DBG_ASSERT( false, "SvXMLNamespaceMap::GetQNameByKey: invalid namespace key" ); assert(false);
case XML_NAMESPACE_NONE: case XML_NAMESPACE_NONE:
// ...if there isn't one, return the local name // ...if there isn't one, return the local name
return rLocalName; return rLocalName;
...@@ -260,7 +257,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, ...@@ -260,7 +257,7 @@ OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey,
else else
{ {
// ... if it isn't, this is a Bad Thing, assert and return the local name // ... if it isn't, this is a Bad Thing, assert and return the local name
DBG_ASSERT( false, "SvXMLNamespaceMap::GetQNameByKey: invalid namespace key" ); assert(false);
return rLocalName; return rLocalName;
} }
} }
...@@ -387,8 +384,7 @@ bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPrefix ...@@ -387,8 +384,7 @@ bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPrefix
if( XML_NAMESPACE_UNKNOWN == nKey ) if( XML_NAMESPACE_UNKNOWN == nKey )
nKey = GetKeyByName( rName ); nKey = GetKeyByName( rName );
DBG_ASSERT( XML_NAMESPACE_NONE != nKey, assert(XML_NAMESPACE_NONE != nKey);
"SvXMLNamespaceMap::AddAtIndex: invalid namespace key" );
if( XML_NAMESPACE_NONE != nKey && ! ( aNameHash.count ( rPrefix ) ) ) if( XML_NAMESPACE_NONE != nKey && ! ( aNameHash.count ( rPrefix ) ) )
{ {
_Add( rPrefix, rName, nKey ); _Add( rPrefix, rName, nKey );
......
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