summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-03-29 22:22:42 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-03-30 16:37:55 +0200
commit3351ebde48a31173c2fea9f7270224017e1f4412 (patch)
tree083ab4cacfea4da6f74e6c1a5a1dcc2448f0f558
parentb50155ae687f640ffdd68beae06442a4d0b0083c (diff)
OUString: remove temporaries and repeated expressions
Change-Id: I1d86be40c4bde4e8fb51c430c6416165655c055c
-rw-r--r--sw/source/ui/frmdlg/column.cxx60
1 files changed, 23 insertions, 37 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index de4ed2ca8fb1..dcefde3c2c49 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -193,9 +193,8 @@ SwColumnDlg::SwColumnDlg(Window* pParent, SwWrtShell& rSh)
const sal_Int32 nPagePos = m_pApplyToLB->GetEntryPos( (void*) LISTBOX_PAGE );
if (pPageSet && pPageDesc)
{
- OUString sPageStr = m_pApplyToLB->GetEntry(nPagePos);
+ const OUString sPageStr = m_pApplyToLB->GetEntry(nPagePos) + pPageDesc->GetName();
m_pApplyToLB->RemoveEntry(nPagePos);
- sPageStr += pPageDesc->GetName();
m_pApplyToLB->InsertEntry( sPageStr, nPagePos );
m_pApplyToLB->SetEntryData( nPagePos, (void*) LISTBOX_PAGE);
}
@@ -915,41 +914,28 @@ void SwColumnPage::UpdateCols()
void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
- OUString sLbl( '~' );
-
- OUString sLbl2( OUString::number( nVis + 1 ));
- OUString tmp1(sLbl2);
- sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl);
- m_pLbl1->SetText(sLbl2);
-
- sLbl2 = OUString::number( nVis + 2 );
- OUString tmp2(sLbl2);
- sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl);
- m_pLbl2->SetText(sLbl2);
-
- sLbl2 = OUString::number( nVis + 3 );
- OUString tmp3(sLbl2);
- sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl);
- m_pLbl3->SetText(sLbl2);
- OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
- aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp1));
-
- sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
- aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp2));
-
- sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
- aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp3));
-
- OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
- OUString sDist1 = sDist;
- sDist1 = sDist1.replaceFirst("%1", tmp1);
- sDist1 = sDist1.replaceFirst("%2", tmp2);
- aDistEd1.SetAccessibleName(sDist1);
-
- OUString sDist2 = sDist;
- sDist2 = sDist2.replaceFirst("%1", tmp2);
- sDist2 = sDist2.replaceFirst("%2", tmp3);
- aDistEd2.SetAccessibleName(sDist2);
+ const OUString sLbl( '~' );
+
+ const OUString sLbl1(OUString::number( nVis + 1 ));
+ m_pLbl1->SetText(sLbl1 + sLbl);
+
+ const OUString sLbl2(OUString::number( nVis + 2 ));
+ m_pLbl2->SetText(sLbl2 + sLbl);
+
+ const OUString sLbl3(OUString::number( nVis + 3 ));
+ m_pLbl3->SetText(sLbl3 + sLbl);
+
+ const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
+ aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1));
+ aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl2));
+ aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl3));
+
+ const OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
+ aDistEd1.SetAccessibleName(
+ sDist.replaceFirst("%1", sLbl1).replaceFirst("%2", sLbl2));
+
+ aDistEd2.SetAccessibleName(
+ sDist.replaceFirst("%1", sLbl2).replaceFirst("%2", sLbl3));
}
/*------------------------------------------------------------------------