summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-04 23:58:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-09 12:16:56 +0100
commit104261010aa5ccbb7df4a82a3a3cafcfb0591fa7 (patch)
treeb8db79d2707ff5925ad01dba8a41bd8ab6d66847 /sc
parent1a1e953ee33c213dc8b88dd96a69ca9fc5e42d50 (diff)
some UniString->rtl::OUString
Change-Id: Ie69b30094da25df23a36baca2c7723d6a41f48c3
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/attrib.cxx13
-rw-r--r--sc/source/core/data/global.cxx4
-rw-r--r--sc/source/core/data/global2.cxx2
-rw-r--r--sc/source/core/data/table4.cxx6
-rw-r--r--sc/source/core/tool/compiler.cxx6
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/core/tool/interpr1.cxx5
-rw-r--r--sc/source/filter/excel/xechart.cxx6
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xelink.cxx4
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/excel/xlroot.cxx2
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx7
-rw-r--r--sc/source/filter/inc/fapihelper.hxx5
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx15
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/dbgui/asciiopt.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx4
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiimoptdlg.cxx4
-rw-r--r--sc/source/ui/docshell/docsh.cxx4
-rw-r--r--sc/source/ui/docshell/impex.cxx12
-rw-r--r--sc/source/ui/formdlg/formula.cxx15
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx6
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx6
-rw-r--r--sc/source/ui/vba/vbarange.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx10
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx35
-rw-r--r--sc/source/ui/view/output2.cxx8
38 files changed, 107 insertions, 106 deletions
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 0c51238b9e0c..e2f2c55ba5e1 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -135,12 +135,13 @@ ScMergeAttr::~ScMergeAttr()
String ScMergeAttr::GetValueText() const
{
- String aString( '(' );
- aString += String::CreateFromInt32( nColMerge );
- aString += ',';
- aString += String::CreateFromInt32( nRowMerge );
- aString += ')';
- return aString;
+ rtl::OUStringBuffer aString;
+ aString.append('(');
+ aString.append(static_cast<sal_Int32>(nColMerge));
+ aString.append(',');
+ aString.append(static_cast<sal_Int32>(nRowMerge));
+ aString.append(')');
+ return aString.makeStringAndClear();
}
//------------------------------------------------------------------------
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 011d2e0d63e3..08310e7fd6fb 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -822,7 +822,7 @@ void ScGlobal::AddQuotes( String& rString, sal_Unicode cQuote, bool bEscapeEmbed
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
rtl::OUString aQuotes( pQ );
- rString.SearchAndReplaceAll( cQuote, aQuotes);
+ rString.SearchAndReplaceAll( rtl::OUString(cQuote), aQuotes);
}
rString.Insert( cQuote, 0 ).Append( cQuote );
}
@@ -838,7 +838,7 @@ void ScGlobal::EraseQuotes( String& rString, sal_Unicode cQuote, bool bUnescapeE
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
rtl::OUString aQuotes( pQ );
- rString.SearchAndReplaceAll( aQuotes, cQuote);
+ rString.SearchAndReplaceAll( aQuotes, rtl::OUString(cQuote));
}
}
}
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 6fc2e4c570f9..e180538f767f 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -387,7 +387,7 @@ String ScGlobal::GetAbsDocName( const String& rFileName,
String ScGlobal::GetDocTabName( const String& rFileName,
const String& rTabName )
{
- String aDocTab( '\'' );
+ String aDocTab(rtl::OUString('\''));
aDocTab += rFileName;
xub_StrLen nPos = 1;
while( (nPos = aDocTab.Search( '\'', nPos ))
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 09ef436a390c..fcafa58bf884 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -94,7 +94,7 @@ short lcl_DecompValueString( String& aValue, sal_Int32& nVal, sal_uInt16* pMinDi
xub_StrLen nNum = 0;
if ( p[nNum] == '-' )
nNum = nNeg = 1;
- while ( p[nNum] && CharClass::isAsciiNumeric( p[nNum] ) )
+ while ( p[nNum] && CharClass::isAsciiNumeric( rtl::OUString(p[nNum]) ) )
nNum++;
sal_Unicode cNext = p[nNum]; // 0 if at the end
@@ -103,7 +103,7 @@ short lcl_DecompValueString( String& aValue, sal_Int32& nVal, sal_uInt16* pMinDi
// #i5550# If there are numbers at the beginning and the end,
// prefer the one at the beginning only if it's followed by a space.
// Otherwise, use the number at the end, to enable things like IP addresses.
- if ( nNum > nNeg && ( cNext == 0 || cNext == ' ' || !CharClass::isAsciiNumeric(cLast) ) )
+ if ( nNum > nNeg && ( cNext == 0 || cNext == ' ' || !CharClass::isAsciiNumeric(rtl::OUString(cLast)) ) )
{ // number at the beginning
nVal = aValue.Copy( 0, nNum ).ToInt32();
// any number with a leading zero sets the minimum number of digits
@@ -116,7 +116,7 @@ short lcl_DecompValueString( String& aValue, sal_Int32& nVal, sal_uInt16* pMinDi
{
nNeg = 0;
xub_StrLen nEnd = nNum = aValue.Len() - 1;
- while ( nNum && CharClass::isAsciiNumeric( p[nNum] ) )
+ while ( nNum && CharClass::isAsciiNumeric( rtl::OUString(p[nNum]) ) )
nNum--;
if ( p[nNum] == '-' )
{
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 6a3aa146a32b..a9f6e43bf6f8 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2790,7 +2790,7 @@ bool ScCompiler::IsReference( const String& rName )
if ( ch1 == cDecSep )
return false;
// Who was that imbecile introducing '.' as the sheet name separator!?!
- if ( CharClass::isAsciiNumeric( ch1 ) )
+ if ( CharClass::isAsciiNumeric( rtl::OUString(ch1) ) )
{
// Numerical sheet name is valid.
// But English 1.E2 or 1.E+2 is value 100, 1.E-2 is 0.01
@@ -3492,7 +3492,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
String aOld( aRef[j] );
String aStr2;
const sal_Unicode* p = aRef[j].GetBuffer();
- while ( *p && CharClass::isAsciiNumeric( *p ) )
+ while ( *p && CharClass::isAsciiNumeric( rtl::OUString(*p) ) )
aStr2 += *p++;
aRef[j] = rtl::OUString( p );
aRef[j] += aStr2;
@@ -3604,7 +3604,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
}
else
{
- String aTmpStr( cSymbol[0] );
+ rtl::OUString aTmpStr( cSymbol[0] );
bMayBeFuncName = ScGlobal::pCharClass->isLetter( aTmpStr, 0 );
bAsciiNonAlnum = false;
}
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index eae3d241f68d..be6525300d5a 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -591,7 +591,7 @@ String lcl_GetCharStr( sal_Int32 nNo )
String lcl_GetNumStr( sal_Int32 nNo, SvxNumType eType )
{
- String aTmpStr( '0' );
+ String aTmpStr(rtl::OUString('0'));
if( nNo )
{
switch( eType )
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 58e3cbd99526..15c1c892935f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2336,7 +2336,7 @@ void ScInterpreter::ScCell()
// font color doesn't matter here
pDok->GetDefPattern()->GetFont( aDefFont, SC_AUTOCOL_BLACK, pPrinter );
pPrinter->SetFont( aDefFont );
- long nZeroWidth = pPrinter->GetTextWidth( String( '0' ) );
+ long nZeroWidth = pPrinter->GetTextWidth( rtl::OUString( '0' ) );
pPrinter->SetFont( aOldFont );
pPrinter->SetMapMode( aOldMode );
int nZeroCount = (int)(pDok->GetColWidth( aCellPos.Col(), aCellPos.Tab() ) / nZeroWidth);
@@ -3007,11 +3007,10 @@ void ScInterpreter::ScPropper()
const sal_Unicode* pUpr = aUpr.GetBuffer();
const sal_Unicode* pLwr = aLwr.GetBuffer();
*pStr = *pUpr;
- String aTmpStr( 'x' );
xub_StrLen nPos = 1;
while( nPos < nLen )
{
- aTmpStr.SetChar( 0, pStr[nPos-1] );
+ rtl::OUString aTmpStr( pStr[nPos-1] );
if ( !ScGlobal::pCharClass->isLetter( aTmpStr, 0 ) )
pStr[nPos] = pUpr[nPos];
else
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index d5ea624983c5..9888f5af4b14 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -1152,9 +1152,9 @@ void XclExpChFrLabelProps::Convert( const ScfPropertySet& rPropSet, bool bShowSe
::set_flag( maData.mnFlags, EXC_CHFRLABELPROPS_SHOWBUBBLE, bShowBubble );
// label value separator
- rPropSet.GetStringProperty( maData.maSeparator, EXC_CHPROP_LABELSEPARATOR );
- if( maData.maSeparator.Len() == 0 )
- maData.maSeparator = String( sal_Unicode( ' ' ) );
+ maData.maSeparator = rPropSet.GetStringProperty( EXC_CHPROP_LABELSEPARATOR );
+ if( maData.maSeparator.isEmpty() )
+ maData.maSeparator = rtl::OUString(' ');
}
void XclExpChFrLabelProps::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 101eb6a98504..bc7445b67062 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1264,7 +1264,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
String aToken( aString.GetToken( 0, '\n', nStringIx ) );
if( nToken > 0 )
{
- mxString1->Append( '\0' );
+ mxString1->Append(rtl::OUString(static_cast<sal_Unicode>('\0')));
sFormulaBuf.append( (sal_Unicode) ',' );
}
mxString1->Append( aToken );
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 62490f5e0e8e..b2a68d467265 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -564,7 +564,7 @@ void XclExpStringHelper::AppendString( XclExpString& rXclString, const XclExpRoo
void XclExpStringHelper::AppendChar( XclExpString& rXclString, const XclExpRoot& rRoot, sal_Unicode cChar )
{
if( rRoot.GetBiff() == EXC_BIFF8 )
- rXclString.Append( cChar );
+ rXclString.Append( rtl::OUString(cChar) );
else
rXclString.AppendByte( cChar, rRoot.GetTextEncoding() );
}
@@ -863,7 +863,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico
else
{
String aPortionText( mrEE.GetText( aSel ) );
- aPortionText.SearchAndReplaceAll( String( '&' ), String( RTL_CONSTASCII_USTRINGPARAM( "&&" ) ) );
+ aPortionText.SearchAndReplaceAll( rtl::OUString('&'), rtl::OUString("&&") );
// #i17440# space between font height and numbers in text
if( bFontHtChanged && aParaText.Len() && aPortionText.Len() )
{
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 882f8dcdbd14..e75f626aa670 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1333,14 +1333,14 @@ void XclExpExternSheetBase::WriteExtNameBuffer( XclExpStream& rStrm )
XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, sal_Unicode cCode ) :
XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET )
{
- Init( String( cCode ) );
+ Init( rtl::OUString(cCode) );
}
XclExpExternSheet::XclExpExternSheet( const XclExpRoot& rRoot, const String& rTabName ) :
XclExpExternSheetBase( rRoot, EXC_ID_EXTERNSHEET )
{
// reference to own sheet: \03<sheetname>
- Init( String( EXC_EXTSH_TABNAME ).Append( rTabName ) );
+ Init(rtl::OUString(EXC_EXTSH_TABNAME) + rTabName);
}
void XclExpExternSheet::Save( XclExpStream& rStrm )
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 63318655a360..01384ad3e387 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1119,7 +1119,7 @@ void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeIn
// create API struct for label values, set API label separator
cssc2::DataPointLabel aPointLabel( bShowValue, bShowPercent, bShowCateg, bShowSymbol );
rPropSet.SetProperty( EXC_CHPROP_LABEL, aPointLabel );
- String aSep = mxLabelProps ? mxLabelProps->maSeparator : String( sal_Unicode( '\n' ) );
+ String aSep = mxLabelProps ? mxLabelProps->maSeparator : rtl::OUString('\n');
if( aSep.Len() == 0 )
aSep = CREATE_STRING( "; " );
rPropSet.SetStringProperty( EXC_CHPROP_LABELSEPARATOR, aSep );
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index a6bb268877df..424b91b2fc0c 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -358,7 +358,7 @@ void XclImpHyperlink::ConvertToValidTabName(String& rUrl)
// the 1st character must be '#'.
return;
- String aNewUrl(sal_Unicode('#')), aTabName;
+ String aNewUrl(rtl::OUString('#')), aTabName;
bool bInQuote = false;
bool bQuoteTabName = false;
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 7b9846b1cd93..034a72738641 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -560,7 +560,7 @@ void XclImpHFConverter::InsertField( const SvxFieldItem& rFieldItem )
void XclImpHFConverter::InsertLineBreak()
{
ESelection& rSel = GetCurrSel();
- mrEE.QuickInsertText( String( '\n' ), ESelection( rSel.nEndPara, rSel.nEndPos, rSel.nEndPara, rSel.nEndPos ) );
+ mrEE.QuickInsertText( rtl::OUString('\n'), ESelection( rSel.nEndPara, rSel.nEndPos, rSel.nEndPara, rSel.nEndPos ) );
++rSel.nEndPara;
rSel.nEndPos = 0;
GetCurrInfo().mnHeight += GetCurrMaxLineHeight();
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index a3168c652619..66b5e33993b2 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -225,7 +225,7 @@ void XclRoot::SetCharWidth( const XclFontData& rFontData )
aFont.SetCharSet( rFontData.GetFontEncoding() );
aFont.SetWeight( rFontData.GetScWeight() );
pPrinter->SetFont( aFont );
- mrData.mnCharWidth = pPrinter->GetTextWidth( String( '0' ) );
+ mrData.mnCharWidth = pPrinter->GetTextWidth( rtl::OUString('0') );
}
if( mrData.mnCharWidth <= 0 )
{
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index 0e3d73f5a239..616365c73761 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -205,12 +205,11 @@ bool ScfPropertySet::GetBoolProperty( const ::rtl::OUString& rPropName ) const
return GetAnyProperty( aAny, rPropName ) && ScUnoHelpFunctions::GetBoolFromAny( aAny );
}
-bool ScfPropertySet::GetStringProperty( String& rValue, const OUString& rPropName ) const
+OUString ScfPropertySet::GetStringProperty( const OUString& rPropName ) const
{
OUString aOUString;
- bool bRet = GetProperty( aOUString, rPropName );
- rValue = aOUString;
- return bRet;
+ GetProperty( aOUString, rPropName );
+ return aOUString;
}
bool ScfPropertySet::GetColorProperty( Color& rColor, const ::rtl::OUString& rPropName ) const
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index f34b9b1bd5d1..bf308addedc7 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -178,9 +178,8 @@ public:
@return true = property contains true; false = property contains false or error occurred. */
bool GetBoolProperty( const ::rtl::OUString& rPropName ) const;
- /** Gets the specified Boolean property from the property set.
- @return true, if the passed Boolean variable could be filled with the property value. */
- bool GetStringProperty( String& rValue, const ::rtl::OUString& rPropName ) const;
+ /** Gets the specified Boolean property from the property set. */
+ rtl::OUString GetStringProperty( const ::rtl::OUString& rPropName ) const;
/** Gets the specified color property from the property set.
@return true, if the passed color variable could be filled with the property value. */
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 8b3cda92594f..14fbb1f98421 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -889,7 +889,7 @@ struct XclChObjectLink
struct XclChFrLabelProps
{
- String maSeparator; /// Separator between label values.
+ rtl::OUString maSeparator; /// Separator between label values.
sal_uInt16 mnFlags; /// Flags indicating which values to be displayed.
explicit XclChFrLabelProps();
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 8ea50a312820..cbadad7940e0 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1325,11 +1325,12 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
if ( pCell->GetCode()->GetCodeLen() <= 1 )
{ // ==1: einzelner ist als Parameter immer Bereich
// ==0: es waere vielleicht einer, wenn..
- String aBraced( '(' );
- aBraced += rFormula;
- aBraced += ')';
+ rtl::OUStringBuffer aBraced;
+ aBraced.append('(');
+ aBraced.append(rFormula);
+ aBraced.append(')');
delete pCell;
- pCell = new ScFormulaCell( pDoc, rPos, aBraced );
+ pCell = new ScFormulaCell( pDoc, rPos, aBraced.makeStringAndClear() );
}
else
bColRowName = false;
@@ -2901,9 +2902,9 @@ void ScInputHandler::AddRefEntry()
RemoveSelection();
if (pTableView)
- pTableView->InsertText( cSep, false );
+ pTableView->InsertText( rtl::OUString(cSep), false );
if (pTopView)
- pTopView->InsertText( cSep, false );
+ pTopView->InsertText( rtl::OUString(cSep), false );
DataChanged();
}
@@ -3773,7 +3774,7 @@ bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
{
xub_StrLen nLen = rDestEngine.GetTextLen( (sal_uInt16)0 );
ESelection aSel( 0,nLen, 1,0 );
- rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen
+ rDestEngine.QuickInsertText( rtl::OUString(' '), aSel ); // Umbruch durch Space ersetzen
--nParCnt;
}
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f857d8f39cb8..d819e0c733ab 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -519,7 +519,7 @@ void ScInputWindow::Select()
if ( pScMod->IsEditMode() ) // nicht, wenn z.B. geschuetzt
{
aTextWindow.StartEditEngine();
- aTextWindow.SetTextString( '=' );
+ aTextWindow.SetTextString(rtl::OUString('='));
EditView* pView = aTextWindow.GetEditView();
if (pView)
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 5d424abfc7d3..294ac6e64565 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2198,7 +2198,7 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
else
{
OSL_FAIL("unbekannter Feldbefehl");
- pInfo->SetRepresentation(String('?'));
+ pInfo->SetRepresentation(rtl::OUString('?'));
}
}
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx
index 4465b2b39813..ff9182dd9e22 100644
--- a/sc/source/ui/dbgui/asciiopt.cxx
+++ b/sc/source/ui/dbgui/asciiopt.cxx
@@ -47,7 +47,7 @@ static const sal_Char pStrMrg[] = "MRG";
ScAsciiOptions::ScAsciiOptions() :
bFixedLen ( false ),
- aFieldSeps ( ';' ),
+ aFieldSeps ( rtl::OUString(';') ),
bMergeFieldSeps ( false ),
bQuotedFieldAsText(false),
bDetectSpecialNumber(false),
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 5faa83dbf70a..5d99fb467e57 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -118,7 +118,7 @@ void ScCsvGrid::UpdateLayoutData()
{
DisableRepaint();
SetFont( maMonoFont );
- Execute( CSVCMD_SETCHARWIDTH, GetTextWidth( String( 'X' ) ) );
+ Execute( CSVCMD_SETCHARWIDTH, GetTextWidth( rtl::OUString( 'X' ) ) );
Execute( CSVCMD_SETLINEHEIGHT, GetTextHeight() + 1 );
SetFont( maHeaderFont );
Execute( CSVCMD_SETHDRHEIGHT, GetTextHeight() + 1 );
@@ -132,7 +132,7 @@ void ScCsvGrid::UpdateOffsetX()
sal_Int32 nDigits = 2;
while( nLastLine /= 10 ) ++nDigits;
nDigits = Max( nDigits, sal_Int32( 3 ) );
- Execute( CSVCMD_SETHDRWIDTH, GetTextWidth( String( '0' ) ) * nDigits );
+ Execute( CSVCMD_SETHDRWIDTH, GetTextWidth( rtl::OUString( '0' ) ) * nDigits );
}
void ScCsvGrid::ApplyLayout( const ScCsvLayoutData& rOldData )
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 4717690f5df8..caa41153ff68 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1119,7 +1119,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
if ( aStrEmpty.equals(aStrVal) || aStrNotEmpty.equals(aStrVal) )
{
- pLbCond->SelectEntry( '=' );
+ pLbCond->SelectEntry(rtl::OUString('='));
pLbCond->Disable();
}
else
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index 62ff41a487f0..a661795385a0 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -596,7 +596,7 @@ IMPL_LINK( ScPivotFilterDlg, ValModifyHdl, ComboBox*, pEd )
if ( aStrEmpty.equals(aStrVal) || aStrNotEmpty.equals(aStrVal) )
{
- pLb->SelectEntry( '=' );
+ pLb->SelectEntry(rtl::OUString('='));
pLb->Disable();
}
else
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index e6952d952324..214138143135 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -190,7 +190,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aStr = pFieldSepTab->GetDelimiter( nCode );
if ( !aStr.Len() )
- aEdFieldSep.SetText( String((sal_Unicode)nCode) );
+ aEdFieldSep.SetText( rtl::OUString((sal_Unicode)nCode) );
else
aEdFieldSep.SetText( aStr );
@@ -198,7 +198,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aStr = pTextSepTab->GetDelimiter( nCode );
if ( !aStr.Len() )
- aEdTextSep.SetText( String((sal_Unicode)nCode) );
+ aEdTextSep.SetText( rtl::OUString((sal_Unicode)nCode) );
else
aEdTextSep.SetText( aStr );
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 153e17e76a62..99ff6d75bda8 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1161,8 +1161,8 @@ sal_Bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
// ISO8859-1/MS_1252 encoding, comma, double quotes
aOptions.SetCharSet( RTL_TEXTENCODING_MS_1252 );
- aOptions.SetFieldSeps( (sal_Unicode) ',' );
- aOptions.SetTextSep( (sal_Unicode) '"' );
+ aOptions.SetFieldSeps( rtl::OUString(',') );
+ aOptions.SetTextSep( '"' );
}
FltError eError = eERR_OK;
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 392d855e0f35..e58782f1cc9a 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -741,11 +741,11 @@ void lcl_UnescapeSylk( String & rString, SylkVersion eVersion )
// Older versions quoted the string and doubled embedded quotes, but not
// the semicolons, which was plain wrong.
if (eVersion >= SYLK_OOO32)
- rString.SearchAndReplaceAll( rtl::OUString(DOUBLE_SEMICOLON), ';' );
+ rString.SearchAndReplaceAll( rtl::OUString(DOUBLE_SEMICOLON), rtl::OUString(';') );
else
- rString.SearchAndReplaceAll( rtl::OUString(DOUBLE_DOUBLEQUOTE), '"' );
+ rString.SearchAndReplaceAll( rtl::OUString(DOUBLE_DOUBLEQUOTE), rtl::OUString('"') );
- rString.SearchAndReplaceAll( rtl::OUString(SYLK_LF), _LF );
+ rString.SearchAndReplaceAll( rtl::OUString(SYLK_LF), rtl::OUString(_LF) );
}
static const sal_Unicode* lcl_ScanSylkString( const sal_Unicode* p,
@@ -1682,7 +1682,7 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
}
}
if( nCol < nEndCol )
- lcl_WriteSimpleString( rStrm, String(cSep) );
+ lcl_WriteSimpleString( rStrm, rtl::OUString(cSep) );
}
WriteUnicodeOrByteEndl( rStrm );
if( rStrm.GetError() != SVSTREAM_OK )
@@ -2009,7 +2009,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
case CELLTYPE_EDIT:
hasstring:
pDoc->GetString( nCol, nRow, aRange.aStart.Tab(), aCellStr );
- aCellStr.SearchAndReplaceAll( _LF, rtl::OUString(SYLK_LF) );
+ aCellStr.SearchAndReplaceAll( rtl::OUString(_LF), rtl::OUString(SYLK_LF) );
aBufStr.AssignAscii(RTL_CONSTASCII_STRINGPARAM( "C;X" ));
aBufStr += String::CreateFromInt32( c );
@@ -2093,7 +2093,7 @@ bool ScImportExport::Doc2Sylk( SvStream& rStrm )
}
}
}
- lcl_WriteSimpleString( rStrm, String( 'E' ) );
+ lcl_WriteSimpleString( rStrm, rtl::OUString( 'E' ) );
WriteUnicodeOrByteEndl( rStrm );
return rStrm.GetError() == SVSTREAM_OK;
}
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 690745f23f5e..e5cdf92bfb43 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -177,12 +177,12 @@ ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
if ( !bEdit )
{
- String aNewFormula = '=';
+ rtl::OUString aNewFormula('=');
if ( aFormula.Len() > 0 && aFormula.GetChar(0) == '=' )
- aNewFormula=aFormula;
+ aNewFormula = aFormula;
pScMod->InputReplaceSelection( aNewFormula );
- pScMod->InputSetSelection( 1, aNewFormula.Len()+1 );
+ pScMod->InputSetSelection( 1, aNewFormula.getLength()+1 );
xub_StrLen PrivStart, PrivEnd;
pScMod->InputGetSelection( PrivStart, PrivEnd);
SetMeText(pScMod->InputGetFormulaStr(),PrivStart, PrivEnd,bMatrix,false,false);
@@ -342,10 +342,11 @@ bool ScFormulaDlg::calculateValue( const String& rStrExp, String& rStrResult )
if ( pCell->GetCode()->GetCodeLen() <= 1 )
{ // ==1: einzelner ist als Parameter immer Bereich
// ==0: es waere vielleicht einer, wenn..
- String aBraced( '(' );
- aBraced += rStrExp;
- aBraced += ')';
- pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced ) );
+ rtl::OUStringBuffer aBraced;
+ aBraced.append('(');
+ aBraced.append(rStrExp);
+ aBraced.append(')');
+ pFCell.reset( new ScFormulaCell( pDoc, aCursorPos, aBraced.makeStringAndClear() ) );
}
else
bColRowName = false;
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 55e3817db368..65423c296c1e 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -435,7 +435,7 @@ ScConflictsDlg::ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocume
long nTabs[] = { 3, 10, 216, 266 };
maLbConflicts.SetTabs( nTabs );
- String aTab( sal_Unicode( '\t' ) );
+ rtl::OUString aTab('\t');
String aHeader( maStrTitleConflict );
aHeader += aTab;
aHeader += maStrTitleAuthor;
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index cd73cf841a02..90f3e28e08b2 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -101,13 +101,13 @@ void ScSolverOptionsString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16,
Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD );
- String sTxt( ' ' );
+ rtl::OUString sTxt( ' ' );
if ( mbIsDouble )
- sTxt += (String)rtl::math::doubleToUString( mfDoubleValue,
+ sTxt += rtl::math::doubleToUString( mfDoubleValue,
rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max,
ScGlobal::GetpLocaleData()->getNumDecimalSep()[0], true );
else
- sTxt += String::CreateFromInt32( mnIntValue );
+ sTxt += rtl::OUString::valueOf(mnIntValue);
rDev.SetFont( aFont );
rDev.DrawText( aNewPos, sTxt );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index bbd195ac4849..6b2f9aa89396 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -169,7 +169,7 @@ void ColumnEdit::Down()
void ColumnEdit::First()
{
nCol = 1;
- SetText( 'A' );
+ SetText(rtl::OUString('A'));
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 603a742afc0e..08b9e871b263 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -633,9 +633,9 @@ void ScHFEditPage::ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling)
aSel.nEndPos = aPageEntry.Len();
aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara, aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
++aSel.nEndPos;
- String aPageOfEntry = ' ';
- aPageOfEntry += ScGlobal::GetRscString( STR_HF_OF );
- aPageOfEntry += ' ';
+ String aPageOfEntry = rtl::OUStringBuffer().append(' ').
+ append(ScGlobal::GetRscString( STR_HF_OF )).append(' ').
+ makeStringAndClear();
aWndCenter.GetEditEngine()->QuickInsertText(aPageOfEntry,ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
aSel.nEndPos = sal::static_int_cast<xub_StrLen>( aSel.nEndPos + aPageOfEntry.Len() );
aWndCenter.GetEditEngine()->QuickInsertField(SvxFieldItem(SvxPagesField(), EE_FEATURE_FIELD), ESelection(aSel.nEndPara,aSel.nEndPos, aSel.nEndPara, aSel.nEndPos));
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 61435d4b1166..3bc6e4f80009 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3909,7 +3909,7 @@ double getDefaultCharWidth( ScDocShell* pDocShell )
::Font aDefFont;
pAttr->GetFont( aDefFont, SC_AUTOCOL_BLACK, pRefDevice );
pRefDevice->SetFont( aDefFont );
- long nCharWidth = pRefDevice->GetTextWidth( String( '0' ) ); // 1/100th mm
+ long nCharWidth = pRefDevice->GetTextWidth( rtl::OUString('0') ); // 1/100th mm
return lcl_hmmToPoints( nCharWidth );
}
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index ee6d5bd9a4a0..90e3dfe4482e 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -332,7 +332,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
- String aFlags = 'A';
+ String aFlags = rtl::OUString('A');
if( pReqArgs->HasItem( SID_DELETE, &pItem ) )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
@@ -446,7 +446,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
- String aFlags = 'A';
+ String aFlags = rtl::OUString('A');
if( pReqArgs->HasItem( FID_FILL_TAB, &pItem ) )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
@@ -1047,7 +1047,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aCol = bColumns ? 'C' : 'R';
+ rtl::OUString aCol = bColumns ? rtl::OUString('C') : rtl::OUString('R');
rReq.AppendItem( SfxStringItem( SID_OUTLINE_MAKE, aCol ) );
rReq.Done();
}
@@ -1113,7 +1113,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
- String aCol = bColumns ? 'C' : 'R';
+ rtl::OUString aCol = bColumns ? rtl::OUString('C') : rtl::OUString('R');
rReq.AppendItem( SfxStringItem( SID_OUTLINE_REMOVE, aCol ) );
rReq.Done();
}
@@ -1210,7 +1210,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if ( pReqArgs!=NULL && pTabViewShell->SelectionEditable() )
{
const SfxPoolItem* pItem;
- String aFlags = 'A';
+ String aFlags = rtl::OUString('A');
if( pReqArgs->HasItem( FID_INS_CELL_CONTENTS, &pItem ) )
aFlags = ((const SfxStringItem*)pItem)->GetValue();
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 51b2679a9a2f..66ac4881e427 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -155,7 +155,7 @@ void lcl_RemoveAttribs( EditView& rEditView )
void lclInsertCharacter( EditView* pTableView, EditView* pTopView, sal_Unicode cChar )
{
- String aString( cChar );
+ rtl::OUString aString( cChar );
if( pTableView )
pTableView->InsertText( aString );
if( pTopView )
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c98b89e91cb1..1a6b9f9a4dc3 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4277,30 +4277,31 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
aSource.Format( aItem, SCA_VALID | SCA_TAB_3D, pSourceDoc );
// TODO: we could define ocQuote for "
- const String aQuote( '"' );
+ const rtl::OUString aQuote('"');
const String& sSep = ScCompiler::GetNativeSymbol( ocSep);
- String aFormula( '=' );
- aFormula += ScCompiler::GetNativeSymbol( ocDde);
- aFormula += ScCompiler::GetNativeSymbol( ocOpen);
- aFormula += aQuote;
- aFormula += aApp;
- aFormula += aQuote;
- aFormula += sSep;
- aFormula += aQuote;
- aFormula += aTopic;
- aFormula += aQuote;
- aFormula += sSep;
- aFormula += aQuote;
- aFormula += aItem;
- aFormula += aQuote;
- aFormula += ScCompiler::GetNativeSymbol( ocClose);
+ rtl::OUStringBuffer aFormula;
+ aFormula.append('=');
+ aFormula.append(ScCompiler::GetNativeSymbol(ocDde));
+ aFormula.append(ScCompiler::GetNativeSymbol(ocOpen));
+ aFormula.append(aQuote);
+ aFormula.append(aApp);
+ aFormula.append(aQuote);
+ aFormula.append(sSep);
+ aFormula.append(aQuote);
+ aFormula.append(aTopic);
+ aFormula.append(aQuote);
+ aFormula.append(sSep);
+ aFormula.append(aQuote);
+ aFormula.append(aItem);
+ aFormula.append(aQuote);
+ aFormula.append(ScCompiler::GetNativeSymbol(ocClose));
pView->DoneBlockMode();
pView->InitBlockMode( nDestPosX, nDestPosY, nThisTab );
pView->MarkCursor( nDestPosX + nSizeX - 1,
nDestPosY + nSizeY - 1, nThisTab );
- pView->EnterMatrix( aFormula, ::formula::FormulaGrammar::GRAM_NATIVE );
+ pView->EnterMatrix( aFormula.makeStringAndClear(), ::formula::FormulaGrammar::GRAM_NATIVE );
pView->MarkRange( aDest, false, false );
pView->SetCursor( aDest.aStart.Col(), aDest.aStart.Row() );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 0801604501b6..fd0c0755f00d 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -556,7 +556,7 @@ void ScDrawStringsVars::RepeatToFill( long colWidth )
if ( nPos == STRING_NOTFOUND || nPos >= aString.Len() )
return;
- long charWidth = pOutput->pFmtDevice->GetTextWidth(String(nChar));
+ long charWidth = pOutput->pFmtDevice->GetTextWidth(rtl::OUString(nChar));
if (bPixelToLogic)
colWidth = pOutput->pRefDevice->PixelToLogic(Size(colWidth,0)).Width();
// Are there restrictions on the cell type we should filter out here ?
@@ -716,7 +716,7 @@ long ScDrawStringsVars::GetMaxDigitWidth()
for (sal_Char i = 0; i < 10; ++i)
{
sal_Char cDigit = cZero + i;
- long n = pOutput->pFmtDevice->GetTextWidth(String(cDigit));
+ long n = pOutput->pFmtDevice->GetTextWidth(rtl::OUString(cDigit));
nMaxDigitWidth = ::std::max(nMaxDigitWidth, n);
}
return nMaxDigitWidth;
@@ -727,7 +727,7 @@ long ScDrawStringsVars::GetSignWidth()
if (nSignWidth > 0)
return nSignWidth;
- nSignWidth = pOutput->pFmtDevice->GetTextWidth(String('-'));
+ nSignWidth = pOutput->pFmtDevice->GetTextWidth(rtl::OUString('-'));
return nSignWidth;
}
@@ -746,7 +746,7 @@ long ScDrawStringsVars::GetExpWidth()
if (nExpWidth > 0)
return nExpWidth;
- nExpWidth = pOutput->pFmtDevice->GetTextWidth(String('E'));
+ nExpWidth = pOutput->pFmtDevice->GetTextWidth(rtl::OUString('E'));
return nExpWidth;
}