summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-26 15:26:03 +0200
committerNoel Grandin <noel@peralex.com>2014-05-27 08:20:11 +0200
commit9af0abebfd61641c9d028505caa864cdf898e35b (patch)
treeaff469b96f89daf093271d95f790250147ea9c0d /embeddedobj
parent9b791f9c31165b82ec0fa3760a8af18c5af21294 (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')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx26
-rw-r--r--embeddedobj/source/commonembedding/inplaceobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx2
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx52
-rw-r--r--embeddedobj/source/commonembedding/specialobject.cxx14
-rw-r--r--embeddedobj/source/commonembedding/visobj.cxx14
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx8
-rw-r--r--embeddedobj/source/general/dummyobject.cxx40
-rw-r--r--embeddedobj/source/general/xcreator.cxx24
-rw-r--r--embeddedobj/source/msole/oleembed.cxx20
-rw-r--r--embeddedobj/source/msole/olemisc.cxx2
-rw-r--r--embeddedobj/source/msole/olepersist.cxx50
-rw-r--r--embeddedobj/source/msole/olevisual.cxx26
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx8
-rw-r--r--embeddedobj/source/msole/xolefactory.cxx22
15 files changed, 153 insertions, 157 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 );
diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx
index 76f982f20d84..603b8f3c8b21 100644
--- a/embeddedobj/source/general/dummyobject.cxx
+++ b/embeddedobj/source/general/dummyobject.cxx
@@ -45,7 +45,7 @@ void ODummyEmbeddedObject::CheckInit_WrongState()
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) );
}
void ODummyEmbeddedObject::CheckInit_Runtime()
@@ -55,7 +55,7 @@ void ODummyEmbeddedObject::CheckInit_Runtime()
if ( m_nObjectState == -1 )
throw uno::RuntimeException( "The object has no persistence!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
void ODummyEmbeddedObject::PostEvent_Impl( const OUString& aEventName )
{
@@ -237,7 +237,7 @@ void SAL_CALL ODummyEmbeddedObject::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) );
m_nCachedAspect = nAspect;
m_aCachedSize = aSize;
@@ -258,12 +258,12 @@ awt::Size SAL_CALL ODummyEmbeddedObject::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_bHasCachedSize || m_nCachedAspect != nAspect )
throw embed::NoVisualAreaSizeException(
"No size available!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
return m_aCachedSize;
}
@@ -280,7 +280,7 @@ sal_Int32 SAL_CALL ODummyEmbeddedObject::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;
}
@@ -297,7 +297,7 @@ embed::VisualRepresentation SAL_CALL ODummyEmbeddedObject::getPreferredVisualRep
// no representation can be retrieved
throw embed::WrongStateException( "Illegal call!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
@@ -319,12 +319,12 @@ void SAL_CALL ODummyEmbeddedObject::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 );
if ( ( m_nObjectState != -1 || nEntryConnectionMode == embed::EntryInitModes::NO_INIT )
@@ -332,7 +332,7 @@ void SAL_CALL ODummyEmbeddedObject::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 )
@@ -342,7 +342,7 @@ void SAL_CALL ODummyEmbeddedObject::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) );
}
if ( nEntryConnectionMode == embed::EntryInitModes::DEFAULT_INIT
@@ -357,13 +357,13 @@ void SAL_CALL ODummyEmbeddedObject::setPersistentEntry(
}
else
throw lang::IllegalArgumentException( "Wrong entry is provided!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
2 );
}
else
throw lang::IllegalArgumentException( "Wrong connection mode is provided!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
3 );
}
@@ -384,7 +384,7 @@ void SAL_CALL ODummyEmbeddedObject::storeToEntry( const uno::Reference< embed::X
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) );
m_xParentStorage->copyElementTo( m_aEntryName, xStorage, sEntName );
}
@@ -406,7 +406,7 @@ void SAL_CALL ODummyEmbeddedObject::storeAsEntry( const uno::Reference< embed::X
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) );
PostEvent_Impl( OUString( "OnSaveAs" ) );
@@ -462,7 +462,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::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_aEntryName.isEmpty() )
return sal_True;
@@ -481,7 +481,7 @@ OUString SAL_CALL ODummyEmbeddedObject::getEntryName()
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;
}
@@ -499,7 +499,7 @@ void SAL_CALL ODummyEmbeddedObject::storeOwn()
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) );
// the object can not be activated or changed
return;
@@ -516,7 +516,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly()
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) );
// this object can not be changed
return sal_True;
@@ -538,7 +538,7 @@ void SAL_CALL ODummyEmbeddedObject::reload(
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) );
// nothing to reload
}
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index df2625630581..b3db0f04ef27 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -77,12 +77,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::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),
3 );
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),
4 );
OUString aEmbedFactory = m_aConfigHelper.GetFactoryNameByClassID( aClassID );
@@ -118,12 +118,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::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 );
@@ -237,12 +237,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::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< uno::XInterface > xResult;
@@ -300,12 +300,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::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),
3 );
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),
4 );
OUString aEmbedFactory = m_aConfigHelper.GetFactoryNameByClassID( aClassID );
@@ -347,7 +347,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
if ( aURL.isEmpty() )
throw lang::IllegalArgumentException( "No URL for the link is provided!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
3 );
OUString aFilterName = m_aConfigHelper.UpdateMediaDescriptorWithFilterName( aTempMedDescr, false );
@@ -376,14 +376,12 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::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),
3 );
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),
4 );
uno::Reference< embed::XEmbeddedObjectCreator > xLinkCreator =
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 4de8ae6995e0..144ecf555293 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -459,7 +459,7 @@ void SAL_CALL OleEmbeddedObject::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) );
// in case the object is already in requested state
if ( m_nObjectState == nNewState )
@@ -613,7 +613,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::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) );
#ifdef WNT
if ( m_pOleComponent )
@@ -655,7 +655,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::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) );
// TODO: Shouldn't we ask object? ( I guess no )
return m_nObjectState;
@@ -771,7 +771,7 @@ void SAL_CALL OleEmbeddedObject::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) );
#ifdef WNT
if ( m_pOleComponent )
@@ -904,7 +904,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV
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) );
#ifdef WNT
if ( m_pOleComponent )
{
@@ -949,7 +949,7 @@ void SAL_CALL OleEmbeddedObject::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;
}
@@ -975,7 +975,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi
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;
}
@@ -1002,7 +1002,7 @@ void SAL_CALL OleEmbeddedObject::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) );
if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE )
{
@@ -1036,7 +1036,7 @@ void SAL_CALL OleEmbeddedObject::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,
@@ -1066,7 +1066,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64
if ( m_nObjectState == -1 )
throw embed::WrongStateException( "The object must be in running state!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
sal_Int64 nResult = 0;
diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx
index 2a05a702e1fc..dc1accbdba3e 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -384,7 +384,7 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent()
{
// the object is still not running
throw uno::RuntimeException( "The object is not loaded!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
#if defined WNT
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 44f68bc11b18..d3b0901d1a5c 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -1080,13 +1080,13 @@ void OleEmbeddedObject::StoreToLocation_Impl(
{
// 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) );
OSL_ENSURE( m_xParentStorage.is() && m_xObjectStream.is(), "The object has no valid persistence!\n" );
@@ -1313,12 +1313,12 @@ void SAL_CALL OleEmbeddedObject::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 ???
@@ -1333,7 +1333,7 @@ void SAL_CALL OleEmbeddedObject::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 )
@@ -1343,7 +1343,7 @@ void SAL_CALL OleEmbeddedObject::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) );
}
uno::Reference< container::XNameAccess > xNameAccess( xStorage, uno::UNO_QUERY );
@@ -1439,7 +1439,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry(
if ( aURL.isEmpty() )
throw lang::IllegalArgumentException(
"Empty URL is provided in the media descriptor!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
4 );
CreateOleComponent_Impl();
@@ -1461,7 +1461,7 @@ void SAL_CALL OleEmbeddedObject::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 );
}
#else
@@ -1479,7 +1479,7 @@ void SAL_CALL OleEmbeddedObject::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 );
#endif
@@ -1573,7 +1573,7 @@ void SAL_CALL OleEmbeddedObject::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) );
}
// it is allowed to call saveCompleted( false ) for nonstored objects
@@ -1669,7 +1669,7 @@ sal_Bool SAL_CALL OleEmbeddedObject::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_xObjectStream.is() )
return sal_True;
@@ -1699,13 +1699,13 @@ OUString SAL_CALL OleEmbeddedObject::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;
}
@@ -1742,13 +1742,13 @@ void SAL_CALL OleEmbeddedObject::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
@@ -1851,13 +1851,13 @@ sal_Bool SAL_CALL OleEmbeddedObject::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;
}
@@ -1892,13 +1892,13 @@ void SAL_CALL OleEmbeddedObject::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_bWaitSaveCompleted )
throw embed::WrongStateException(
"The object waits for saveCompleted() call!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
// TODO:
// throw away current document
@@ -1931,12 +1931,12 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag
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 );
// TODO: The object must be at least in Running state;
@@ -1945,7 +1945,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag
// 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_bReadOnly )
@@ -1954,7 +1954,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag
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) );
#ifdef WNT
@@ -2069,12 +2069,12 @@ OUString SAL_CALL OleEmbeddedObject::getLinkURL()
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 )
throw embed::WrongStateException(
"The object is not a link object!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ 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 93a0b9c57b02..93eaf15a83c4 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -100,11 +100,11 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
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 object is not loaded!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
#ifdef WNT
// RECOMPOSE_ON_RESIZE misc flag means that the object has to be switched to running state on resize.
@@ -178,11 +178,11 @@ awt::Size SAL_CALL OleEmbeddedObject::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 object is not loaded!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
awt::Size aResult;
@@ -216,7 +216,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
{
throw embed::NoVisualAreaSizeException(
"No size available!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
}
@@ -259,7 +259,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
if ( !bSuccess )
throw embed::NoVisualAreaSizeException(
"No size available!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
aGuard.reset();
@@ -278,7 +278,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
{
throw embed::NoVisualAreaSizeException(
"No size available!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
}
else
@@ -294,7 +294,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
{
throw embed::NoVisualAreaSizeException(
"No size available!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
}
}
@@ -324,13 +324,13 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres
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: 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( "The object is not loaded!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ static_cast< ::cppu::OWeakObject* >(this) );
embed::VisualRepresentation aVisualRepr;
@@ -390,7 +390,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres
{
// 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 GetVisualRepresentationInNativeFormat_Impl( m_xCachedVisualRepresentation );
@@ -417,11 +417,11 @@ sal_Int32 SAL_CALL OleEmbeddedObject::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 object is not loaded!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
+ 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 1e27ea9fe839..0ba4a619bc7f 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -144,12 +144,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia
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.getLength() )
throw lang::IllegalArgumentException( "Empty element name is provided!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
2 );
InitializedOleGuard aGuard;
@@ -296,12 +296,12 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF
#ifdef WNT
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 ( !sEntryName.getLength() )
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< embed::XEmbeddedObject > xResult(
diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx
index 7958eed21f12..dd969e729f4e 100644
--- a/embeddedobj/source/msole/xolefactory.cxx
+++ b/embeddedobj/source/msole/xolefactory.cxx
@@ -69,12 +69,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::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 );
@@ -139,12 +139,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::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< uno::XInterface > xResult(
@@ -179,12 +179,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::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),
3 );
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),
4 );
uno::Reference< uno::XInterface > xResult(
@@ -218,14 +218,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::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< uno::XInterface > xResult(
@@ -263,12 +261,12 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
// the initialization is completelly controlled by user
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< uno::XInterface > xResult(