summaryrefslogtreecommitdiff
path: root/xmloff/source/core
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2008-01-04 12:15:03 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2008-01-04 12:15:03 +0000
commit7fcc6014a32f3a467f14875848f8b953a0683f83 (patch)
treed280edd3c13e27813423bf60a9c7767e883b9b84 /xmloff/source/core
parent94ed6557411c5426e7082d658cd97ab320106b01 (diff)
INTEGRATION: CWS sw8u10bf02 (1.21.96); FILE MERGED
2007/11/30 14:13:27 ama 1.21.96.1: Fix #i84117#: Double use of namespace
Diffstat (limited to 'xmloff/source/core')
-rw-r--r--xmloff/source/core/nmspmap.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index ed8fcee89255..ef35ee995f29 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: nmspmap.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: hr $ $Date: 2007-06-27 14:56:21 $
+ * last change: $Author: hr $ $Date: 2008-01-04 13:15:03 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -161,9 +161,12 @@ sal_uInt16 SvXMLNamespaceMap::AddIfKnown( const OUString& rPrefix, const OUStrin
if( XML_NAMESPACE_NONE == nKey )
return XML_NAMESPACE_UNKNOWN;
- if( XML_NAMESPACE_UNKNOWN != nKey &&
- aNameHash.find ( rPrefix ) == aNameHash.end() )
- nKey = _Add( rPrefix, rName, nKey );
+ if( XML_NAMESPACE_UNKNOWN != nKey )
+ {
+ NameSpaceHash::const_iterator aIter = aNameHash.find( rPrefix );
+ if( aIter == aNameHash.end() || (*aIter).second->sName != rName )
+ nKey = _Add( rPrefix, rName, nKey );
+ }
return nKey;
}