From 2962ceec4b96758bec7e7a0390d5ec60e3ce708f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 May 2017 12:37:04 +0200 Subject: remove some unnecessary temporary OUStrings found with: git grep -nP 'OUString\(\s*\w+\s*\)' | grep -v new | grep -v return Change-Id: I923109b4339210aed2639e423fbc4d5f19233f02 Reviewed-on: https://gerrit.libreoffice.org/37463 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- vcl/source/gdi/impgraph.cxx | 6 +----- vcl/source/window/window.cxx | 7 ++----- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index dd88c7047221..b31dbf4828ba 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1532,11 +1532,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if (!rIStm.GetError()) { - SvgDataPtr aSvgDataPtr( - new SvgData( - aNewData, - OUString(aPath))); - + SvgDataPtr aSvgDataPtr(new SvgData(aNewData, aPath)); rImpGraphic = aSvgDataPtr; } } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 12a5a3027321..248397d3fc51 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3145,11 +3145,8 @@ const OUString& Window::GetHelpText() const static const char* pEnv = getenv( "HELP_DEBUG" ); if( pEnv && *pEnv ) { - OUStringBuffer aTxt( 64+mpWindowImpl->maHelpText.getLength() ); - aTxt.append( mpWindowImpl->maHelpText ); - aTxt.append( "\n------------------\n" ); - aTxt.append( OUString( aStrHelpId ) ); - mpWindowImpl->maHelpText = aTxt.makeStringAndClear(); + OUString aTxt = mpWindowImpl->maHelpText + "\n------------------\n" + aStrHelpId; + mpWindowImpl->maHelpText = aTxt; } mpWindowImpl->mbHelpTextDynamic = false; } -- cgit