diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-17 12:17:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-18 15:13:51 +0100 |
commit | 5819bec966782b844eb2953f6636a84a01212234 (patch) | |
tree | 13d291ba52f014cf6f948379c4bab8ac44b45035 /vcl | |
parent | callcatcher: drop unused macro-generated GetChildWindowId methods (diff) | |
download | core-5819bec966782b844eb2953f6636a84a01212234.tar.gz core-5819bec966782b844eb2953f6636a84a01212234.zip |
ditch last (?) String::String(const sal_Unicode*)
Change-Id: I47ce16581a9923729a7e5e1e5cedaf91e4b215ac
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/edit.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/vcl/i18nhelp.hxx | 4 | ||||
-rw-r--r-- | vcl/source/app/i18nhelp.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 8 |
5 files changed, 16 insertions, 16 deletions
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx index 9632f9eca4a5..16c0e2fae9db 100644 --- a/vcl/inc/vcl/edit.hxx +++ b/vcl/inc/vcl/edit.hxx @@ -102,7 +102,7 @@ private: SAL_DLLPRIVATE void ImplInvalidateOrRepaint( xub_StrLen nStart = 0, xub_StrLen nEnd = STRING_LEN ); SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode ); SAL_DLLPRIVATE void ImplSetText( const XubString& rStr, const Selection* pNewSelection = 0 ); - SAL_DLLPRIVATE void ImplInsertText( const XubString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False ); + SAL_DLLPRIVATE void ImplInsertText( const rtl::OUString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False ); SAL_DLLPRIVATE String ImplGetValidString( const String& rString ) const; SAL_DLLPRIVATE void ImplClearBackground( long nXStart, long nXEnd ); SAL_DLLPRIVATE void ImplShowCursor( sal_Bool bOnlyIfVisible = sal_True ); diff --git a/vcl/inc/vcl/i18nhelp.hxx b/vcl/inc/vcl/i18nhelp.hxx index 610f5cffeaeb..0d1afb060054 100644 --- a/vcl/inc/vcl/i18nhelp.hxx +++ b/vcl/inc/vcl/i18nhelp.hxx @@ -79,9 +79,9 @@ public: I18nHelper( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF, const ::com::sun::star::lang::Locale& rLocale ); ~I18nHelper(); - sal_Int32 CompareString( const String& rStr1, const String& rStr2 ) const; + sal_Int32 CompareString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const; - sal_Bool MatchString( const String& rStr1, const String& rStr2 ) const; + sal_Bool MatchString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const; sal_Bool MatchMnemonic( const String& rString, sal_Unicode cMnemonicChar ) const; String GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const; diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index ea4eb34e8213..7e43afa2f87b 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -118,7 +118,7 @@ String vcl::I18nHelper::filterFormattingChars( const String& rStr ) return aBuf.makeStringAndClear(); } -sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rStr2 ) const +sal_Int32 vcl::I18nHelper::CompareString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -137,7 +137,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const String& rStr1, const String& rSt return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 ); } -sal_Bool vcl::I18nHelper::MatchString( const String& rStr1, const String& rStr2 ) const +sal_Bool vcl::I18nHelper::MatchString( const rtl::OUString& rStr1, const rtl::OUString& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -164,7 +164,7 @@ sal_Bool vcl::I18nHelper::MatchMnemonic( const String& rString, sal_Unicode cMne if ( n != STRING_NOTFOUND ) { String aMatchStr( rString, n+1, STRING_LEN ); // not only one char, because of transliteration... - bEqual = MatchString( cMnemonicChar, aMatchStr ); + bEqual = MatchString( rtl::OUString(cMnemonicChar), aMatchStr ); } return bEqual; } diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index ca56cfdef2d9..a18208c911ed 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -857,7 +857,7 @@ bool Edit::ImplTruncateToMaxLen( rtl::OUString& rStr, sal_uInt32 nSelectionLen ) // ----------------------------------------------------------------------- -void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_Bool bIsUserInput ) +void Edit::ImplInsertText( const rtl::OUString& rStr, const Selection* pNewSel, sal_Bool bIsUserInput ) { Selection aSelection( maSelection ); aSelection.Justify(); @@ -873,9 +873,9 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ maText.Erase( (xub_StrLen)aSelection.Max(), 1 ); // take care of input-sequence-checking now - if (bIsUserInput && rStr.Len()) + if (bIsUserInput && !rStr.isEmpty()) { - DBG_ASSERT( rStr.Len() == 1, "unexpected string length. User input is expected to providse 1 char only!" ); + DBG_ASSERT( rStr.getLength() == 1, "unexpected string length. User input is expected to providse 1 char only!" ); // determine if input-sequence-checking should be applied or not // @@ -920,7 +920,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ } // uno::Reference < i18n::XBreakIterator > xBI( ImplGetBreakIterator(), UNO_QUERY ); - bIsInputSequenceChecking = rStr.Len() == 1 && + bIsInputSequenceChecking = rStr.getLength() == 1 && bCTLFontEnabled && bCTLSequenceChecking && aSelection.Min() > 0 && /* first char needs not to be checked */ @@ -930,7 +930,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ uno::Reference < i18n::XExtendedInputSequenceChecker > xISC; if (bIsInputSequenceChecking && (xISC = ImplGetInputSequenceChecker()).is()) { - sal_Unicode cChar = rStr.GetChar(0); + sal_Unicode cChar = rStr[0]; xub_StrLen nTmpPos = static_cast< xub_StrLen >( aSelection.Min() ); sal_Int16 nCheckMode = bCTLSequenceCheckingRestricted ? i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC; @@ -1826,7 +1826,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) bDone = sal_True; // Auch bei ReadOnly die Zeichen schlucken. if ( !mbReadOnly ) { - ImplInsertText( rKEvt.GetCharCode(), 0, sal_True ); + ImplInsertText(rtl::OUString(rKEvt.GetCharCode()), 0, sal_True); if ( maAutocompleteHdl.IsSet() ) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.Len()) ) diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index e625a1f5641c..67b82700dcc2 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -163,10 +163,10 @@ static int ImplIsPatternChar( xub_Unicode cChar, sal_Char cEditMask ) try { - String aCharStr( cChar ); - nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.Len(), Application::GetSettings().GetLocale() ); + rtl::OUString aCharStr(cChar); + nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.getLength(), Application::GetSettings().GetLocale() ); } - catch ( ::com::sun::star::uno::Exception& ) + catch (const ::com::sun::star::uno::Exception&) { SAL_WARN( "vcl.control", "ImplIsPatternChar: Exception caught!" ); return sal_False; @@ -213,7 +213,7 @@ static xub_Unicode ImplPatternChar( xub_Unicode cChar, sal_Char cEditMask ) (cEditMask == EDITMASK_UPPERALPHANUM) || ( cEditMask == EDITMASK_UPPERALLCHAR ) ) { - cChar = ImplGetCharClass()->toUpper( String(cChar),0,1,Application::GetSettings().GetLocale() )[0]; + cChar = ImplGetCharClass()->toUpper(rtl::OUString(cChar), 0, 1, Application::GetSettings().GetLocale())[0]; } return cChar; } |