From c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 1 Feb 2017 12:24:07 +0200 Subject: unnecessary use of OUStringBuffer in throwing exceptions Change-Id: Iec1473264426f19c31e72260dfce9494389e474f Reviewed-on: https://gerrit.libreoffice.org/33788 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/uno/wizard/unowizard.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'svtools') diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index d4977cfe456d..d585739f1573 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -195,12 +195,9 @@ namespace { { if ( i_rPaths[i][j] <= nPreviousPageID ) { - OStringBuffer message; - message.append( "Path " ); - message.append( i ); - message.append( ": invalid page ID sequence - each page ID must be greater than the previous one." ); throw IllegalArgumentException( - OStringToOUString( message.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ), + "Path " + OUString::number(i) + + ": invalid page ID sequence - each page ID must be greater than the previous one.", i_rContext, 2 ); } nPreviousPageID = i_rPaths[i][j]; -- cgit