summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-13 12:45:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-13 15:24:45 +0100
commit8b3cbc71151cf91a97e4c4340430876c8d02d030 (patch)
treebb502a9202c87b10883567bacf2fe3db3a84006f
parent0a5f063797d39913536a690cda9426ba20300b73 (diff)
Related: fdo#38838 remove UniString::ToLowerAscii
Change-Id: Iecb8104ea2891d5229e3ecace54e12287d9b0ac6
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx4
-rw-r--r--cui/source/inc/cuigaldlg.hxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx12
-rw-r--r--include/tools/string.hxx2
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx4
-rw-r--r--tools/source/string/strimp.cxx24
6 files changed, 11 insertions, 37 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 639280187e31..11c3d0a4c584 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -106,7 +106,7 @@ void SearchThread::execute()
nBeginFormat = nEndFormat = nFileNumber;
for( sal_uInt16 i = nBeginFormat; i <= nEndFormat; ++i )
- aFormats.push_back( mpBrowser->aFilterEntryList[ i ]->aFilterName.ToLowerAscii() );
+ aFormats.push_back( mpBrowser->aFilterEntryList[ i ]->aFilterName.toAsciiLowerCase() );
ImplSearch( maStartURL, aFormats, mpBrowser->bSearchRecursive );
}
@@ -970,7 +970,7 @@ void TPGalleryThemeProperties::FillFilterList()
#endif
pFilterEntry = new FilterEntry;
- pFilterEntry->aFilterName = String( CUI_RES( RID_SVXSTR_GALLERY_ALLFILES ) );
+ pFilterEntry->aFilterName = CUI_RESSTR(RID_SVXSTR_GALLERY_ALLFILES);
pFilterEntry->aFilterName = addExtension( pFilterEntry->aFilterName, aExtensions );
size_t pos = aCbbFileType.InsertEntry( pFilterEntry->aFilterName, 0 );
if ( pos < aFilterEntryList.size() ) {
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index 3157e98911cc..1591dab5eec7 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -52,7 +52,7 @@ typedef ::std::vector< sal_uLong > TokenList_impl;
struct FilterEntry
{
- String aFilterName;
+ OUString aFilterName;
};
class SearchThread: public salhelper::Thread
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 71f70f40486c..eee5bfe84759 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1782,14 +1782,14 @@ sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
return sal_False;
}
-static sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
+static sal_Bool lcl_FindAbbreviation(const SvStringsISortDtor* pList, const OUString& sWord)
{
OUString sAbk('~');
SvStringsISortDtor::const_iterator it = pList->find( sAbk );
sal_uInt16 nPos = it - pList->begin();
if( nPos < pList->size() )
{
- String sLowerWord( sWord ); sLowerWord.ToLowerAscii();
+ OUString sLowerWord(sWord.toAsciiLowerCase());
OUString pAbk;
for( sal_uInt16 n = nPos;
n < pList->size() &&
@@ -1797,15 +1797,15 @@ static sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const Str
++n )
{
// ~ and ~. are not allowed!
- if( 2 < pAbk.getLength() && pAbk.getLength() - 1 <= sWord.Len() )
+ if( 2 < pAbk.getLength() && pAbk.getLength() - 1 <= sWord.getLength() )
{
- String sLowerAbk( pAbk ); sLowerAbk.ToLowerAscii();
- for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; )
+ OUString sLowerAbk(pAbk.toAsciiLowerCase());
+ for (sal_Int32 i = sLowerAbk.getLength(), ii = sLowerWord.getLength(); i;)
{
if( !--i ) // agrees
return sal_True;
- if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii ))
+ if( sLowerAbk[i] != sLowerWord[--ii])
break;
}
}
diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index 768192f5c82a..5fd64e9e6d88 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -225,8 +225,6 @@ public:
UniString& Erase( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN );
UniString Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const;
- UniString& ToLowerAscii();
-
StringCompare CompareTo( const UniString& rStr,
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareToAscii( const sal_Char* pAsciiStr,
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 336329fe6cf5..9de494d77b14 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -316,8 +316,8 @@ lcl_NewUINameArray(sal_uInt16 nStt, sal_uInt16 const nEnd)
pNameArray->reserve(nEnd - nStt);
while( nStt < nEnd )
{
- const ResId rRId( nStt, *pSwResMgr );
- pNameArray->push_back(OUString(rRId));
+ const ResId aRId( nStt, *pSwResMgr );
+ pNameArray->push_back(OUString(aRId));
++nStt;
}
return pNameArray;
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 6fbb280cab74..c6d882b65524 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -365,30 +365,6 @@ STRING& STRING::Erase( xub_StrLen nIndex, xub_StrLen nCount )
return *this;
}
-STRING& STRING::ToLowerAscii()
-{
- DBG_CHKTHIS( STRING, DBGCHECKSTRING );
-
- sal_Int32 nIndex = 0;
- sal_Int32 nLen = mpData->mnLen;
- STRCODE* pStr = mpData->maStr;
- while ( nIndex < nLen )
- {
- // Convert if char is between 'A' and 'Z'
- if ( (*pStr >= 65) && (*pStr <= 90) )
- {
- // allocate string of new size
- pStr = ImplCopyStringData( pStr );
- *pStr += 32;
- }
-
- ++pStr,
- ++nIndex;
- }
-
- return *this;
-}
-
xub_StrLen STRING::Search( STRCODE c, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );