summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-23 17:47:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-23 21:04:47 +0200
commitf573b1affdd7fd543eb25139620a82f72e0419a4 (patch)
tree9bc5f311de6a3867829a43ae9fd61ce53e1d4d3d /extensions
parent8c28f11a7ecfb2ae85bd7c07d20032eb1c4c0dd9 (diff)
loplugin:bufferadd (clang-cl)
Change-Id: I854e1d4e6acef1c59842fe3921a42e95d0c8fd38 Reviewed-on: https://gerrit.libreoffice.org/81407 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/ole/oleobjw.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index 16755415ab2a..c3f81bfa5df5 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -18,7 +18,6 @@
*/
#include "ole2uno.hxx"
-#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
@@ -1700,9 +1699,8 @@ Any IUnknownWrapper::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
//check if there are not too many arguments supplied
if (::sal::static_int_cast< sal_uInt32, int >( nUnoArgs ) > dispparams.cArgs)
{
- OUStringBuffer buf(256);
- buf.append("[automation bridge] There are too many arguments for this method");
- throw IllegalArgumentException( buf.makeStringAndClear(),
+ throw IllegalArgumentException(
+ "[automation bridge] There are too many arguments for this method",
Reference<XInterface>(), static_cast<sal_Int16>(dispparams.cArgs));
}
@@ -1818,13 +1816,10 @@ Any IUnknownWrapper::invokeWithDispIdComTlb(FuncDesc& aFuncDesc,
// it's a UNO programming error.
if (i >= nUnoArgs && !(paramFlags & PARAMFLAG_FOPT))
{
- OUStringBuffer buf(256);
- buf.append("ole automation bridge: The called function expects an argument at"
- "position: "); //a different number of arguments")),
- buf.append(OUString::number(i));
- buf.append(" (index starting at 0).");
- throw IllegalArgumentException( buf.makeStringAndClear(),
- Reference<XInterface>(), static_cast<sal_Int16>(i));
+ throw IllegalArgumentException(
+ ("ole automation bridge: The called function expects an argument at position: "
+ + OUString::number(i) + " (index starting at 0)."),
+ Reference<XInterface>(), static_cast<sal_Int16>(i));
}
// Property Put arguments