Related: rhbz#867808 if one person threw by pointer...
then its guaranteed that someone else did too, review newed Exceptions Change-Id: Ie1ad78895e443a20a8663666cd6c8d3e5deb0727
This commit is contained in:
@@ -37,21 +37,21 @@ OUString SAL_CALL
|
|||||||
transliteration_Numeric::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, sal_Int32 /*nCount*/, Sequence< sal_Int32 >& /*offset*/ )
|
transliteration_Numeric::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, sal_Int32 /*nCount*/, Sequence< sal_Int32 >& /*offset*/ )
|
||||||
throw(RuntimeException)
|
throw(RuntimeException)
|
||||||
{
|
{
|
||||||
throw (new RuntimeException());
|
throw RuntimeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SAL_CALL
|
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*/ )
|
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(RuntimeException)
|
||||||
{
|
{
|
||||||
throw (new RuntimeException());
|
throw RuntimeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence< OUString > SAL_CALL
|
Sequence< OUString > SAL_CALL
|
||||||
transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ )
|
transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ )
|
||||||
throw(RuntimeException)
|
throw(RuntimeException)
|
||||||
{
|
{
|
||||||
throw (new RuntimeException());
|
throw RuntimeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -115,7 +115,7 @@ PresenterController::PresenterController (
|
|||||||
OSL_ASSERT(mxController.is());
|
OSL_ASSERT(mxController.is());
|
||||||
|
|
||||||
if ( ! mxSlideShowController.is())
|
if ( ! mxSlideShowController.is())
|
||||||
throw new lang::IllegalArgumentException(
|
throw lang::IllegalArgumentException(
|
||||||
"missing slide show controller",
|
"missing slide show controller",
|
||||||
static_cast<XWeak*>(this),
|
static_cast<XWeak*>(this),
|
||||||
2);
|
2);
|
||||||
|
@@ -113,7 +113,7 @@ namespace toolkit
|
|||||||
{
|
{
|
||||||
Window* pWindow = i_rOwningWindow.GetWindow();
|
Window* pWindow = i_rOwningWindow.GetWindow();
|
||||||
if ( !pWindow )
|
if ( !pWindow )
|
||||||
throw new RuntimeException();
|
throw RuntimeException();
|
||||||
pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
|
pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,10 +42,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
|
|||||||
Window *pWindow = GetWindow();
|
Window *pWindow = GetWindow();
|
||||||
if ( pWindow->GetType() != WINDOW_WORKWINDOW )
|
if ( pWindow->GetType() != WINDOW_WORKWINDOW )
|
||||||
{
|
{
|
||||||
::com::sun::star::uno::Exception *pException =
|
com::sun::star::uno::Exception aException;
|
||||||
new ::com::sun::star::uno::RuntimeException;
|
aException.Message = OUString("not a work window");
|
||||||
pException->Message = OUString("not a work window");
|
throw aException;
|
||||||
throw pException;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// use sal_Int64 here to accommodate all int types
|
// 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 )
|
if( bThrow )
|
||||||
{
|
{
|
||||||
::com::sun::star::uno::Exception *pException =
|
com::sun::star::uno::Exception aException;
|
||||||
new ::com::sun::star::uno::RuntimeException;
|
aException.Message = OUString("incorrect window handle type");
|
||||||
pException->Message = OUString("incorrect window handle type");
|
throw aException;
|
||||||
throw pException;
|
|
||||||
}
|
}
|
||||||
// create system parent data
|
// create system parent data
|
||||||
SystemParentData aSysParentData;
|
SystemParentData aSysParentData;
|
||||||
|
Reference in New Issue
Block a user