diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-01 12:24:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-02 07:48:21 +0000 |
commit | c0f9bdd3e644e3ebf690aff9eb1aeec4f16dbf27 (patch) | |
tree | e5bb6d31a17587452dde579803286f68ffc73672 /toolkit | |
parent | 52360bf8dd567598593cb212ac85f0c919315618 (diff) |
unnecessary use of OUStringBuffer in throwing exceptions
Change-Id: Iec1473264426f19c31e72260dfce9494389e474f
Reviewed-on: https://gerrit.libreoffice.org/33788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
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); } |