summaryrefslogtreecommitdiff
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
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
-rw-r--r--animations/source/animcore/animcore.cxx2
-rw-r--r--comphelper/source/streaming/memorystream.cxx4
-rw-r--r--comphelper/source/streaming/seqinputstreamserv.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx4
-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
-rw-r--r--extensions/source/update/check/updatehdl.cxx2
-rw-r--r--filter/source/config/cache/basecontainer.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx4
-rw-r--r--forms/source/misc/InterfaceContainer.cxx2
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx12
-rw-r--r--framework/source/services/autorecovery.cxx2
-rw-r--r--framework/source/services/frame.cxx4
-rw-r--r--framework/source/services/tabwindowservice.cxx8
-rw-r--r--io/source/acceptor/acc_socket.cxx8
-rw-r--r--io/source/connector/ctr_socket.cxx8
-rw-r--r--package/source/xstor/owriteablestream.cxx9
-rw-r--r--package/source/xstor/xstorage.cxx87
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx3
-rw-r--r--sdext/source/presenter/PresenterAccessibility.cxx8
-rw-r--r--sdext/source/presenter/PresenterWindowManager.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
-rw-r--r--svl/source/fsstor/fsstorage.cxx20
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx8
37 files changed, 249 insertions, 268 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index b77675d22fbc..9aed80975efb 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -514,7 +514,7 @@ AnimationNode::~AnimationNode()
#define IMPL_NODE_FACTORY(N,IN,SN)\
Reference< XInterface > SAL_CALL createInstance_##N( const Reference< XComponentContext > & ) throw (Exception)\
{\
- return Reference < XInterface > ( (static_cast< ::cppu::OWeakObject * >(new AnimationNode( N )) ) );\
+ return static_cast< ::cppu::OWeakObject * >(new AnimationNode( N ));\
}\
OUString getImplementationName_##N()\
{\
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index c4379cdb46ba..b8b3f4c113ca 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -148,7 +148,7 @@ void SAL_CALL UNOMemoryStream::closeInput() throw (NotConnectedException, IOExce
void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgumentException, IOException, RuntimeException, std::exception)
{
if( (location < 0) || (location > SAL_MAX_INT32) )
- throw IllegalArgumentException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 );
+ throw IllegalArgumentException("this implementation does not support more than 2GB!", static_cast<OWeakObject*>(this), 0 );
// seek operation should be able to resize the stream
if ( location > static_cast< sal_Int64 >( maData.size() ) )
@@ -180,7 +180,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< sal_Int8 >& aData ) t
if( nNewSize > SAL_MAX_INT32 )
{
OSL_ASSERT(false);
- throw IOException("this implementation does not support more than 2GB!", Reference< XInterface >(static_cast<OWeakObject*>(this)) );
+ throw IOException("this implementation does not support more than 2GB!", static_cast<OWeakObject*>(this) );
}
if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) )
diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx
index b5750d454b8f..1ea60fa5a63f 100644
--- a/comphelper/source/streaming/seqinputstreamserv.cxx
+++ b/comphelper/source/streaming/seqinputstreamserv.cxx
@@ -208,7 +208,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com
if ( aArguments.getLength() != 1 )
throw lang::IllegalArgumentException( "Wrong number of arguments!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
1 );
uno::Sequence< sal_Int8 > aSeq;
@@ -224,7 +224,7 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< ::com
}
else
throw lang::IllegalArgumentException( "Unexpected type of argument!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ),
+ static_cast< ::cppu::OWeakObject* >(this),
1 );
}
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index e8a9844606a4..bea8c6750f80 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -446,8 +446,8 @@ void TheExtensionManager::queryTermination( ::lang::EventObject const & )
{
ToTop( TOTOP_RESTOREWHENMIN );
throw frame::TerminationVetoException(
- OUString("The office cannot be closed while the Extension Manager is running"),
- uno::Reference<XInterface>(static_cast<frame::XTerminateListener*>(this), uno::UNO_QUERY));
+ "The office cannot be closed while the Extension Manager is running",
+ static_cast<frame::XTerminateListener*>(this));
}
else
{
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(
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 2acbd05c5a74..084ecb2e29f8 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -482,7 +482,7 @@ void SAL_CALL UpdateHandler::queryTermination( const lang::EventObject& )
throw frame::TerminationVetoException(
"The office cannot be closed while displaying a warning!",
- uno::Reference<XInterface>(static_cast<frame::XTerminateListener*>(this), uno::UNO_QUERY));
+ static_cast<frame::XTerminateListener*>(this));
}
else
setVisible( false );
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 8bf3650cfc93..2a1c938fb64b 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -291,7 +291,7 @@ css::uno::Any SAL_CALL BaseContainer::getByName(const OUString& sItem)
{
if (sItem.isEmpty())
throw css::container::NoSuchElementException( "An empty item can't be part of this cache!",
- css::uno::Reference< css::uno::XInterface >(static_cast< css::container::XNameAccess* >(this), css::uno::UNO_QUERY));
+ static_cast< css::container::XNameAccess* >(this));
css::uno::Any aValue;
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 0f643f1d2932..80bfc9112543 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -295,8 +295,8 @@ void SAL_CALL XMLFilterDialogComponent::queryTermination( const EventObject& /*
{
mpDialog->ToTop();
throw TerminationVetoException(
- OUString("The office cannot be closed while the XMLFilterDialog is running"),
- Reference<XInterface>(static_cast<XTerminateListener*>(this), UNO_QUERY));
+ "The office cannot be closed while the XMLFilterDialog is running",
+ static_cast<XTerminateListener*>(this));
}
else
mpDialog->Close();
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index d9cfd6332948..4a1da91b9213 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -216,7 +216,7 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
catch( const Exception& )
{
throw WrappedTargetException(
- OUString( "Could not clone the given interface hierarchy." ),
+ "Could not clone the given interface hierarchy.",
static_cast< XIndexContainer* >( const_cast< OInterfaceContainer* >( &_cloneSource ) ),
::cppu::getCaughtException()
);
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 842ab0564830..9185dab132c4 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -94,7 +94,7 @@ void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePicke
{
if ( rBHelper.bDisposed )
throw lang::DisposedException(
- OUString( "object is already disposed" ),
+ "object is already disposed",
static_cast< XFilePicker2* >( this ) );
if ( !rBHelper.bInDispose && !rBHelper.bDisposed )
@@ -110,7 +110,7 @@ void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePi
{
if ( rBHelper.bDisposed )
throw lang::DisposedException(
- OUString( "object is already disposed" ),
+ "object is already disposed",
static_cast< XFilePicker2* >( this ) );
rBHelper.aLC.removeInterface( getCppuType( &xListener ), xListener );
@@ -433,7 +433,7 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
OSL_FAIL("Could not start event notifier thread!");
throw uno::RuntimeException(
- OUString("Error executing dialog"),
+ "Error executing dialog",
static_cast<XFilePicker2*>(this));
}
@@ -601,7 +601,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
uno::Any aAny;
if ( 0 == aArguments.getLength( ) )
throw lang::IllegalArgumentException(
- OUString( "no arguments" ),
+ "no arguments",
static_cast<XFilePicker2*>(this), 1);
aAny = aArguments[0];
@@ -609,7 +609,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
if ( (aAny.getValueType() != ::cppu::UnoType<sal_Int16>::get()) &&
(aAny.getValueType() != ::cppu::UnoType<sal_Int8>::get()) )
throw lang::IllegalArgumentException(
- OUString("invalid argument type"),
+ "invalid argument type",
static_cast<XFilePicker2*>(this), 1);
sal_Int16 templateId = -1;
@@ -671,7 +671,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
default:
throw lang::IllegalArgumentException(
- OUString( "Unknown template" ),
+ "Unknown template",
static_cast< XFilePicker2* >( this ),
1 );
}
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index eac5b1ed3e9a..76d76d40b11d 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1939,7 +1939,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
if (rInfo.AppModule.isEmpty())
{
throw css::uno::RuntimeException(
- OUString("Cant find out the default filter and its extension, if no application module is known!"),
+ "Cant find out the default filter and its extension, if no application module is known!",
static_cast< css::frame::XDispatch* >(this));
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 2386f1807d17..a091e6d2e947 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -798,7 +798,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
if (!xWindow.is())
throw css::uno::RuntimeException(
- OUString("Frame::initialize() called without a valid container window reference."),
+ "Frame::initialize() called without a valid container window reference.",
static_cast< css::frame::XFrame* >(this));
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -806,7 +806,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
if ( m_xContainerWindow.is() )
throw css::uno::RuntimeException(
- OUString("Frame::initialized() is called more then once, which isnt useful nor allowed."),
+ "Frame::initialized() is called more then once, which isnt useful nor allowed.",
static_cast< css::frame::XFrame* >(this));
// Look for rejected calls first!
diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx
index 2fefbdb1cba9..9646de95ca84 100644
--- a/framework/source/services/tabwindowservice.cxx
+++ b/framework/source/services/tabwindowservice.cxx
@@ -499,8 +499,8 @@ void TabWindowService::impl_checkTabIndex (::sal_Int32 nID)
)
{
throw css::lang::IndexOutOfBoundsException(
- OUString("Tab index out of bounds."),
- css::uno::Reference< css::uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ));
+ "Tab index out of bounds.",
+ static_cast< ::cppu::OWeakObject* >(this) );
}
}
@@ -512,8 +512,8 @@ TTabPageInfoHash::iterator TabWindowService::impl_getTabPageInfo(::sal_Int32 nID
TTabPageInfoHash::iterator pIt = m_lTabPageInfos.find(nID);
if (pIt == m_lTabPageInfos.end ())
throw css::lang::IndexOutOfBoundsException(
- OUString("Tab index out of bounds."),
- css::uno::Reference< css::uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY ));
+ "Tab index out of bounds.",
+ static_cast< ::cppu::OWeakObject* >(this) );
return pIt;
}
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 936116f93c74..64376cb07846 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -211,7 +211,7 @@ namespace io_acceptor {
OUString message("acc_socket.cxx:SocketConnection::read: error - ");
message += m_socket.getErrorAsString();
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -227,7 +227,7 @@ namespace io_acceptor {
{
OUString message("acc_socket.cxx:SocketConnection::read: error - connection already closed");
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -249,7 +249,7 @@ namespace io_acceptor {
OUString message("acc_socket.cxx:SocketConnection::write: error - ");
message += m_socket.getErrorAsString();
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -263,7 +263,7 @@ namespace io_acceptor {
{
OUString message("acc_socket.cxx:SocketConnection::write: error - connection already closed");
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index d7ad019a3525..059d97270c87 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -135,7 +135,7 @@ namespace stoc_connector {
OUString message("ctr_socket.cxx:SocketConnection::read: error - ");
message += m_socket.getErrorAsString();
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -151,7 +151,7 @@ namespace stoc_connector {
{
OUString message("ctr_socket.cxx:SocketConnection::read: error - connection already closed");
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -173,7 +173,7 @@ namespace stoc_connector {
OUString message("ctr_socket.cxx:SocketConnection::write: error - ");
message += m_socket.getErrorAsString();
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
@@ -187,7 +187,7 @@ namespace stoc_connector {
{
OUString message("ctr_socket.cxx:SocketConnection::write: error - connection already closed");
- IOException ioException(message, Reference<XInterface>(static_cast<XConnection *>(this)));
+ IOException ioException(message, static_cast<XConnection *>(this));
Any any;
any <<= ioException;
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 5de31ab99ee7..eb4b75d160d6 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -2470,9 +2470,8 @@ void SAL_CALL OWriteStream::dispose()
m_pImpl->AddLog( "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException("Can not commit/revert the storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ throw lang::WrappedTargetRuntimeException("Can not commit/revert the storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -3328,7 +3327,7 @@ void SAL_CALL OWriteStream::commit()
uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException( "Problems on commit!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ),
+ static_cast< ::cppu::OWeakObject* >( this ),
aCaught );
}
@@ -3391,7 +3390,7 @@ void SAL_CALL OWriteStream::revert()
uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException( "Problems on revert!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ),
+ static_cast< ::cppu::OWeakObject* >( this ),
aCaught );
}
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 61cfbe642ec9..e4e9174f8fe5 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1967,7 +1967,7 @@ void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
// the source object is also a kind of locker for the current object
// since the listeners could dispose the object while being notified
- lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
+ lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_pData->m_aListenersContainer.disposeAndClear( aSource );
m_pImpl->m_nModifiedListenerCount = 0;
@@ -4005,7 +4005,7 @@ void SAL_CALL OStorage::commit()
uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException( THROW_WHERE "Problems on commit!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ),
+ static_cast< ::cppu::OWeakObject* >( this ),
aCaught );
}
@@ -4076,7 +4076,7 @@ void SAL_CALL OStorage::revert()
uno::Any aCaught( ::cppu::getCaughtException() );
throw embed::StorageWrappedTargetException( THROW_WHERE "Problems on revert!",
- uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ),
+ static_cast< ::cppu::OWeakObject* >( this ),
aCaught );
}
@@ -4249,13 +4249,12 @@ uno::Any SAL_CALL OStorage::getByName( const OUString& aName )
}
catch( const uno::Exception& rException )
{
- m_pImpl->AddLog( rException.Message );
- m_pImpl->AddLog( THROW_WHERE "Rethrow" );
+ m_pImpl->AddLog( rException.Message );
+ m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetException( THROW_WHERE "Can not open storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetException( THROW_WHERE "Can not open storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4285,13 +4284,12 @@ uno::Sequence< OUString > SAL_CALL OStorage::getElementNames()
}
catch ( const uno::Exception& rException )
{
- m_pImpl->AddLog( rException.Message );
- m_pImpl->AddLog( THROW_WHERE "Rethrow" );
+ m_pImpl->AddLog( rException.Message );
+ m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -4326,13 +4324,12 @@ sal_Bool SAL_CALL OStorage::hasByName( const OUString& aName )
}
catch ( const uno::Exception& rException )
{
- m_pImpl->AddLog( rException.Message );
- m_pImpl->AddLog( THROW_WHERE "Rethrow" );
+ m_pImpl->AddLog( rException.Message );
+ m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4377,13 +4374,12 @@ sal_Bool SAL_CALL OStorage::hasElements()
}
catch( const uno::Exception& rException )
{
- m_pImpl->AddLog( rException.Message );
- m_pImpl->AddLog( THROW_WHERE "Rethrow" );
+ m_pImpl->AddLog( rException.Message );
+ m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -4412,13 +4408,12 @@ void SAL_CALL OStorage::dispose()
}
catch( const uno::Exception& rException )
{
- m_pImpl->AddLog( rException.Message );
- m_pImpl->AddLog( THROW_WHERE "Rethrow" );
+ m_pImpl->AddLog( rException.Message );
+ m_pImpl->AddLog( THROW_WHERE "Rethrow" );
- uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ uno::Any aCaught( ::cppu::getCaughtException() );
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open storage!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -4497,9 +4492,8 @@ void SAL_CALL OStorage::removeEncryption()
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4572,8 +4566,8 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ),
+ throw lang::WrappedTargetRuntimeException( THROW_WHERE "Can not open package!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4642,9 +4636,8 @@ void SAL_CALL OStorage::setEncryptionAlgorithms( const uno::Sequence< beans::Nam
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ throw lang::WrappedTargetException( THROW_WHERE "Can not open package!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4703,9 +4696,8 @@ uno::Sequence< beans::NamedValue > SAL_CALL OStorage::getEncryptionAlgorithms()
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ throw lang::WrappedTargetException( THROW_WHERE "Can not open package!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4890,7 +4882,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetException(
"Can't read contents!",
- uno::Reference< XInterface >( static_cast< OWeakObject* >( this ), uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -4950,9 +4942,8 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const OUString& aPropertyName )
m_pImpl->AddLog( THROW_WHERE "Rethrow" );
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetException( THROW_WHERE "Can not open package!\n",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ throw lang::WrappedTargetException( THROW_WHERE "Can not open package!",
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index a50df63b74f8..c17cc86d22f8 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -166,8 +166,7 @@ Reference<rendering::XCanvas> SAL_CALL PresenterHelper::createSharedCanvas (
|| ! rxSharedWindow.is()
|| ! rxWindow.is())
{
- throw RuntimeException("illegal argument",
- Reference<XInterface>(static_cast<XWeak*>(this)));
+ throw RuntimeException("illegal argument", static_cast<XWeak*>(this));
}
if (rxWindow == rxSharedWindow)
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index a4c66f0ea729..2dd8de5db854 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -896,7 +896,7 @@ Reference<XAccessible> SAL_CALL
ThrowIfDisposed();
if (nIndex<0 || nIndex>=sal_Int32(maChildren.size()))
- throw lang::IndexOutOfBoundsException("invalid child index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
+ throw lang::IndexOutOfBoundsException("invalid child index", static_cast<uno::XWeak*>(this));
return Reference<XAccessible>(maChildren[nIndex].get());
}
@@ -1569,7 +1569,7 @@ sal_Unicode SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacter (sal
ThrowIfDisposed();
if (!mpParagraph)
- throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
+ throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this));
return mpParagraph->GetCharacter(nIndex);
}
@@ -1609,7 +1609,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo
awt::Rectangle aCharacterBox;
if (nIndex < 0)
{
- throw lang::IndexOutOfBoundsException("invalid text index", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
+ throw lang::IndexOutOfBoundsException("invalid text index", static_cast<uno::XWeak*>(this));
}
else if (mpParagraph)
{
@@ -1622,7 +1622,7 @@ awt::Rectangle SAL_CALL PresenterAccessible::AccessibleParagraph::getCharacterBo
}
else
{
- throw lang::IndexOutOfBoundsException("no text support in current mode", uno::Reference<uno::XInterface>(static_cast<uno::XWeak*>(this)));
+ throw lang::IndexOutOfBoundsException("no text support in current mode", static_cast<uno::XWeak*>(this));
}
return aCharacterBox;
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index 89c15ef44b66..520b160845b4 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -1195,7 +1195,7 @@ void PresenterWindowManager::ThrowIfDisposed (void) const
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
throw lang::DisposedException (
- OUString( "PresenterWindowManager has already been disposed"),
+ "PresenterWindowManager has already been disposed",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index d079799284c1..26e42a4835ea 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1359,7 +1359,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
return;
Reference< XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
- lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this));
+ lang::EventObject aSource ( static_cast< ::cppu::OWeakObject* >(this) );
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
if (pContainer!=NULL)
{
@@ -1382,7 +1382,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
if (bDeliverOwnership)
m_pData->m_bSuicide = true;
throw util::CloseVetoException(
- OUString("Cant close while saving."),
+ "Cant close while saving.",
static_cast< util::XCloseable* >(this));
}
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index d7986a34ecc8..f354bfc1bebb 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1018,8 +1018,7 @@ uno::Any SAL_CALL FSStorage::getByName( const OUString& aName )
{
uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetException( "Can not open element!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1067,10 +1066,9 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
OSL_FAIL( "The folder does not exist!\n" );
else
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
}
@@ -1080,10 +1078,9 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames()
}
catch ( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1113,10 +1110,9 @@ sal_Bool SAL_CALL FSStorage::hasByName( const OUString& aName )
}
catch ( uno::Exception& )
{
- uno::Any aCaught( ::cppu::getCaughtException() );
+ uno::Any aCaught( ::cppu::getCaughtException() );
throw lang::WrappedTargetRuntimeException( "Can not open storage!",
- uno::Reference< uno::XInterface >( static_cast< OWeakObject* >( this ),
- uno::UNO_QUERY ),
+ static_cast< OWeakObject* >( this ),
aCaught );
}
@@ -1178,7 +1174,7 @@ void SAL_CALL FSStorage::dispose()
if ( m_pImpl->m_pListenersContainer )
{
- lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
+ lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
m_pImpl->m_pListenersContainer->disposeAndClear( aSource );
}
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index c4319185e39b..157292a2855e 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -63,8 +63,8 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
{
if (aArguments.getLength() > 2)
throw css::lang::IllegalArgumentException(
- "DocumentDigitalSignatures::initialize requires zero, one, or two arguments",
- Reference<XInterface>(static_cast<XInitialization*>(this), UNO_QUERY), 0);
+ "DocumentDigitalSignatures::initialize requires zero, one, or two arguments",
+ static_cast<XInitialization*>(this), 0);
m_nArgumentsCount = aArguments.getLength();
@@ -73,13 +73,13 @@ void DocumentDigitalSignatures::initialize( const Sequence< Any >& aArguments)
if (!(aArguments[0] >>= m_sODFVersion))
throw css::lang::IllegalArgumentException(
"DocumentDigitalSignatures::initialize: the first arguments must be a string",
- Reference<XInterface>(static_cast<XInitialization*>(this), UNO_QUERY), 0);
+ static_cast<XInitialization*>(this), 0);
if (aArguments.getLength() == 2
&& !(aArguments[1] >>= m_bHasDocumentSignature))
throw css::lang::IllegalArgumentException(
"DocumentDigitalSignatures::initialize: the second arguments must be a bool",
- Reference<XInterface>(static_cast<XInitialization*>(this), UNO_QUERY), 1);
+ static_cast<XInitialization*>(this), 1);
//the Version is supported as of ODF1.2, so for and 1.1 document or older we will receive the
//an empty string. In this case we set it to ODFVER_010_TEXT. Then we can later check easily