summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 10:13:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 12:12:31 +0200
commit4a96fb8ec0130e1036913093836bcf28bc37a49b (patch)
treee7aad9be4ca417e9e64f688cc99bee0638037741 /vcl/workben
parentf33b6e341fb7dd1ab3acd4fe5457b716be316e89 (diff)
loplugin:bufferadd loosen some constraints
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/svpclient.cxx9
-rw-r--r--vcl/workben/svptest.cxx6
2 files changed, 6 insertions, 9 deletions
diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx
index 744b38138239..8ef179b0c1a2 100644
--- a/vcl/workben/svpclient.cxx
+++ b/vcl/workben/svpclient.cxx
@@ -180,11 +180,10 @@ void MyWin::parseList( const OString& rList )
aElementType = OStringToOUString( aLine.copy( 13 ), RTL_TEXTENCODING_ASCII_US );
else
{
- OUStringBuffer aNewElement( 64 );
- aNewElement.append( aElementType );
- aNewElement.append( ": " );
- aNewElement.append( OStringToOUString( aLine, RTL_TEXTENCODING_ASCII_US ) );
- m_aSvpBitmaps->InsertEntry( aNewElement.makeStringAndClear() );
+ OUString aNewElement =
+ aElementType + ": " +
+ OStringToOUString( aLine, RTL_TEXTENCODING_ASCII_US );
+ m_aSvpBitmaps->InsertEntry( aNewElement );
}
}
}
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index a79cda4df507..72ff179821a8 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -238,13 +238,11 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rR
sal_uInt8 nBlue = (i << 2) & 0xC0;
rRenderContext.SetTextColor(Color(nRed, nGreen, nBlue));
- OUStringBuffer aPrintText(1024);
-
- aPrintText.append( "SVP test program" );
+ OUString aPrintText = "SVP test program";
rRenderContext.DrawText(tools::Rectangle(Point((aPaperSize.Width() - 4000) / 2, 2000),
Size(aPaperSize.Width() - 2100, aPaperSize.Height() - 4000)),
- aPrintText.makeStringAndClear(),
+ aPrintText,
DrawTextFlags::MultiLine);
}