[Libreoffice-commits] core.git: sfx2/source
Furkan Tokac
furkantokac34 at gmail.com
Mon Oct 30 10:28:07 UTC 2017
sfx2/source/appl/childwin.cxx | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit 7939e29b4117733005f81960ca792b2629d63212
Author: Furkan Tokac <furkantokac34 at gmail.com>
Date: Wed Oct 25 18:35:47 2017 +0300
tdf#112689 - Replace chained O(U)StringBuffer::append() with operator+
Change-Id: I32aab185cd0572353f4d94cfe4b16af25a665ef4
Reviewed-on: https://gerrit.libreoffice.org/43684
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Muhammet Kara <muhammet.kara at pardus.org.tr>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index b89482663816..8ce0dda592e4 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -286,15 +286,17 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
{
sal_uInt16 nID = GetType();
- OUStringBuffer aWinData;
- aWinData.append('V').append(static_cast<sal_Int32>(nVersion)).
- append(',').append(rInfo.bVisible ? 'V' : 'H').append(',').
- append(static_cast<sal_Int32>(rInfo.nFlags));
+ OUString rInfoVisible = rInfo.bVisible ? OUString("V") : OUString("H");
+
+ OUString aWinData = "V"
+ + OUString::number(static_cast<sal_Int32>(nVersion))
+ + ","
+ + rInfoVisible
+ + ","
+ + OUString::number(static_cast<sal_Int32>(rInfo.nFlags));
+
if ( !rInfo.aExtraString.isEmpty() )
- {
- aWinData.append(',');
- aWinData.append(rInfo.aExtraString);
- }
+ aWinData += "," + rInfo.aExtraString;
OUString sName(OUString::number(nID));
//Try and save window state per-module, e.g. sidebar on in one application
@@ -305,7 +307,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
aWinOpt.SetWindowState(OStringToOUString(rInfo.aWinState, RTL_TEXTENCODING_UTF8));
css::uno::Sequence < css::beans::NamedValue > aSeq
- { { "Data", css::uno::makeAny(aWinData.makeStringAndClear()) } };
+ { { "Data", css::uno::makeAny(aWinData) } };
aWinOpt.SetUserData( aSeq );
// ... but save status at runtime!
More information about the Libreoffice-commits
mailing list