summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i18npool/source/transliteration/transliteration_Numeric.cxx6
-rw-r--r--sdext/source/presenter/PresenterController.cxx2
-rw-r--r--toolkit/source/awt/stylesettings.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx14
4 files changed, 11 insertions, 13 deletions
diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx
index 4ef2cfbc249a..8f09c261a4a6 100644
--- a/i18npool/source/transliteration/transliteration_Numeric.cxx
+++ b/i18npool/source/transliteration/transliteration_Numeric.cxx
@@ -37,21 +37,21 @@ OUString SAL_CALL
transliteration_Numeric::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, sal_Int32 /*nCount*/, Sequence< sal_Int32 >& /*offset*/ )
throw(RuntimeException)
{
- throw (new RuntimeException());
+ throw RuntimeException();
}
sal_Bool SAL_CALL
transliteration_Numeric::equals( const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, sal_Int32& /*nMatch1*/, const OUString& /*str2*/, sal_Int32 /*pos2*/, sal_Int32 /*nCount2*/, sal_Int32& /*nMatch2*/ )
throw(RuntimeException)
{
- throw (new RuntimeException());
+ throw RuntimeException();
}
Sequence< OUString > SAL_CALL
transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ )
throw(RuntimeException)
{
- throw (new RuntimeException());
+ throw RuntimeException();
}
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 0532de6b6f93..ceceadd2a213 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -115,7 +115,7 @@ PresenterController::PresenterController (
OSL_ASSERT(mxController.is());
if ( ! mxSlideShowController.is())
- throw new lang::IllegalArgumentException(
+ throw lang::IllegalArgumentException(
"missing slide show controller",
static_cast<XWeak*>(this),
2);
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
index 7b29cdb5e818..a09f95f7af2e 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -113,7 +113,7 @@ namespace toolkit
{
Window* pWindow = i_rOwningWindow.GetWindow();
if ( !pWindow )
- throw new RuntimeException();
+ throw RuntimeException();
pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
}
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 30740d99bf1a..12022d13cff5 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -42,10 +42,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
Window *pWindow = GetWindow();
if ( pWindow->GetType() != WINDOW_WORKWINDOW )
{
- ::com::sun::star::uno::Exception *pException =
- new ::com::sun::star::uno::RuntimeException;
- pException->Message = OUString("not a work window");
- throw pException;
+ com::sun::star::uno::Exception aException;
+ aException.Message = OUString("not a work window");
+ throw aException;
}
// use sal_Int64 here to accommodate all int types
@@ -73,10 +72,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
}
if( bThrow )
{
- ::com::sun::star::uno::Exception *pException =
- new ::com::sun::star::uno::RuntimeException;
- pException->Message = OUString("incorrect window handle type");
- throw pException;
+ com::sun::star::uno::Exception aException;
+ aException.Message = OUString("incorrect window handle type");
+ throw aException;
}
// create system parent data
SystemParentData aSysParentData;