[Libreoffice-commits] core.git: 9 commits - accessibility/source basic/source connectivity/source cppuhelper/source cui/source dbaccess/source desktop/source dtrans/source editeng/source extensions/Library_pcr.mk extensions/source filter/source forms/source fpicker/source framework/inc framework/source i18npool/source include/svtools include/svx include/toolkit include/ucbhelper odk/examples package/source reportdesign/source sc/source sd/source sfx2/source shell/source sot/source starmath/source stoc/source svl/source svtools/source svx/source sw/source toolkit/source ucbhelper/source ucb/source UnoControls/source unotools/source unoxml/source uui/source vcl/aqua vcl/source xmloff/source xmlscript/source xmlsecurity/source
Noel Grandin
noel at peralex.com
Wed Jun 5 00:45:36 PDT 2013
UnoControls/source/base/basecontainercontrol.cxx | 3
UnoControls/source/base/basecontrol.cxx | 14
UnoControls/source/base/multiplexer.cxx | 2
UnoControls/source/controls/OConnectionPointContainerHelper.cxx | 2
UnoControls/source/controls/OConnectionPointHelper.cxx | 2
UnoControls/source/controls/statusindicator.cxx | 4
accessibility/source/extended/AccessibleBrowseBox.cxx | 2
accessibility/source/extended/AccessibleGridControl.cxx | 2
accessibility/source/extended/accessibleeditbrowseboxcell.cxx | 2
basic/source/classes/propacc.cxx | 2
basic/source/uno/dlgcont.cxx | 1
basic/source/uno/scriptcont.cxx | 1
connectivity/source/drivers/ado/AStatement.cxx | 4
connectivity/source/drivers/evoab2/NResultSet.cxx | 1
connectivity/source/drivers/evoab2/NStatement.cxx | 2
connectivity/source/drivers/file/FStatement.cxx | 4
connectivity/source/drivers/mork/MStatement.cxx | 2
connectivity/source/drivers/mozab/MStatement.cxx | 2
connectivity/source/drivers/odbcbase/OStatement.cxx | 4
cppuhelper/source/factory.cxx | 2
cui/source/options/dbregisterednamesconfig.cxx | 1
cui/source/options/optlingu.cxx | 1
cui/source/options/optupdt.cxx | 1
cui/source/tabpages/numpages.cxx | 1
dbaccess/source/core/api/resultset.cxx | 2
dbaccess/source/core/dataaccess/ModelImpl.cxx | 2
dbaccess/source/core/dataaccess/databasedocument.cxx | 2
dbaccess/source/core/dataaccess/datasource.cxx | 4
dbaccess/source/core/dataaccess/myucp_datasupplier.cxx | 2
dbaccess/source/ext/macromigration/macromigrationpages.cxx | 1
dbaccess/source/ui/dlg/UserAdminDlg.cxx | 1
dbaccess/source/ui/misc/TokenWriter.cxx | 1
desktop/source/offacc/acceptor.cxx | 28 -
desktop/source/offacc/acceptor.hxx | 7
dtrans/source/cnttype/wbench/testcnttype.cxx | 1
dtrans/source/win32/dnd/source.cxx | 2
dtrans/source/win32/workbench/test_wincb.cxx | 9
editeng/source/misc/svxacorr.cxx | 1
extensions/Library_pcr.mk | 1
extensions/source/logging/loghandler.cxx | 1
extensions/source/nsplugin/source/so_instance.cxx | 16 -
extensions/source/propctrlr/browserline.cxx | 1
extensions/source/propctrlr/browserview.cxx | 5
extensions/source/propctrlr/browserview.hxx | 6
extensions/source/propctrlr/buttonnavigationhandler.cxx | 8
extensions/source/propctrlr/eformshelper.cxx | 2
extensions/source/propctrlr/eformspropertyhandler.cxx | 2
extensions/source/propctrlr/eventhandler.cxx | 20 -
extensions/source/propctrlr/eventhandler.hxx | 4
extensions/source/propctrlr/formcomponenthandler.cxx | 32 +-
extensions/source/propctrlr/formgeometryhandler.cxx | 4
extensions/source/propctrlr/genericpropertyhandler.cxx | 24 -
extensions/source/propctrlr/genericpropertyhandler.hxx | 3
extensions/source/propctrlr/handlerhelper.cxx | 31 +
extensions/source/propctrlr/handlerhelper.hxx | 10
extensions/source/propctrlr/pcrcomponentcontext.cxx | 93 -----
extensions/source/propctrlr/pcrcomponentcontext.hxx | 159 ----------
extensions/source/propctrlr/propcontroller.cxx | 22 -
extensions/source/propctrlr/propcontroller.hxx | 3
extensions/source/propctrlr/propertyhandler.cxx | 10
extensions/source/propctrlr/propertyhandler.hxx | 5
filter/source/odfflatxml/OdfFlatXml.cxx | 12
filter/source/pdf/pdfexport.cxx | 19 -
filter/source/pdf/pdfexport.hxx | 4
filter/source/pdf/pdffilter.cxx | 8
filter/source/pdf/pdffilter.hxx | 4
filter/source/svg/svgimport.cxx | 2
filter/source/svg/svgreader.cxx | 6
filter/source/svg/svgreader.hxx | 4
filter/source/svg/test/svg2odf.cxx | 2
filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 18 -
filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx | 21 -
filter/source/xsltdialog/typedetectionimport.cxx | 11
filter/source/xsltdialog/typedetectionimport.hxx | 6
filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 14
filter/source/xsltdialog/xmlfilterjar.cxx | 23 -
filter/source/xsltdialog/xmlfilterjar.hxx | 4
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 22 -
filter/source/xsltdialog/xmlfiltersettingsdialog.hxx | 4
filter/source/xsltdialog/xmlfiltertabdialog.cxx | 10
filter/source/xsltdialog/xmlfiltertabdialog.hxx | 4
filter/source/xsltdialog/xmlfiltertabpagexslt.cxx | 4
filter/source/xsltdialog/xmlfiltertabpagexslt.hxx | 2
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 28 -
filter/source/xsltdialog/xmlfiltertestdialog.hxx | 4
filter/source/xsltfilter/XSLTFilter.cxx | 31 -
forms/source/component/Filter.hxx | 1
forms/source/component/cachedrowset.hxx | 1
fpicker/source/office/fpsmartcontent.cxx | 2
fpicker/source/win32/filepicker/workbench/Test_fps.cxx | 1
fpicker/source/win32/folderpicker/workbench/Test_fops.cxx | 1
framework/inc/helper/tagwindowasmodified.hxx | 5
framework/inc/services/desktop.hxx | 8
framework/inc/services/dispatchhelper.hxx | 6
framework/inc/services/modulemanager.hxx | 5
framework/inc/services/pathsettings.hxx | 4
framework/inc/services/sessionlistener.hxx | 4
framework/inc/services/substitutepathvars.hxx | 4
framework/inc/services/taskcreatorsrv.hxx | 4
framework/inc/tabwin/tabwindow.hxx | 4
framework/inc/tabwin/tabwinfactory.hxx | 4
framework/inc/uiconfiguration/moduleuicfgsupplier.hxx | 4
framework/inc/uielement/controlmenucontroller.hxx | 2
framework/inc/uielement/fontmenucontroller.hxx | 2
framework/inc/uielement/fontsizemenucontroller.hxx | 2
framework/inc/uielement/footermenucontroller.hxx | 2
framework/inc/uielement/headermenucontroller.hxx | 2
framework/inc/uielement/langselectionmenucontroller.hxx | 2
framework/inc/uielement/macrosmenucontroller.hxx | 4
framework/inc/uielement/newmenucontroller.hxx | 3
framework/inc/uielement/objectmenucontroller.hxx | 3
framework/inc/uielement/recentfilesmenucontroller.hxx | 2
framework/inc/uielement/toolbarsmenucontroller.hxx | 3
framework/inc/uifactory/menubarfactory.hxx | 6
framework/inc/uifactory/statusbarfactory.hxx | 2
framework/inc/uifactory/toolboxfactory.hxx | 2
framework/inc/uifactory/uicontrollerfactory.hxx | 10
framework/source/accelerators/acceleratorconfiguration.cxx | 1
framework/source/dispatch/popupmenudispatcher.cxx | 1
framework/source/fwe/xml/menudocumenthandler.cxx | 8
framework/source/helper/tagwindowasmodified.cxx | 3
framework/source/services/desktop.cxx | 28 -
framework/source/services/dispatchhelper.cxx | 8
framework/source/services/modulemanager.cxx | 14
framework/source/services/pathsettings.cxx | 17 -
framework/source/services/sessionlistener.cxx | 22 -
framework/source/services/substitutepathvars.cxx | 10
framework/source/services/taskcreatorsrv.cxx | 36 --
framework/source/tabwin/tabwindow.cxx | 10
framework/source/tabwin/tabwinfactory.cxx | 18 -
framework/source/uiconfiguration/imagemanagerimpl.cxx | 1
framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 10
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 1
framework/source/uiconfiguration/uiconfigurationmanager.cxx | 1
framework/source/uielement/controlmenucontroller.cxx | 7
framework/source/uielement/fontmenucontroller.cxx | 7
framework/source/uielement/fontsizemenucontroller.cxx | 6
framework/source/uielement/footermenucontroller.cxx | 6
framework/source/uielement/headermenucontroller.cxx | 7
framework/source/uielement/langselectionmenucontroller.cxx | 9
framework/source/uielement/macrosmenucontroller.cxx | 14
framework/source/uielement/menubarmanager.cxx | 2
framework/source/uielement/newmenucontroller.cxx | 23 -
framework/source/uielement/objectmenucontroller.cxx | 7
framework/source/uielement/recentfilesmenucontroller.cxx | 7
framework/source/uielement/toolbarsmenucontroller.cxx | 25 -
framework/source/uifactory/menubarfactory.cxx | 18 -
framework/source/uifactory/statusbarfactory.cxx | 10
framework/source/uifactory/toolboxfactory.cxx | 10
framework/source/uifactory/uicontrollerfactory.cxx | 31 -
i18npool/source/numberformatcode/numberformatcode.cxx | 1
i18npool/source/transliteration/transliterationImpl.cxx | 1
include/svtools/popupmenucontrollerbase.hxx | 4
include/svx/fmgridif.hxx | 1
include/toolkit/controls/unocontrol.hxx | 1
include/toolkit/controls/unocontrolmodel.hxx | 2
include/ucbhelper/registerucb.hxx | 5
odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx | 2
package/source/xstor/owriteablestream.cxx | 1
package/source/xstor/xstorage.cxx | 1
reportdesign/source/core/sdr/UndoEnv.cxx | 4
reportdesign/source/filter/xml/xmlImage.cxx | 1
sc/source/filter/xml/xmlwrap.cxx | 1
sc/source/ui/unoobj/servuno.cxx | 1
sd/source/filter/xml/sdxmlwrp.cxx | 1
sd/source/ui/animations/CustomAnimationPane.cxx | 8
sd/source/ui/annotations/annotationmanager.cxx | 2
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 1
sd/source/ui/dlg/TemplateScanner.cxx | 1
sd/source/ui/framework/factories/BasicPaneFactory.cxx | 4
sd/source/ui/table/TableDesignPane.cxx | 2
sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 1
sd/source/ui/tools/EventMultiplexer.cxx | 2
sfx2/source/dialog/taskpane.cxx | 1
sfx2/source/doc/docfile.cxx | 1
sfx2/source/doc/docmacromode.cxx | 1
sfx2/source/doc/doctemplates.cxx | 1
sfx2/source/doc/objmisc.cxx | 1
sfx2/source/doc/sfxbasemodel.cxx | 1
sfx2/source/sidebar/ContextChangeBroadcaster.cxx | 1
sfx2/source/sidebar/ResourceManager.cxx | 1
sfx2/source/sidebar/SidebarController.cxx | 1
sfx2/source/sidebar/TabBar.cxx | 1
sfx2/source/sidebar/Tools.cxx | 1
sfx2/source/view/frame2.cxx | 1
sfx2/source/view/viewfrm.cxx | 1
sfx2/source/view/viewfrm2.cxx | 1
shell/source/win32/workbench/TestSmplMail.cxx | 1
shell/source/win32/workbench/TestSysShExec.cxx | 1
sot/source/sdstor/ucbstorage.cxx | 4
starmath/source/mathmlexport.cxx | 1
starmath/source/mathmlimport.cxx | 1
stoc/source/defaultregistry/defaultregistry.cxx | 2
stoc/source/servicemanager/servicemanager.cxx | 4
svl/source/fsstor/fsfactory.cxx | 6
svl/source/fsstor/fsstorage.cxx | 28 -
svl/source/fsstor/fsstorage.hxx | 2
svl/source/inc/fsfactory.hxx | 9
svl/source/numbers/supservs.cxx | 6
svl/source/numbers/supservs.hxx | 4
svl/source/passwordcontainer/passwordcontainer.cxx | 4
svtools/source/misc/transfer.cxx | 4
svtools/source/table/gridtablerenderer.cxx | 1
svtools/source/uno/popupmenucontrollerbase.cxx | 10
svtools/source/uno/unowizard.hxx | 2
svtools/source/uno/wizard/unowizard.cxx | 1
svx/source/accessibility/svxrectctaccessiblecontext.cxx | 4
svx/source/form/filtnav.cxx | 1
svx/source/form/fmscriptingenv.cxx | 1
svx/source/form/fmtextcontrolshell.cxx | 1
svx/source/form/formcontroller.cxx | 35 +-
svx/source/inc/fmvwimp.hxx | 2
svx/source/inc/formcontroller.hxx | 7
svx/source/sidebar/ContextChangeEventMultiplexer.cxx | 1
svx/source/tbxctrls/tbcontrl.cxx | 2
svx/source/xml/xmlgrhlp.cxx | 2
sw/source/core/swg/SwXMLTextBlocks1.cxx | 1
sw/source/filter/basflt/fltini.cxx | 1
sw/source/filter/xml/swxml.cxx | 1
sw/source/filter/xml/wrtxml.cxx | 1
sw/source/ui/app/docsh2.cxx | 1
sw/source/ui/dbui/dbmgr.cxx | 1
sw/source/ui/vba/vbatables.cxx | 1
toolkit/source/awt/animatedimagespeer.cxx | 1
toolkit/source/awt/vclxwindows.cxx | 1
toolkit/source/controls/controlmodelcontainerbase.cxx | 1
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 8
toolkit/source/controls/grid/defaultgridcolumnmodel.hxx | 4
toolkit/source/controls/grid/gridcontrol.cxx | 10
toolkit/source/controls/grid/sortablegriddatamodel.hxx | 1
toolkit/source/controls/unocontrols.cxx | 1
toolkit/source/helper/tkresmgr.cxx | 1
ucb/source/cacher/cacheddynamicresultset.cxx | 12
ucb/source/cacher/cacheddynamicresultset.hxx | 6
ucb/source/core/identify.cxx | 4
ucb/source/core/identify.hxx | 4
ucb/source/core/ucb.cxx | 24 -
ucb/source/core/ucb.hxx | 4
ucb/source/core/ucbcmds.cxx | 26 -
ucb/source/core/ucbstore.cxx | 34 +-
ucb/source/core/ucbstore.hxx | 12
ucb/source/ucp/ext/ucpext_content.cxx | 1
ucb/source/ucp/ext/ucpext_datasupplier.cxx | 1
ucb/source/ucp/ext/ucpext_provider.cxx | 1
ucbhelper/source/client/content.cxx | 2
ucbhelper/source/provider/registerucb.cxx | 14
unotools/source/config/confignode.cxx | 1
unotools/source/config/pathoptions.cxx | 1
unotools/source/ucbhelper/ucblockbytes.cxx | 2
unoxml/source/dom/documentbuilder.cxx | 2
unoxml/source/dom/saxbuilder.cxx | 4
uui/source/newerverwarn.cxx | 1
vcl/aqua/source/dtrans/aqua_clipboard.cxx | 4
vcl/source/control/throbber.cxx | 1
xmloff/source/meta/xmlversion.cxx | 1
xmloff/source/xforms/xformsexport.cxx | 1
xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 1
xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 1
xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 2
xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 7
xmlsecurity/source/component/documentdigitalsignatures.cxx | 1
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 1
262 files changed, 677 insertions(+), 1080 deletions(-)
New commits:
commit 95c0d568fdcd0da939c891d861bb470b28079170
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 4 17:16:58 2013 +0200
use uno::Reference#clear() method...
...instead of assigning an empty value. Reduces code noise.
Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index 2ef9a9e..7c1a968 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 f1ffc82..37e5c89 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 3468360..7757606 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 7f24ddc..54f9370 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 eb92296..24eb001 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 a3e9515..2e8d819 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 bd56b69..ad85061 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 ace45d2..9c97e96 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 146003b..bcaec36 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 c5ca85e..9d62724 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 a55af08..c02397e 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 0252794..8a0be61 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 d5e1b27..04ab8879 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 cdf53f4..e498128 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 431844f..423a14b 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 2406aea..bd55cc1 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 160a17a..f005337 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 e9885fd..6c6257d 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 e269f19..36c1458 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 41ba7dd..8ae2254 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 d8e24d7..9a6d92e 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 a8aee2a..b005e9c 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 e7fe844..6f8017f 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 882c72b..f4ce6b4 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 b32a56f..9dae855 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 7de1781..57e5738 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 daae334..4535235 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 d4bcc99..961237b 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 57608cc..cfff74f 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 eb63dd4..e0497d2 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 6c70555..43a142a 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 7393306..4f31d40 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 2d24f8b..040159c 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 ea26cc3..6da8a82 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 20233f2..f0b3d38 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 c91265f..d74a697 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 29b278c..484b467 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 284c452..e9550bc 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 1b610bc..f4d6bba 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 5bdb6bf..9a2d84c 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 cdaf433..ed0a7f5 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 0f39a05..f66a879 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 5caa90e..b150066 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 88086ef..d7a1072 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 bbb2797..6c9fa05 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 776fa59..9a0ee3e 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 e58ddae..cfeb01e 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 438427d..3eaf770 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 b5f710e..629f30c 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 a5ff6fc..d60f249 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 8d434e7..e3a7bac 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 4568e74..8d2ad2b 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 383c748..ce14626 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();
commit a1afcae81ca3c4b6bb240263b3259090d48c7715
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 4 16:35:09 2013 +0200
fdo#46808, Convert XMultiServiceFactory in ucb module
Change-Id: I4e1cfe22ba6043521dd1237f90ade66f80b29253
diff --git a/include/ucbhelper/registerucb.hxx b/include/ucbhelper/registerucb.hxx
index 1c58fc1..183dabd 100644
--- a/include/ucbhelper/registerucb.hxx
+++ b/include/ucbhelper/registerucb.hxx
@@ -30,6 +30,7 @@
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
+ namespace uno { class XComponentContext; }
} } }
@@ -108,8 +109,8 @@ UCBHELPER_DLLPUBLIC bool registerAtUcb(
com::sun::star::ucb::XContentProviderManager > const &
rManager,
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > const &
- rServiceFactory,
+ com::sun::star::uno::XComponentContext > const &
+ rxContext,
OUString const & rName,
OUString const & rArguments,
OUString const & rTemplate,
diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx
index 8b9f1a9..ab6d880 100644
--- a/ucb/source/cacher/cacheddynamicresultset.cxx
+++ b/ucb/source/cacher/cacheddynamicresultset.cxx
@@ -33,8 +33,8 @@ using namespace com::sun::star::uno;
CachedDynamicResultSet::CachedDynamicResultSet(
Reference< XDynamicResultSet > xOrigin
, const Reference< XContentIdentifierMapping > & xContentMapping
- , const Reference< XMultiServiceFactory > & xSMgr )
- : DynamicResultSetWrapper( xOrigin, comphelper::getComponentContext(xSMgr) )
+ , const Reference< XComponentContext > & xContext )
+ : DynamicResultSetWrapper( xOrigin, xContext )
, m_xContentIdentifierMapping( xContentMapping )
{
impl_init();
@@ -133,9 +133,9 @@ void SAL_CALL CachedDynamicResultSet
//--------------------------------------------------------------------------
CachedDynamicResultSetFactory::CachedDynamicResultSetFactory(
- const Reference< XMultiServiceFactory > & rSMgr )
+ const Reference< XComponentContext > & xContext )
{
- m_xSMgr = rSMgr;
+ m_xContext = xContext;
}
CachedDynamicResultSetFactory::~CachedDynamicResultSetFactory()
@@ -164,7 +164,7 @@ XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetFactory,
// CachedDynamicResultSetFactory XServiceInfo methods.
//--------------------------------------------------------------------------
-XSERVICEINFO_IMPL_1( CachedDynamicResultSetFactory,
+XSERVICEINFO_IMPL_1_CTX( CachedDynamicResultSetFactory,
OUString( "com.sun.star.comp.ucb.CachedDynamicResultSetFactory" ),
OUString( CACHED_DRS_FACTORY_NAME ) );
@@ -186,7 +186,7 @@ Reference< XDynamicResultSet > SAL_CALL CachedDynamicResultSetFactory
throw( RuntimeException )
{
Reference< XDynamicResultSet > xRet;
- xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xSMgr );
+ xRet = new CachedDynamicResultSet( SourceStub, ContentIdentifierMapping, m_xContext );
return xRet;
}
diff --git a/ucb/source/cacher/cacheddynamicresultset.hxx b/ucb/source/cacher/cacheddynamicresultset.hxx
index 18dd49a..6b7c84f 100644
--- a/ucb/source/cacher/cacheddynamicresultset.hxx
+++ b/ucb/source/cacher/cacheddynamicresultset.hxx
@@ -51,7 +51,7 @@ public:
, const com::sun::star::uno::Reference<
com::sun::star::ucb::XContentIdentifierMapping > & xContentMapping
, const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & xSMgr );
+ com::sun::star::uno::XComponentContext > & xContext );
virtual ~CachedDynamicResultSet();
@@ -87,13 +87,13 @@ class CachedDynamicResultSetFactory
{
protected:
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
public:
CachedDynamicResultSetFactory(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > & rSMgr);
+ com::sun::star::uno::XComponentContext > & xContext);
virtual ~CachedDynamicResultSetFactory();
diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx
index 209aeed..53d0dff 100644
--- a/ucb/source/core/identify.cxx
+++ b/ucb/source/core/identify.cxx
@@ -38,10 +38,8 @@ using namespace com::sun::star::ucb;
//=========================================================================
ContentIdentifier::ContentIdentifier(
- const Reference< XMultiServiceFactory >& rxSMgr,
const OUString& ContentId )
-: m_xSMgr( rxSMgr ),
- m_aContentId( ContentId )
+: m_aContentId( ContentId )
{
}
diff --git a/ucb/source/core/identify.hxx b/ucb/source/core/identify.hxx
index 8c504f7..7532578 100644
--- a/ucb/source/core/identify.hxx
+++ b/ucb/source/core/identify.hxx
@@ -35,8 +35,7 @@ class ContentIdentifier :
public com::sun::star::ucb::XContentIdentifier
{
public:
- ContentIdentifier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
- const OUString& ContentId );
+ ContentIdentifier( const OUString& ContentId );
virtual ~ContentIdentifier();
// XInterface
@@ -52,7 +51,6 @@ public:
throw( com::sun::star::uno::RuntimeException );
private:
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
OUString m_aContentId;
OUString m_aProviderScheme;
};
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 493ff51..3d45c7f 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -231,13 +231,13 @@ bool createContentProviderData(
//=========================================================================
UniversalContentBroker::UniversalContentBroker(
- const Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr )
-: m_xSMgr( rXSMgr ),
+ const Reference< com::sun::star::uno::XComponentContext >& xContext )
+: m_xContext( xContext ),
m_pDisposeEventListeners( NULL ),
m_nInitCount( 0 ), //@@@ see initialize() method
m_nCommandId( 0 )
{
- OSL_ENSURE( m_xSMgr.is(),
+ OSL_ENSURE( m_xContext.is(),
"UniversalContentBroker ctor: No service manager" );
}
@@ -333,7 +333,7 @@ void SAL_CALL UniversalContentBroker::removeEventListener(
//
//=========================================================================
-XSERVICEINFO_IMPL_1( UniversalContentBroker,
+XSERVICEINFO_IMPL_1_CTX( UniversalContentBroker,
OUString( "com.sun.star.comp.ucb.UniversalContentBroker" ),
OUString( UCB_SERVICE_NAME ) );
@@ -598,7 +598,7 @@ Reference< XContentIdentifier > SAL_CALL
}
if ( !xIdentifier.is() )
- xIdentifier = new ContentIdentifier( m_xSMgr, ContentId );
+ xIdentifier = new ContentIdentifier( ContentId );
return xIdentifier;
}
@@ -846,11 +846,11 @@ void UniversalContentBroker::prepareAndRegister(
&aProviderArguments))
{
registerAtUcb(this,
- m_xSMgr,
- aIt->ServiceName,
- aProviderArguments,
- aIt->URLTemplate,
- 0);
+ m_xContext,
+ aIt->ServiceName,
+ aProviderArguments,
+ aIt->URLTemplate,
+ 0);
}
else
@@ -864,7 +864,7 @@ bool UniversalContentBroker::getContentProviderData(
const OUString & rKey2,
ContentProviderDataList & rListToFill )
{
- if ( !m_xSMgr.is() || rKey1.isEmpty() || rKey2.isEmpty() )
+ if ( !m_xContext.is() || rKey1.isEmpty() || rKey2.isEmpty() )
{
OSL_FAIL( "UniversalContentBroker::getContentProviderData - Invalid argument!" );
return false;
@@ -873,7 +873,7 @@ bool UniversalContentBroker::getContentProviderData(
try
{
uno::Reference< lang::XMultiServiceFactory > xConfigProv =
- configuration::theDefaultProvider::get( comphelper::getComponentContext(m_xSMgr) );
+ configuration::theDefaultProvider::get( m_xContext );
OUStringBuffer aFullPath;
aFullPath.appendAscii( CONFIG_CONTENTPROVIDERS_KEY "/['" );
diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx
index 50d5d69..54e215b 100644
--- a/ucb/source/core/ucb.hxx
+++ b/ucb/source/core/ucb.hxx
@@ -62,7 +62,7 @@ class UniversalContentBroker :
public com::sun::star::util::XChangesListener
{
public:
- UniversalContentBroker( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr );
+ UniversalContentBroker( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
virtual ~UniversalContentBroker();
// XInterface
@@ -198,7 +198,7 @@ private:
void prepareAndRegister( const ucbhelper::ContentProviderDataList& rData);
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
com::sun::star::uno::Reference<
com::sun::star::util::XChangesNotifier > m_xNotifier;
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 3c4fdd7..b1f9e26 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -76,19 +76,19 @@ namespace
struct TransferCommandContext
{
- uno::Reference< lang::XMultiServiceFactory > xSMgr;
+ uno::Reference< uno::XComponentContext > m_xContext;
uno::Reference< ucb::XCommandProcessor > xProcessor;
uno::Reference< ucb::XCommandEnvironment > xEnv;
uno::Reference< ucb::XCommandEnvironment > xOrigEnv;
ucb::GlobalTransferCommandArgument2 aArg;
TransferCommandContext(
- const uno::Reference< lang::XMultiServiceFactory > & rxSMgr,
+ const uno::Reference< uno::XComponentContext > & xContext,
const uno::Reference< ucb::XCommandProcessor > & rxProcessor,
const uno::Reference< ucb::XCommandEnvironment > & rxEnv,
const uno::Reference< ucb::XCommandEnvironment > & rxOrigEnv,
const ucb::GlobalTransferCommandArgument2 & rArg )
- : xSMgr( rxSMgr ), xProcessor( rxProcessor ), xEnv( rxEnv ),
+ : m_xContext( xContext ), xProcessor( rxProcessor ), xEnv( rxEnv ),
xOrigEnv( rxOrigEnv ), aArg( rArg ) {}
};
@@ -965,7 +965,7 @@ uno::Reference< io::XInputStream > getInputStream(
try
{
- uno::Reference< io::XOutputStream > xOutputStream( io::Pipe::create(comphelper::getComponentContext(rContext.xSMgr)), uno::UNO_QUERY_THROW );
+ uno::Reference< io::XOutputStream > xOutputStream( io::Pipe::create(rContext.m_xContext), uno::UNO_QUERY_THROW );
ucb::OpenCommandArgument2 aArg;
aArg.Mode = ucb::OpenMode::DOCUMENT;
@@ -1617,7 +1617,7 @@ void globalTransfer_(
rContext.aArg.MimeType );
TransferCommandContext aSubCtx(
- rContext.xSMgr,
+ rContext.m_xContext,
rContext.xProcessor,
rContext.xEnv,
rContext.xOrigEnv,
@@ -1704,11 +1704,8 @@ void UniversalContentBroker::globalTransfer(
uno::Reference< ucb::XCommandEnvironment > xLocalEnv;
if (xEnv.is())
{
- uno::Reference< uno::XComponentContext > xCtx(
- comphelper::getComponentContext( m_xSMgr ) );
-
- xLocalEnv.set( ucb::CommandEnvironment::create(
- xCtx,
+ xLocalEnv.set( ucb::CommandEnvironment::create(
+ m_xContext,
new InteractionHandlerProxy( xEnv->getInteractionHandler() ),
xEnv->getProgressHandler() ) );
}
@@ -1994,7 +1991,7 @@ void UniversalContentBroker::globalTransfer(
}
TransferCommandContext aTransferCtx(
- m_xSMgr, this, xLocalEnv, xEnv, rArg );
+ m_xContext, this, xLocalEnv, xEnv, rArg );
if ( rArg.NewTitle.isEmpty() )
{
@@ -2045,11 +2042,8 @@ uno::Any UniversalContentBroker::checkIn( const ucb::CheckinArgument& rArg,
uno::Reference< ucb::XCommandEnvironment > xLocalEnv;
if (xEnv.is())
{
- uno::Reference< uno::XComponentContext > xCtx(
- comphelper::getComponentContext( m_xSMgr ) );
-
- xLocalEnv.set( ucb::CommandEnvironment::create(
- xCtx,
+ xLocalEnv.set( ucb::CommandEnvironment::create(
+ m_xContext,
new InteractionHandlerProxy( xEnv->getInteractionHandler() ),
xEnv->getProgressHandler() ) );
}
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 319a945..ee7030c 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -142,12 +142,12 @@ PropertySetMap_Impl;
class PropertySetInfo_Impl :
public OWeakObject, public XTypeProvider, public XPropertySetInfo
{
- Reference< XMultiServiceFactory > m_xSMgr;
+ Reference< XComponentContext > m_xContext;
Sequence< Property >* m_pProps;
PersistentPropertySet* m_pOwner;
public:
- PropertySetInfo_Impl( const Reference< XMultiServiceFactory >& rxSMgr,
+ PropertySetInfo_Impl( const Reference< XComponentContext >& xContext,
PersistentPropertySet* pOwner );
virtual ~PropertySetInfo_Impl();
@@ -192,8 +192,8 @@ struct UcbStore_Impl
//=========================================================================
//=========================================================================
-UcbStore::UcbStore( const Reference< XMultiServiceFactory >& rXSMgr )
-: m_xSMgr( rXSMgr ),
+UcbStore::UcbStore( const Reference< XComponentContext >& xContext )
+: m_xContext( xContext ),
m_pImpl( new UcbStore_Impl() )
{
}
@@ -235,7 +235,7 @@ XTYPEPROVIDER_IMPL_4( UcbStore,
//
//=========================================================================
-XSERVICEINFO_IMPL_1( UcbStore,
+XSERVICEINFO_IMPL_1_CTX( UcbStore,
OUString( "com.sun.star.comp.ucb.UcbStore" ),
OUString( STORE_SERVICE_NAME ) );
@@ -265,7 +265,7 @@ UcbStore::createPropertySetRegistry( const OUString& )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xTheRegistry.is() )
- m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xSMgr, getInitArgs() );
+ m_pImpl->m_xTheRegistry = new PropertySetRegistry( m_xContext, getInitArgs() );
}
return m_pImpl->m_xTheRegistry;
@@ -327,9 +327,9 @@ struct PropertySetRegistry_Impl
//=========================================================================
PropertySetRegistry::PropertySetRegistry(
- const Reference< XMultiServiceFactory >& rXSMgr,
+ const Reference< XComponentContext >& xContext,
const Sequence< Any > &rInitArgs )
-: m_xSMgr( rXSMgr ),
+: m_xContext( xContext ),
m_pImpl( new PropertySetRegistry_Impl( rInitArgs ) )
{
}
@@ -412,7 +412,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
// Yep!
return Reference< XPersistentPropertySet >(
new PersistentPropertySet(
- m_xSMgr, *this, key ) );
+ m_xContext, *this, key ) );
}
else if ( create )
{
@@ -460,7 +460,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
return Reference< XPersistentPropertySet >(
new PersistentPropertySet(
- m_xSMgr, *this, key ) );
+ m_xContext, *this, key ) );
}
}
catch (const IllegalArgumentException&)
@@ -1037,9 +1037,7 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider()
{
try
{
- m_pImpl->m_xConfigProvider
- = theDefaultProvider::get(
- comphelper::getComponentContext( m_xSMgr ) );
+ m_pImpl->m_xConfigProvider = theDefaultProvider::get( m_xContext );
}
catch (const Exception&)
{
@@ -1263,10 +1261,10 @@ struct PersistentPropertySet_Impl
//=========================================================================
PersistentPropertySet::PersistentPropertySet(
- const Reference< XMultiServiceFactory >& rXSMgr,
+ const Reference< XComponentContext >& xContext,
PropertySetRegistry& rCreator,
const OUString& rKey )
-: m_xSMgr( rXSMgr ),
+: m_xContext( xContext ),
m_pImpl( new PersistentPropertySet_Impl( rCreator, rKey ) )
{
// register at creator.
@@ -1401,7 +1399,7 @@ Reference< XPropertySetInfo > SAL_CALL
PropertySetInfo_Impl*& rpInfo = m_pImpl->m_pInfo;
if ( !rpInfo )
{
- rpInfo = new PropertySetInfo_Impl( m_xSMgr, this );
+ rpInfo = new PropertySetInfo_Impl( m_xContext, this );
rpInfo->acquire();
}
return Reference< XPropertySetInfo >( rpInfo );
@@ -2361,9 +2359,9 @@ PropertySetRegistry& PersistentPropertySet::getPropertySetRegistry()
//=========================================================================
PropertySetInfo_Impl::PropertySetInfo_Impl(
- const Reference< XMultiServiceFactory >& rxSMgr,
+ const Reference< XComponentContext >& xContext,
PersistentPropertySet* pOwner )
-: m_xSMgr( rxSMgr ),
+: m_xContext( xContext ),
m_pProps( NULL ),
m_pOwner( pOwner )
{
diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx
index 8364bd2..2a9d70a 100644
--- a/ucb/source/core/ucbstore.hxx
+++ b/ucb/source/core/ucbstore.hxx
@@ -54,13 +54,13 @@ class UcbStore :
public com::sun::star::lang::XInitialization
{
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
UcbStore_Impl* m_pImpl;
public:
UcbStore(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rXSMgr );
+ com::sun::star::uno::XComponentContext >& xContext );
virtual ~UcbStore();
// XInterface
@@ -104,7 +104,7 @@ class PropertySetRegistry :
friend class PersistentPropertySet;
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
PropertySetRegistry_Impl* m_pImpl;
private:
@@ -120,7 +120,7 @@ private:
public:
PropertySetRegistry(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rXSMgr,
+ com::sun::star::uno::XComponentContext >& xContext,
const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any >& rInitArgs);
virtual ~PropertySetRegistry();
@@ -187,7 +187,7 @@ class PersistentPropertySet :
public com::sun::star::beans::XPropertyAccess
{
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
PersistentPropertySet_Impl* m_pImpl;
private:
@@ -199,7 +199,7 @@ private:
public:
PersistentPropertySet(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rXSMgr,
+ com::sun::star::uno::XComponentContext >& xContext,
PropertySetRegistry& rCreator,
const OUString& rKey );
virtual ~PersistentPropertySet();
diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 944fe01..a17e0ad 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -42,14 +42,14 @@ namespace ucbhelper {
bool
registerAtUcb(
uno::Reference< ucb::XContentProviderManager > const & rManager,
- uno::Reference< lang::XMultiServiceFactory > const & rServiceFactory,
+ uno::Reference< uno::XComponentContext > const & rxContext,
OUString const & rName,
OUString const & rArguments,
OUString const & rTemplate,
ContentProviderRegistrationInfo * pInfo)
throw (uno::RuntimeException)
{
- OSL_ENSURE(rServiceFactory.is(),
+ OSL_ENSURE(rxContext.is(),
"ucb::registerAtUcb(): No service factory");
bool bNoProxy = rArguments.startsWith("{noproxy}");
@@ -66,13 +66,7 @@ registerAtUcb(
uno::Reference< ucb::XContentProviderFactory > xProxyFactory;
try
{
- uno::Reference< beans::XPropertySet > xFactoryProperties( rServiceFactory, uno::UNO_QUERY_THROW );
- uno::Reference< uno::XComponentContext > xContext = uno::Reference< uno::XComponentContext >(
- xFactoryProperties->getPropertyValue( OUString( "DefaultContext" ) ),
- uno::UNO_QUERY );
- xProxyFactory
- = uno::Reference< ucb::XContentProviderFactory >(
- ucb::ContentProviderProxyFactory::create( xContext ) );
+ xProxyFactory = ucb::ContentProviderProxyFactory::create( rxContext );
}
catch (uno::Exception const &) {}
OSL_ENSURE(xProxyFactory.is(), "No ContentProviderProxyFactory");
@@ -85,7 +79,7 @@ registerAtUcb(
try
{
xProvider = uno::Reference< ucb::XContentProvider >(
- rServiceFactory->createInstance(rName),
+ rxContext->getServiceManager()->createInstanceWithContext(rName, rxContext),
uno::UNO_QUERY);
}
catch (uno::RuntimeException const &) { throw; }
commit 546fa9f365ef1b19abe6739d2f42389f82576437
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 4 16:08:54 2013 +0200
fdo#46808, Convert XMultiServiceFactory in svl module
Change-Id: Ia51d748af3b29a6021e6f5307a60d87f17917f24
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 06ca47b..2379cf1 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -55,7 +55,7 @@ OUString SAL_CALL FSStorageFactory::impl_staticGetImplementationName()
uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::impl_staticCreateSelfInstance(
const uno::Reference< lang::XMultiServiceFactory >& xServiceManager )
{
- return uno::Reference< uno::XInterface >( *new FSStorageFactory( xServiceManager ) );
+ return uno::Reference< uno::XInterface >( *new FSStorageFactory( comphelper::getComponentContext(xServiceManager) ) );
}
//-------------------------------------------------------------------------
@@ -78,7 +78,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance()
static_cast< OWeakObject* >(
new FSStorage( aResultContent,
embed::ElementModes::READWRITE,
- m_xFactory ) ),
+ m_xContext ) ),
uno::UNO_QUERY );
}
@@ -160,7 +160,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
return uno::Reference< uno::XInterface >(
static_cast< OWeakObject* >( new FSStorage( aResultContent,
nStorageMode,
- m_xFactory ) ),
+ m_xContext ) ),
uno::UNO_QUERY );
}
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 41bf495..bb8c6c8 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -96,27 +96,27 @@ struct FSStorage_Impl
::cppu::OInterfaceContainerHelper* m_pListenersContainer; // list of listeners
::cppu::OTypeCollection* m_pTypeCollection;
- uno::Reference< lang::XMultiServiceFactory > m_xFactory;
+ uno::Reference< uno::XComponentContext > m_xContext;
- FSStorage_Impl( const OUString& aURL, sal_Int32 nMode, uno::Reference< lang::XMultiServiceFactory > xFactory )
+ FSStorage_Impl( const OUString& aURL, sal_Int32 nMode, uno::Reference< uno::XComponentContext > xContext )
: m_aURL( aURL )
, m_pContent( NULL )
, m_nMode( nMode )
, m_pListenersContainer( NULL )
, m_pTypeCollection( NULL )
- , m_xFactory( xFactory )
+ , m_xContext( xContext )
{
OSL_ENSURE( !m_aURL.isEmpty(), "The URL must not be empty" );
}
- FSStorage_Impl( const ::ucbhelper::Content& aContent, sal_Int32 nMode, uno::Reference< lang::XMultiServiceFactory > xFactory )
+ FSStorage_Impl( const ::ucbhelper::Content& aContent, sal_Int32 nMode, uno::Reference< uno::XComponentContext > xContext )
: m_aURL( aContent.getURL() )
, m_pContent( new ::ucbhelper::Content( aContent ) )
, m_nMode( nMode )
, m_pListenersContainer( NULL )
, m_pTypeCollection( NULL )
- , m_xFactory( xFactory )
+ , m_xContext( xContext )
{
OSL_ENSURE( !m_aURL.isEmpty(), "The URL must not be empty" );
}
@@ -143,11 +143,11 @@ FSStorage_Impl::~FSStorage_Impl()
//-----------------------------------------------
FSStorage::FSStorage( const ::ucbhelper::Content& aContent,
sal_Int32 nMode,
- uno::Reference< lang::XMultiServiceFactory > xFactory )
-: m_pImpl( new FSStorage_Impl( aContent, nMode, xFactory ) )
+ uno::Reference< uno::XComponentContext > xContext )
+: m_pImpl( new FSStorage_Impl( aContent, nMode, xContext ) )
{
// TODO: use properties
- if ( !xFactory.is() )
+ if ( !xContext.is() )
throw uno::RuntimeException();
GetContent();
@@ -473,8 +473,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
{
uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(
- ucb::SimpleFileAccess::create(
- comphelper::getComponentContext(m_pImpl->m_xFactory) ) );
+ ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) );
xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) );
}
else
@@ -620,7 +619,7 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement(
xResult = uno::Reference< embed::XStorage >(
static_cast< OWeakObject* >( new FSStorage( aResultContent,
nStorageMode,
- m_pImpl->m_xFactory ) ),
+ m_pImpl->m_xContext ) ),
uno::UNO_QUERY );
}
catch( embed::InvalidStorageException& )
@@ -682,9 +681,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const OUSt
::ucbhelper::Content aResultContent( aFileURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, comphelper::getProcessComponentContext() );
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
- xTempResult = uno::Reference < io::XStream >(
- io::TempFile::create(comphelper::getComponentContext(m_pImpl->m_xFactory)),
- uno::UNO_QUERY_THROW );
+ xTempResult = io::TempFile::create(m_pImpl->m_xContext);
uno::Reference < io::XOutputStream > xTempOut = xTempResult->getOutputStream();
uno::Reference < io::XInputStream > xTempIn = xTempResult->getInputStream();
@@ -1463,8 +1460,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
if ( isLocalFile_Impl( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) ) )
{
uno::Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess(
- ucb::SimpleFileAccess::create(
- comphelper::getComponentContext(m_pImpl->m_xFactory) ) );
+ ucb::SimpleFileAccess::create( m_pImpl->m_xContext ) );
uno::Reference< io::XStream > xStream =
xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/svl/source/fsstor/fsstorage.hxx b/svl/source/fsstor/fsstorage.hxx
index 71dcf67..ef4a1f6 100644
--- a/svl/source/fsstor/fsstorage.hxx
+++ b/svl/source/fsstor/fsstorage.hxx
@@ -51,7 +51,7 @@ public:
FSStorage( const ::ucbhelper::Content& aContent,
sal_Int32 nMode,
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory );
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext );
virtual ~FSStorage();
diff --git a/svl/source/inc/fsfactory.hxx b/svl/source/inc/fsfactory.hxx
index 2c08995..4e5294a 100644
--- a/svl/source/inc/fsfactory.hxx
+++ b/svl/source/inc/fsfactory.hxx
@@ -22,18 +22,19 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase2.hxx>
class FSStorageFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleServiceFactory,
::com::sun::star::lang::XServiceInfo >
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
public:
- FSStorageFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
- : m_xFactory( xFactory )
+ FSStorageFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext )
+ : m_xContext( xContext )
{
- OSL_ENSURE( xFactory.is(), "No service manager is provided!\n" );
+ OSL_ENSURE( xContext.is(), "No service manager is provided!\n" );
}
static ::com::sun::star::uno::Sequence< OUString > SAL_CALL
diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx
index 1114d780a..8b4bb41 100644
--- a/svl/source/numbers/supservs.cxx
+++ b/svl/source/numbers/supservs.cxx
@@ -39,11 +39,11 @@ using namespace ::utl;
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL SvNumberFormatsSupplierServiceObject_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return static_cast< ::cppu::OWeakObject* >(new SvNumberFormatsSupplierServiceObject(_rxFactory));
+ return static_cast< ::cppu::OWeakObject* >(new SvNumberFormatsSupplierServiceObject( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
-SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB)
:m_pOwnFormatter(NULL)
,m_xORB(_rxORB)
{
@@ -111,7 +111,7 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence<
#endif
}
- m_pOwnFormatter = new SvNumberFormatter( comphelper::getComponentContext(m_xORB), eNewFormatterLanguage);
+ m_pOwnFormatter = new SvNumberFormatter( m_xORB, eNewFormatterLanguage);
m_pOwnFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
SetNumberFormatter(m_pOwnFormatter);
}
diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx
index fe6dc2f..a3c3b38 100644
--- a/svl/source/numbers/supservs.hxx
+++ b/svl/source/numbers/supservs.hxx
@@ -47,11 +47,11 @@ class SvNumberFormatsSupplierServiceObject
protected:
SvNumberFormatter* m_pOwnFormatter;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xORB;
public:
- SvNumberFormatsSupplierServiceObject(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ SvNumberFormatsSupplierServiceObject(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
~SvNumberFormatsSupplierServiceObject();
// XInterface
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 590c1de..8cf17ee 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -444,7 +444,7 @@ PasswordContainer::~PasswordContainer()
if( mComponent.is() )
{
mComponent->removeEventListener(this);
- mComponent = Reference< XComponent >();
+ mComponent.clear();
}
}
@@ -463,7 +463,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) throw(RuntimeEx
if( mComponent.is() )
{
//mComponent->removeEventListener(this);
- mComponent = Reference< XComponent >();
+ mComponent.clear();
}
}
commit 8c799984cc5b76c20baccffea818e07c440c2330
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jun 4 13:34:29 2013 +0200
fdo#46808, Convert the rest of XMultiServiceFactory in framework module
Change-Id: Ife3caf00ab37a8c344f0ab90e40337b3b5bc1571
diff --git a/framework/inc/helper/tagwindowasmodified.hxx b/framework/inc/helper/tagwindowasmodified.hxx
index a17e1dc..73dbfaf 100644
--- a/framework/inc/helper/tagwindowasmodified.hxx
+++ b/framework/inc/helper/tagwindowasmodified.hxx
@@ -65,9 +65,6 @@ class TagWindowAsModified : // interfaces
private:
- /// may we need an uno service manager to create own services
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
-
/// reference to the frame, where we listen for new loaded documents for updating our own xModel reference
css::uno::WeakReference< css::frame::XFrame > m_xFrame;
@@ -84,7 +81,7 @@ class TagWindowAsModified : // interfaces
//____________________________
// ctor/dtor
- TagWindowAsModified(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ TagWindowAsModified();
virtual ~TagWindowAsModified( );
//____________________________
diff --git a/framework/inc/services/dispatchhelper.hxx b/framework/inc/services/dispatchhelper.hxx
index a2a89d1..4c0e47b 100644
--- a/framework/inc/services/dispatchhelper.hxx
+++ b/framework/inc/services/dispatchhelper.hxx
@@ -58,7 +58,7 @@ class DispatchHelper : public ThreadHelpBase // must be the
/** global uno service manager.
Can be used to create own needed services. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** used to wait for asynchronous listener callbacks. */
::osl::Condition m_aBlock;
@@ -75,8 +75,8 @@ class DispatchHelper : public ThreadHelpBase // must be the
//---------------------------------------
// ctor/dtor
- DispatchHelper( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR );
- virtual ~DispatchHelper( );
+ DispatchHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ virtual ~DispatchHelper( );
//---------------------------------------
// XInterface, XTypeProvider, XServiceInfo
diff --git a/framework/inc/services/modulemanager.hxx b/framework/inc/services/modulemanager.hxx
index 68dc4d8..2427622 100644
--- a/framework/inc/services/modulemanager.hxx
+++ b/framework/inc/services/modulemanager.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/frame/XModuleManager2.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase3.hxx>
namespace com { namespace sun { namespace star { namespace lang {
@@ -62,7 +63,7 @@ class ModuleManager:
/** the global uno service manager.
Must be used to create own needed services.
*/
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//---------------------------------------
/** points to the underlying configuration.
@@ -93,7 +94,7 @@ class ModuleManager:
css::uno::Reference< css::lang::XMultiServiceFactory > const &
manager);
- ModuleManager(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ ModuleManager(const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~ModuleManager( );
diff --git a/framework/inc/services/pathsettings.hxx b/framework/inc/services/pathsettings.hxx
index 0c7e2e2..d90721e 100644
--- a/framework/inc/services/pathsettings.hxx
+++ b/framework/inc/services/pathsettings.hxx
@@ -122,7 +122,7 @@ class PathSettings : public css::lang::XTypeProvider ,
private:
/** reference to factory, which has create this instance. */
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** list of all path variables and her corresponding values. */
PathSettings::PathHash m_lPaths;
@@ -156,7 +156,7 @@ class PathSettings : public css::lang::XTypeProvider ,
Attention: It's neccessary for right function of this class, that the order of base
classes is the right one. Because we transfer information from one base to another
during this ctor runs! */
- PathSettings(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ PathSettings(const css::uno::Reference< css::uno::XComponentContext >& xContext);
/** free all used resources ... if it was not already done. */
virtual ~PathSettings();
diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx
index e9853e1..7604a87 100644
--- a/framework/inc/services/substitutepathvars.hxx
+++ b/framework/inc/services/substitutepathvars.hxx
@@ -223,7 +223,7 @@ class SubstitutePathVariables : private ThreadHelpBase, // Struct for right init
friend class SubstitutePathVariables_Impl;
public:
- SubstitutePathVariables( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ SubstitutePathVariables( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
virtual ~SubstitutePathVariables();
// XInterface, XTypeProvider, XServiceInfo
@@ -281,7 +281,7 @@ class SubstitutePathVariables : private ThreadHelpBase, // Struct for right init
SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
};
}
diff --git a/framework/inc/services/taskcreatorsrv.hxx b/framework/inc/services/taskcreatorsrv.hxx
index 68654e0..184b12a 100644
--- a/framework/inc/services/taskcreatorsrv.hxx
+++ b/framework/inc/services/taskcreatorsrv.hxx
@@ -98,14 +98,14 @@ class TaskCreatorService : public css::lang::XTypeProvider
/** @short the global uno service manager.
@descr Must be used to create own needed services.
*/
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
//___________________________________________
// interface
public:
- TaskCreatorService(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
+ TaskCreatorService(const css::uno::Reference< css::uno::XComponentContext >& xContext);
virtual ~TaskCreatorService( );
// XInterface, XTypeProvider, XServiceInfo
diff --git a/framework/inc/tabwin/tabwindow.hxx b/framework/inc/tabwin/tabwindow.hxx
index e2bf729..47846ea 100644
--- a/framework/inc/tabwin/tabwindow.hxx
+++ b/framework/inc/tabwin/tabwindow.hxx
@@ -61,7 +61,7 @@ class TabWindow : public ::com::sun::star::lang::XTypeProvider ,
public ::cppu::OWeakObject
{
public:
- TabWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ TabWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
virtual ~TabWindow();
// XInterface, XTypeProvider, XServiceInfo
@@ -166,7 +166,7 @@ class TabWindow : public ::com::sun::star::lang::XTypeProvider ,
sal_Int32 m_nNextTabID;
OUString m_aTitlePropName;
OUString m_aPosPropName;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XTopWindow > m_xTopWindow;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xContainerWindow;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xTabControlWindow;
diff --git a/framework/inc/tabwin/tabwinfactory.hxx b/framework/inc/tabwin/tabwinfactory.hxx
index fb08f20..df66e49 100644
--- a/framework/inc/tabwin/tabwinfactory.hxx
+++ b/framework/inc/tabwin/tabwinfactory.hxx
@@ -45,7 +45,7 @@ class TabWinFactory : protected ThreadHelpBase
public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XSingleComponentFactory, com::sun::star::lang::XServiceInfo>
{
public:
- TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ TabWinFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
virtual ~TabWinFactory();
// XInterface, XTypeProvider, XServiceInfo
@@ -56,7 +56,7 @@ class TabWinFactory : protected ThreadHelpBase
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArgumentsAndContext( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& Context ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit2 > m_xToolkit;
};
diff --git a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx b/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx
index 1ca6d23..47d1d91 100644
--- a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx
+++ b/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx
@@ -64,7 +64,7 @@ namespace framework
FWK_DECLARE_XTYPEPROVIDER
DECLARE_XSERVICEINFO
- ModuleUIConfigurationManagerSupplier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager );
+ ModuleUIConfigurationManagerSupplier( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
virtual ~ModuleUIConfigurationManagerSupplier();
// XComponent
@@ -94,7 +94,7 @@ namespace framework
com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserCfgRootStorage;
com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > m_xModuleMgr;
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
};
}
diff --git a/framework/inc/uifactory/menubarfactory.hxx b/framework/inc/uifactory/menubarfactory.hxx
index ea58ce9..c0930ca 100644
--- a/framework/inc/uifactory/menubarfactory.hxx
+++ b/framework/inc/uifactory/menubarfactory.hxx
@@ -45,7 +45,7 @@ namespace framework
::com::sun::star::ui::XUIElementFactory>
{
public:
- MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
virtual ~MenuBarFactory();
// XInterface, XTypeProvider, XServiceInfo
@@ -63,9 +63,9 @@ namespace framework
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
protected:
- MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager,bool );
+ MenuBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,bool );
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > m_xModuleManager;
};
}
diff --git a/framework/inc/uifactory/statusbarfactory.hxx b/framework/inc/uifactory/statusbarfactory.hxx
index 2e0e0cd..382d56b 100644
--- a/framework/inc/uifactory/statusbarfactory.hxx
+++ b/framework/inc/uifactory/statusbarfactory.hxx
@@ -34,7 +34,7 @@ namespace framework
class StatusBarFactory : public MenuBarFactory
{
public:
- StatusBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ StatusBarFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
diff --git a/framework/inc/uifactory/toolboxfactory.hxx b/framework/inc/uifactory/toolboxfactory.hxx
index 43384be..db166b2 100644
--- a/framework/inc/uifactory/toolboxfactory.hxx
+++ b/framework/inc/uifactory/toolboxfactory.hxx
@@ -34,7 +34,7 @@ namespace framework
class ToolBoxFactory : public MenuBarFactory
{
public:
- ToolBoxFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ ToolBoxFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
diff --git a/framework/inc/uifactory/uicontrollerfactory.hxx b/framework/inc/uifactory/uicontrollerfactory.hxx
index df3f70a..fd5dfac 100644
--- a/framework/inc/uifactory/uicontrollerfactory.hxx
+++ b/framework/inc/uifactory/uicontrollerfactory.hxx
@@ -61,16 +61,16 @@ class UIControllerFactory : protected ThreadHelpBase, // Struct for right inita
virtual void SAL_CALL deregisterController( const OUString& aCommandURL, const OUString& aModuleName ) throw (::com::sun::star::uno::RuntimeException);
protected:
- UIControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager, const rtl::OUString &rUINode );
+ UIControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext, const rtl::OUString &rUINode );
sal_Bool m_bConfigRead;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
ConfigurationAccess_ControllerFactory* m_pConfigAccess;
};
class PopupMenuControllerFactory : public UIControllerFactory
{
public:
- PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ PopupMenuControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
@@ -79,7 +79,7 @@ class PopupMenuControllerFactory : public UIControllerFactory
class ToolbarControllerFactory : public UIControllerFactory
{
public:
- ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ ToolbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
@@ -88,7 +88,7 @@ class ToolbarControllerFactory : public UIControllerFactory
class StatusbarControllerFactory : public UIControllerFactory
{
public:
- StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager );
+ StatusbarControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
// XInterface, XTypeProvider, XServiceInfo
DECLARE_XSERVICEINFO
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 2653e2f..605a815 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -59,9 +59,8 @@ DEFINE_XTYPEPROVIDER_4(TagWindowAsModified ,
css::lang::XEventListener )
//*****************************************************************************************************************
-TagWindowAsModified::TagWindowAsModified(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
+TagWindowAsModified::TagWindowAsModified()
: ThreadHelpBase (&Application::GetSolarMutex())
- , m_xSMGR (xSMGR )
{
}
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 40adc06..7da823d 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -33,7 +33,7 @@ namespace framework{
//_______________________________________________
// XInterface, XTypeProvider, XServiceInfo
-DEFINE_XSERVICEINFO_MULTISERVICE(DispatchHelper ,
+DEFINE_XSERVICEINFO_MULTISERVICE_2(DispatchHelper ,
::cppu::OWeakObject ,
"com.sun.star.frame.DispatchHelper",
IMPLEMENTATIONNAME_DISPATCHHELPER)
@@ -46,10 +46,10 @@ DEFINE_INIT_SERVICE( DispatchHelper, {} )
@param xSMGR the global uno service manager, which can be used to create own needed services.
*/
-DispatchHelper::DispatchHelper( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR )
+DispatchHelper::DispatchHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext )
: ThreadHelpBase( )
// Init member
- , m_xSMGR (xSMGR)
+ , m_xContext (xContext)
{
}
@@ -104,7 +104,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
// parse given URL
/* SAFE { */
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR)) );
+ css::uno::Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create(m_xContext);
aReadLock.unlock();
/* } SAFE */
diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx
index 6c18d13..f6990ca 100644
--- a/framework/source/services/modulemanager.cxx
+++ b/framework/source/services/modulemanager.cxx
@@ -65,12 +65,12 @@ ModuleManager::impl_getSupportedServiceNames() {
css::uno::Reference< css::uno::XInterface > ModuleManager::impl_createInstance(
css::uno::Reference< css::lang::XMultiServiceFactory > const & manager)
{
- return static_cast< cppu::OWeakObject * >(new ModuleManager(manager));
+ return static_cast< cppu::OWeakObject * >(new ModuleManager( comphelper::getComponentContext(manager) ));
}
-ModuleManager::ModuleManager(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
+ModuleManager::ModuleManager(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: ThreadHelpBase( )
- , m_xSMGR (xSMGR)
+ , m_xContext (xContext)
{
}
@@ -175,7 +175,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName ,
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -185,7 +185,7 @@ void SAL_CALL ModuleManager::replaceByName(const OUString& sName ,
// flush changes (because an error occurred) we will read them later. If we use a different config access
// we can close it without a flush ... and our read data wont be affected .-)
css::uno::Reference< css::uno::XInterface > xCfg = ::comphelper::ConfigurationHelper::openConfig(
- comphelper::getComponentContext(xSMGR),
+ xContext,
OUString(CFGPATH_FACTORIES),
::comphelper::ConfigurationHelper::E_STANDARD);
css::uno::Reference< css::container::XNameAccess > xModules (xCfg, css::uno::UNO_QUERY_THROW);
@@ -316,7 +316,7 @@ css::uno::Reference< css::container::XNameAccess > ModuleManager::implts_getConf
ReadGuard aReadLock(m_aLock);
if (m_xCFG.is())
return m_xCFG;
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
aReadLock.unlock();
// <- SAFE ----------------------------------
@@ -324,7 +324,7 @@ css::uno::Reference< css::container::XNameAccess > ModuleManager::implts_getConf
try
{
xCfg = ::comphelper::ConfigurationHelper::openConfig(
- comphelper::getComponentContext(xSMGR),
+ xContext,
OUString(CFGPATH_FACTORIES),
::comphelper::ConfigurationHelper::E_READONLY);
}
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index bcdafce..45d0287 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -105,7 +105,7 @@ DEFINE_XTYPEPROVIDER_8 ( PathSettings
css::beans::XMultiPropertySet
)
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE ( PathSettings ,
+DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( PathSettings ,
::cppu::OWeakObject ,
SERVICENAME_PATHSETTINGS ,
IMPLEMENTATIONNAME_PATHSETTINGS
@@ -125,7 +125,7 @@ DEFINE_INIT_SERVICE ( PathSettings,
)
//-----------------------------------------------------------------------------
-PathSettings::PathSettings( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR )
+PathSettings::PathSettings( const css::uno::Reference< css::uno::XComponentContext >& xContext )
// Init baseclasses first
// Attention: Don't change order of initialization!
// ThreadHelpBase is a struct with a lock as member. We can't use a lock as direct member!
@@ -135,7 +135,7 @@ PathSettings::PathSettings( const css::uno::Reference< css::lang::XMultiServiceF
, ::cppu::OPropertySetHelper(*(static_cast< ::cppu::OBroadcastHelper* >(this)))
, ::cppu::OWeakObject()
// Init member
- , m_xSMGR (xSMGR)
+ , m_xContext (xContext)
, m_pPropHelp(0 )
, m_bIgnoreEvents(sal_False)
{
@@ -1083,7 +1083,7 @@ css::uno::Reference< css::util::XStringSubstitution > PathSettings::fa_getSubsti
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list