diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-26 14:29:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-27 08:20:11 +0200 |
commit | 9b791f9c31165b82ec0fa3760a8af18c5af21294 (patch) | |
tree | 3668f3b746bc584280a01162f86a0b2fe6b46510 /embeddedobj/source/commonembedding | |
parent | 3b24dcc8a8138c1e1495c3dba5ffe5748cb183c2 (diff) |
remove unnecessary use of OUString constructor when throwing
Change-Id: I4a3f3f911dcfbf88696053215a2fb7a94678244c
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 31 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/inplaceobj.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/miscobj.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 54 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/specialobject.cxx | 14 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/visobj.cxx | 14 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 24 |
7 files changed, 69 insertions, 72 deletions
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 ); |