summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-17 12:17:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-18 15:13:51 +0100
commit5819bec966782b844eb2953f6636a84a01212234 (patch)
tree13d291ba52f014cf6f948379c4bab8ac44b45035 /vcl/source
parent0e0aca151b36462cf5f5592fa7e7d21b5c96472d (diff)
ditch last (?) String::String(const sal_Unicode*)
Change-Id: I47ce16581a9923729a7e5e1e5cedaf91e4b215ac
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/i18nhelp.cxx6
-rw-r--r--vcl/source/control/edit.cxx12
-rw-r--r--vcl/source/control/field2.cxx8
3 files changed, 13 insertions, 13 deletions
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;
}