Kaydet (Commit) f09bd2e1 authored tarafından Noel Grandin's avatar Noel Grandin

convert sc/source/ui/optdlg/*.cxx from String to OUString

Change-Id: Ic62c8dd15a5cff750ab8a7cd0dc5c0201069c947
üst f917cff4
...@@ -152,7 +152,7 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ ) ...@@ -152,7 +152,7 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ )
{ {
XColorEntry* pEntry = xColorLst->GetColor( i ); XColorEntry* pEntry = xColorLst->GetColor( i );
Color aColor = pEntry->GetColor(); Color aColor = pEntry->GetColor();
String sName = pEntry->GetName(); OUString sName = pEntry->GetName();
m_pContentColorLB->InsertEntry( aColor, sName ); m_pContentColorLB->InsertEntry( aColor, sName );
m_pMoveColorLB->InsertEntry( aColor, sName ); m_pMoveColorLB->InsertEntry( aColor, sName );
......
...@@ -172,8 +172,8 @@ bool ScTpFormulaOptions::IsValidSeparator(const OUString& rSep) const ...@@ -172,8 +172,8 @@ bool ScTpFormulaOptions::IsValidSeparator(const OUString& rSep) const
bool ScTpFormulaOptions::IsValidSeparatorSet() const bool ScTpFormulaOptions::IsValidSeparatorSet() const
{ {
// Make sure the column and row separators are different. // Make sure the column and row separators are different.
String aColStr = mpEdSepArrayCol->GetText(); OUString aColStr = mpEdSepArrayCol->GetText();
String aRowStr = mpEdSepArrayRow->GetText(); OUString aRowStr = mpEdSepArrayRow->GetText();
if (aColStr == aRowStr) if (aColStr == aRowStr)
return false; return false;
...@@ -199,12 +199,12 @@ IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit ) ...@@ -199,12 +199,12 @@ IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit )
if (!pEdit) if (!pEdit)
return 0; return 0;
String aStr = pEdit->GetText(); OUString aStr = pEdit->GetText();
if (aStr.Len() > 1) if (aStr.getLength() > 1)
{ {
// In case the string is more than one character long, only grab the // In case the string is more than one character long, only grab the
// first character. // first character.
aStr = aStr.Copy(0, 1); aStr = aStr.copy(0, 1);
pEdit->SetText(aStr); pEdit->SetText(aStr);
} }
......
...@@ -267,12 +267,12 @@ sal_uInt16 ScTpUserLists::UpdateUserListBox() ...@@ -267,12 +267,12 @@ sal_uInt16 ScTpUserLists::UpdateUserListBox()
//---------------------------------------------------------- //----------------------------------------------------------
size_t nCount = pUserLists->size(); size_t nCount = pUserLists->size();
String aEntry; OUString aEntry;
for ( size_t i=0; i<nCount; ++i ) for ( size_t i=0; i<nCount; ++i )
{ {
aEntry = (*pUserLists)[i]->GetString(); aEntry = (*pUserLists)[i]->GetString();
OSL_ENSURE( aEntry.Len() > 0, "Empty UserList-entry :-/" ); OSL_ENSURE( !aEntry.isEmpty(), "Empty UserList-entry :-/" );
mpLbLists->InsertEntry( aEntry ); mpLbLists->InsertEntry( aEntry );
} }
...@@ -291,13 +291,13 @@ void ScTpUserLists::UpdateEntries( size_t nList ) ...@@ -291,13 +291,13 @@ void ScTpUserLists::UpdateEntries( size_t nList )
{ {
const ScUserListData* pList = (*pUserLists)[nList]; const ScUserListData* pList = (*pUserLists)[nList];
sal_uInt16 nSubCount = pList->GetSubCount(); sal_uInt16 nSubCount = pList->GetSubCount();
String aEntryListStr; OUString aEntryListStr;
for ( sal_uInt16 i=0; i<nSubCount; i++ ) for ( sal_uInt16 i=0; i<nSubCount; i++ )
{ {
if ( i!=0 ) if ( i!=0 )
aEntryListStr += CR; aEntryListStr += OUString(CR);
aEntryListStr += String(pList->GetSubStr(i)); aEntryListStr += pList->GetSubStr(i);
} }
mpEdEntries->SetText(convertLineEnd(aEntryListStr, GetSystemLineEnd())); mpEdEntries->SetText(convertLineEnd(aEntryListStr, GetSystemLineEnd()));
...@@ -312,19 +312,19 @@ void ScTpUserLists::UpdateEntries( size_t nList ) ...@@ -312,19 +312,19 @@ void ScTpUserLists::UpdateEntries( size_t nList )
void ScTpUserLists::MakeListStr( OUString& rListStr ) void ScTpUserLists::MakeListStr( OUString& rListStr )
{ {
String aStr; OUString aStr;
xub_StrLen nToken = comphelper::string::getTokenCount(rListStr, LF); xub_StrLen nToken = comphelper::string::getTokenCount(rListStr, LF);
for(xub_StrLen i=0;i<nToken;i++) for(xub_StrLen i=0;i<nToken;i++)
{ {
OUString aString = comphelper::string::strip(rListStr.getToken(i, LF), ' '); OUString aString = comphelper::string::strip(rListStr.getToken(i, LF), ' ');
aStr+=aString; aStr += aString;
aStr+=cDelimiter; aStr += OUString(cDelimiter);
} }
aStr = comphelper::string::strip(aStr, cDelimiter); aStr = comphelper::string::strip(aStr, cDelimiter);
xub_StrLen nLen = aStr.Len(); xub_StrLen nLen = aStr.getLength();
rListStr = ""; rListStr = "";
...@@ -332,14 +332,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr ) ...@@ -332,14 +332,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr )
xub_StrLen c = 0; xub_StrLen c = 0;
while ( c < nLen ) while ( c < nLen )
{ {
rListStr += OUString(aStr.GetChar(c)); rListStr += OUString(aStr[c]);
c++; c++;
if ( aStr.GetChar(c) == cDelimiter ) if ( aStr[c] == cDelimiter )
{ {
rListStr += OUString(aStr.GetChar(c)); rListStr += OUString(aStr[c]);
while ( (aStr.GetChar(c) == cDelimiter) && (c < nLen) ) while ( (aStr[c] == cDelimiter) && (c < nLen) )
c++; c++;
} }
} }
...@@ -388,8 +388,8 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, ...@@ -388,8 +388,8 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
if ( nCellDir != RET_CANCEL ) if ( nCellDir != RET_CANCEL )
{ {
String aStrList; OUString aStrList;
String aStrField; OUString aStrField;
if ( nCellDir == SCRET_COLS ) if ( nCellDir == SCRET_COLS )
{ {
...@@ -401,18 +401,18 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, ...@@ -401,18 +401,18 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
{ {
aStrField = pDoc->GetString(col, row, nTab); aStrField = pDoc->GetString(col, row, nTab);
if ( aStrField.Len() > 0 ) if ( !aStrField.isEmpty() )
{ {
aStrList += aStrField; aStrList += aStrField;
aStrList += '\n'; aStrList += "\n";
} }
} }
else else
bValueIgnored = sal_True; bValueIgnored = sal_True;
} }
if ( aStrList.Len() > 0 ) if ( !aStrList.isEmpty() )
AddNewList( aStrList ); AddNewList( aStrList );
aStrList.Erase(); aStrList = "";
} }
} }
else else
...@@ -425,18 +425,18 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos, ...@@ -425,18 +425,18 @@ void ScTpUserLists::CopyListFromArea( const ScRefAddress& rStartPos,
{ {
aStrField = pDoc->GetString(col, row, nTab); aStrField = pDoc->GetString(col, row, nTab);
if ( aStrField.Len() > 0 ) if ( !aStrField.isEmpty() )
{ {
aStrList += aStrField; aStrList += aStrField;
aStrList += '\n'; aStrList += "\n";
} }
} }
else else
bValueIgnored = sal_True; bValueIgnored = sal_True;
} }
if ( aStrList.Len() > 0 ) if ( !aStrList.isEmpty() )
AddNewList( aStrList ); AddNewList( aStrList );
aStrList.Erase(); aStrList = "";
} }
} }
...@@ -572,11 +572,11 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) ...@@ -572,11 +572,11 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
} }
else if (pBtn == mpBtnAdd || pBtn == mpBtnModify) else if (pBtn == mpBtnAdd || pBtn == mpBtnModify)
{ {
String theEntriesStr( mpEdEntries->GetText() ); OUString theEntriesStr( mpEdEntries->GetText() );
if ( !bModifyMode ) if ( !bModifyMode )
{ {
if ( theEntriesStr.Len() > 0 ) if ( !theEntriesStr.isEmpty() )
{ {
AddNewList( theEntriesStr ); AddNewList( theEntriesStr );
UpdateUserListBox(); UpdateUserListBox();
...@@ -609,7 +609,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) ...@@ -609,7 +609,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
OSL_ENSURE( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" ); OSL_ENSURE( nSelList != LISTBOX_ENTRY_NOTFOUND, "Modify without List :-/" );
if ( theEntriesStr.Len() > 0 ) if ( !theEntriesStr.isEmpty() )
{ {
ModifyList( nSelList, theEntriesStr ); ModifyList( nSelList, theEntriesStr );
UpdateUserListBox(); UpdateUserListBox();
...@@ -646,7 +646,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) ...@@ -646,7 +646,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn )
if ( mpLbLists->GetEntryCount() > 0 ) if ( mpLbLists->GetEntryCount() > 0 )
{ {
sal_uInt16 nRemovePos = mpLbLists->GetSelectEntryPos(); sal_uInt16 nRemovePos = mpLbLists->GetSelectEntryPos();
String aMsg ( aStrQueryRemove.getToken( 0, '#' ) ); OUString aMsg ( aStrQueryRemove.getToken( 0, '#' ) );
aMsg += mpLbLists->GetEntry( nRemovePos ); aMsg += mpLbLists->GetEntry( nRemovePos );
aMsg += aStrQueryRemove.getToken( 1, '#' ); aMsg += aStrQueryRemove.getToken( 1, '#' );
......
...@@ -392,7 +392,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent, ...@@ -392,7 +392,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( Window* pParent,
for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i ) for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i )
{ {
String sMetric = aUnitArr.GetStringByPos( i ); OUString sMetric = aUnitArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i ); FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i );
switch ( eFUnit ) switch ( eFUnit )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment