summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs/crnrdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/miscdlgs/crnrdlg.cxx')
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx31
1 files changed, 14 insertions, 17 deletions
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 1596b4a8574b..9c79f6860207 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -379,7 +379,6 @@ void ScColRowNameRangesDlg::UpdateNames()
SCROW nRow2;
SCTAB nTab2;
OUString rString;
- OUString strShow;
const ScAddress::Details aDetails(pDoc->GetAddressConvention());
OUString aString;
@@ -405,24 +404,23 @@ void ScColRowNameRangesDlg::UpdateNames()
SCCOL q=nCol1+3;
if(q>nCol2) q=nCol2;
//@008 construct string
- strShow = " [";
+ OUStringBuffer strShow = " [";
rString = pDoc->GetString(nCol1, nRow1, nTab1);
- strShow += rString;
+ strShow.append(rString);
for(SCCOL i=nCol1+1;i<=q;i++)
{
- strShow += ", ";
+ strShow.append(", ");
rString = pDoc->GetString(i, nRow1, nTab1);
- strShow += rString;
+ strShow.append(rString);
}
if(q<nCol2) // Too long? Add ",..."
{
- strShow += ", ...";
+ strShow.append(", ...");
}
- strShow += "]";
+ strShow.append("]");
//@008 Add string to listbox
- OUString aInsStr = aString;
- aInsStr += strShow;
+ OUString aInsStr = aString + strShow.makeStringAndClear();
nPos = pLbRange->InsertEntry( aInsStr );
aRangeMap.emplace( aInsStr, aRange );
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataCol) );
@@ -448,23 +446,22 @@ void ScColRowNameRangesDlg::UpdateNames()
nCol2, nRow2, nTab2 );
SCROW q=nRow1+3;
if(q>nRow2) q=nRow2;
- strShow = " [";
+ OUStringBuffer strShow = " [";
rString = pDoc->GetString(nCol1, nRow1, nTab1);
- strShow += rString;
+ strShow.append(rString);
for(SCROW i=nRow1+1;i<=q;i++)
{
- strShow += ", ";
+ strShow.append(", ");
rString = pDoc->GetString(nCol1, i, nTab1);
- strShow += rString;
+ strShow.append(rString);
}
if(q<nRow2)
{
- strShow += ", ...";
+ strShow.append(", ...");
}
- strShow += "]";
+ strShow.append("]");
- OUString aInsStr = aString;
- aInsStr += strShow;
+ OUString aInsStr = aString + strShow.makeStringAndClear();
nPos = pLbRange->InsertEntry( aInsStr );
aRangeMap.emplace( aInsStr, aRange );
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataRow) );