summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-06-04 17:16:58 +0200
committerNoel Grandin <noel@peralex.com>2013-06-05 08:13:23 +0200
commit95c0d568fdcd0da939c891d861bb470b28079170 (patch)
treeca4e4108178ec1176fd1a976df6f31a08d590210
parenta1afcae81ca3c4b6bb240263b3259090d48c7715 (diff)
use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise. Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx3
-rw-r--r--UnoControls/source/base/basecontrol.cxx14
-rw-r--r--UnoControls/source/base/multiplexer.cxx2
-rw-r--r--UnoControls/source/controls/OConnectionPointContainerHelper.cxx2
-rw-r--r--UnoControls/source/controls/OConnectionPointHelper.cxx2
-rw-r--r--UnoControls/source/controls/statusindicator.cxx4
-rw-r--r--accessibility/source/extended/AccessibleBrowseBox.cxx2
-rw-r--r--accessibility/source/extended/AccessibleGridControl.cxx2
-rw-r--r--accessibility/source/extended/accessibleeditbrowseboxcell.cxx2
-rw-r--r--basic/source/classes/propacc.cxx2
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/FStatement.cxx4
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx2
-rw-r--r--connectivity/source/drivers/mozab/MStatement.cxx2
-rw-r--r--connectivity/source/drivers/odbcbase/OStatement.cxx4
-rw-r--r--cppuhelper/source/factory.cxx2
-rw-r--r--dbaccess/source/core/api/resultset.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.cxx2
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx1
-rw-r--r--dtrans/source/win32/dnd/source.cxx2
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx9
-rw-r--r--extensions/source/nsplugin/source/so_instance.cxx16
-rw-r--r--extensions/source/propctrlr/eformshelper.cxx2
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx2
-rw-r--r--fpicker/source/win32/filepicker/workbench/Test_fps.cxx1
-rw-r--r--fpicker/source/win32/folderpicker/workbench/Test_fops.cxx1
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx8
-rw-r--r--framework/source/uielement/menubarmanager.cxx2
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx8
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/framework/factories/BasicPaneFactory.cxx4
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx2
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx2
-rw-r--r--shell/source/win32/workbench/TestSmplMail.cxx1
-rw-r--r--shell/source/win32/workbench/TestSysShExec.cxx1
-rw-r--r--sot/source/sdstor/ucbstorage.cxx4
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx2
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx4
-rw-r--r--svtools/source/misc/transfer.cxx4
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx4
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
-rw-r--r--ucbhelper/source/client/content.cxx2
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx2
-rw-r--r--unoxml/source/dom/documentbuilder.cxx2
-rw-r--r--unoxml/source/dom/saxbuilder.cxx4
-rw-r--r--vcl/aqua/source/dtrans/aqua_clipboard.cxx4
53 files changed, 82 insertions, 89 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index 2ef9a9e6e1de..7c1a9687d52f 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -395,7 +395,6 @@ Reference< XControl > SAL_CALL BaseContainerControl::getControl ( const OUString
// Ready for multithreading
MutexGuard aGuard ( Mutex::getGlobalMutex() ) ;
- Reference< XControl > xRetControl = Reference< XControl > ();
size_t nControls = maControlInfoList.size();
// Search for right control
@@ -484,7 +483,7 @@ void SAL_CALL BaseContainerControl::removeTabController ( const Reference< XTabC
if ( m_xTabControllerList.getConstArray () [nCount] == rTabController )
{
// ... if is it found ... remove it from list.
- m_xTabControllerList.getArray()[ nCount ] = Reference< XTabController >() ;
+ m_xTabControllerList.getArray()[ nCount ].clear();
break ;
}
}
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index f1ffc8220ecd..37e5c893ba5a 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -279,13 +279,13 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException )
OComponentHelper::dispose();
// release context and peer
- m_xContext = Reference< XInterface >();
+ m_xContext.clear();
impl_releasePeer();
// release view
if ( m_xGraphicsView.is() == sal_True )
{
- m_xGraphicsView = Reference< XGraphics >();
+ m_xGraphicsView.clear();
}
}
@@ -751,12 +751,12 @@ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( Ru
{
removePaintListener( this );
removeWindowListener( this );
- m_xGraphicsPeer = Reference< XGraphics >();
+ m_xGraphicsPeer.clear();
}
if ( m_xGraphicsView.is() == sal_True )
{
- m_xGraphicsView = Reference< XGraphics >();
+ m_xGraphicsView.clear();
}
}
@@ -956,12 +956,12 @@ void BaseControl::impl_releasePeer()
{
removePaintListener( this );
removeWindowListener( this );
- m_xGraphicsPeer = Reference< XGraphics >();
+ m_xGraphicsPeer.clear();
}
m_xPeer->dispose();
- m_xPeerWindow = Reference< XWindow >();
- m_xPeer = Reference< XWindowPeer >();
+ m_xPeerWindow.clear();
+ m_xPeer.clear();
if ( m_pMultiplexer != NULL )
{
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index 346836094e00..775760638967 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -251,7 +251,7 @@ void SAL_CALL OMRCListenerMultiplexerHelper::disposing( const EventObject& /*aSo
{
MutexGuard aGuard( m_aMutex );
// peer is disposed, clear the reference
- m_xPeer = Reference< XWindow >();
+ m_xPeer.clear();
}
//____________________________________________________________________________________________________________
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index 7f24ddc5d84a..54f937064da3 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -115,7 +115,7 @@ Sequence< Type > SAL_CALL OConnectionPointContainerHelper::getConnectionPointTyp
Reference< XConnectionPoint > SAL_CALL OConnectionPointContainerHelper::queryConnectionPoint( const Type& aType ) throw( RuntimeException )
{
// Set default return value, if method failed.
- Reference< XConnectionPoint > xConnectionPoint = Reference< XConnectionPoint >();
+ Reference< XConnectionPoint > xConnectionPoint;
// Get all elements of the container, which have the searched type.
OInterfaceContainerHelper* pSpecialContainer = m_aMultiTypeContainer.getContainer( aType );
diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx
index eb9229627e53..24eb001014e3 100644
--- a/UnoControls/source/controls/OConnectionPointHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointHelper.cxx
@@ -247,7 +247,7 @@ void OConnectionPointHelper::impl_UnlockContainer()
{
// Free hard uno3-reference to container.
// see also "impl_LockContainer()"
- m_xLock = Reference< XInterface >();
+ m_xLock.clear();
}
} // namespace unocontrols
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index a3e9515eb551..2e8d8193f252 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -71,8 +71,8 @@ StatusIndicator::StatusIndicator( const Reference< XComponentContext >& rxContex
StatusIndicator::~StatusIndicator()
{
// Release all references
- m_xText = Reference< XFixedText >();
- m_xProgressBar = Reference< XProgressBar >();
+ m_xText.clear();
+ m_xProgressBar.clear();
}
//____________________________________________________________________________________________________________
diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx
index bd56b697ba7b..ad850610ebb6 100644
--- a/accessibility/source/extended/AccessibleBrowseBox.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBox.cxx
@@ -95,7 +95,7 @@ void SAL_CALL AccessibleBrowseBox::disposing()
m_pImpl->m_pTable = NULL;
m_pImpl->m_pColumnHeaderBar = NULL;
m_pImpl->m_pRowHeaderBar = NULL;
- m_pImpl->m_aCreator = Reference< XAccessible >();
+ m_pImpl->m_aCreator.clear();
Reference< XAccessible > xTable = m_pImpl->mxTable;
diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx
index ace45d2c8c3e..9c97e96a174c 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -93,7 +93,7 @@ void SAL_CALL AccessibleGridControl::disposing()
m_pImpl->m_pColumnHeaderBar = NULL;
m_pImpl->m_pRowHeaderBar = NULL;
m_pImpl->m_pCell = NULL;
- m_pImpl->m_aCreator = Reference< XAccessible >();
+ m_pImpl->m_aCreator.clear();
Reference< XAccessible > xTable = m_pImpl->m_xTable;
diff --git a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
index 146003bac2f5..bcaec362b102 100644
--- a/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
+++ b/accessibility/source/extended/accessibleeditbrowseboxcell.cxx
@@ -245,7 +245,7 @@ namespace accessibility
m_pBrowseBox = NULL;
m_xControlAccessible.clear();
- m_aContext = Reference< XAccessibleContext >( );
+ m_aContext.clear();
// NO dispose of the inner object there: it is the XAccessible of an window, and disposing
// it would delete the respective VCL window
}
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index c5ca85e870e6..9d627248ea1d 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -92,7 +92,7 @@ SbPropertyValues::SbPropertyValues()
SbPropertyValues::~SbPropertyValues()
{
- m_xInfo = Reference< XPropertySetInfo >();
+ m_xInfo.clear();
}
//----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index a55af080ba84..c02397ee92da 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -83,7 +83,7 @@ void OStatement_Base::disposeResultSet()
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
//------------------------------------------------------------------------------
@@ -187,7 +187,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
}
catch( const DisposedException& ) { }
- m_xResultSet = Reference< XResultSet >();
+ m_xResultSet.clear();
}
//--------------------------------------------------------------------
sal_Int32 OStatement_Base::getRowCount () throw( SQLException)
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 0252794604df..8a0be6123131 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -98,7 +98,7 @@ void OCommonStatement::disposeResultSet()
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
//------------------------------------------------------------------------------
void OCommonStatement::disposing()
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index d5e1b27a1263..04ab887906f2 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -110,7 +110,7 @@ void OStatement_Base::disposeResultSet()
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
//------------------------------------------------------------------------------
void OStatement_BASE2::disposing()
@@ -229,7 +229,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
}
catch( const DisposedException& ) { }
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index cdf53f4f6df8..e498128b8c35 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -308,7 +308,7 @@ void OCommonStatement::clearCachedResultSet()
Reference< XCloseable >( xResultSet, UNO_QUERY_THROW )->close();
- m_xResultSet = Reference< XResultSet >();
+ m_xResultSet.clear();
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx
index 431844fbe30a..423a14b46b9d 100644
--- a/connectivity/source/drivers/mozab/MStatement.cxx
+++ b/connectivity/source/drivers/mozab/MStatement.cxx
@@ -294,7 +294,7 @@ void OCommonStatement::clearCachedResultSet()
DBG_UNHANDLED_EXCEPTION();
}
- m_xResultSet = Reference< XResultSet >();
+ m_xResultSet.clear();
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx
index 2406aea6eaff..bd55cc168c90 100644
--- a/connectivity/source/drivers/odbcbase/OStatement.cxx
+++ b/connectivity/source/drivers/odbcbase/OStatement.cxx
@@ -94,7 +94,7 @@ void OStatement_Base::disposeResultSet()
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
// -----------------------------------------------------------------------------
void SAL_CALL OStatement_Base::disposing(void)
@@ -232,7 +232,7 @@ void OStatement_Base::clearMyResultSet () throw (SQLException)
}
catch( const DisposedException& ) { }
- m_xResultSet = Reference< XResultSet >();
+ m_xResultSet.clear();
}
//--------------------------------------------------------------------
SQLLEN OStatement_Base::getRowCount () throw( SQLException)
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 160a17ace576..f005337db8ce 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -463,7 +463,7 @@ void OFactoryComponentHelper::dispose()
// do not delete in the guard section
MutexGuard aGuard( aMutex );
x = xTheInstance;
- xTheInstance = Reference<XInterface >();
+ xTheInstance.clear();
}
// if it is a component call dispose at the component
Reference<XComponent > xComp( x, UNO_QUERY );
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index e9885fd72b77..6c6257de7760 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -170,7 +170,7 @@ void OResultSet::disposing()
m_xDelegatorRow = NULL;
m_xDelegatorRowUpdate = NULL;
- m_aStatement = Reference< XInterface >();
+ m_aStatement.clear();
}
// XCloseable
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index e269f19ec7c8..36c1458cb824 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -877,7 +877,7 @@ DocumentStorageAccess* ODatabaseModelImpl::getDocumentStorageAccess()
void ODatabaseModelImpl::modelIsDisposing( const bool _wasInitialized, ResetModelAccess )
{
- m_xModel = Reference< XModel >();
+ m_xModel.clear();
// Basic libraries and Dialog libraries are a model facet, though held at this impl class.
// They automatically dispose themself when the model they belong to is being disposed.
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 41ba7dd3c150..8ae22546ed5d 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1390,7 +1390,7 @@ void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxC
Reference< XChild > xChild( _rxContainer.get(),UNO_QUERY );
if ( xChild.is() )
xChild->setParent( NULL );
- _rxContainer = Reference< XNameAccess >();
+ _rxContainer.clear();
}
Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType )
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index d8e24d7b6f83..9a6d92e49d0b 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -170,8 +170,8 @@ void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
xFlushable->removeFlushListener( this );
}
- m_aListener = Reference< XFlushListener >();
- m_aBroadcaster = Reference< XFlushable >();
+ m_aListener.clear();
+ m_aBroadcaster.clear();
}
void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) throw (RuntimeException)
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index a8aee2ad40ce..b005e9cdcc4a 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -356,7 +356,7 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( (size_t)nIndex < m_pImpl->m_aResults.size() )
- m_pImpl->m_aResults[ nIndex ]->xRow = Reference< XRow >();
+ m_pImpl->m_aResults[ nIndex ]->xRow.clear();
}
void DataSupplier::close()
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx
index e7fe844e2c31..6f8017f54520 100644
--- a/dtrans/source/cnttype/wbench/testcnttype.cxx
+++ b/dtrans/source/cnttype/wbench/testcnttype.cxx
@@ -66,7 +66,6 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr )
// Dispose and clear factory
xComponent->dispose();
SrvMgr.clear();
- SrvMgr = Reference< XMultiServiceFactory >();
}
//----------------------------------------------------------------
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 882c72b84416..f4ce6b4aa50b 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -372,7 +372,7 @@ unsigned __stdcall DndOleSTAFunc(LPVOID pParams)
//--> TRA
// clear the global transferable again
- g_XTransferable = Reference< XTransferable >( );
+ g_XTransferable.clear();
//<-- TRA
OSL_ENSURE( hr != E_INVALIDARG, "IDataObject impl does not contain valid data");
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index b32a56fe3622..9dae8556c490 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -299,11 +299,11 @@ int SAL_CALL main( int nArgc, char* Argv[] )
// flush the clipboard content
Reference< XFlushableClipboard > rXFlushableClip( xClipboard, UNO_QUERY );
rXFlushableClip->flushClipboard( );
- rXFlushableClip = Reference< XFlushableClipboard >( );
+ rXFlushableClip.clear();
xClipNotifier->removeClipboardListener( rXClipListener );
- rXClipListener = Reference< XClipboardListener >( );
- xClipNotifier = Reference< XClipboardNotifier >( );
+ rXClipListener.clear();
+ xClipNotifier.clear();
//--------------------------------------------------
// shutdown the service manager
@@ -317,10 +317,9 @@ int SAL_CALL main( int nArgc, char* Argv[] )
// Dispose and clear factory
xComponent->dispose();
- xComponent = Reference< XComponent >( );
+ xComponent.clear();
g_xFactory.clear();
- g_xFactory = Reference< XMultiServiceFactory >();
CoUninitialize( );
diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx
index 7de17815ff0a..57e573802729 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -266,7 +266,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
}
//free the input stream, it is hold by the m_xComponent
- xInputStream = Reference<io::XInputStream>();
+ xInputStream.clear();
debug_fprintf(NSP_LOG_APPEND, "load document success\n");
@@ -352,7 +352,7 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int
if(!bRetval){
// try to reload document again
debug_fprintf(NSP_LOG_APPEND, "load document error, try to reload it once again\n");
- mxRemoteMSF = Reference< XMultiServiceFactory >();
+ mxRemoteMSF.clear();
m_bInit = sal_False;
bRetval = LoadDocument(hParent);
debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval);
@@ -416,12 +416,12 @@ sal_Bool SoPluginInstance::Destroy(void)
}
}
- m_xUnoWin = Reference< awt::XWindow >();
- m_xComponent = Reference< XComponent >();
- m_xFrame = Reference< frame::XFrame2 >();
- m_xFrames = Reference< frame::XFrames >();
- m_xDispatcher = Reference< frame::XDispatchHelper >();
- m_xDispatchProvider = Reference< frame::XDispatchProvider >();
+ m_xUnoWin.clear();
+ m_xComponent.clear();
+ m_xFrame.clear();
+ m_xFrames.clear();
+ m_xDispatcher.clear();
+ m_xDispatchProvider.clear();
return sal_True;
}
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx
index daae33437f13..45352357d809 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -652,7 +652,7 @@ namespace pcr
_rElementNames.resize( 0 );
if ( _bPrepentEmptyEntry )
- rMapUINameToElement[ OUString() ] = Reference< XPropertySet >();
+ rMapUINameToElement[ OUString() ].clear();
try
{
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index d4bcc99bf64b..961237b82c4d 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -97,7 +97,7 @@ namespace svt
// Don't free the memory here! It will be done by the next
// call automaticly - releasing of the uno reference ...
m_pOwnInteraction = NULL;
- m_xOwnInteraction = Reference< XInteractionHandler >();
+ m_xOwnInteraction.clear();
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< XInteractionHandler > xGlobalInteractionHandler(
diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
index 57608ccaf112..cfff74feff01 100644
--- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
+++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
@@ -347,7 +347,6 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
- g_xFactory = Reference< XMultiServiceFactory >();
printf("Test successful\n");
diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
index eb63dd4b0cea..e0497d25a688 100644
--- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
+++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
@@ -140,7 +140,6 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
- g_xFactory = Reference< XMultiServiceFactory >();
printf("Test successful\n");
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 6c70555c82a1..43a142af5acc 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -295,7 +295,7 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName )
if ( 0 == m_nElementDepth )
{
m_xReader->endDocument();
- m_xReader = Reference< XDocumentHandler >();
+ m_xReader.clear();
m_bMenuBarMode = sal_False;
if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR )))
{
@@ -443,7 +443,7 @@ void OReadMenuBarHandler::endElement( const OUString& aName )
if ( 0 == m_nElementDepth )
{
m_xReader->endDocument();
- m_xReader = Reference< XDocumentHandler >();
+ m_xReader.clear();
m_bMenuMode = sal_False;
if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU )))
{
@@ -529,7 +529,7 @@ void SAL_CALL OReadMenuHandler::endElement( const OUString& aName )
if ( 0 == m_nElementDepth )
{
m_xReader->endDocument();
- m_xReader = Reference< XDocumentHandler >();
+ m_xReader.clear();
m_bMenuPopupMode = sal_False;
if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP )))
{
@@ -733,7 +733,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName )
if ( 0 == m_nElementDepth )
{
m_xReader->endDocument();
- m_xReader = Reference< XDocumentHandler >();
+ m_xReader.clear();
m_bMenuMode = sal_False;
if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU )))
{
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 7393306510ec..4f31d403c12e 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -714,7 +714,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source ) throw ( Run
pMenuItemDisposing->xMenuItemDispatch->removeStatusListener(
static_cast< XStatusListener* >( this ), aTargetURL );
- pMenuItemDisposing->xMenuItemDispatch = Reference< XDispatch >();
+ pMenuItemDisposing->xMenuItemDispatch.clear();
if ( pMenuItemDisposing->xPopupMenu.is() )
{
Reference< com::sun::star::lang::XEventListener > xEventListener( pMenuItemDisposing->xPopupMenuController, UNO_QUERY );
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
index 2d24f8ba5e9c..040159c02611 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx
@@ -76,7 +76,7 @@ void OStatement_Base::disposeResultSet()
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
- m_xResultSet = Reference< XResultSet>();
+ m_xResultSet.clear();
}
//------------------------------------------------------------------------------
void OStatement_BASE2::disposing()
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index ea26cc318264..6da8a8219c3e 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -363,7 +363,7 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_DISPOSING:
- mxView = Reference<XDrawView>();
+ mxView.clear();
onSelectionChanged();
onChangeCurrentPage();
break;
@@ -1737,9 +1737,9 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
[]bHasAnimateForm means the UI has changed, bAnimateForm is it value
So if create a new textgroup animation, the following animation will never be run!
- Since the ¡°Animate attached shape¡± is default checked.
+ Since the \A1\B0Animate attached shape\A1\B1 is default checked.
And the bHasAnimateForm default is false, and if user uncheck it the value bAnimateForm will be false,
- it same as the TextGroup¡¯s default value, also could not be run setAnimateForm.
+ it same as the TextGroup\A1\AFs default value, also could not be run setAnimateForm.
if( bHasAnimateForm )
{
if( pTextGroup->getAnimateForm() != bAnimateForm )
@@ -1752,7 +1752,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
In setTextGrouping, there are three case:
1. Create new text effects for empty TextGroup
2. Remove all text effects of TextGroup (nTextGrouping == -1)
- 3. Change all the text effects¡¯ start type
+ 3. Change all the text effects\A1\AF start type
So here is the right logic:
If set the animation from text to shape and remove text animation,
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 20233f2c9038..f0b3d388c7bc 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -942,7 +942,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference<XDrawView>();
+ mxView.clear();
onSelectionChanged();
break;
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index c91265f3446f..d74a69715329 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -143,7 +143,7 @@ void SAL_CALL BasicPaneFactory::disposing (void)
{
xCC->removeResourceFactoryForReference(this);
xCC->removeConfigurationChangeListener(this);
- mxConfigurationControllerWeak = Reference<XConfigurationController>();
+ mxConfigurationControllerWeak.clear();
}
for (PaneContainer::const_iterator iDescriptor = mpPaneContainer->begin();
@@ -398,7 +398,7 @@ void SAL_CALL BasicPaneFactory::disposing (
{
if (mxConfigurationControllerWeak == rEventObject.Source)
{
- mxConfigurationControllerWeak = Reference<XConfigurationController>();
+ mxConfigurationControllerWeak.clear();
}
else
{
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 29b278c67b21..484b4677362d 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -609,7 +609,7 @@ IMPL_LINK(TableDesignPane,EventMultiplexerListener,
break;
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference<XDrawView>();
+ mxView.clear();
onSelectionChanged();
break;
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 284c452bc64f..e9550bcfbcf2 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -530,7 +530,7 @@ void SAL_CALL EventMultiplexer::Implementation::disposing (
if (xConfigurationController.is()
&& rEventObject.Source == xConfigurationController)
{
- mxConfigurationControllerWeak = Reference<XConfigurationController>();
+ mxConfigurationControllerWeak.clear();
}
}
diff --git a/shell/source/win32/workbench/TestSmplMail.cxx b/shell/source/win32/workbench/TestSmplMail.cxx
index 1b610bcc9851..f4d6bba45c0a 100644
--- a/shell/source/win32/workbench/TestSmplMail.cxx
+++ b/shell/source/win32/workbench/TestSmplMail.cxx
@@ -160,7 +160,6 @@ int SAL_CALL main(int , char*, char* )
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
- g_xFactory = Reference< XMultiServiceFactory >();
printf("Test successful\n");
diff --git a/shell/source/win32/workbench/TestSysShExec.cxx b/shell/source/win32/workbench/TestSysShExec.cxx
index 5bdb6bf19315..9a2d84cd0717 100644
--- a/shell/source/win32/workbench/TestSysShExec.cxx
+++ b/shell/source/win32/workbench/TestSysShExec.cxx
@@ -132,7 +132,6 @@ int SAL_CALL main(int nArgc, char* Argv[], char* )
// Dispose and clear factory
xComponent->dispose();
g_xFactory.clear();
- g_xFactory = Reference< XMultiServiceFactory >();
printf("Test successful\n");
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index cdaf433187db..ed0a7f5026d5 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -693,7 +693,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
UCBStorageStream_Impl::~UCBStorageStream_Impl()
{
if( m_rSource.is() )
- m_rSource = Reference< XInputStream >();
+ m_rSource.clear();
if( m_pStream )
delete m_pStream;
@@ -1222,7 +1222,7 @@ void UCBStorageStream_Impl::Free()
#endif
m_nRepresentMode = nonset;
- m_rSource = Reference< XInputStream >();
+ m_rSource.clear();
DELETEZ( m_pStream );
}
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index 0f39a0553219..f66a879af59e 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -1245,7 +1245,7 @@ void SAL_CALL NestedRegistryImpl::initialize( const Sequence< Any >& aArguments
aArguments[0] >>= m_localReg;
aArguments[1] >>= m_defaultReg;
if ( m_localReg == m_defaultReg )
- m_defaultReg = Reference< XSimpleRegistry >();
+ m_defaultReg.clear();
}
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 5caa90e95645..b1500665e34f 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -1465,8 +1465,8 @@ void ORegistryServiceManager::dispose()
// dispose
MutexGuard aGuard( m_mutex );
// erase all members
- m_xRegistry = Reference<XSimpleRegistry >();
- m_xRootKey = Reference<XRegistryKey >();
+ m_xRegistry.clear();
+ m_xRootKey.clear();
}
/**
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 88086ef26fad..d7a107200a46 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -518,7 +518,7 @@ void SAL_CALL TransferableHelper::lostOwnership( const Reference< XClipboard >&,
Reference< XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() );
xDesktop->removeTerminateListener( mxTerminateListener );
- mxTerminateListener = Reference< XTerminateListener >();
+ mxTerminateListener.clear();
}
ObjectReleased();
@@ -1535,7 +1535,7 @@ Reference< XTransferable > TransferableDataHelper::GetXTransferable() const
}
catch( const ::com::sun::star::uno::Exception& )
{
- xRet = Reference< XTransferable >();
+ xRet.clear();
}
}
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index bbb2797788d1..6c9fa05354e8 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -691,7 +691,7 @@ void SAL_CALL SvxRectCtlAccessibleContext::disposing()
mnClientId = 0;
}
- mxParent = Reference< XAccessible >();
+ mxParent.clear();
}
}
}
@@ -1098,7 +1098,7 @@ void SAL_CALL SvxRectCtlChildAccessibleContext::disposing()
mnClientId = 0;
}
- mxParent = Reference< XAccessible >();
+ mxParent.clear();
delete mpBoundingBox;
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 776fa59094bf..9a0ee3ed3da0 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -2447,7 +2447,7 @@ Reference< XControl > FormController::findControl(Sequence< Reference< XControl
if ( _bRemove )
::comphelper::removeElementAt( _rControls, i );
else if ( _bOverWrite )
- *pControls = Reference< XControl >();
+ pControls->clear();
return xControl;
}
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e58ddaef6e8f..cfeb01e4735a 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1835,7 +1835,7 @@ SvxStyleToolBoxControl::SvxStyleToolBoxControl(
for ( sal_uInt16 i=0; i<MAX_FAMILIES; i++ )
{
pBoundItems[i] = 0;
- m_xBoundItems[i] = Reference< XComponent >();
+ m_xBoundItems[i].clear();
pFamilyState[i] = NULL;
}
}
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 438427da897e..3eaf770d4581 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -269,7 +269,7 @@ void SAL_CALL SvXMLGraphicOutputStream::closeOutput()
throw NotConnectedException() ;
mxStmWrapper->closeOutput();
- mxStmWrapper = Reference< XOutputStream >();
+ mxStmWrapper.clear();
mbClosed = sal_True;
}
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index b5f710e0cc14..629f30c98797 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -583,7 +583,7 @@ Any Content::createCursorAny( const Sequence< OUString >& rPropertyNames,
: ( eMode == INCLUDE_DOCUMENTS_ONLY )
? OpenMode::DOCUMENTS : OpenMode::ALL;
aArg.Priority = 0; // unused
- aArg.Sink = Reference< XInterface >(); // unused
+ aArg.Sink.clear(); // unused
aArg.Properties = aProps;
Command aCommand;
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index a5ff6fcad3f0..d60f249584d6 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1297,7 +1297,7 @@ sal_Bool UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream )
}
else
{
- m_xOutputStream = Reference < XOutputStream >();
+ m_xOutputStream.clear();
setInputStream_Impl( Reference < XInputStream >() );
}
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 8d434e74bf19..e3a7bac1d544 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -74,7 +74,7 @@ namespace DOM
is.aInputStream = aContent.openStream();
} catch (const com::sun::star::uno::Exception&) {
OSL_FAIL("exception in default entity resolver");
- is.aInputStream = Reference< XInputStream >();
+ is.aInputStream.clear();
}
return is;
}
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index 4568e745e008..8d2ad2b4f797 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -95,8 +95,8 @@ namespace DOM
{
::osl::MutexGuard g(m_Mutex);
- m_aDocument = Reference< XDocument >();
- m_aFragment = Reference< XDocumentFragment >();
+ m_aDocument.clear();
+ m_aFragment.clear();
while (!m_aNodeStack.empty()) m_aNodeStack.pop();
while (!m_aNSStack.empty()) m_aNSStack.pop();
m_aState = SAXDocumentBuilderState_READY;
diff --git a/vcl/aqua/source/dtrans/aqua_clipboard.cxx b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
index 383c7488aa2f..ce1462612edb 100644
--- a/vcl/aqua/source/dtrans/aqua_clipboard.cxx
+++ b/vcl/aqua/source/dtrans/aqua_clipboard.cxx
@@ -247,10 +247,10 @@ void AquaClipboard::applicationDidBecomeActive(NSNotification*)
// notification to the old clipboard owner as well as
// ClipboardChanged notification to any clipboard listener
Reference<XClipboardOwner> oldOwner(mXClipboardOwner);
- mXClipboardOwner = Reference<XClipboardOwner>();
+ mXClipboardOwner.clear();
Reference<XTransferable> oldContent(mXClipboardContent);
- mXClipboardContent = Reference<XTransferable>();
+ mXClipboardContent.clear();
aGuard.clear();