[Libreoffice-commits] core.git: sw/source
Muhammet Kara
muhammet.kara at pardus.org.tr
Fri Jun 17 06:49:27 UTC 2016
sw/source/ui/misc/linenum.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit cc56044ea01538781f16576512b66538f2720394
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date: Thu Jun 16 19:28:24 2016 +0300
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 09c8bce..641804d 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
More information about the Libreoffice-commits
mailing list