summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx8
-rw-r--r--toolkit/source/controls/unocontrol.cxx5
2 files changed, 3 insertions, 10 deletions
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 7b7b7192f9db..edc78f7d9258 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -39,9 +39,7 @@ void VCLXWindow::SetSystemParent_Impl(const css::uno::Any& rHandle)
VclPtr<vcl::Window> pWindow = GetWindow();
if (pWindow->GetType() != WindowType::WORKWINDOW)
{
- css::uno::RuntimeException aException;
- aException.Message = "not a work window";
- throw aException;
+ throw css::uno::RuntimeException("not a work window");
}
// use sal_Int64 here to accommodate all int types
@@ -67,9 +65,7 @@ void VCLXWindow::SetSystemParent_Impl(const css::uno::Any& rHandle)
}
if (bThrow)
{
- css::uno::RuntimeException aException;
- aException.Message = "incorrect window handle type";
- throw aException;
+ throw css::uno::RuntimeException("incorrect window handle type");
}
// create system parent data
SystemParentData aSysParentData;
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index c47048b3a4b6..0880455581ea 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1074,10 +1074,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
::osl::ClearableMutexGuard aGuard( GetMutex() );
if ( !mxModel.is() )
{
- RuntimeException aException;
- aException.Message = "createPeer: no model!";
- aException.Context = static_cast<XAggregation*>(static_cast<cppu::OWeakAggObject*>(this));
- throw aException;
+ throw RuntimeException("createPeer: no model!", getXWeak());
}
if( getPeer().is() )