diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2016-06-16 19:28:24 +0300 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-17 06:48:49 +0000 |
commit | cc56044ea01538781f16576512b66538f2720394 (patch) | |
tree | a0dad8346b4a8c942371d08f687a78df839c1a8f /sw/source | |
parent | 1bc3c88bc9ed085bf7e173cb12f313934d92f309 (diff) |
More efficient OUString concatanation in LineNumberingDialog
According to https://goo.gl/jsVAwy:
All the other alternatives, like explicit OUStringBuffer and repeated append()
should be now worse in all possible aspects. In fact, this should result in
just one OUString allocation, one data copy for anything and at most one
length computation, so it should possibly beat even strcpy+strcat, while at
the same time looking good.
Change-Id: I23bf5b5a0b8d79b2d8995700eefc20ab3fb6f79c
Reviewed-on: https://gerrit.libreoffice.org/26386
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/misc/linenum.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 09c8bcebbd11..641804d4325f 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -81,18 +81,18 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw) get(m_pNumberingOnCB, "shownumbering"); get(m_pNumberingOnFooterHeader, "showfooterheadernumbering"); - OUString sIntervalName = m_pDivIntervalFT->GetAccessibleName(); - sIntervalName += "("; - sIntervalName += m_pDivRowsFT->GetAccessibleName(); - sIntervalName += ")"; + OUString sIntervalName = m_pDivIntervalFT->GetAccessibleName() + + "(" + + m_pDivRowsFT->GetAccessibleName() + + ")"; m_pDivIntervalNF->SetAccessibleName(sIntervalName); vcl::Window *pNumIntervalFT = get<vcl::Window>("interval"); vcl::Window *pNumRowsFT = get<vcl::Window>("intervallines"); - sIntervalName = pNumIntervalFT->GetAccessibleName(); - sIntervalName += "("; - sIntervalName += pNumRowsFT->GetAccessibleName(); - sIntervalName += ")"; + sIntervalName = pNumIntervalFT->GetAccessibleName() + + "(" + + pNumRowsFT->GetAccessibleName() + + ")"; m_pNumIntervalNF->SetAccessibleName(sIntervalName); // char styles |