summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-10-07 17:41:32 +0100
committerDavid Tardon <dtardon@redhat.com>2014-10-08 20:00:25 +0000
commit6090777883be55a0650b19096bc3975def44120e (patch)
treea6d02ed2fe96a104b5bd7b2f0975356bd5e93500
parent35166b42fdefd18a0d06b8053bae549466457c08 (diff)
Resolves: fdo#84757 1~ instead of ~1 and 10~ instead of 1~0
regression from 3351ebde48a31173c2fea9f7270224017e1f4412 Date: Sat Mar 29 22:22:42 2014 +0100 OUString: remove temporaries and repeated expressions but understandable as it was unreadable goo originally (cherry picked from commit 4289c346de432cc94f05aab78a9464350334b11f) Change-Id: I3ce161bd2628f3a49b14df886ee8d684b248db1c Reviewed-on: https://gerrit.libreoffice.org/11847 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sw/source/ui/frmdlg/column.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index d32551aef89a..ff71b0b91433 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -914,16 +914,17 @@ void SwColumnPage::UpdateCols()
void SwColumnPage::SetLabels( sal_uInt16 nVis )
{
+ //insert ~ before the last character, e.g. 1 -> ~1, 10 -> 1~0
const OUString sLbl( '~' );
const OUString sLbl1(OUString::number( nVis + 1 ));
- m_pLbl1->SetText(sLbl1 + sLbl);
+ m_pLbl1->SetText(sLbl1.replaceAt(sLbl1.getLength()-1, 0, sLbl));
const OUString sLbl2(OUString::number( nVis + 2 ));
- m_pLbl2->SetText(sLbl2 + sLbl);
+ m_pLbl2->SetText(sLbl2.replaceAt(sLbl2.getLength()-1, 0, sLbl));
const OUString sLbl3(OUString::number( nVis + 3 ));
- m_pLbl3->SetText(sLbl3 + sLbl);
+ m_pLbl3->SetText(sLbl3.replaceAt(sLbl3.getLength()-1, 0, sLbl));
const OUString sColumnWidth = SW_RESSTR( STR_ACCESS_COLUMN_WIDTH ) ;
aEd1.SetAccessibleName(sColumnWidth.replaceFirst("%1", sLbl1));