summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen8.cxx9
-rw-r--r--sc/source/core/data/document.cxx5
-rw-r--r--sc/source/core/data/dpoutput.cxx5
-rw-r--r--sc/source/core/tool/chartarr.cxx5
-rw-r--r--sc/source/core/tool/chartlis.cxx4
-rw-r--r--sc/source/core/tool/chgtrack.cxx14
-rw-r--r--sc/source/core/tool/interpr1.cxx24
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx8
-rw-r--r--sc/source/filter/excel/xltools.cxx13
-rw-r--r--sc/source/filter/qpro/qproform.cxx5
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx19
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx30
-rw-r--r--sc/source/ui/app/inputhdl.cxx7
-rw-r--r--sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/attrdlg/scabstdlg.cxx5
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx7
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx20
-rw-r--r--sc/source/ui/formdlg/formula.cxx7
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx10
-rw-r--r--sc/source/ui/navipi/content.cxx6
-rw-r--r--sc/source/ui/view/viewfun6.cxx17
21 files changed, 84 insertions, 142 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index d7fff9711e0e..5068656aab39 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -843,13 +843,12 @@ void ScDocument::UpdateExternalRefLinks(weld::Window* pWin)
INetURLObject aUrl(aFile,INetURLObject::EncodeMechanism::WasEncoded);
aFile = aUrl.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
- OUStringBuffer aBuf;
- aBuf.append(ScResId(SCSTR_EXTDOC_NOT_LOADED));
- aBuf.append("\n\n");
- aBuf.append(aFile);
+ OUString sMessage = ScResId(SCSTR_EXTDOC_NOT_LOADED) +
+ "\n\n" +
+ aFile;
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin,
VclMessageType::Warning, VclButtonsType::Ok,
- aBuf.makeStringAndClear()));
+ sMessage));
xBox->run();
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index e94d0b4f0db5..cc961b20b1a4 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -408,10 +408,7 @@ void ScDocument::CreateValidTabName(OUString& rName) const
for ( SCTAB i = static_cast<SCTAB>(maTabs.size())+1; !bOk ; i++ )
{
- OUStringBuffer aBuf;
- aBuf.append(aStrTable);
- aBuf.append(static_cast<sal_Int32>(i));
- rName = aBuf.makeStringAndClear();
+ rName = aStrTable + OUString::number(static_cast<sal_Int32>(i));
if (bPrefix)
bOk = ValidNewTabName( rName );
else
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 558d4bde8d4b..60b423aec6c6 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1507,10 +1507,7 @@ OUString lcl_GetDataFieldName( const OUString& rSourceName, sal_Int16 eFunc )
if (!pStrId)
return OUString();
- OUStringBuffer aRet(ScResId(pStrId));
- aRet.append(" - ");
- aRet.append(rSourceName);
- return aRet.makeStringAndClear();
+ return ScResId(pStrId) + " - " + rSourceName;
}
}
diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx
index bdd30ad3dfe2..5a3d21c69c33 100644
--- a/sc/source/core/tool/chartarr.cxx
+++ b/sc/source/core/tool/chartarr.cxx
@@ -374,14 +374,11 @@ std::unique_ptr<ScMemChart> ScChartArray::CreateMemChartMulti()
if (aString.isEmpty())
{
- OUStringBuffer aBuf(ScResId(STR_ROW));
- aBuf.append(' ');
if ( pPos )
nPosRow = pPos->Row() + 1;
else
nPosRow++;
- aBuf.append(static_cast<sal_Int32>(nPosRow));
- aString = aBuf.makeStringAndClear();
+ aString = ScResId(STR_ROW) + " " + OUString::number(static_cast<sal_Int32>(nPosRow));
}
pMemChart->SetRowText( nRow, aString);
}
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 5717f297c38d..79f164f87a5e 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -420,9 +420,7 @@ OUString ScChartListenerCollection::getUniqueName(const OUString& rPrefix) const
{
for (sal_Int32 nNum = 1; nNum < 10000; ++nNum) // arbitrary limit to prevent infinite loop.
{
- OUStringBuffer aBuf(rPrefix);
- aBuf.append(nNum);
- OUString aTestName = aBuf.makeStringAndClear();
+ OUString aTestName = rPrefix + OUString::number(nNum);
if (m_Listeners.find(aTestName) == m_Listeners.end())
return aTestName;
}
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index d7f92341a634..991c25615def 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1197,9 +1197,7 @@ void ScChangeActionMove::GetDescription(
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
}
- OUStringBuffer aBuf(rStr); // append to the original string.
- aBuf.append(aRsc);
- rStr = aBuf.makeStringAndClear();
+ rStr += aRsc; // append to the original string.
}
void ScChangeActionMove::GetRefString(
@@ -1470,9 +1468,7 @@ void ScChangeActionContent::GetDescription(
aRsc = aRsc.replaceAt(nPos, 2, aTmpStr);
}
- OUStringBuffer aBuf(rStr); // append to the original string.
- aBuf.append(aRsc);
- rStr = aBuf.makeStringAndClear();
+ rStr += aRsc; // append to the original string.
}
void ScChangeActionContent::GetRefString(
@@ -1502,11 +1498,7 @@ void ScChangeActionContent::GetRefString(
if ( IsDeletedIn() )
{
// Insert the parentheses.
- OUStringBuffer aBuf;
- aBuf.append('(');
- aBuf.append(rStr);
- aBuf.append(')');
- rStr = aBuf.makeStringAndClear();
+ rStr = "(" + rStr + ")";
}
}
else
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 2f17b222aaa1..df8821b84531 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2323,16 +2323,14 @@ void ScInterpreter::ScCell()
else if( aInfoType == "COORD" )
{ // address, lotus 1-2-3 formatted: $TABLE:$COL$ROW
// Yes, passing tab as col is intentional!
- OUStringBuffer aFuncResult;
- OUString aCellStr =
- ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
- (ScRefFlags::COL_ABS|ScRefFlags::COL_VALID), nullptr, pDok->GetAddressConvention() );
- aFuncResult.append(aCellStr);
- aFuncResult.append(':');
- aCellStr = aCellPos.Format((ScRefFlags::COL_ABS|ScRefFlags::COL_VALID|ScRefFlags::ROW_ABS|ScRefFlags::ROW_VALID),
+ OUString aCellStr1 =
+ ScAddress( static_cast<SCCOL>(aCellPos.Tab()), 0, 0 ).Format(
+ (ScRefFlags::COL_ABS|ScRefFlags::COL_VALID), nullptr, pDok->GetAddressConvention() );
+ OUString aCellStr2 =
+ aCellPos.Format((ScRefFlags::COL_ABS|ScRefFlags::COL_VALID|ScRefFlags::ROW_ABS|ScRefFlags::ROW_VALID),
nullptr, pDok->GetAddressConvention());
- aFuncResult.append(aCellStr);
- PushString( aFuncResult.makeStringAndClear() );
+ OUString aFuncResult = aCellStr1 + ":" + aCellStr2;
+ PushString( aFuncResult );
}
// *** CELL PROPERTIES ***
@@ -2493,12 +2491,8 @@ void ScInterpreter::ScCellExternal()
return;
}
- OUStringBuffer aBuf;
- aBuf.append('\'');
- aBuf.append(*p);
- aBuf.append("'#$");
- aBuf.append(aTabName);
- PushString(aBuf.makeStringAndClear());
+ OUString aBuf = "'" + *p + "'#$" + aTabName;
+ PushString(aBuf);
}
else if ( aInfoType == "CONTENTS" )
{
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index d2dedf012c46..f39bab0e63bf 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -1168,14 +1168,14 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
XML_showRowStripes, "0", XML_showColStripes, "0",
XML_showLastColumn, "1");
- OUStringBuffer aBuf("../pivotCache/pivotCacheDefinition");
- aBuf.append(nCacheId);
- aBuf.append(".xml");
+ OUString aBuf = "../pivotCache/pivotCacheDefinition" +
+ OUString::number(nCacheId) +
+ ".xml";
rStrm.addRelation(
pPivotStrm->getOutputStream(),
CREATE_OFFICEDOC_RELATION_TYPE("pivotCacheDefinition"),
- aBuf.makeStringAndClear());
+ aBuf);
pPivotStrm->endElement(XML_pivotTableDefinition);
}
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 93c6d0ec31b6..2a531a70da61 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -635,13 +635,12 @@ static const char maCFStyleNamePrefix2[] = "ConditionalStyle_"; /// Prefix for c
OUString XclTools::GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_uInt16 nCondition )
{
- OUStringBuffer aBuf(maCFStyleNamePrefix1);
- aBuf.append(static_cast<sal_Int32>(nScTab+1));
- aBuf.append('_');
- aBuf.append(static_cast<sal_Int32>(nFormat+1));
- aBuf.append('_');
- aBuf.append(static_cast<sal_Int32>(nCondition+1));
- return aBuf.makeStringAndClear();
+ return maCFStyleNamePrefix1 +
+ OUString::number(static_cast<sal_Int32>(nScTab+1)) +
+ "_" +
+ OUString::number(static_cast<sal_Int32>(nFormat+1)) +
+ "_" +
+ OUString::number(static_cast<sal_Int32>(nCondition+1));
}
bool XclTools::IsCondFormatStyleName( const OUString& rStyleName )
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index a02b9533247a..89904a27d49c 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -81,9 +81,8 @@ void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtStr
bAddIn = true;
if( pExtString )
{
- OStringBuffer s("QPRO_");
- s.append(pExtString);
- nPush = aPool.Store(eOc, OStringToOUString(s.makeStringAndClear(), maIn.GetStreamCharSet()));
+ OString s = OStringLiteral("QPRO_") + pExtString;
+ nPush = aPool.Store(eOc, OStringToOUString(s, maIn.GetStreamCharSet()));
aPool << nPush;
}
else
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index e494b2486c6f..937ac271db26 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -103,10 +103,8 @@ void writeSort(ScXMLExport& mrExport, const ScSortParam& aParam, const ScRange&
if (aParam.bUserDef)
{
- OUStringBuffer aBuf;
- aBuf.append(SC_USERLIST);
- aBuf.append(static_cast<sal_Int32>(aParam.nUserIndex));
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, aBuf.makeStringAndClear());
+ OUString aBuf = SC_USERLIST + OUString::number(static_cast<sal_Int32>(aParam.nUserIndex));
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, aBuf);
}
else
{
@@ -198,11 +196,10 @@ public:
return;
// name
- OUStringBuffer aBuf;
- aBuf.append(STR_DB_LOCAL_NONAME);
- aBuf.append(static_cast<sal_Int32>(r.first)); // appended number equals sheet index on import.
+ OUString aBuf = STR_DB_LOCAL_NONAME +
+ OUString::number(static_cast<sal_Int32>(r.first)); // appended number equals sheet index on import.
- write(aBuf.makeStringAndClear(), *r.second);
+ write(aBuf, *r.second);
}
void operator() (const ScDBData& rData)
@@ -639,10 +636,8 @@ private:
if (aParam.bUserDef)
{
- OUStringBuffer aBuf;
- aBuf.append(SC_USERLIST);
- aBuf.append(static_cast<sal_Int32>(aParam.nUserIndex));
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, aBuf.makeStringAndClear());
+ OUString aBuf = SC_USERLIST + OUString::number(static_cast<sal_Int32>(aParam.nUserIndex));
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, aBuf);
}
SvXMLElementExport aElemSGs(mrExport, XML_NAMESPACE_TABLE, XML_SORT_GROUPS, true, true);
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9b504788465c..6d91fae22f76 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4884,14 +4884,12 @@ void ScXMLExport::WriteExternalRefCaches()
{
if (nRow > 1)
{
- OUStringBuffer aVal;
- aVal.append(nRow);
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(nRow);
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_REPEATED, aVal);
}
SvXMLElementExport aElemRow(*this, XML_NAMESPACE_TABLE, XML_TABLE_ROW, true, true);
- OUStringBuffer aVal;
- aVal.append(static_cast<sal_Int32>(nMaxColsUsed));
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(static_cast<sal_Int32>(nMaxColsUsed));
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal);
SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true);
}
}
@@ -4902,14 +4900,12 @@ void ScXMLExport::WriteExternalRefCaches()
{
if (nRowGap > 2)
{
- OUStringBuffer aVal;
- aVal.append(static_cast<sal_Int32>(nRowGap-1));
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(static_cast<sal_Int32>(nRowGap-1));
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_ROWS_REPEATED, aVal);
}
SvXMLElementExport aElemRow(*this, XML_NAMESPACE_TABLE, XML_TABLE_ROW, true, true);
- OUStringBuffer aVal;
- aVal.append(static_cast<sal_Int32>(nMaxColsUsed));
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(static_cast<sal_Int32>(nMaxColsUsed));
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal);
SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true);
}
}
@@ -4927,9 +4923,8 @@ void ScXMLExport::WriteExternalRefCaches()
{
if (nCol > 1)
{
- OUStringBuffer aVal;
- aVal.append(static_cast<sal_Int32>(nCol));
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(static_cast<sal_Int32>(nCol));
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal);
}
SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true);
}
@@ -4941,9 +4936,8 @@ void ScXMLExport::WriteExternalRefCaches()
{
if (nColGap > 2)
{
- OUStringBuffer aVal;
- aVal.append(static_cast<sal_Int32>(nColGap-1));
- AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal.makeStringAndClear());
+ OUString aVal = OUString::number(static_cast<sal_Int32>(nColGap-1));
+ AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_COLUMNS_REPEATED, aVal);
}
SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, true, true);
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 111c57d9f105..6d897489bfcc 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1551,11 +1551,8 @@ static OUString lcl_Calculate( const OUString& rFormula, ScDocument* pDoc, const
if ( pCalc->GetCode()->GetCodeLen() <= 1 )
{ // ==1: Single one is as a Parameter always a Range
// ==0: It might be one, if ...
- OUStringBuffer aBraced;
- aBraced.append('(');
- aBraced.append(rFormula);
- aBraced.append(')');
- pCalc.reset( new ScSimpleFormulaCalculator( pDoc, rPos, aBraced.makeStringAndClear(), false ) );
+ OUString aBraced = "(" + rFormula + ")";
+ pCalc.reset( new ScSimpleFormulaCalculator( pDoc, rPos, aBraced, false ) );
}
else
bColRowName = false;
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index ebfe92e781f8..4ff8735e0950 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2028,11 +2028,7 @@ namespace {
OUString createLocalRangeName(const OUString& rName, const OUString& rTableName)
{
- OUStringBuffer aString (rName);
- aString.append(" (");
- aString.append(rTableName);
- aString.append(")");
- return aString.makeStringAndClear();
+ return rName + " (" + rTableName + ")";
}
}
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index 1b5e0ddde237..3d74406e0f4a 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -41,10 +41,9 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
- OUStringBuffer aStrBuf;
- aStrBuf.append( SVLIBRARY("scui") );
+ OUString aStrBuf = SVLIBRARY("scui");
- if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf.makeStringAndClear(),
+ if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf,
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
fp = reinterpret_cast<ScAbstractDialogFactory* (SAL_CALL*)()>(
aDialogLibrary.getFunctionSymbol( "ScCreateDialogFactory" ));
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index e53f0cfc43a7..8ab7a954f440 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -126,11 +126,8 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
theDbName = pDBData->GetName();
}
- OUStringBuffer aBuf;
- aBuf.append(" (");
- aBuf.append(theDbName);
- aBuf.append(')');
- m_xFtDbArea->set_label(aBuf.makeStringAndClear());
+ OUString sLabel = " (" + theDbName + ")";
+ m_xFtDbArea->set_label(sLabel);
}
else
{
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index 479d1b0e56b2..cb3467c8bb69 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -193,18 +193,18 @@ bool DocumentLinkManager::updateDdeOrOleOrWebServiceLinks(weld::Window* pWin)
const OUString& aElem = pDdeLink->GetItem();
const OUString& aType = pDdeLink->GetAppl();
- OUStringBuffer aBuf;
- aBuf.append(ScResId(SCSTR_DDEDOC_NOT_LOADED));
- aBuf.append("\n\n");
- aBuf.append("Source : ");
- aBuf.append(aFile);
- aBuf.append("\nElement : ");
- aBuf.append(aElem);
- aBuf.append("\nType : ");
- aBuf.append(aType);
+ OUString sMessage =
+ ScResId(SCSTR_DDEDOC_NOT_LOADED) +
+ "\n\n"
+ "Source : " +
+ aFile +
+ "\nElement : " +
+ aElem +
+ "\nType : " +
+ aType;
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin,
VclMessageType::Warning, VclButtonsType::Ok,
- aBuf.makeStringAndClear()));
+ sMessage));
xBox->run();
}
}
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index b87662fb98d1..d71351840b85 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -309,12 +309,9 @@ bool ScFormulaDlg::calculateValue( const OUString& rStrExp, OUString& rStrResult
if ( pFCell->GetCode()->GetCodeLen() <= 1 )
{ // ==1: area
// ==0: would be an area if...
- OUStringBuffer aBraced;
- aBraced.append('(');
- aBraced.append(rStrExp);
- aBraced.append(')');
+ OUString aBraced = "(" + rStrExp + ")";
pFCell.reset( new ScSimpleFormulaCalculator(
- m_pDoc, m_CursorPos, aBraced.makeStringAndClear(), bMatrixFormula));
+ m_pDoc, m_CursorPos, aBraced, bMatrixFormula));
pFCell->SetLimitString(true);
}
else
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 1e0fed27c45f..44f0ef4d7e00 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -213,11 +213,11 @@ void ScDataFormDlg::FillCtrls()
if (nCurrentRow <= nEndRow)
{
- OUStringBuffer aBuf;
- aBuf.append(static_cast<sal_Int32>(nCurrentRow - nStartRow));
- aBuf.append(" / ");
- aBuf.append(static_cast<sal_Int32>(nEndRow - nStartRow));
- m_xFixedText->set_label(aBuf.makeStringAndClear());
+ OUString sLabel =
+ OUString::number(static_cast<sal_Int32>(nCurrentRow - nStartRow)) +
+ " / " +
+ OUString::number(static_cast<sal_Int32>(nEndRow - nStartRow));
+ m_xFixedText->set_label(sLabel);
}
else
m_xFixedText->set_label(sNewRecord);
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index c26808a26ece..8d120a9194f5 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -863,11 +863,7 @@ namespace {
OUString createLocalRangeName(const OUString& rName, const OUString& rTableName)
{
- OUStringBuffer aString (rName);
- aString.append(" (");
- aString.append(rTableName);
- aString.append(")");
- return aString.makeStringAndClear();
+ return rName + " (" + rTableName + ")";
}
}
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 0374f4f14ff0..0e3cfde39e24 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -180,16 +180,15 @@ void ScViewFunc::DetectiveMarkPred()
if (pPath && ScRefTokenHelper::getRangeFromToken(aRange, p, aCurPos, true))
{
OUString aTabName = p->GetString().getString();
- OUStringBuffer aBuf;
- aBuf.append(*pPath);
- aBuf.append('#');
- aBuf.append(aTabName);
- aBuf.append('.');
-
OUString aRangeStr(aRange.Format(ScRefFlags::VALID));
- aBuf.append(aRangeStr);
-
- ScGlobal::OpenURL(aBuf.makeStringAndClear(), OUString());
+ OUString sUrl =
+ *pPath +
+ "#" +
+ aTabName +
+ "." +
+ aRangeStr;
+
+ ScGlobal::OpenURL(sUrl, OUString());
}
return;
}