summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/ole/oleobjw.cxx17
-rw-r--r--vcl/win/app/salinfo.cxx8
2 files changed, 7 insertions, 18 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
diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx
index 90fa81b04d0e..ccb6d3806f95 100644
--- a/vcl/win/app/salinfo.cxx
+++ b/vcl/win/app/salinfo.cxx
@@ -18,7 +18,6 @@
*/
#include <svsys.h>
-#include <rtl/ustrbuf.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
#include <vcl/window.hxx>
@@ -133,12 +132,7 @@ bool WinSalSystem::initMonitors()
if( aDeviceStringCount[ rDev ] > 1 )
{
int nInstance = aDeviceStringCount[ rDev ] - (-- aDevCount[ rDev ] );
- OUStringBuffer aBuf( rDev.getLength() + 8 );
- aBuf.append( rDev );
- aBuf.append( " (" );
- aBuf.append( sal_Int32( nInstance ) );
- aBuf.append( ')' );
- m_aMonitors[ i ].m_aName = aBuf.makeStringAndClear();
+ m_aMonitors[ i ].m_aName = rDev + " (" + OUString::number( nInstance ) + ")";
}
}
}