remove more unnecesary OUString constructor use
when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
This commit is contained in:
@@ -383,9 +383,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -477,9 +475,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -315,9 +315,7 @@ namespace
|
||||
"### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -414,9 +412,7 @@ namespace
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -421,9 +421,7 @@ namespace
|
||||
"### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -520,9 +518,7 @@ namespace
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -359,9 +359,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -460,9 +458,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
fprintf(stderr, "screwed\n");
|
||||
#endif
|
||||
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,9 +239,7 @@ extern "C" void cpp_vtable_call(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -328,9 +326,7 @@ extern "C" void cpp_vtable_call(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,9 +289,7 @@ namespace
|
||||
"### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -388,9 +386,7 @@ namespace
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,9 +422,7 @@ namespace
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -535,9 +533,7 @@ namespace
|
||||
#ifdef BRDEBUG
|
||||
fprintf(stderr,"cpp_mediate6\n");
|
||||
#endif
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -382,9 +382,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -475,9 +473,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,9 +380,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -481,9 +479,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
fprintf(stderr, "screwed\n");
|
||||
#endif
|
||||
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,9 +347,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -440,9 +438,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -368,9 +368,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pCppI );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -461,9 +459,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pCppI );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pCppI );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -249,9 +249,7 @@ extern "C" void cpp_vtable_call(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -340,9 +338,7 @@ extern "C" void cpp_vtable_call(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,9 +359,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -452,9 +450,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -247,9 +247,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -340,9 +338,7 @@ static typelib_TypeClass cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -247,9 +247,7 @@ extern "C" void cpp_vtable_call(
|
||||
OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex, "### illegal vtable index!" );
|
||||
if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "illegal vtable index!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "illegal vtable index!", (XInterface *)pThis );
|
||||
}
|
||||
|
||||
// determine called method
|
||||
@@ -336,9 +334,7 @@ extern "C" void cpp_vtable_call(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "no member description found!" ),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,9 +337,7 @@ static typelib_TypeClass __cdecl cpp_mediate(
|
||||
}
|
||||
default:
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("no member description found!"),
|
||||
(XInterface *)pThis );
|
||||
throw RuntimeException( "no member description found!", (XInterface *)pThis );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,8 +440,7 @@ bridges::cpp_uno::shared::VtableFactory::initializeBlock(
|
||||
Rtti():
|
||||
n0(0), n1(0), n2(0),
|
||||
rtti(CPPU_CURRENT_NAMESPACE::msci_getRTTI(
|
||||
OUString(
|
||||
"com.sun.star.uno.XInterface")))
|
||||
OUString("com.sun.star.uno.XInterface")))
|
||||
{}
|
||||
};
|
||||
static Rtti rtti;
|
||||
|
||||
@@ -303,7 +303,7 @@ Reference< XPreparedStatement > Connection::prepareCall( const OUString& )
|
||||
throw (SQLException, RuntimeException, std::exception)
|
||||
{
|
||||
throw SQLException(
|
||||
OUString( "pq_driver: Callable statements not supported" ),
|
||||
"pq_driver: Callable statements not supported",
|
||||
Reference< XInterface > (), OUString() , 1, Any() );
|
||||
}
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@ void ReflectionBase::setName( const OUString& /* aName */ )
|
||||
throw (::com::sun::star::uno::RuntimeException, std::exception)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "pq_sdbc::ReflectionBase::setName not implemented" ),
|
||||
"pq_sdbc::ReflectionBase::setName not implemented",
|
||||
*this );
|
||||
//setPropertyValue( getStatics().NAME , makeAny( aName ) );
|
||||
}
|
||||
|
||||
@@ -283,8 +283,7 @@ void WeakComponentImplHelperBase::dispose()
|
||||
catch (Exception & exc)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected UNO exception caught: ") +
|
||||
OUString("unexpected UNO exception caught: ") +
|
||||
exc.Message );
|
||||
}
|
||||
}
|
||||
@@ -419,8 +418,7 @@ void WeakAggComponentImplHelperBase::dispose()
|
||||
catch (Exception & exc)
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"unexpected UNO exception caught: ") +
|
||||
OUString("unexpected UNO exception caught: ") +
|
||||
exc.Message );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,10 +438,10 @@ SAL_IMPLEMENT_MAIN()
|
||||
{
|
||||
if (! aUnoUrl.endsWithIgnoreAsciiCase( ";uno.ComponentContext" ))
|
||||
throw RuntimeException(
|
||||
OUString("expected UNO-URL with instance name uno.ComponentContext!" ) );
|
||||
"expected UNO-URL with instance name uno.ComponentContext!" );
|
||||
if (bSingleInstance)
|
||||
throw RuntimeException(
|
||||
OUString("unexpected option --singleinstance!") );
|
||||
"unexpected option --singleinstance!" );
|
||||
}
|
||||
if (!aImplName.isEmpty() && aLocation.isEmpty())
|
||||
throw RuntimeException("give component location!" );
|
||||
|
||||
@@ -346,7 +346,7 @@ namespace sdbtools
|
||||
catch( const Exception& )
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString( "The connection could not provide its database's meta data." ),
|
||||
"The connection could not provide its database's meta data.",
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
|
||||
@@ -144,8 +144,9 @@ void Acceptor::initialize( const Sequence<Any>& aArguments )
|
||||
// get connect string and protocol from accept string
|
||||
// "<connectString>;<protocol>"
|
||||
sal_Int32 nIndex1 = m_aAcceptString.indexOf( ';' );
|
||||
if (nIndex1 < 0) throw IllegalArgumentException(
|
||||
OUString("Invalid accept-string format"), m_rContext, 1);
|
||||
if (nIndex1 < 0)
|
||||
throw IllegalArgumentException(
|
||||
"Invalid accept-string format", m_rContext, 1);
|
||||
m_aConnectString = m_aAcceptString.copy( 0 , nIndex1 ).trim();
|
||||
nIndex1++;
|
||||
sal_Int32 nIndex2 = m_aAcceptString.indexOf( ';' , nIndex1 );
|
||||
@@ -170,8 +171,7 @@ void Acceptor::initialize( const Sequence<Any>& aArguments )
|
||||
|
||||
if (!bOk)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("invalid initialization"), m_rContext, 1);
|
||||
throw IllegalArgumentException( "invalid initialization", m_rContext, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex
|
||||
|
||||
if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() )
|
||||
throw ScannerException(
|
||||
OUString("Scanner does not exist"),
|
||||
"Scanner does not exist",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_InvalidContext
|
||||
);
|
||||
@@ -290,7 +290,7 @@ sal_Bool ScannerManager::configureScannerAndScan( ScannerContext& scanner_contex
|
||||
boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
|
||||
if( pHolder->m_bBusy )
|
||||
throw ScannerException(
|
||||
OUString("Scanner is busy"),
|
||||
"Scanner is busy",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_ScanInProgress
|
||||
);
|
||||
@@ -321,14 +321,14 @@ void ScannerManager::startScan( const ScannerContext& scanner_context,
|
||||
|
||||
if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() )
|
||||
throw ScannerException(
|
||||
OUString("Scanner does not exist"),
|
||||
"Scanner does not exist",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_InvalidContext
|
||||
);
|
||||
boost::shared_ptr<SaneHolder> pHolder = rSanes[scanner_context.InternalData];
|
||||
if( pHolder->m_bBusy )
|
||||
throw ScannerException(
|
||||
OUString("Scanner is busy"),
|
||||
"Scanner is busy",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_ScanInProgress
|
||||
);
|
||||
@@ -347,7 +347,7 @@ ScanError ScannerManager::getError( const ScannerContext& scanner_context ) thro
|
||||
|
||||
if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() )
|
||||
throw ScannerException(
|
||||
OUString("Scanner does not exist"),
|
||||
"Scanner does not exist",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_InvalidContext
|
||||
);
|
||||
@@ -366,7 +366,7 @@ Reference< css::awt::XBitmap > ScannerManager::getBitmap( const ScannerContext&
|
||||
|
||||
if( scanner_context.InternalData < 0 || (sal_uLong)scanner_context.InternalData >= rSanes.size() )
|
||||
throw ScannerException(
|
||||
OUString("Scanner does not exist"),
|
||||
"Scanner does not exist",
|
||||
Reference< XScannerManager >( this ),
|
||||
ScanError_InvalidContext
|
||||
);
|
||||
|
||||
@@ -390,7 +390,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
|
||||
catch(const Exception&)
|
||||
{
|
||||
throw WrappedTargetException(
|
||||
OUString( "Could not clone the given database form." ),
|
||||
"Could not clone the given database form.",
|
||||
*const_cast< ODatabaseForm* >( &_cloneSource ),
|
||||
::cppu::getCaughtException()
|
||||
);
|
||||
|
||||
@@ -491,7 +491,7 @@ void SAL_CALL Submission::submitWithInteraction(
|
||||
|
||||
if ( !xModel.is() || msID.isEmpty() )
|
||||
throw RuntimeException(
|
||||
OUString( "This is not a valid submission object." ),
|
||||
"This is not a valid submission object.",
|
||||
*this
|
||||
);
|
||||
|
||||
|
||||
@@ -958,7 +958,7 @@ void SAL_CALL SvtFilePicker::appendFilterGroup( const OUString& sGroupTitle,
|
||||
// check the names
|
||||
if ( FilterNameExists( aFilters ) )
|
||||
throw IllegalArgumentException(
|
||||
OUString("filter name exists"),
|
||||
"filter name exists",
|
||||
static_cast< OWeakObject * >(this), 1);
|
||||
|
||||
// ensure that we have a filter list
|
||||
|
||||
@@ -118,7 +118,7 @@ void CWinFileOpenImpl::setDisplayDirectory(const OUString& aDirectory)
|
||||
if ( ::osl::FileBase::E_None !=
|
||||
::osl::FileBase::getSystemPathFromFileURL(aDirectory,aSysDirectory))
|
||||
throw IllegalArgumentException(
|
||||
OUString("Invalid directory"),
|
||||
"Invalid directory",
|
||||
static_cast<XFilePicker2*>(m_FilePicker), 1);
|
||||
|
||||
// we ensure that there is a trailing '/' at the end of
|
||||
@@ -189,7 +189,7 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException)
|
||||
rc = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
|
||||
else
|
||||
throw uno::RuntimeException(
|
||||
OUString("Error executing dialog"),
|
||||
"Error executing dialog",
|
||||
static_cast<XFilePicker2*>(m_FilePicker));
|
||||
|
||||
return rc;
|
||||
@@ -208,7 +208,7 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const OUString& aTitle, const OUStr
|
||||
|
||||
if (!bRet)
|
||||
throw IllegalArgumentException(
|
||||
OUString("filter already exists"),
|
||||
"filter already exists",
|
||||
static_cast<XFilePicker2*>(m_FilePicker), 1);
|
||||
|
||||
// #95345# see MSDN OPENFILENAME
|
||||
@@ -233,7 +233,7 @@ void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const OUString& aTitle)
|
||||
|
||||
if (filterPos < 0)
|
||||
throw IllegalArgumentException(
|
||||
OUString("filter doesn't exist"),
|
||||
"filter doesn't exist",
|
||||
static_cast<XFilePicker2*>(m_FilePicker), 1);
|
||||
|
||||
// filter index of the base class starts with 1
|
||||
|
||||
@@ -79,11 +79,11 @@ void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::s
|
||||
{
|
||||
if (aImageFormat != ::com::sun::star::ui::dialogs::FilePreviewImageFormats::BITMAP)
|
||||
throw IllegalArgumentException(
|
||||
OUString("unsupported image format"), 0, 1);
|
||||
"unsupported image format", 0, 1);
|
||||
|
||||
if (aImage.hasValue() && (aImage.getValueType() != getCppuType((Sequence<sal_Int8>*)0)))
|
||||
throw IllegalArgumentException(
|
||||
OUString("invalid image data"), 0, 2);
|
||||
"invalid image data", 0, 2);
|
||||
|
||||
// save the new image data and force a redraw
|
||||
m_ImageData = aImage;
|
||||
|
||||
@@ -77,7 +77,7 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect
|
||||
|
||||
if ( ::osl::FileBase::E_None != rc )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "directory is not a valid file url" ),
|
||||
"directory is not a valid file url",
|
||||
static_cast< cppu::OWeakObject * >( m_pFolderPicker ),
|
||||
1 );
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt
|
||||
if ( !aItem.hasValue( ) ||
|
||||
aItem.getValueType( ) != cppu::UnoType<OUString>::get() )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid value type or any has no value" ),
|
||||
"invalid value type or any has no value",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
@@ -160,7 +160,7 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference<
|
||||
if ( !aItemList.hasValue( ) ||
|
||||
aItemList.getValueType( ) != getCppuType((Sequence<OUString>*)0) )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid value type or any has no value" ),
|
||||
"invalid value type or any has no value",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
@@ -188,7 +188,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
|
||||
(aPosition.getValueType( ) != cppu::UnoType<sal_Int16>::get()) &&
|
||||
(aPosition.getValueType( ) != cppu::UnoType<sal_Int8>::get()) ) )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid value type or any has no value" ),
|
||||
"invalid value type or any has no value",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
@@ -201,7 +201,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
|
||||
// index was not correct
|
||||
if ( CB_ERR == lRet )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid item position" ),
|
||||
"invalid item position",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
}
|
||||
@@ -240,7 +240,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
|
||||
(aPosition.getValueType( ) != cppu::UnoType<sal_Int16>::get()) &&
|
||||
(aPosition.getValueType( ) != cppu::UnoType<sal_Int8>::get()) ) )
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid value type or any has no value" ),
|
||||
"invalid value type or any has no value",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
@@ -249,7 +249,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
|
||||
|
||||
if ( nPos < -1 )
|
||||
throw IllegalArgumentException(
|
||||
OUString("invalid index"),
|
||||
"invalid index",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
@@ -257,7 +257,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
|
||||
|
||||
if ( (CB_ERR == lRet) && (-1 != nPos) )
|
||||
throw IllegalArgumentException(
|
||||
OUString("invalid index"),
|
||||
"invalid index",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
}
|
||||
@@ -350,7 +350,7 @@ void SAL_CALL CheckboxSetState(
|
||||
if ( !aState.hasValue( ) ||
|
||||
aState.getValueType( ) != cppu::UnoType<sal_Bool>::get())
|
||||
throw IllegalArgumentException(
|
||||
OUString( "invalid value type or any has no value" ),
|
||||
"invalid value type or any has no value",
|
||||
rXInterface,
|
||||
aArgPos );
|
||||
|
||||
|
||||
@@ -410,8 +410,8 @@ void SAL_CALL DispatchRecorder::replaceByIndex(sal_Int32 idx, const com::sun::st
|
||||
if (element.getValueType() !=
|
||||
cppu::UnoType<com::sun::star::frame::DispatchStatement>::get()) {
|
||||
throw com::sun::star::lang::IllegalArgumentException(
|
||||
OUString( "Illegal argument in dispatch recorder" ),
|
||||
Reference< XInterface >(), 2 );
|
||||
"Illegal argument in dispatch recorder",
|
||||
Reference< XInterface >(), 2 );
|
||||
}
|
||||
|
||||
if (idx >= (sal_Int32)m_aStatements.size()) {
|
||||
|
||||
@@ -179,7 +179,7 @@ public: // Error handler
|
||||
++nError;
|
||||
printf( "Error !\n" );
|
||||
throw SAXException(
|
||||
OUString( "error from error handler") ,
|
||||
"error from error handler",
|
||||
Reference < XInterface >() ,
|
||||
aSAXParseException );
|
||||
}
|
||||
|
||||
@@ -631,7 +631,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
|
||||
}
|
||||
else {
|
||||
throw NotConnectedException(
|
||||
OUString("MarkableInputStream::readBytes NotConnectedException") ,
|
||||
"MarkableInputStream::readBytes NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
return nBytesRead;
|
||||
@@ -693,7 +693,7 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
|
||||
else
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("MarkableInputStream::readSomeBytes NotConnectedException") ,
|
||||
"MarkableInputStream::readSomeBytes NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
return nBytesRead;
|
||||
@@ -709,7 +709,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip)
|
||||
{
|
||||
if ( nBytesToSkip < 0 )
|
||||
throw BufferSizeExceededException(
|
||||
OUString("precondition not met: XInputStream::skipBytes: non-negative integer required!"),
|
||||
"precondition not met: XInputStream::skipBytes: non-negative integer required!",
|
||||
*this
|
||||
);
|
||||
|
||||
@@ -728,7 +728,7 @@ sal_Int32 OMarkableInputStream::available(void) throw (NotConnectedException, Ru
|
||||
else
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("MarkableInputStream::available NotConnectedException") ,
|
||||
"MarkableInputStream::available NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ void OMarkableInputStream::closeInput(void) throw (NotConnectedException, Runtim
|
||||
}
|
||||
else {
|
||||
throw NotConnectedException(
|
||||
OUString("MarkableInputStream::closeInput NotConnectedException") ,
|
||||
"MarkableInputStream::closeInput NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRe
|
||||
if( m_bInputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::readBytes NotConnectedException"),
|
||||
"Pipe::readBytes NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
sal_Int32 nOccupiedBufferLen = m_pFIFO->getSize();
|
||||
@@ -192,7 +192,7 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy
|
||||
if( m_bInputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::readSomeBytes NotConnectedException"),
|
||||
"Pipe::readSomeBytes NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
if( m_pFIFO->getSize() )
|
||||
@@ -224,7 +224,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
|
||||
if( m_bInputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::skipBytes NotConnectedException"),
|
||||
"Pipe::skipBytes NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
|
||||
> std::numeric_limits< sal_Int32 >::max() - m_nBytesToSkip) )
|
||||
{
|
||||
throw BufferSizeExceededException(
|
||||
OUString("Pipe::skipBytes BufferSizeExceededException"),
|
||||
"Pipe::skipBytes BufferSizeExceededException",
|
||||
*this );
|
||||
}
|
||||
m_nBytesToSkip += nBytesToSkip;
|
||||
@@ -252,7 +252,7 @@ sal_Int32 OPipeImpl::available(void)
|
||||
if( m_bInputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::available NotConnectedException"),
|
||||
"Pipe::available NotConnectedException",
|
||||
*this );
|
||||
}
|
||||
return m_pFIFO->getSize();
|
||||
@@ -287,14 +287,14 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
|
||||
if( m_bOutputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::writeBytes NotConnectedException (outputstream)"),
|
||||
"Pipe::writeBytes NotConnectedException (outputstream)",
|
||||
*this );
|
||||
}
|
||||
|
||||
if( m_bInputStreamClosed )
|
||||
{
|
||||
throw NotConnectedException(
|
||||
OUString("Pipe::writeBytes NotConnectedException (inputstream)"),
|
||||
"Pipe::writeBytes NotConnectedException (inputstream)",
|
||||
*this );
|
||||
}
|
||||
|
||||
@@ -325,13 +325,13 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
|
||||
catch ( I_FIFO_OutOfBoundsException & )
|
||||
{
|
||||
throw BufferSizeExceededException(
|
||||
OUString("Pipe::writeBytes BufferSizeExceededException"),
|
||||
"Pipe::writeBytes BufferSizeExceededException",
|
||||
*this );
|
||||
}
|
||||
catch ( I_FIFO_OutOfMemoryException & )
|
||||
{
|
||||
throw BufferSizeExceededException(
|
||||
OUString("Pipe::writeBytes BufferSizeExceededException"),
|
||||
"Pipe::writeBytes BufferSizeExceededException",
|
||||
*this );
|
||||
}
|
||||
|
||||
|
||||
@@ -262,18 +262,14 @@ void Pump::run()
|
||||
|
||||
if( ! rInput.is() )
|
||||
{
|
||||
NotConnectedException exception(
|
||||
OUString("no input stream set") , Reference<XInterface>((OWeakObject*)this) );
|
||||
throw exception;
|
||||
throw NotConnectedException( "no input stream set", (OWeakObject*)this );
|
||||
}
|
||||
Sequence< sal_Int8 > aData;
|
||||
while( rInput->readSomeBytes( aData, 65536 ) )
|
||||
{
|
||||
if( ! rOutput.is() )
|
||||
{
|
||||
NotConnectedException exception(
|
||||
OUString("no output stream set") , Reference<XInterface>( (OWeakObject*)this) );
|
||||
throw exception;
|
||||
throw NotConnectedException( "no output stream set", (OWeakObject*)this );
|
||||
}
|
||||
rOutput->writeBytes( aData );
|
||||
osl_yieldThread();
|
||||
@@ -372,7 +368,7 @@ void Pump::start() throw( RuntimeException, std::exception )
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("Pump::start Couldn't create worker thread"),
|
||||
"Pump::start Couldn't create worker thread",
|
||||
*this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
|
||||
// Check if the server is 4.1 or above
|
||||
if (this->getMysqlVersion() < 40100) {
|
||||
throw SQLException(
|
||||
OUString( "MariaDB LibreOffice Connector requires MySQL Server 4.1 or above" ),
|
||||
"MariaDB LibreOffice Connector requires MySQL Server 4.1 or above",
|
||||
*this,
|
||||
OUString(),
|
||||
0,
|
||||
|
||||
@@ -144,7 +144,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
|
||||
{
|
||||
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not load the " BUNDLE_MARIADB " library!");
|
||||
throw SQLException(
|
||||
OUString( "Unable to load the " BUNDLE_MARIADB " library." ),
|
||||
"Unable to load the " BUNDLE_MARIADB " library.",
|
||||
*this,
|
||||
OUString( "08001" ), // "unable to connect"
|
||||
0,
|
||||
@@ -164,7 +164,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
|
||||
{
|
||||
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not load the " CPPCONN_LIB " library!");
|
||||
throw SQLException(
|
||||
OUString( "Unable to load the " CPPCONN_LIB " library." ),
|
||||
"Unable to load the " CPPCONN_LIB " library.",
|
||||
*this,
|
||||
OUString( "08001" ), // "unable to connect"
|
||||
0,
|
||||
@@ -181,7 +181,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
|
||||
{
|
||||
OSL_FAIL( "MysqlCDriver::impl_initCppConn_lck_throw: could not find the factory symbol in " CPPCONN_LIB "!");
|
||||
throw SQLException(
|
||||
OUString( CPPCONN_LIB " is invalid: missing the driver factory function." ),
|
||||
CPPCONN_LIB " is invalid: missing the driver factory function.",
|
||||
*this,
|
||||
OUString( "08001" ), // "unable to connect"
|
||||
0,
|
||||
@@ -194,7 +194,7 @@ void MysqlCDriver::impl_initCppConn_lck_throw()
|
||||
if ( !cppDriver )
|
||||
{
|
||||
throw SQLException(
|
||||
OUString( "Unable to obtain the MySQL_Driver instance from Connector/C++." ),
|
||||
"Unable to obtain the MySQL_Driver instance from Connector/C++.",
|
||||
*this,
|
||||
OUString( "08001" ), // "unable to connect"
|
||||
0,
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace sd { namespace colortoolpanel
|
||||
{
|
||||
OSL_FAIL( "ToolPanelFactory::createUIElement: no parent window in the args!" );
|
||||
throw IllegalArgumentException(
|
||||
OUString( "No parent window provided in the creation arguments. Cannot create tool panel." ),
|
||||
"No parent window provided in the creation arguments. Cannot create tool panel.",
|
||||
*this,
|
||||
2
|
||||
);
|
||||
|
||||
@@ -200,7 +200,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
|
||||
Any a;
|
||||
a <<= e;
|
||||
throw SAXException(
|
||||
OUString("io exception during writing"),
|
||||
"io exception during writing",
|
||||
Reference< XInterface > (),
|
||||
a );
|
||||
}
|
||||
@@ -1023,12 +1023,12 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
|
||||
if( ! m_bDocStarted )
|
||||
{
|
||||
throw SAXException(
|
||||
OUString("endDocument called before startDocument"),
|
||||
"endDocument called before startDocument",
|
||||
Reference< XInterface >() , Any() );
|
||||
}
|
||||
if( m_nLevel ) {
|
||||
throw SAXException(
|
||||
OUString("unexpected end of document"),
|
||||
"unexpected end of document",
|
||||
Reference< XInterface >() , Any() );
|
||||
}
|
||||
m_pSaxWriterHelper->endDocument();
|
||||
@@ -1041,7 +1041,7 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
|
||||
Any a;
|
||||
a <<= e;
|
||||
throw SAXException(
|
||||
OUString("IO exception during closing the IO Stream"),
|
||||
"IO exception during closing the IO Stream",
|
||||
Reference< XInterface > (),
|
||||
a );
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ namespace basprov
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString( "BasicMethodNodeImpl::invoke: function name not supported!" ),
|
||||
"BasicMethodNodeImpl::invoke: function name not supported!",
|
||||
Reference< XInterface >(), 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -69,17 +69,7 @@ namespace basprov
|
||||
|
||||
static OUString getImplementationName_BasicProviderImpl()
|
||||
{
|
||||
static OUString* pImplName = 0;
|
||||
if ( !pImplName )
|
||||
{
|
||||
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
|
||||
if ( !pImplName )
|
||||
{
|
||||
static OUString aImplName( "com.sun.star.comp.scripting.ScriptProviderForBasic" );
|
||||
pImplName = &aImplName;
|
||||
}
|
||||
}
|
||||
return *pImplName;
|
||||
return OUString( "com.sun.star.comp.scripting.ScriptProviderForBasic" );
|
||||
}
|
||||
|
||||
|
||||
@@ -210,7 +200,7 @@ namespace basprov
|
||||
if ( aArguments.getLength() != 1 )
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString( "BasicProviderImpl::initialize: incorrect argument count." ),
|
||||
"BasicProviderImpl::initialize: incorrect argument count.",
|
||||
*this,
|
||||
1
|
||||
);
|
||||
@@ -225,7 +215,7 @@ namespace basprov
|
||||
if ( !xModel.is() )
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString( "BasicProviderImpl::initialize: unable to determine the document model from the script invocation context." ),
|
||||
"BasicProviderImpl::initialize: unable to determine the document model from the script invocation context.",
|
||||
*this,
|
||||
1
|
||||
);
|
||||
@@ -236,7 +226,7 @@ namespace basprov
|
||||
if ( !( aArguments[0] >>= m_sScriptingContext ) )
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString( "BasicProviderImpl::initialize: incorrect argument type " ).concat( aArguments[0].getValueTypeName() ),
|
||||
OUString( "BasicProviderImpl::initialize: incorrect argument type " ) + aArguments[0].getValueTypeName(),
|
||||
*this,
|
||||
1
|
||||
);
|
||||
@@ -319,8 +309,7 @@ namespace basprov
|
||||
|
||||
|
||||
OUString aDescription = sfUri->getName();
|
||||
OUString aLocation = sfUri->getParameter(
|
||||
OUString("location") );
|
||||
OUString aLocation = sfUri->getParameter( OUString("location") );
|
||||
|
||||
sal_Int32 nIndex = 0;
|
||||
// In some strange circumstances the Library name can have an
|
||||
@@ -418,10 +407,6 @@ namespace basprov
|
||||
|
||||
OUString BasicProviderImpl::getName( ) throw (RuntimeException, std::exception)
|
||||
{
|
||||
// TODO
|
||||
|
||||
SolarMutexGuard aGuard;
|
||||
|
||||
return OUString("Basic");
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! mxComponentContext.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("PresenterSpritePane: missing component context"),
|
||||
"PresenterSpritePane: missing component context",
|
||||
static_cast<XWeak*>(this));
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! (rArguments[0] >>= mxPaneId))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid pane id"),
|
||||
"PresenterPane: invalid pane id",
|
||||
static_cast<XWeak*>(this),
|
||||
0);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! (rArguments[1] >>= mxParentWindow))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid parent window"),
|
||||
"PresenterPane: invalid parent window",
|
||||
static_cast<XWeak*>(this),
|
||||
1);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! (rArguments[2] >>= xParentCanvas))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid parent canvas"),
|
||||
"PresenterPane: invalid parent canvas",
|
||||
static_cast<XWeak*>(this),
|
||||
2);
|
||||
}
|
||||
@@ -208,7 +208,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! (rArguments[3] >>= msTitle))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid title"),
|
||||
"PresenterPane: invalid title",
|
||||
static_cast<XWeak*>(this),
|
||||
3);
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if ( ! (rArguments[4] >>= mxBorderPainter))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid border painter"),
|
||||
"PresenterPane: invalid border painter",
|
||||
static_cast<XWeak*>(this),
|
||||
4);
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
if (rArguments.getLength()>5 && ! (rArguments[5] >>= bIsWindowVisibleOnCreation))
|
||||
{
|
||||
throw lang::IllegalArgumentException(
|
||||
OUString("PresenterPane: invalid window visibility flag"),
|
||||
"PresenterPane: invalid window visibility flag",
|
||||
static_cast<XWeak*>(this),
|
||||
5);
|
||||
}
|
||||
@@ -253,7 +253,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("PresenterSpritePane: invalid number of arguments"),
|
||||
"PresenterSpritePane: invalid number of arguments",
|
||||
static_cast<XWeak*>(this));
|
||||
}
|
||||
}
|
||||
@@ -447,7 +447,7 @@ void PresenterPaneBase::ThrowIfDisposed (void)
|
||||
if (rBHelper.bDisposed || rBHelper.bInDispose)
|
||||
{
|
||||
throw lang::DisposedException (
|
||||
OUString( "PresenterPane object has already been disposed"),
|
||||
"PresenterPane object has already been disposed",
|
||||
static_cast<uno::XWeak*>(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void SAL_CALL PresenterPaneBorderManager::initialize (const Sequence<Any>& rArgu
|
||||
else
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("PresenterPane: invalid number of arguments"),
|
||||
"PresenterPane: invalid number of arguments",
|
||||
static_cast<XWeak*>(this));
|
||||
}
|
||||
}
|
||||
@@ -498,7 +498,7 @@ void PresenterPaneBorderManager::ThrowIfDisposed (void)
|
||||
if (rBHelper.bDisposed || rBHelper.bInDispose)
|
||||
{
|
||||
throw lang::DisposedException (
|
||||
OUString( "PresenterPaneBorderManager object has already been disposed"),
|
||||
"PresenterPaneBorderManager object has already been disposed",
|
||||
static_cast<uno::XWeak*>(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ PresenterSlidePreview::PresenterSlidePreview (
|
||||
|| ! rpPresenterController.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString(
|
||||
"PresenterSlidePreview can not be constructed due to empty argument"),
|
||||
"PresenterSlidePreview can not be constructed due to empty argument",
|
||||
static_cast<XWeak*>(this));
|
||||
}
|
||||
|
||||
@@ -393,7 +392,7 @@ void PresenterSlidePreview::ThrowIfDisposed (void)
|
||||
if (PresenterSlidePreviewInterfaceBase::rBHelper.bDisposed || PresenterSlidePreviewInterfaceBase::rBHelper.bInDispose)
|
||||
{
|
||||
throw lang::DisposedException (
|
||||
OUString( "PresenterSlidePreview object has already been disposed"),
|
||||
"PresenterSlidePreview object has already been disposed",
|
||||
static_cast<uno::XWeak*>(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,8 +134,8 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
if ( aURL.isEmpty() && !aCommand.isEmpty() )
|
||||
{
|
||||
throw RuntimeException(
|
||||
(OUString( "Cannot translate URI reference to external format: ")
|
||||
+ aCommand),
|
||||
OUString("Cannot translate URI reference to external format: ")
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
} catch (com::sun::star::lang::IllegalArgumentException &)
|
||||
{
|
||||
throw SystemShellExecuteException(
|
||||
OUString("Could not expand $BRAND_BASE_DIR path"),
|
||||
"Could not expand $BRAND_BASE_DIR path",
|
||||
static_cast < XSystemShellExecute * > (this), ENOENT );
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
if ( FileBase::E_None != FileBase::getSystemPathFromFileURL(aProgramURL, aProgram))
|
||||
{
|
||||
throw SystemShellExecuteException(
|
||||
OUString("Cound not convert executable path"),
|
||||
"Cound not convert executable path",
|
||||
static_cast < XSystemShellExecute * > (this), ENOENT );
|
||||
}
|
||||
|
||||
@@ -224,10 +224,9 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
|
||||
} else if ((nFlags & css::system::SystemShellExecuteFlags::URIS_ONLY) != 0)
|
||||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
(OUString(
|
||||
"XSystemShellExecute.execute URIS_ONLY with non-absolute"
|
||||
" URI reference ")
|
||||
+ aCommand),
|
||||
OUString("XSystemShellExecute.execute URIS_ONLY with non-absolute"
|
||||
" URI reference ")
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this), 0);
|
||||
} else {
|
||||
escapeForShell(aBuffer, OUStringToOString(aCommand, osl_getThreadTextEncoding()));
|
||||
|
||||
@@ -265,13 +265,13 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
|
||||
// parameter checking
|
||||
if (0 == aCommand.getLength())
|
||||
throw IllegalArgumentException(
|
||||
OUString("Empty command"),
|
||||
"Empty command",
|
||||
static_cast< XSystemShellExecute* >( this ),
|
||||
1 );
|
||||
|
||||
if ((nFlags & ~(NO_SYSTEM_ERROR_MESSAGE | URIS_ONLY)) != 0)
|
||||
throw IllegalArgumentException(
|
||||
OUString("Invalid Flags specified"),
|
||||
"Invalid Flags specified",
|
||||
static_cast< XSystemShellExecute* >( this ),
|
||||
3 );
|
||||
|
||||
@@ -282,10 +282,9 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
|
||||
if (!(uri.is() && uri->isAbsolute()))
|
||||
{
|
||||
throw css::lang::IllegalArgumentException(
|
||||
(OUString(
|
||||
"XSystemShellExecute.execute URIS_ONLY with"
|
||||
" non-absolute URI reference ")
|
||||
+ aCommand),
|
||||
OUString("XSystemShellExecute.execute URIS_ONLY with"
|
||||
" non-absolute URI reference ")
|
||||
+ aCommand,
|
||||
static_cast< cppu::OWeakObject * >(this), 0);
|
||||
}
|
||||
}
|
||||
@@ -336,7 +335,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
|
||||
psxErr = MapError(psxErr);
|
||||
|
||||
throw SystemShellExecuteException(
|
||||
OUString("Error executing command"),
|
||||
"Error executing command",
|
||||
static_cast< XSystemShellExecute* >(this),
|
||||
psxErr);
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ void CSmplMailClient::assembleCommandLine(
|
||||
osl::FileBase::RC err = osl::FileBase::getSystemPathFromFileURL(attachments[i], sysPath);
|
||||
if (err != osl::FileBase::E_None)
|
||||
throw IllegalArgumentException(
|
||||
OUString("Invalid attachment file URL"),
|
||||
"Invalid attachment file URL",
|
||||
static_cast<XSimpleMailClient*>(this),
|
||||
1);
|
||||
|
||||
@@ -260,7 +260,7 @@ void SAL_CALL CSmplMailClient::sendSimpleMailMessage(
|
||||
|
||||
if (!executeSenddoc(senddocParams))
|
||||
throw Exception(
|
||||
OUString("Send email failed"),
|
||||
"Send email failed",
|
||||
static_cast<XSimpleMailClient*>(this));
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ void CSmplMailClient::validateParameter(
|
||||
{
|
||||
if (!xSimpleMailMessage.is())
|
||||
throw IllegalArgumentException(
|
||||
OUString("Empty mail message reference"),
|
||||
"Empty mail message reference",
|
||||
static_cast<XSimpleMailClient*>(this),
|
||||
1);
|
||||
|
||||
@@ -278,14 +278,14 @@ void CSmplMailClient::validateParameter(
|
||||
// check the flags, the allowed range is 0 - (2^n - 1)
|
||||
if (aFlag < 0 || aFlag > 3)
|
||||
throw IllegalArgumentException(
|
||||
OUString("Invalid flag value"),
|
||||
"Invalid flag value",
|
||||
static_cast<XSimpleMailClient*>(this),
|
||||
2);
|
||||
|
||||
// check if a recipient is specified of the flags NO_USER_INTERFACE is specified
|
||||
if ((aFlag & NO_USER_INTERFACE) && !xSimpleMailMessage->getRecipient().getLength())
|
||||
throw IllegalArgumentException(
|
||||
OUString("No recipient specified"),
|
||||
"No recipient specified",
|
||||
static_cast<XSimpleMailClient*>(this),
|
||||
1);
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen )
|
||||
if (eTC != TypeClass_SEQUENCE)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no sequence given!"),
|
||||
"no sequence given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
if (nLen < 0)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal length given!"),
|
||||
"illegal length given!",
|
||||
(XWeak *)(OWeakObject *)this, 1 );
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ sal_Int32 ArrayIdlClassImpl::getLen( const Any & rArray )
|
||||
if (eTC != TypeClass_SEQUENCE)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no sequence given!"),
|
||||
"no sequence given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex )
|
||||
if (eTC != TypeClass_SEQUENCE)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no sequence given!"),
|
||||
"no sequence given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ Any ArrayIdlClassImpl::get( const Any & rArray, sal_Int32 nIndex )
|
||||
if (pSeq->nElements <= nIndex)
|
||||
{
|
||||
throw ArrayIndexOutOfBoundsException(
|
||||
OUString("illegal index given!"),
|
||||
"illegal index given!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
|
||||
if (eTC != TypeClass_SEQUENCE)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no sequence given!"),
|
||||
"no sequence given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
|
||||
if (pSeq->nElements <= nIndex)
|
||||
{
|
||||
throw ArrayIndexOutOfBoundsException(
|
||||
OUString("illegal index given!"),
|
||||
"illegal index given!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
|
||||
{
|
||||
TYPELIB_DANGER_RELEASE( pElemTypeDescr );
|
||||
throw IllegalArgumentException(
|
||||
OUString("sequence element is not assignable by given value!"),
|
||||
"sequence element is not assignable by given value!",
|
||||
(XWeak *)(OWeakObject *)this, 2 );
|
||||
}
|
||||
TYPELIB_DANGER_RELEASE( pElemTypeDescr );
|
||||
|
||||
@@ -196,7 +196,7 @@ Any IdlCompFieldImpl::get( const Any & rObj )
|
||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal object given!"),
|
||||
"illegal object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -225,14 +225,14 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & rValue )
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal value given!"),
|
||||
"illegal value given!",
|
||||
(XWeak *)(OWeakObject *)this, 1 );
|
||||
}
|
||||
}
|
||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal object given!"),
|
||||
"illegal object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -262,14 +262,14 @@ void IdlCompFieldImpl::set( Any & rObj, const Any & rValue )
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal value given!"),
|
||||
"illegal value given!",
|
||||
(XWeak *)(OWeakObject *)this, 1 );
|
||||
}
|
||||
}
|
||||
TYPELIB_DANGER_RELEASE( pObjTD );
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal object given!"),
|
||||
"illegal object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forType( typelib_TypeDescriptio
|
||||
return xRet;
|
||||
}
|
||||
throw RuntimeException(
|
||||
OUString( "IdlReflectionServiceImpl::forType() failed!" ),
|
||||
"IdlReflectionServiceImpl::forType() failed!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ const Mapping & IdlReflectionServiceImpl::getCpp2Uno()
|
||||
if (! _aCpp2Uno.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get c++ to uno mapping!"),
|
||||
"cannot get c++ to uno mapping!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
}
|
||||
@@ -396,7 +396,7 @@ const Mapping & IdlReflectionServiceImpl::getUno2Cpp()
|
||||
if (! _aUno2Cpp.is())
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString("cannot get uno to c++ mapping!"),
|
||||
"cannot get uno to c++ mapping!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
}
|
||||
@@ -413,7 +413,7 @@ uno_Interface * IdlReflectionServiceImpl::mapToUno(
|
||||
return (uno_Interface *)getCpp2Uno().mapInterface( xObj.get(), pTo );
|
||||
|
||||
throw RuntimeException(
|
||||
OUString("illegal object given!"),
|
||||
"illegal object given!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ void IdlEnumFieldImpl::set( const Any &, const Any & )
|
||||
throw(css::lang::IllegalArgumentException, css::lang::IllegalAccessException, css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
throw IllegalAccessException(
|
||||
OUString("enum field is constant!"),
|
||||
"enum field is constant!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void IdlEnumFieldImpl::set( Any &, const Any & )
|
||||
throw(css::lang::IllegalArgumentException, css::lang::IllegalAccessException, css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
throw IllegalAccessException(
|
||||
OUString("enum field is constant!"),
|
||||
"enum field is constant!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ Any IdlAttributeFieldImpl::get( const Any & rObj )
|
||||
return aRet;
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal object given!"),
|
||||
"illegal object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
|
||||
if (getAttributeTypeDescr()->bReadOnly)
|
||||
{
|
||||
throw IllegalAccessException(
|
||||
OUString("cannot set readonly attribute!"),
|
||||
"cannot set readonly attribute!",
|
||||
(XWeak *)(OWeakObject *)this );
|
||||
}
|
||||
|
||||
@@ -285,11 +285,11 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
|
||||
(*pUnoI->release)( pUnoI );
|
||||
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal value given!"),
|
||||
"illegal value given!",
|
||||
*(const Reference< XInterface > *)rObj.getValue(), 1 );
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal destination object given!"),
|
||||
"illegal destination object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
@@ -315,9 +315,8 @@ void IdlAttributeFieldImpl::checkException(
|
||||
cppu::throwException(e);
|
||||
} else {
|
||||
throw WrappedTargetRuntimeException(
|
||||
OUString(
|
||||
"non-RuntimeException occurred when accessing an"
|
||||
" interface type attribute"),
|
||||
"non-RuntimeException occurred when accessing an"
|
||||
" interface type attribute",
|
||||
context, e);
|
||||
}
|
||||
}
|
||||
@@ -607,7 +606,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
|
||||
{
|
||||
(*pUnoI->release)( pUnoI );
|
||||
throw IllegalArgumentException(
|
||||
OUString("arguments len differ!"),
|
||||
"arguments len differ!",
|
||||
*(const Reference< XInterface > *)rObj.getValue(), 1 );
|
||||
}
|
||||
|
||||
@@ -681,7 +680,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
|
||||
if (! bAssign)
|
||||
{
|
||||
IllegalArgumentException aExc(
|
||||
OUString("cannot coerce argument type during corereflection call!"),
|
||||
"cannot coerce argument type during corereflection call!",
|
||||
*(const Reference< XInterface > *)rObj.getValue(), (sal_Int16)nPos );
|
||||
|
||||
// cleanup
|
||||
@@ -758,7 +757,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
|
||||
return aRet;
|
||||
}
|
||||
throw IllegalArgumentException(
|
||||
OUString("illegal destination object given!"),
|
||||
"illegal destination object given!",
|
||||
(XWeak *)(OWeakObject *)this, 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ void SAL_CALL OServiceManagerWrapper::setPropertyValue(
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no XComponentContext given!"),
|
||||
"no XComponentContext given!",
|
||||
(OWeakObject *)this, 1 );
|
||||
}
|
||||
}
|
||||
@@ -788,7 +788,7 @@ void OServiceManager::setPropertyValue(
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no XComponentContext given!"),
|
||||
"no XComponentContext given!",
|
||||
(OWeakObject *)this, 1 );
|
||||
}
|
||||
}
|
||||
@@ -1187,7 +1187,7 @@ void OServiceManager::insert( const Any & Element )
|
||||
if( Element.getValueTypeClass() != TypeClass_INTERFACE )
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("no interface given!"),
|
||||
"no interface given!",
|
||||
Reference< XInterface >(), 0 );
|
||||
}
|
||||
Reference<XInterface > xEle( Element, UNO_QUERY_THROW );
|
||||
@@ -1265,8 +1265,7 @@ void OServiceManager::remove( const Any & Element )
|
||||
else
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString(
|
||||
"neither interface nor string given!"),
|
||||
"neither interface nor string given!",
|
||||
Reference< XInterface >(), 0 );
|
||||
}
|
||||
|
||||
@@ -1280,7 +1279,7 @@ void OServiceManager::remove( const Any & Element )
|
||||
if( aIt == m_ImplementationMap.end() )
|
||||
{
|
||||
throw NoSuchElementException(
|
||||
OUString("element is not in!"),
|
||||
"element is not in!",
|
||||
static_cast< OWeakObject * >(this) );
|
||||
}
|
||||
//First remove all factories which have been loaded by ORegistryServiceManager.
|
||||
|
||||
@@ -358,7 +358,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6
|
||||
return nRet;
|
||||
}
|
||||
throw CannotConvertException(
|
||||
OUString("UNSIGNED HYPER out of range!"),
|
||||
"UNSIGNED HYPER out of range!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6
|
||||
return nRet;
|
||||
}
|
||||
throw CannotConvertException(
|
||||
OUString("FLOAT out of range!"),
|
||||
"FLOAT out of range!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
case TypeClass_DOUBLE:
|
||||
@@ -384,7 +384,7 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6
|
||||
return nRet;
|
||||
}
|
||||
throw CannotConvertException(
|
||||
OUString("DOUBLE out of range!"),
|
||||
"DOUBLE out of range!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
|
||||
@@ -395,27 +395,27 @@ sal_Int64 TypeConverter_Impl::toHyper( const Any& rAny, sal_Int64 min, sal_uInt6
|
||||
if (! getHyperValue( fVal, *(OUString const *)rAny.getValue() ))
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("invalid STRING value!"),
|
||||
"invalid STRING value!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 );
|
||||
}
|
||||
nRet = (fVal > SAL_INT64_MAX ? (sal_Int64)(sal_uInt64)fVal : (sal_Int64)fVal);
|
||||
if (fVal >= min && (fVal < 0 || ((sal_uInt64)fVal) <= max))
|
||||
return nRet;
|
||||
throw CannotConvertException(
|
||||
OUString("STRING value out of range!"),
|
||||
"STRING value out of range!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
|
||||
default:
|
||||
throw CannotConvertException(
|
||||
OUString("TYPE is not supported!"),
|
||||
"TYPE is not supported!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::TYPE_NOT_SUPPORTED, 0 );
|
||||
}
|
||||
|
||||
if (nRet >= min && (nRet < 0 || (sal_uInt64)nRet <= max))
|
||||
return nRet;
|
||||
throw CannotConvertException(
|
||||
OUString("VALUE is out of range!"),
|
||||
"VALUE is out of range!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ double TypeConverter_Impl::toDouble( const Any& rAny, double min, double max ) c
|
||||
if (! getNumericValue( fRet, *(OUString *)rAny.getValue() ))
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("invalid STRING value!"),
|
||||
"invalid STRING value!",
|
||||
Reference<XInterface>(), aDestinationClass, FailReason::IS_NOT_NUMBER, 0 );
|
||||
}
|
||||
break;
|
||||
@@ -489,14 +489,14 @@ double TypeConverter_Impl::toDouble( const Any& rAny, double min, double max ) c
|
||||
|
||||
default:
|
||||
throw CannotConvertException(
|
||||
OUString("TYPE is not supported!"),
|
||||
"TYPE is not supported!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::TYPE_NOT_SUPPORTED, 0 );
|
||||
}
|
||||
|
||||
if (fRet >= min && fRet <= max)
|
||||
return fRet;
|
||||
throw CannotConvertException(
|
||||
OUString("VALUE is out of range!"),
|
||||
"VALUE is out of range!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::OUT_OF_RANGE, 0 );
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy
|
||||
else
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("value is not of same or derived type!"),
|
||||
"value is not of same or derived type!",
|
||||
Reference< XInterface >(), aDestinationClass,
|
||||
FailReason::SOURCE_IS_NO_DERIVED_TYPE, 0 );
|
||||
}
|
||||
@@ -558,14 +558,14 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy
|
||||
!*(XInterface * const *)rVal.getValue())
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("value is no interface!"),
|
||||
"value is no interface!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::NO_SUCH_INTERFACE, 0 );
|
||||
}
|
||||
if (! (aRet = (*(XInterface * const *)rVal.getValue())->queryInterface(
|
||||
aDestType )).hasValue())
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("value has no such interface!"),
|
||||
"value has no such interface!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::NO_SUCH_INTERFACE, 0 );
|
||||
}
|
||||
break;
|
||||
@@ -668,7 +668,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy
|
||||
else
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("value cannot be converted to demanded ENUM!"),
|
||||
"value cannot be converted to demanded ENUM!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_ENUM, 0 );
|
||||
}
|
||||
break;
|
||||
@@ -690,7 +690,7 @@ Any SAL_CALL TypeConverter_Impl::convertTo( const Any& rVal, const Type& aDestTy
|
||||
return aRet;
|
||||
|
||||
throw CannotConvertException(
|
||||
OUString("conversion not possible!"),
|
||||
"conversion not possible!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::INVALID, 0 );
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
|
||||
|
||||
default:
|
||||
throw IllegalArgumentException(
|
||||
OUString("destination type is not simple!"),
|
||||
"destination type is not simple!",
|
||||
Reference< XInterface >(), (sal_Int16) 1 );
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
|
||||
else
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("STRING has no boolean value!"),
|
||||
"STRING has no boolean value!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_BOOL, 0 );
|
||||
}
|
||||
}
|
||||
@@ -852,7 +852,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
|
||||
else
|
||||
{
|
||||
throw CannotConvertException(
|
||||
OUString("value is not ENUM!"),
|
||||
"value is not ENUM!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::IS_NOT_ENUM, 0 );
|
||||
}
|
||||
break;
|
||||
@@ -904,7 +904,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
|
||||
return aRet;
|
||||
|
||||
throw CannotConvertException(
|
||||
OUString("conversion not possible!"),
|
||||
"conversion not possible!",
|
||||
Reference< XInterface >(), aDestinationClass, FailReason::INVALID, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
|
||||
break;
|
||||
default:
|
||||
throw IllegalArgumentException(
|
||||
OUString( "SwXViewSettings: invalid zoom type"), 0, 0);
|
||||
"SwXViewSettings: invalid zoom type", 0, 0);
|
||||
}
|
||||
mpViewOption->SetZoomType( eZoom );
|
||||
mbApplyZoom = true;
|
||||
|
||||
@@ -245,8 +245,7 @@ void OFileAccess::transferImpl( const OUString& rSource,
|
||||
catch ( Exception const & )
|
||||
{
|
||||
throw RuntimeException(
|
||||
OUString( "OFileAccess::transferrImpl - Unable to obtain "
|
||||
"destination folder URL!" ),
|
||||
"OFileAccess::transferrImpl - Unable to obtain destination folder URL!",
|
||||
static_cast< cppu::OWeakObject * >( this ) );
|
||||
}
|
||||
|
||||
@@ -255,8 +254,7 @@ void OFileAccess::transferImpl( const OUString& rSource,
|
||||
}
|
||||
|
||||
throw RuntimeException(
|
||||
OUString( "OFileAccess::transferrImpl - Unable to obtain "
|
||||
"destination folder URL!" ),
|
||||
"OFileAccess::transferrImpl - Unable to obtain destination folder URL!",
|
||||
static_cast< cppu::OWeakObject * >( this ) );
|
||||
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ AquaClipboard::AquaClipboard(NSPasteboard* pasteboard, bool bUseSystemPasteboard
|
||||
[mPasteboard release];
|
||||
|
||||
throw RuntimeException(
|
||||
OUString("AquaClipboard: Cannot create pasteboard change listener"),
|
||||
"AquaClipboard: Cannot create pasteboard change listener",
|
||||
static_cast<XClipboardEx*>(this));
|
||||
}
|
||||
|
||||
|
||||
@@ -965,7 +965,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste
|
||||
{
|
||||
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
|
||||
throw RuntimeException(
|
||||
OUString( "Could not create system window!" ),
|
||||
"Could not create system window!",
|
||||
Reference< XInterface >() );
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace xmloff
|
||||
void SAL_CALL OEventDescriptorMapper::replaceByName( const OUString&, const Any& ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
|
||||
{
|
||||
throw IllegalArgumentException(
|
||||
OUString("replacing is not implemented for this wrapper class."), static_cast< ::cppu::OWeakObject* >(this), 1);
|
||||
"replacing is not implemented for this wrapper class.", static_cast< ::cppu::OWeakObject* >(this), 1);
|
||||
}
|
||||
|
||||
Any SAL_CALL OEventDescriptorMapper::getByName( const OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException, std::exception)
|
||||
@@ -98,7 +98,7 @@ namespace xmloff
|
||||
MapString2PropertyValueSequence::const_iterator aPos = m_aMappedEvents.find(_rName);
|
||||
if (m_aMappedEvents.end() == aPos)
|
||||
throw NoSuchElementException(
|
||||
OUString("There is no element named ") += _rName,
|
||||
OUString("There is no element named ") + _rName,
|
||||
static_cast< ::cppu::OWeakObject* >(this));
|
||||
|
||||
return makeAny(aPos->second);
|
||||
|
||||
Reference in New Issue
Block a user