diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-08 09:03:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-08 09:03:10 +0100 |
commit | 3d4723f80a37e719359ad78ad063bc39ac28cd32 (patch) | |
tree | 87963e60947a5d61854d733dccd3779bad05545b /xmloff | |
parent | b62541a083158cf1d30337ba5e751c1cbd2c649e (diff) |
Revert "simplify some compareTo"
This reverts commit 19020191cbf3e3c7a7bf98d0958d86d931ae687b,
s1.compareTo(s2, length-of-s2)
is *not* equivalent to
s1 == s2
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/nmspmap.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 31ba464fd612..c867818b66d9 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -463,7 +463,7 @@ sal_Bool SvXMLNamespaceMap::NormalizeW3URI( ::rtl::OUString& rName ) sal_Bool bSuccess = sal_False; const OUString sURIPrefix = GetXMLToken( XML_URI_W3_PREFIX ); - if( rName == sURIPrefix ) + if( rName.compareTo( sURIPrefix, sURIPrefix.getLength() ) == 0 ) { const OUString sURISuffix = GetXMLToken( XML_URI_XFORMS_SUFFIX ); sal_Int32 nCompareFrom = rName.getLength() - sURISuffix.getLength(); @@ -508,7 +508,7 @@ sal_Bool SvXMLNamespaceMap::NormalizeOasisURN( ::rtl::OUString& rName ) sal_Int32 nNameLen = rName.getLength(); // :urn:oasis:names:tc.* const OUString& rOasisURN = GetXMLToken( XML_URN_OASIS_NAMES_TC ); - if( rName != rOasisURN ) + if( 0 != rName.compareTo( rOasisURN, rOasisURN.getLength() ) ) return sal_False; // :urn:oasis:names:tc:.* @@ -526,7 +526,7 @@ sal_Bool SvXMLNamespaceMap::NormalizeOasisURN( ::rtl::OUString& rName ) nPos = nTCIdEnd + 1; OUString sTmp( rName.copy( nPos ) ); const OUString& rXMLNS = GetXMLToken( XML_XMLNS ); - if( sTmp != rXMLNS ) + if( 0!= sTmp.compareTo( rXMLNS, rXMLNS.getLength() ) ) return sal_False; // :urn:oasis:names:tc:[^:]:xmlns:.* diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 562fe8a53937..4ad63cbcadb7 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2670,7 +2670,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen { const OUString sURL( "vnd.sun.star.EmbeddedObject:" ); - if ( aPersistName == sURL ) + if ( aPersistName.compareTo( sURL, sURL.getLength() ) == 0 ) aPersistName = aPersistName.copy( sURL.getLength() ); xProps->setPropertyValue( OUString( "PersistName" ), |