summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/filter/eppt/epptso.cxx5
-rwxr-xr-xunusedcode.easy1
-rw-r--r--vcl/inc/vcl/edit.hxx2
-rw-r--r--vcl/inc/vcl/i18nhelp.hxx4
-rw-r--r--vcl/source/app/i18nhelp.cxx6
-rw-r--r--vcl/source/control/edit.cxx12
-rw-r--r--vcl/source/control/field2.cxx8
7 files changed, 19 insertions, 19 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 70cf9a420e2b..dcb752f6a9ed 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1209,9 +1209,8 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
aFile = aUrl.PathToFileName();
else if ( INET_PROT_SMB == aUrl.GetProtocol() )
{
- // Convert smb notation to '\\'
- aFile = aUrl.GetMainURL( INetURLObject::NO_DECODE );
- aFile = String( aFile.GetBuffer() + 4 ); // skip the 'smb:' part
+ // Convert smb notation to '\\' and skip the 'smb:' part
+ aFile = aUrl.GetMainURL(INetURLObject::NO_DECODE).copy(4);
aFile.SearchAndReplaceAll( '/', '\\' );
aTarget = aFile;
}
diff --git a/unusedcode.easy b/unusedcode.easy
index 4d6601a7b1c8..da7c66401ce9 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -70,6 +70,7 @@ SrchAttrItemList::Replace(SearchAttrItem const&, unsigned short)
SrchAttrItemList::Replace(SearchAttrItem const*, unsigned short, unsigned short)
SrchAttrItemList::_ForEach(unsigned short, unsigned short, unsigned char (*)(SearchAttrItem const&, void*), void*)
StgCache::Pos2Page(int)
+String::String(unsigned short const*)
SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, unsigned char)
SvPtrarr::Replace(void* const*, unsigned short, unsigned short)
SvStringsISortDtor::Insert(String* const*, unsigned short)
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;
}