diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-26 15:26:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-27 08:20:11 +0200 |
commit | 9af0abebfd61641c9d028505caa864cdf898e35b (patch) | |
tree | aff469b96f89daf093271d95f790250147ea9c0d /embeddedobj/source/commonembedding | |
parent | 9b791f9c31165b82ec0fa3760a8af18c5af21294 (diff) |
remove unnecessary use of Reference constructor in throw
Convert code like this:
throw IOException("xx",
Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
throw IOException("xx",
static_cast<OWeakObject*>(this) );
Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 26 | ||||
-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 | 52 | ||||
-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 | 8 |
7 files changed, 59 insertions, 59 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 2be19047aeba..d96aab213a37 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -102,7 +102,7 @@ void OCommonEmbeddedObject::Deactivate() { throw embed::StorageWrappedTargetException( "The client could not store the object!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ), + static_cast< ::cppu::OWeakObject* >( this ), uno::makeAny( e ) ); } } @@ -384,7 +384,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else throw embed::WrongStateException( "The object is in unacceptable state!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } @@ -397,7 +397,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nCurInd == m_aAcceptedStates.getLength() ) throw embed::WrongStateException( "The object is in unacceptable state!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); sal_Int32 nDestInd = 0; for ( nDestInd = 0; nDestInd < m_aAcceptedStates.getLength(); nDestInd++ ) @@ -407,7 +407,7 @@ uno::Sequence< sal_Int32 > OCommonEmbeddedObject::GetIntermediateStatesSequence_ if ( nDestInd == m_aAcceptedStates.getLength() ) throw embed::UnreachableStateException( "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) ), + static_cast< ::cppu::OWeakObject* >(this), m_nObjectState, nNewState ); @@ -429,7 +429,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); sal_Int32 nOldState = m_nObjectState; @@ -495,7 +495,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OCommonEmbeddedObject::getReachableStates() if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_aAcceptedStates; } @@ -510,7 +510,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getCurrentState() if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_nObjectState; } @@ -539,7 +539,7 @@ void SAL_CALL OCommonEmbeddedObject::doVerb( sal_Int32 nVerbID ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); // for internal documents this call is just a duplicate of changeState sal_Int32 nNewState = -1; @@ -572,7 +572,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OCommonEmbeddedObject::getSuppor if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_aObjectVerbs; } @@ -592,7 +592,7 @@ void SAL_CALL OCommonEmbeddedObject::setClientSite( if ( m_nObjectState != embed::EmbedStates::LOADED && m_nObjectState != embed::EmbedStates::RUNNING ) throw embed::WrongStateException( "The client site can not be set currently!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); m_xClientSite = xClient; } @@ -608,7 +608,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OCommonEmbeddedObject::getClie if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_xClientSite; } @@ -625,7 +625,7 @@ void SAL_CALL OCommonEmbeddedObject::update() if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); PostEvent_Impl( OUString( "OnVisAreaChanged" ) ); } @@ -641,7 +641,7 @@ void SAL_CALL OCommonEmbeddedObject::setUpdateMode( sal_Int32 nMode ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE || nMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE, diff --git a/embeddedobj/source/commonembedding/inplaceobj.cxx b/embeddedobj/source/commonembedding/inplaceobj.cxx index 207c88e2cff3..0fff4c32919c 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -47,7 +47,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( "The object is not activated inplace!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); awt::Rectangle aNewRectToShow = GetRectangleInterception( aPosRect, aClipRect ); awt::Rectangle aOldRectToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle ); diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 6bfbf5a82966..fb560aa02108 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -492,7 +492,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( { // the object is still not loaded throw uno::RuntimeException( "Can't store object without persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index aebfb813a256..4a057f85f085 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -911,12 +911,12 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( "Empty element name is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 2 ); // May be LOADED should be forbidden here ??? @@ -931,7 +931,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( throw embed::WrongStateException( "Can't change persistent representation of activated object!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) @@ -955,7 +955,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( else throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1112,7 +1112,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( //} else throw lang::IllegalArgumentException( "Wrong connection mode is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 3 ); } } @@ -1136,13 +1136,13 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: { // the object is still not loaded throw embed::WrongStateException( "Can't store object without persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded // objects, so the persist name must be handled correctly ( althowgh no real persist entry is used ) @@ -1268,13 +1268,13 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: { // the object is still not loaded throw embed::WrongStateException( "Can't store object without persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); // for now support of this interface is required to allow breaking of links and converting them to normal embedded // objects, so the persist name must be handled correctly ( althowgh no real persist entry is used ) @@ -1407,7 +1407,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) { // the object is still not loaded throw embed::WrongStateException( "Can't store object without persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } // for now support of this interface is required to allow breaking of links and converting them to normal embedded @@ -1486,7 +1486,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_xObjectStorage.is() ) return sal_True; @@ -1507,13 +1507,13 @@ OUString SAL_CALL OCommonEmbeddedObject::getEntryName() { // the object is still not loaded throw embed::WrongStateException( "The object persistence is not initialized!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_aEntryName; } @@ -1537,13 +1537,13 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() { // the object is still not loaded throw embed::WrongStateException( "Can't store object without persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bReadOnly ) throw io::IOException(); // TODO: access denied @@ -1623,13 +1623,13 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isReadonly() { // the object is still not loaded throw embed::WrongStateException( "The object persistence is not initialized!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_bReadOnly; } @@ -1655,7 +1655,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( { // the object is still not loaded throw embed::WrongStateException( "The object persistence is not initialized!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_nObjectState != embed::EmbedStates::LOADED ) @@ -1663,13 +1663,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( // the object is still not loaded throw embed::WrongStateException( "The object must be in loaded state to be reloaded!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bIsLink ) { @@ -1777,7 +1777,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt // it must be a linked initialized object throw embed::WrongStateException( "The object is not a valid linked object!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } else { @@ -1787,12 +1787,12 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( "Empty element name is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 2 ); if ( !m_bIsLink || m_nObjectState == -1 ) @@ -1800,13 +1800,13 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt // it must be a linked initialized object throw embed::WrongStateException( "The object is not a valid linked object!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); } if ( m_bWaitSaveCompleted ) throw embed::WrongStateException( "The object waits for saveCompleted() call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); if ( !xNameAccess.is() ) @@ -1878,7 +1878,7 @@ OUString SAL_CALL OCommonEmbeddedObject::getLinkURL() if ( !m_bIsLink ) throw embed::WrongStateException( "The object is not a link object!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return m_aLinkURL; } diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index 86ec2a727c2c..4ff96a131bb1 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -108,13 +108,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( "The own object has no model!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + 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( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); // TODO: return for the aspect of the document embed::VisualRepresentation aVisualRepresentation; @@ -135,7 +135,7 @@ void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, cons if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); maSize = aSize; } @@ -154,11 +154,11 @@ awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no model!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); awt::Size aResult; return maSize; @@ -176,7 +176,7 @@ sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 nAspect ) if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); return embed::EmbedMapUnits::ONE_100TH_MM; } @@ -205,7 +205,7 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( nVerbID == -7 ) { diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 62438972075f..9f2af1e890ac 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -43,11 +43,11 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); m_bHasClonedSize = false; @@ -81,7 +81,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); SAL_WARN_IF( nAspect == embed::Aspects::MSOLE_ICON, "embeddedobj.common", "For iconified objects no graphical replacement is required!" ); @@ -121,11 +121,11 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect ) if ( nAspect == embed::Aspects::MSOLE_ICON ) // no representation can be retrieved throw embed::WrongStateException( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); if ( m_bHasClonedSize ) return m_nClonedMapUnit; @@ -162,14 +162,14 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The own object has no persistence!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + 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( "Illegal call!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); + static_cast< ::cppu::OWeakObject* >(this) ); bool bBackToLoaded = false; if ( m_nObjectState == embed::EmbedStates::LOADED ) diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 1253040e3f5d..42ddfb3464f2 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -67,12 +67,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta { if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( "Empty element name is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 2 ); uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY ); @@ -155,12 +155,12 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta { if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 1 ); if ( sEntName.isEmpty() ) throw lang::IllegalArgumentException( "Empty element name is provided!", - uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ), + static_cast< ::cppu::OWeakObject* >(this), 2 ); uno::Sequence< beans::PropertyValue > aTempMedDescr( aMediaDescr ); |