From 3d4723f80a37e719359ad78ad063bc39ac28cd32 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 8 Mar 2013 09:03:10 +0100 Subject: Revert "simplify some compareTo" This reverts commit 19020191cbf3e3c7a7bf98d0958d86d931ae687b, s1.compareTo(s2, length-of-s2) is *not* equivalent to s1 == s2 --- editeng/source/uno/unofield.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editeng') diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index eee7c6e1d234..b33da6beaa22 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -886,8 +886,8 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const ::rt // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation. const OUString aTextFieldPrexit2( "com.sun.star.text.TextField." ); - if( (ServiceSpecifier == aTextFieldPrexit) || - (ServiceSpecifier == aTextFieldPrexit2) ) + if( (ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0) || + (ServiceSpecifier.compareTo( aTextFieldPrexit2, aTextFieldPrexit2.getLength() ) == 0) ) { OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) ); -- cgit