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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/uno/unofield.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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() ) ); |