OUString: remove temporaries and repeated expressions

Change-Id: I1d86be40c4bde4e8fb51c430c6416165655c055c
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index de4ed2c..dcefde3 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( '~' );
    const OUString sLbl( '~' );

    OUString sLbl2( OUString::number( nVis + 1 ));
    OUString tmp1(sLbl2);
    sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl);
    m_pLbl1->SetText(sLbl2);
    const OUString sLbl1(OUString::number( nVis + 1 ));
    m_pLbl1->SetText(sLbl1 + sLbl);

    sLbl2 = OUString::number( nVis + 2 );
    OUString tmp2(sLbl2);
    sLbl2 = sLbl2.replaceAt(sLbl2.getLength() - 1, 0, sLbl);
    m_pLbl2->SetText(sLbl2);
    const OUString sLbl2(OUString::number( nVis + 2 ));
    m_pLbl2->SetText(sLbl2 + sLbl);

    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));
    const OUString sLbl3(OUString::number( nVis + 3 ));
    m_pLbl3->SetText(sLbl3 + sLbl);

    sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
    aEd2.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp2));
    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));

    sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
    aEd3.SetAccessibleName(sColumnWidth.replaceFirst("%1", tmp3));
    const OUString sDist = SW_RESSTR( STR_ACCESS_PAGESETUP_SPACING ) ;
    aDistEd1.SetAccessibleName(
        sDist.replaceFirst("%1", sLbl1).replaceFirst("%2", sLbl2));

    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);
    aDistEd2.SetAccessibleName(
        sDist.replaceFirst("%1", sLbl2).replaceFirst("%2", sLbl3));
}

/*------------------------------------------------------------------------