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 --- toolkit/source/controls/unocontrolmodel.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index d7e0ab636a46..3a2cf610f651 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -1143,17 +1143,11 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any & if (!bConverted) { - OUStringBuffer aErrorMessage; - aErrorMessage.append( "Unable to convert the given value for the property " ); - aErrorMessage.append ( GetPropertyName( (sal_uInt16)nPropId ) ); - aErrorMessage.append( ".\n" ); - aErrorMessage.append( "Expected type: " ); - aErrorMessage.append ( pDestType->getTypeName() ); - aErrorMessage.append( "\n" ); - aErrorMessage.append( "Found type: " ); - aErrorMessage.append ( rValue.getValueType().getTypeName() ); throw css::lang::IllegalArgumentException( - aErrorMessage.makeStringAndClear(), + "Unable to convert the given value for the property " + + GetPropertyName( (sal_uInt16)nPropId ) + + ".\nExpected type: " + pDestType->getTypeName() + + "\nFound type: " + rValue.getValueType().getTypeName(), static_cast< css::beans::XPropertySet* >(this), 1); } -- cgit