diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-21 13:48:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-22 21:42:14 +0200 |
commit | 75997f13ee3a71d6c994392264b0190bd7bb6756 (patch) | |
tree | 4dc35a2e62e41d4b1f7953367419ff3fb072635f /sfx2 | |
parent | b546af03ab9e371c70ce72562bc0a492972a8585 (diff) |
no need to create temporaries when appending number to O[U]StringBuffer
Change-Id: I36d82423b5f75010552696a66cec7e53ee265ce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114395
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 935b49c05374..4657c87f89c9 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -938,9 +938,9 @@ SearchTabPage_Impl::~SearchTabPage_Impl() { SvtViewOptions aViewOpt( EViewType::TabPage, CONFIGNAME_SEARCHPAGE ); OUStringBuffer aUserData; - aUserData.append(OUString::number(m_xFullWordsCB->get_active() ? 1 : 0)) + aUserData.append(static_cast<sal_Int32>(m_xFullWordsCB->get_active() ? 1 : 0)) .append(";") - .append(OUString::number( m_xScopeCB->get_active() ? 1 : 0 )); + .append( static_cast<sal_Int32>(m_xScopeCB->get_active() ? 1 : 0) ); sal_Int32 nCount = std::min(m_xSearchED->get_count(), 10); // save only 10 entries for ( sal_Int32 i = 0; i < nCount; ++i ) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index ecee69062180..fbecef81125e 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -538,7 +538,8 @@ void UsageInfo::save() OStringBuffer aUsageInfoMsg("Document Type;Command;Count"); for (auto const& elem : maUsage) - aUsageInfoMsg.append("\n").append(elem.first.toUtf8()).append(";").append(OString::number(elem.second)); + aUsageInfoMsg.append("\n").append(elem.first.toUtf8()) + .append(";").append(static_cast<sal_Int32>(elem.second)); sal_uInt64 written = 0; auto s = aUsageInfoMsg.makeStringAndClear(); @@ -1190,7 +1191,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra if (aEvent.IsEnabled && (aEvent.State >>= aInt32)) { - aBuffer.append(OUString::number(aInt32)); + aBuffer.append(aInt32); } } else if (aEvent.FeatureURL.Path == "TransformPosX" || @@ -1267,7 +1268,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra if (aEvent.IsEnabled && (aEvent.State >>= aPoint)) { - aBuffer.append(OUString::number(aPoint.X)).append(" / ").append(OUString::number(aPoint.Y)); + aBuffer.append(aPoint.X).append(" / ").append(aPoint.Y); } } else if (aEvent.FeatureURL.Path == "Size") @@ -1276,7 +1277,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra if (aEvent.IsEnabled && (aEvent.State >>= aSize)) { - aBuffer.append(OUString::number(aSize.Width)).append(" x ").append(OUString::number(aSize.Height)); + aBuffer.append(aSize.Width).append(" x ").append(aSize.Height); } } else if (aEvent.FeatureURL.Path == "LanguageStatus" || @@ -1327,7 +1328,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra float nScaleValue = 1000.0; nValue *= nScaleValue; sal_Int32 nConvertedValue = OutputDevice::LogicToLogic(nValue, MapUnit::MapTwip, MapUnit::MapInch); - aBuffer.append(OUString::number(nConvertedValue / nScaleValue)); + aBuffer.append(nConvertedValue / nScaleValue); } } else diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index ec1046617253..a19498de467d 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -476,7 +476,7 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView, return; OStringBuffer aPayload; - aPayload.append("{ \"id\": \"").append(OString::number(nLOKWindowId)).append('"'); + aPayload.append("{ \"id\": \"").append(static_cast<sal_Int64>(nLOKWindowId)).append('"'); aPayload.append(", \"action\": \"").append(OUStringToOString(rAction, RTL_TEXTENCODING_UTF8)).append('"'); for (const auto& rItem: rPayload) |