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/source/control | |
parent | 0e0aca151b36462cf5f5592fa7e7d21b5c96472d (diff) |
ditch last (?) String::String(const sal_Unicode*)
Change-Id: I47ce16581a9923729a7e5e1e5cedaf91e4b215ac
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/edit.cxx | 12 | ||||
-rw-r--r-- | vcl/source/control/field2.cxx | 8 |
2 files changed, 10 insertions, 10 deletions
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; } |