diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-03-08 12:37:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-08 13:04:13 +0100 |
commit | 6583305dd70e31ae745d709b8cda8c7b68219735 (patch) | |
tree | e50a38a329c161b3d3a99c11fa49a53a3dfb8330 /xmloff | |
parent | a3c0df8222a20860f64b06c956c213131b79a73b (diff) |
simplify compareTo (now correct)
Change-Id: Ia4fd2f54d0bda71d472f46949500c0b23ff8e1b7
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
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 c867818b66d9..ebf268c26dd7 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.compareTo( sURIPrefix, sURIPrefix.getLength() ) == 0 ) + if( rName.startsWith( sURIPrefix ) ) { 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( 0 != rName.compareTo( rOasisURN, rOasisURN.getLength() ) ) + if( !rName.startsWith( rOasisURN ) ) 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( 0!= sTmp.compareTo( rXMLNS, rXMLNS.getLength() ) ) + if( !sTmp.startsWith( rXMLNS ) ) return sal_False; // :urn:oasis:names:tc:[^:]:xmlns:.* diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 4ad63cbcadb7..c38f45faf326 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.compareTo( sURL, sURL.getLength() ) == 0 ) + if ( aPersistName.startsWith( sURL ) ) aPersistName = aPersistName.copy( sURL.getLength() ); xProps->setPropertyValue( OUString( "PersistName" ), |