From 2d9ce9191da681e4fd9f1d08933ca5117c56601b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 20 Mar 2013 13:02:46 +0100 Subject: Remove uses of rtl::OUString::compareToAscii(asciiStr, maxLength) ...which is a confusing overload with unexpectedly different semantics from the one-parameter form. In preparation of marking it as deprecated. Change-Id: I4f176995546ae583fc570d770647ffc315eecc75 --- forms/source/component/Button.cxx | 5 ++--- forms/source/inc/frm_strings.hxx | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'forms/source') diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index df76b7acf39d..8526cc35b5de 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -654,9 +654,8 @@ namespace { bool isFormControllerURL( const ::rtl::OUString& _rURL ) { - const sal_Int32 nPrefixLen = URL_CONTROLLER_PREFIX.length; - return ( _rURL.getLength() > nPrefixLen ) - && ( _rURL.compareToAscii( URL_CONTROLLER_PREFIX.ascii, nPrefixLen ) == 0 ); + return ( _rURL.getLength() > RTL_CONSTASCII_LENGTH( ".uno:FormController/" ) ) + && ( _rURL.startsWith( ".uno:FormController/" ) ); } } diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index ad01b92b81f9..3e10031b8c74 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -286,8 +286,6 @@ namespace frm //-------------------------------------------------------------------------- //- URLs //-------------------------------------------------------------------------- - FORMS_CONSTASCII_STRING( URL_CONTROLLER_PREFIX, ".uno:FormController/" ); - FORMS_CONSTASCII_STRING( URL_FORM_POSITION, ".uno:FormController/positionForm" ); FORMS_CONSTASCII_STRING( URL_FORM_RECORDCOUNT, ".uno:FormController/RecordCount" ); FORMS_CONSTASCII_STRING( URL_RECORD_FIRST, ".uno:FormController/moveToFirst" ); -- cgit