diff options
34 files changed, 212 insertions, 215 deletions
diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index ffc5136f804d..b5750d454b8f 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -207,7 +207,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com throw frame::DoubleInitializationException(); if ( aArguments.getLength() != 1 ) - throw lang::IllegalArgumentException( OUString("Wrong number of arguments!\n"), + throw lang::IllegalArgumentException( "Wrong number of arguments!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); @@ -223,7 +223,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com m_bInitialized = true; } else - throw lang::IllegalArgumentException( OUString("Unexpected type of argument!\n"), + throw lang::IllegalArgumentException( "Unexpected type of argument!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); } diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index bb8462f75e7f..076088df9b0e 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -516,7 +516,7 @@ SAL_IMPLEMENT_MAIN() { Reference< XComponent > xComp( xBridge, UNO_QUERY ); if (! xComp.is()) - throw RuntimeException( OUString( "bridge factory does not export interface \"com.sun.star.lang.XComponent\"!" ) ); + throw RuntimeException( "bridge factory does not export interface \"com.sun.star.lang.XComponent\"!" ); ODisposingListener::waitFor( xComp ); xComp->dispose(); // explicitly dispose the remote bridge so that it joins @@ -545,7 +545,7 @@ SAL_IMPLEMENT_MAIN() Reference< XComponent > xComp( xInstance, UNO_QUERY ); if (xComp.is()) xComp->dispose(); - throw RuntimeException( OUString( "component does not export interface interface \"com.sun.star.lang.XMain\"!" ) ); + throw RuntimeException( "component does not export interface interface \"com.sun.star.lang.XMain\"!" ); } } } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index f6d95bd09a96..1242f8f58da5 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2109,7 +2109,7 @@ void SvxPropertyValuesToItemSet( pPropSet->setPropertyValue( pProps[i].Name, pProps[i].Value, rItemSet ); } else - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); + throw beans::UnknownPropertyException( "Unknown property: " + pProps[i].Name, static_cast < cppu::OWeakObject * > ( 0 ) ); } } diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 048655c40f4b..2be19047aeba 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -101,7 +101,7 @@ void OCommonEmbeddedObject::Deactivate() catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( - OUString( "The client could not store the object!" ), + "The client could not store the object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), uno::makeAny( e ) ); } @@ -225,10 +225,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) if ( nNextState == embed::EmbedStates::INPLACE_ACTIVE ) { if ( !m_xClientSite.is() ) - throw embed::WrongStateException( - OUString( "client site not set, yet" ), - *this - ); + throw embed::WrongStateException( "client site not set, yet", *this ); uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY ); if ( xInplaceClient.is() && xInplaceClient->canInplaceActivate() ) @@ -386,7 +383,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } } else - throw embed::WrongStateException( OUString( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( "The object is in unacceptable state!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -399,7 +396,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ break; if ( nCurInd == m_aAcceptedStates.getLength() ) - throw embed::WrongStateException( OUString( "The object is in unacceptable state!\n" ), + throw embed::WrongStateException( "The object is in unacceptable state!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nDestInd = 0; @@ -409,7 +406,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nDestInd == m_aAcceptedStates.getLength() ) throw embed::UnreachableStateException( - OUString( "The state either not reachable, or the object allows the state only as an intermediate one!\n" ), + "The state either not reachable, or the object allows the state only as an intermediate one!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), m_nObjectState, nNewState ); @@ -431,7 +428,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nOldState = m_nObjectState; @@ -497,7 +494,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aAcceptedStates; @@ -512,7 +509,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_nObjectState; @@ -541,7 +538,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for internal documents this call is just a duplicate of changeState @@ -574,7 +571,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aObjectVerbs; @@ -594,7 +591,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - OUString( "The client site can not be set currently!\n" ), + "The client site can not be set currently!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -610,7 +607,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -627,7 +624,7 @@ void SAL_CALL OCommonEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); PostEvent_Impl( OUString( "OnVisAreaChanged" ) ); @@ -643,7 +640,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE diff --git a/embeddedobj/source/commonembedding/inplaceobj.cxx b/embeddedobj/source/commonembedding/inplaceobj.cxx index 594b97ee00c2..207c88e2cff3 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -46,7 +46,7 @@ void SAL_CALL OCommonEmbeddedObject::setObjectRectangles( const awt::Rectangle& if ( m_nObjectState != embed::EmbedStates::INPLACE_ACTIVE && m_nObjectState != embed::EmbedStates::UI_ACTIVE ) - throw embed::WrongStateException( OUString( "The object is not activated inplace!\n" ), + throw embed::WrongStateException( "The object is not activated inplace!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Rectangle aNewRectToShow = GetRectangleInterception( aPosRect, aClipRect ); diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 8df625dc06b9..6bfbf5a82966 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -491,7 +491,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw uno::RuntimeException( OUString( "Can't store object without persistence!\n" ), + throw uno::RuntimeException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 4d2ddc841cb2..aebfb813a256 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -140,7 +140,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor( } catch( const uno::Exception& e ) { throw embed::StorageWrappedTargetException( - OUString( "Can't copy storage!" ), + "Can't copy storage!", uno::Reference< uno::XInterface >(), uno::makeAny( e ) ); } @@ -910,12 +910,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -930,7 +930,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // it can switch persistent representation only without initialization throw embed::WrongStateException( - OUString( "Can't change persistent representation of activated object!\n" ), + "Can't change persistent representation of activated object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -954,7 +954,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( } else throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1111,7 +1111,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( OUString( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( "Wrong connection mode is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1135,13 +1135,13 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1267,13 +1267,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1406,7 +1406,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1485,7 +1485,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStorage.is() ) @@ -1506,13 +1506,13 @@ OUString SAL_CALL OCommonEmbeddedObject::getEntryName() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1536,13 +1536,13 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1622,13 +1622,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -1654,7 +1654,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1662,13 +1662,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( - OUString( "The object must be in loaded state to be reloaded!\n" ), + "The object must be in loaded state to be reloaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bIsLink ) @@ -1776,7 +1776,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - OUString( "The object is not a valid linked object!\n" ), + "The object is not a valid linked object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } else @@ -1786,12 +1786,12 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt } if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1799,13 +1799,13 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt { // it must be a linked initialized object throw embed::WrongStateException( - OUString( "The object is not a valid linked object!\n" ), + "The object is not a valid linked object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); @@ -1877,7 +1877,7 @@ OUString SAL_CALL OCommonEmbeddedObject::getLinkURL() if ( !m_bIsLink ) throw embed::WrongStateException( - OUString( "The object is not a link object!\n" ), + "The object is not a link object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aLinkURL; diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index c98b79788377..86ec2a727c2c 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -107,13 +107,13 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR // TODO: if object is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 || m_nObjectState == embed::EmbedStates::LOADED ) - throw embed::WrongStateException( OUString( "The own object has no model!\n" ), + throw embed::WrongStateException( "The own object has no model!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: return for the aspect of the document @@ -134,7 +134,7 @@ void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, cons OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); maSize = aSize; @@ -153,11 +153,11 @@ awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The own object has no model!\n" ), + throw embed::WrongStateException( "The own object has no model!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -175,7 +175,7 @@ sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -204,7 +204,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( nVerbID == -7 ) diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 20a3e0a26aa1..62438972075f 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -42,11 +42,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ), + throw embed::WrongStateException( "The own object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_bHasClonedSize = false; @@ -80,7 +80,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ), + throw embed::WrongStateException( "The own object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); @@ -120,11 +120,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ), + throw embed::WrongStateException( "The own object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bHasClonedSize ) @@ -161,14 +161,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The own object has no persistence!\n" ), + throw embed::WrongStateException( "The own object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); bool bBackToLoaded = false; diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 3f6a1464bd76..1253040e3f5d 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -66,12 +66,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -154,12 +154,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -218,12 +218,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -267,12 +267,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta { // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -332,7 +332,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( "No URL for the link is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -378,12 +378,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -395,7 +395,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( "No URL for the link is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index d4a14811a486..76f982f20d84 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -44,7 +44,7 @@ void ODummyEmbeddedObject::CheckInit_WrongState() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -54,7 +54,7 @@ void ODummyEmbeddedObject::CheckInit_Runtime() throw lang::DisposedException(); if ( m_nObjectState == -1 ) - throw uno::RuntimeException( OUString( "The object has no persistence!\n" ), + throw uno::RuntimeException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } void ODummyEmbeddedObject::PostEvent_Impl( const OUString& aEventName ) @@ -236,7 +236,7 @@ void SAL_CALL ODummyEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_nCachedAspect = nAspect; @@ -257,12 +257,12 @@ awt::Size SAL_CALL ODummyEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bHasCachedSize || m_nCachedAspect != nAspect ) throw embed::NoVisualAreaSizeException( - OUString( "No size available!\n" ), + "No size available!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aCachedSize; @@ -279,7 +279,7 @@ sal_Int32 SAL_CALL ODummyEmbeddedObject::getMapUnit( sal_Int64 nAspect ) OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; @@ -296,7 +296,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep CheckInit_WrongState(); // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -318,12 +318,12 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -331,7 +331,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( && ( m_nObjectState == -1 || nEntryConnectionMode != embed::EntryInitModes::NO_INIT ) ) { throw embed::WrongStateException( - OUString( "Can't change persistent representation of activated object!\n" ), + "Can't change persistent representation of activated object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -341,7 +341,7 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -356,13 +356,13 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry( m_nObjectState = embed::EmbedStates::LOADED; } else - throw lang::IllegalArgumentException( OUString( "Wrong entry is provided!\n" ), + throw lang::IllegalArgumentException( "Wrong entry is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); } else - throw lang::IllegalArgumentException( OUString( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( "Wrong connection mode is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -383,7 +383,7 @@ void SAL_CALL ODummyEmbeddedObject::storeToEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName ); @@ -405,7 +405,7 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); PostEvent_Impl( OUString( "OnSaveAs" ) ); @@ -461,7 +461,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_aEntryName.isEmpty() ) @@ -480,7 +480,7 @@ OUString SAL_CALL ODummyEmbeddedObject::getEntryName() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -498,7 +498,7 @@ void SAL_CALL ODummyEmbeddedObject::storeOwn() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // the object can not be activated or changed @@ -515,7 +515,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // this object can not be changed @@ -537,7 +537,7 @@ void SAL_CALL ODummyEmbeddedObject::reload( if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // nothing to reload diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index b41feb02a5e9..df2625630581 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -76,12 +76,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -117,12 +117,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -236,12 +236,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // TODO: use lObjArgs if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -299,12 +299,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Reference< uno::XInterface > xResult; if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -346,7 +346,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "No URL for the link is provided!\n" ), + throw lang::IllegalArgumentException( "No URL for the link is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -375,13 +375,13 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // was also extended. if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 4a43d1ed891d..4de8ae6995e0 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -458,7 +458,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // in case the object is already in requested state @@ -612,7 +612,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -654,7 +654,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: Shouldn't we ask object? ( I guess no ) @@ -770,7 +770,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -903,7 +903,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT if ( m_pOleComponent ) @@ -948,7 +948,7 @@ void SAL_CALL OleEmbeddedObject::setClientSite( { if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( - OUString( "The client site can not be set currently!\n" ), + "The client site can not be set currently!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); m_xClientSite = xClient; @@ -974,7 +974,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_xClientSite; @@ -1001,7 +1001,7 @@ void SAL_CALL OleEmbeddedObject::update() throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) @@ -1035,7 +1035,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object has no persistence!\n" ), + throw embed::WrongStateException( "The object has no persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE @@ -1065,7 +1065,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 throw lang::DisposedException(); // TODO if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object must be in running state!\n" ), + throw embed::WrongStateException( "The object must be in running state!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int64 nResult = 0; diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 8e321806ccbf..2a05a702e1fc 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -383,7 +383,7 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent() if ( m_nObjectState == -1 ) // || m_nObjectState == embed::EmbedStates::LOADED ) { // the object is still not running - throw uno::RuntimeException( OUString( "The object is not loaded!\n" ), + throw uno::RuntimeException( "The object is not loaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 082077482e5d..44f68bc11b18 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -1079,13 +1079,13 @@ void OleEmbeddedObject::StoreToLocation_Impl( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); OSL_ENSURE( m_xParentStorage.is() && m_xObjectStream.is(), "The object has no valid persistence!\n" ); @@ -1312,12 +1312,12 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1332,7 +1332,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // it can switch persistent representation only without initialization throw embed::WrongStateException( - OUString( "Can't change persistent representation of activated object!\n" ), + "Can't change persistent representation of activated object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1342,7 +1342,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( saveCompleted( ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) ); else throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1438,7 +1438,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( if ( aURL.isEmpty() ) throw lang::IllegalArgumentException( - OUString( "Empty URL is provided in the media descriptor!\n" ), + "Empty URL is provided in the media descriptor!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -1460,7 +1460,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( //TODO: //} else - throw lang::IllegalArgumentException( OUString( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( "Wrong connection mode is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); } @@ -1478,7 +1478,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // do nothing, the object has already switched it's persistence } else - throw lang::IllegalArgumentException( OUString( "Wrong connection mode is provided!\n" ), + throw lang::IllegalArgumentException( "Wrong connection mode is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); @@ -1572,7 +1572,7 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1668,7 +1668,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_xObjectStream.is() ) @@ -1698,13 +1698,13 @@ OUString SAL_CALL OleEmbeddedObject::getEntryName() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_aEntryName; @@ -1741,13 +1741,13 @@ void SAL_CALL OleEmbeddedObject::storeOwn() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "Can't store object without persistence!\n" ), + throw embed::WrongStateException( "Can't store object without persistence!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_bReadOnly ) @@ -1850,13 +1850,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::isReadonly() if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return m_bReadOnly; @@ -1891,13 +1891,13 @@ void SAL_CALL OleEmbeddedObject::reload( if ( m_nObjectState == -1 ) { // the object is still not loaded - throw embed::WrongStateException( OUString( "The object persistence is not initialized!\n" ), + throw embed::WrongStateException( "The object persistence is not initialized!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: @@ -1930,12 +1930,12 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag throw lang::DisposedException(); // TODO if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -1944,7 +1944,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag { // it must be a linked initialized object throw embed::WrongStateException( - OUString( "The object is not a valid linked object!\n" ), + "The object is not a valid linked object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -1953,7 +1953,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); @@ -2068,12 +2068,12 @@ OUString SAL_CALL OleEmbeddedObject::getLinkURL() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( - OUString( "The object waits for saveCompleted() call!\n" ), + "The object waits for saveCompleted() call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bIsLink ) throw embed::WrongStateException( - OUString( "The object is not a link object!\n" ), + "The object is not a link object!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: probably the link URL can be retrieved from OLE diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index eaed3682ab8b..93a0b9c57b02 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -99,11 +99,11 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!\n" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object is not loaded!\n" ), + throw embed::WrongStateException( "The object is not loaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); #ifdef WNT @@ -177,11 +177,11 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object is not loaded!\n" ), + throw embed::WrongStateException( "The object is not loaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); awt::Size aResult; @@ -215,7 +215,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) catch( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( - OUString( "No size available!\n" ), + "No size available!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -258,7 +258,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) if ( !bSuccess ) throw embed::NoVisualAreaSizeException( - OUString( "No size available!\n" ), + "No size available!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); aGuard.reset(); @@ -277,7 +277,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) catch ( const uno::Exception& ) { throw embed::NoVisualAreaSizeException( - OUString( "No size available!\n" ), + "No size available!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -293,7 +293,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) else { throw embed::NoVisualAreaSizeException( - OUString( "No size available!\n" ), + "No size available!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } } @@ -323,13 +323,13 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); // TODO: if the object has cached representation then it should be returned // TODO: if the object has no cached representation and is in loaded state it should switch itself to the running state if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object is not loaded!\n" ), + throw embed::WrongStateException( "The object is not loaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); embed::VisualRepresentation aVisualRepr; @@ -389,7 +389,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres if ( !m_xCachedVisualRepresentation.is() ) { // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); } @@ -416,11 +416,11 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getMapUnit( sal_Int64 nAspect ) SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.ole", "For iconified objects no graphical replacement is required!" ); if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved - throw embed::WrongStateException( OUString( "Illegal call!\n" ), + throw embed::WrongStateException( "Illegal call!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); if ( m_nObjectState == -1 ) - throw embed::WrongStateException( OUString( "The object is not loaded!\n" ), + throw embed::WrongStateException( "The object is not loaded!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); return embed::EmbedMapUnits::ONE_100TH_MM; diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index c0f45fc556eb..1e27ea9fe839 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -143,12 +143,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntName.getLength() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -295,12 +295,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF #ifdef WNT if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( !sEntryName.getLength() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 19c8eff9a74a..7958eed21f12 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -68,12 +68,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -138,12 +138,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -178,12 +178,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 3 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 4 ); @@ -217,13 +217,13 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta uno::RuntimeException, std::exception ) { if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); @@ -262,12 +262,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta { // the initialization is completelly controlled by user if ( !xStorage.is() ) - throw lang::IllegalArgumentException( OUString( "No parent storage is provided!\n" ), + throw lang::IllegalArgumentException( "No parent storage is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 1 ); if ( sEntName.isEmpty() ) - throw lang::IllegalArgumentException( OUString( "Empty element name is provided!\n" ), + throw lang::IllegalArgumentException( "Empty element name is provided!", uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), 2 ); diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm index 7c4858aa27fa..36814347814c 100644 --- a/fpicker/source/aqua/SalAquaFilePicker.mm +++ b/fpicker/source/aqua/SalAquaFilePicker.mm @@ -229,7 +229,7 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException ) default: throw uno::RuntimeException( - rtl::OUString("The dialog returned with an unknown result!"), + "The dialog returned with an unknown result!", static_cast<XFilePicker*>( static_cast<XFilePicker3*>( this ) )); break; } @@ -526,14 +526,14 @@ throw( uno::Exception, uno::RuntimeException ) // parameter checking uno::Any aAny; if( 0 == aArguments.getLength() ) - throw lang::IllegalArgumentException(rtl::OUString("no arguments"), + throw lang::IllegalArgumentException("no arguments", static_cast<XFilePicker*>( static_cast<XFilePicker3*>(this) ), 1 ); aAny = aArguments[0]; if( ( aAny.getValueType() != ::cppu::UnoType<sal_Int16>::get() ) && (aAny.getValueType() != ::cppu::UnoType<sal_Int8>::get() ) ) - throw lang::IllegalArgumentException(rtl::OUString( "invalid argument type" ), + throw lang::IllegalArgumentException("invalid argument type", static_cast<XFilePicker*>( static_cast<XFilePicker3*>(this) ), 1 ); sal_Int16 templateId = -1; @@ -586,7 +586,7 @@ throw( uno::Exception, uno::RuntimeException ) OSL_TRACE( "Template: FILESAVE_AUTOEXTENSION" ); break; default: - throw lang::IllegalArgumentException(rtl::OUString("Unknown template"), + throw lang::IllegalArgumentException("Unknown template", static_cast<XFilePicker*>( static_cast<XFilePicker3*>(this) ), 1 ); } diff --git a/fpicker/source/aqua/SalAquaFolderPicker.mm b/fpicker/source/aqua/SalAquaFolderPicker.mm index 31cd0e16e8e0..6ad8c73823bd 100644 --- a/fpicker/source/aqua/SalAquaFolderPicker.mm +++ b/fpicker/source/aqua/SalAquaFolderPicker.mm @@ -122,7 +122,7 @@ sal_Int16 SAL_CALL SalAquaFolderPicker::execute() throw( uno::RuntimeException ) break; default: - throw uno::RuntimeException(OUString("The dialog returned with an unknown result!"), static_cast< cppu::OWeakObject * >( this )); + throw uno::RuntimeException("The dialog returned with an unknown result!", static_cast< cppu::OWeakObject * >( this )); break; } @@ -174,7 +174,7 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx OSL_TRACE("# of items: %d", nFiles); if (nFiles < 1) { - throw uno::RuntimeException(OUString("no directory selected"), static_cast< cppu::OWeakObject * >( this )); + throw uno::RuntimeException("no directory selected", static_cast< cppu::OWeakObject * >( this )); } rtl::OUString aDirectory; diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 0fc0515d2284..43c38d7ba80e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2097,7 +2097,7 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype ) throw uno::Sequence< OUString > aList = getAvailableMimeTypes(); const OUString* pEnd = aList.getConstArray()+aList.getLength(); if ( ::std::find(aList.getConstArray(),pEnd,_mimetype) == pEnd ) - throwIllegallArgumentException(OUString("getAvailableMimeTypes()") + throwIllegallArgumentException("getAvailableMimeTypes()" ,*this ,1 ,m_aProps->m_xContext); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index fbf4fb6cc44c..8d0050fd8146 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -897,7 +897,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN } else { - throw beans::UnknownPropertyException( OUString( "unknown property: " ) + sPropertyName, static_cast<OWeakObject *>(this) ); + throw beans::UnknownPropertyException( "unknown property: " + sPropertyName, static_cast<OWeakObject *>(this) ); } return aRet; diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 71bacc8efe81..7cad8485a2b2 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -109,7 +109,7 @@ using namespace ooo::vba; static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName, uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc ) { if (!xSpreadDoc.is()) - throw lang::IllegalArgumentException( OUString( "getNewSpreadsheetName() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( "getNewSpreadsheetName() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 ); static OUString aUnderScore( "_" ); int currentNum =2; aNewName = aOldName + aUnderScore + OUString::number(currentNum) ; @@ -123,7 +123,7 @@ static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName, static void removeAllSheets( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, const OUString& aSheetName) { if (!xSpreadDoc.is()) - throw lang::IllegalArgumentException( OUString( "removeAllSheets() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( "removeAllSheets() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 ); uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets(); uno::Reference <container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY ); diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index b55016aecf0d..6f8f9a931690 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -490,7 +490,7 @@ ScVbaWorksheets::getServiceNames() bool ScVbaWorksheets::nameExists( uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc, const OUString & name, SCTAB& nTab ) throw ( lang::IllegalArgumentException ) { if (!xSpreadDoc.is()) - throw lang::IllegalArgumentException( OUString( "nameExists() xSpreadDoc is null" ), uno::Reference< uno::XInterface >(), 1 ); + throw lang::IllegalArgumentException( "nameExists() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 ); uno::Reference <container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY ); if ( xIndex.is() ) { diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index db6eea1f0b00..d5982379deb6 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -430,7 +430,7 @@ namespace slideshow } catch( const uno::Exception& ) { - throw lang::NoSupportException( OUString( "No video support for " ) + rMediaURL ); + throw lang::NoSupportException( "No video support for " + rMediaURL ); } } #endif diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 7ccfeb721806..d7986a34ecc8 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -1017,7 +1017,7 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName ) catch ( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetException( OUString("Can not open element!\n"), + throw lang::WrappedTargetException( "Can not open element!", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -1068,7 +1068,7 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() else { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OUString("Can not open storage!\n"), + throw lang::WrappedTargetRuntimeException( "Can not open storage!", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -1081,7 +1081,7 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() catch ( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OUString("Can not open storage!\n"), + throw lang::WrappedTargetRuntimeException( "Can not open storage!", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); @@ -1114,7 +1114,7 @@ sal_Bool SAL_CALL FSStorage::hasByName( const OUString& aName ) catch ( uno::Exception& ) { uno::Any aCaught( ::cppu::getCaughtException() ); - throw lang::WrappedTargetRuntimeException( OUString("Can not open storage!\n"), + throw lang::WrappedTargetRuntimeException( "Can not open storage!", uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ), aCaught ); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index c49fc2cdc041..04c1bc2099a5 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -111,7 +111,7 @@ namespace size_t lhsCount = m_aComponentInfo.childCount( _components.first ); size_t rhsCount = m_aComponentInfo.childCount( _components.second ); if ( lhsCount != rhsCount ) - throw RuntimeException( OUString( "Found inconsistent form component hierarchies (1)!" ), NULL ); + throw RuntimeException( "Found inconsistent form component hierarchies (1)!" ); return lhsCount; } @@ -141,7 +141,7 @@ namespace Reference< XControlModel > lhsControlModel( _component.first, UNO_QUERY ); Reference< XControlModel > rhsControlModel( _component.second, UNO_QUERY ); if ( lhsControlModel.is() != rhsControlModel.is() ) - throw RuntimeException( OUString( "Found inconsistent form component hierarchies (2)!" ), NULL ); + throw RuntimeException( "Found inconsistent form component hierarchies (2)!" ); if ( lhsControlModel.is() ) m_rControlModelMap[ lhsControlModel ] = rhsControlModel; diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx index 072517d42f3a..e59b992cbf96 100644 --- a/svx/source/sidebar/line/LinePropertyPanel.cxx +++ b/svx/source/sidebar/line/LinePropertyPanel.cxx @@ -304,11 +304,11 @@ LinePropertyPanel* LinePropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(OUString("no parent Window given to LinePropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to LinePropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(OUString("no XFrame given to LinePropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to LinePropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(OUString("no SfxBindings given to LinePropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to LinePropertyPanel::Create", NULL, 2); return new LinePropertyPanel( pParent, diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx index a8f6d45fdbb4..5f132c375ed4 100644 --- a/svx/source/table/tabledesign.cxx +++ b/svx/source/table/tabledesign.cxx @@ -738,7 +738,7 @@ Any TableDesignFamily::getPropertyValue( const OUString& PropertyName ) throw (U } else { - throw UnknownPropertyException( OUString("unknown property: ") + PropertyName, static_cast<OWeakObject *>(this) ); + throw UnknownPropertyException( "unknown property: " + PropertyName, static_cast<OWeakObject *>(this) ); } } diff --git a/sw/source/core/uibase/uno/unomailmerge.cxx b/sw/source/core/uibase/uno/unomailmerge.cxx index 4fef3646b335..4d670c7c8b93 100644 --- a/sw/source/core/uibase/uno/unomailmerge.cxx +++ b/sw/source/core/uibase/uno/unomailmerge.cxx @@ -543,7 +543,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( else if (rName == UNO_NAME_OUT_SERVER_PASSWORD) bOK = rValue >>= sOutServerPassword; else - throw UnknownPropertyException( OUString( "Property is unknown: " ) + rName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Property is unknown: " + rName, static_cast < cppu::OWeakObject * > ( this ) ); if (!bOK) throw IllegalArgumentException("Property type mismatch or property not set: " + rName, static_cast < cppu::OWeakObject * > ( this ), 0 ); @@ -586,7 +586,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( if ( !bValid ) { throw IllegalArgumentException( - OUString( "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'." ), + "The current 'Selection' does not describe a valid array of bookmarks, relative to the current 'ResultSet'.", static_cast < cppu::OWeakObject * > ( this ), 0 ); diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx index 86d43b4d315a..b1eb6ac93abb 100644 --- a/sw/source/core/unocore/SwXTextDefaults.cxx +++ b/sw/source/core/unocore/SwXTextDefaults.cxx @@ -67,9 +67,9 @@ void SAL_CALL SwXTextDefaults::setPropertyValue( const OUString& rPropertyName, throw RuntimeException(); const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pMap) - throw UnknownPropertyException(OUString ( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pMap->nFlags & PropertyAttribute::READONLY) - throw PropertyVetoException ( OUString ( "Property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw PropertyVetoException ( "Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); const SfxPoolItem& rItem = m_pDoc->GetDefault(pMap->nWID); if (RES_PAGEDESC == pMap->nWID && MID_PAGEDESC_PAGEDESCNAME == pMap->nMemberId) @@ -132,7 +132,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyValue( const OUString& rPropertyName ) throw RuntimeException(); const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pMap) - throw UnknownPropertyException(OUString ( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); Any aRet; const SfxPoolItem& rItem = m_pDoc->GetDefault(pMap->nWID); rItem.QueryValue( aRet, pMap->nMemberId ); @@ -173,7 +173,7 @@ PropertyState SAL_CALL SwXTextDefaults::getPropertyState( const OUString& rPrope throw RuntimeException(); const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pMap) - throw UnknownPropertyException(OUString ( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); const SfxPoolItem& rItem = m_pDoc->GetDefault(pMap->nWID); if (IsStaticDefaultItem ( &rItem ) ) @@ -202,9 +202,9 @@ void SAL_CALL SwXTextDefaults::setPropertyToDefault( const OUString& rPropertyNa throw RuntimeException(); const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pMap) - throw UnknownPropertyException(OUString ( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pMap->nFlags & PropertyAttribute::READONLY) - throw RuntimeException( OUString ( "setPropertyToDefault: property is read-only: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw RuntimeException( "setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); SfxItemPool& rSet (m_pDoc->GetAttrPool()); rSet.ResetPoolDefaultItem ( pMap->nWID ); } @@ -216,7 +216,7 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName throw RuntimeException(); const SfxItemPropertySimpleEntry *pMap = m_pPropSet->getPropertyMap().getByName( rPropertyName ); if (!pMap) - throw UnknownPropertyException(OUString ( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); Any aRet; SfxItemPool& rSet (m_pDoc->GetAttrPool()); const SfxPoolItem *pItem = rSet.GetPoolDefaultItem ( pMap->nWID ); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 2ef5ecbc847e..4899005e4a52 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -595,7 +595,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, else { throw beans::UnknownPropertyException( - OUString( "Unknown property: " ) + rPropertyName, + "Unknown property: " + rPropertyName, static_cast< cppu::OWeakObject * >( this ) ); } } @@ -751,7 +751,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, } break; default: - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } } @@ -929,7 +929,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, } break; default: - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } } } @@ -2119,9 +2119,9 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, const SfxItemPropertySimpleEntry* pEntry = _pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) - throw beans::PropertyVetoException ("Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::PropertyVetoException( "Property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if(pField) { @@ -2276,7 +2276,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, pEntry = _pParaPropSet->getPropertyMap().getByName(rPropertyName); } if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); switch( pEntry->nWID ) { diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 6a15f4e7a2d5..44aa2c224006 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1339,7 +1339,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: const :: SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); //UUUU const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM)); @@ -1934,7 +1934,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) SwFrmFmt* pFmt = GetFrmFmt(); const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); //UUUU const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM)); @@ -2490,7 +2490,7 @@ void SwXFrame::setPropertyToDefault( const OUString& rPropertyName ) { const SfxItemPropertySimpleEntry* pEntry = m_pPropSet->getPropertyMap().getByName(rPropertyName); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) throw uno::RuntimeException("setPropertyToDefault: property is read-only: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); @@ -2611,7 +2611,7 @@ uno::Any SwXFrame::getPropertyDefault( const OUString& rPropertyName ) } } else - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) ); } else if(!IsDescriptor()) throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 3246577a3dc3..410e94cb274a 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -432,7 +432,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXTextPortion::GetPropertyValues_Impl( GetPropertyValue( pValues[nProp], *pEntry, pUnoCrsr, pSet ); } else - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); } delete pSet; } @@ -468,7 +468,7 @@ void SAL_CALL SwXTextPortion::SetPropertyValues_Impl( { const SfxItemPropertySimpleEntry* pEntry = rMap.getByName(pPropertyNames[nProp]); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); if ( pEntry->nFlags & beans::PropertyAttribute::READONLY) throw beans::PropertyVetoException ("Property is read-only: " + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) ); @@ -668,7 +668,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion: { const SfxItemPropertySimpleEntry* pEntry = rPropMap.getByName( pProp[i] ); if (!pEntry) - throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + pProp[i], static_cast < cppu::OWeakObject * > ( this ) ); + throw beans::UnknownPropertyException( "Unknown property: " + pProp[i], static_cast < cppu::OWeakObject * > ( this ) ); aResult.State = pPropertyStates[i]; aResult.Result = beans::TolerantPropertySetResultType::UNKNOWN_FAILURE; |