summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx10
-rw-r--r--framework/source/accelerators/presethandler.cxx8
-rw-r--r--framework/source/accelerators/storageholder.cxx4
-rw-r--r--framework/source/classes/framecontainer.cxx4
-rw-r--r--framework/source/classes/fwktabwindow.cxx5
-rw-r--r--framework/source/classes/taskcreator.cxx3
-rw-r--r--framework/source/dispatch/closedispatcher.cxx4
-rw-r--r--framework/source/dispatch/dispatchprovider.cxx20
-rw-r--r--framework/source/dispatch/interceptionhelper.cxx2
-rw-r--r--framework/source/dispatch/menudispatcher.cxx4
-rw-r--r--framework/source/dispatch/oxt_handler.cxx2
-rw-r--r--framework/source/dispatch/popupmenudispatcher.cxx5
-rw-r--r--framework/source/fwe/classes/framelistanalyzer.cxx6
-rw-r--r--framework/source/fwe/dispatch/interaction.cxx4
-rw-r--r--framework/source/fwe/helper/actiontriggerhelper.cxx5
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx14
-rw-r--r--framework/source/fwe/xml/statusbardocumenthandler.cxx2
-rw-r--r--framework/source/fwe/xml/toolboxdocumenthandler.cxx2
-rw-r--r--framework/source/fwi/classes/propertysethelper.cxx2
-rw-r--r--framework/source/fwi/jobs/configaccess.cxx2
-rw-r--r--framework/source/fwi/uielement/constitemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/itemcontainer.cxx2
-rw-r--r--framework/source/fwi/uielement/rootitemcontainer.cxx2
-rw-r--r--framework/source/helper/ocomponentaccess.cxx8
-rw-r--r--framework/source/helper/oframes.cxx2
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx6
-rw-r--r--framework/source/helper/tagwindowasmodified.cxx4
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx2
-rw-r--r--framework/source/interaction/quietinteraction.cxx8
-rw-r--r--framework/source/jobs/helponstartup.cxx10
-rw-r--r--framework/source/jobs/job.cxx22
-rw-r--r--framework/source/jobs/jobdispatch.cxx2
-rw-r--r--framework/source/layoutmanager/helpers.cxx4
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx37
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx12
-rw-r--r--framework/source/loadenv/loadenv.cxx12
-rw-r--r--framework/source/services/autorecovery.cxx13
-rw-r--r--framework/source/services/desktop.cxx22
-rw-r--r--framework/source/services/dispatchhelper.cxx2
-rw-r--r--framework/source/services/frame.cxx16
-rw-r--r--framework/source/services/pathsettings.cxx6
-rw-r--r--framework/source/services/taskcreatorsrv.cxx4
-rw-r--r--framework/source/tabwin/tabwindow.cxx16
-rw-r--r--framework/source/tabwin/tabwinfactory.cxx8
-rw-r--r--framework/source/uiconfiguration/globalsettings.cxx3
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx8
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx23
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx2
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx18
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx4
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx8
-rw-r--r--framework/source/uielement/addonstoolbarwrapper.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx10
-rw-r--r--framework/source/uielement/menubarwrapper.cxx4
-rw-r--r--framework/source/uielement/newmenucontroller.cxx2
-rw-r--r--framework/source/uielement/progressbarwrapper.cxx5
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
-rw-r--r--framework/source/uielement/statusbarmanager.cxx6
-rw-r--r--framework/source/uielement/statusbarwrapper.cxx2
-rw-r--r--framework/source/uielement/toolbarmanager.cxx17
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx2
-rw-r--r--framework/source/uielement/uicommanddescription.cxx10
-rw-r--r--framework/source/uifactory/addonstoolbarfactory.cxx2
-rw-r--r--framework/source/uifactory/factoryconfiguration.cxx2
-rw-r--r--framework/source/xml/imagesdocumenthandler.cxx2
65 files changed, 223 insertions, 241 deletions
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index d6ef53c6c6d6..96ccfb1e3c11 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -521,7 +521,7 @@ XCUBasedAcceleratorConfiguration::XCUBasedAcceleratorConfiguration(const css::un
, m_pSecondaryWriteCache(0 )
{
const OUString CFG_ENTRY_ACCELERATORS("org.openoffice.Office.Accelerators");
- m_xCfg = css::uno::Reference< css::container::XNameAccess > (
+ m_xCfg.set(
::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_ACCELERATORS, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
}
@@ -971,14 +971,14 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::reset()
OUString sConfig = xNamed->getName();
if ( sConfig == "Global" )
{
- m_xCfg = css::uno::Reference< css::container::XNameAccess > (
+ m_xCfg.set(
::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_GLOBAL, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
XCUBasedAcceleratorConfiguration::reload();
}
else if ( sConfig == "Modules" )
{
- m_xCfg = css::uno::Reference< css::container::XNameAccess > (
+ m_xCfg.set(
::comphelper::ConfigurationHelper::openConfig( m_xContext, CFG_ENTRY_MODULES, ::comphelper::ConfigurationHelper::E_ALL_LOCALES ),
css::uno::UNO_QUERY );
XCUBasedAcceleratorConfiguration::reload();
@@ -1282,7 +1282,7 @@ void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt:
xAccess->getByName(CFG_ENTRY_MODULES) >>= xModules;
if ( !xModules->hasByName(m_sModuleCFG) )
{
- xFac = css::uno::Reference< css::lang::XSingleServiceFactory >(xModules, css::uno::UNO_QUERY);
+ xFac.set(xModules, css::uno::UNO_QUERY);
xInst = xFac->createInstance();
xModules->insertByName(m_sModuleCFG, css::uno::makeAny(xInst));
}
@@ -1294,7 +1294,7 @@ void XCUBasedAcceleratorConfiguration::insertKeyToConfiguration( const css::awt:
css::uno::Reference< css::container::XNameContainer > xCommand;
if ( !xContainer->hasByName(sKey) )
{
- xFac = css::uno::Reference< css::lang::XSingleServiceFactory >(xContainer, css::uno::UNO_QUERY);
+ xFac.set(xContainer, css::uno::UNO_QUERY);
xInst = xFac->createInstance();
xContainer->insertByName(sKey, css::uno::makeAny(xInst));
}
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 54ee97363efe..35a417342a81 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -196,7 +196,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
try
{
- xStorage = css::uno::Reference< css::embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
+ xStorage.set(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
}
catch(const css::uno::Exception&)
{
@@ -243,7 +243,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag
try
{
- xStorage = css::uno::Reference< css::embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
+ xStorage.set(xStorageFactory->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
}
catch(const css::uno::Exception&)
{
@@ -434,7 +434,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
OUStringList lTargets;
// read preset names of share layer
- xAccess = css::uno::Reference< css::container::XNameAccess >(xShare, css::uno::UNO_QUERY);
+ xAccess.set(xShare, css::uno::UNO_QUERY);
if (xAccess.is())
{
lNames = xAccess->getElementNames();
@@ -452,7 +452,7 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
}
// read preset names of user layer
- xAccess = css::uno::Reference< css::container::XNameAccess >(xUser, css::uno::UNO_QUERY);
+ xAccess.set(xUser, css::uno::UNO_QUERY);
if (xAccess.is())
{
lNames = xAccess->getElementNames();
diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx
index 104b66fd3259..2d67e8204589 100644
--- a/framework/source/accelerators/storageholder.cxx
+++ b/framework/source/accelerators/storageholder.cxx
@@ -210,7 +210,7 @@ void StorageHolder::commitPath(const OUString& sPath)
pIt != lStorages.rend();
++pIt )
{
- xCommit = css::uno::Reference< css::embed::XTransactedObject >(*pIt, css::uno::UNO_QUERY);
+ xCommit.set(*pIt, css::uno::UNO_QUERY);
if (!xCommit.is())
continue;
xCommit->commit();
@@ -218,7 +218,7 @@ void StorageHolder::commitPath(const OUString& sPath)
// SAFE -> ------------------------------
osl::ClearableMutexGuard aReadLock(m_mutex);
- xCommit = css::uno::Reference< css::embed::XTransactedObject >(m_xRoot, css::uno::UNO_QUERY);
+ xCommit.set(m_xRoot, css::uno::UNO_QUERY);
aReadLock.clear();
// <- SAFE ------------------------------
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx
index 1b45a82dabcf..1eea3b39cefe 100644
--- a/framework/source/classes/framecontainer.cxx
+++ b/framework/source/classes/framecontainer.cxx
@@ -93,7 +93,7 @@ void FrameContainer::remove( const css::uno::Reference< css::frame::XFrame >& xF
// If removed frame was the current active frame - reset state variable.
if (m_xActiveFrame==xFrame)
- m_xActiveFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xActiveFrame.clear();
}
}
@@ -125,7 +125,7 @@ void FrameContainer::clear()
// ... and don't forget to reset the active frame.
// Its an reference to a valid container-item.
// But no container item => no active frame!
- m_xActiveFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xActiveFrame.clear();
}
/**-***************************************************************************************************************
diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx
index 7ee33f26372d..3f1bade759d0 100644
--- a/framework/source/classes/fwktabwindow.cxx
+++ b/framework/source/classes/fwktabwindow.cxx
@@ -100,9 +100,8 @@ void FwkTabPage::CreateDialog()
xHandler = m_xEventHdl;
uno::Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( this ), uno::UNO_QUERY );
- m_xPage = uno::Reference < awt::XWindow >(
- m_xWinProvider->createContainerWindow(
- m_sPageURL, OUString(), xParent, xHandler ), uno::UNO_QUERY );
+ m_xPage.set( m_xWinProvider->createContainerWindow( m_sPageURL, OUString(), xParent, xHandler ),
+ uno::UNO_QUERY );
uno::Reference< awt::XControl > xPageControl( m_xPage, uno::UNO_QUERY );
if ( xPageControl.is() )
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 62d75a72d2f2..9c32c50d727a 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -75,8 +75,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
if (x) sCreator = x.get();
}
- xCreator = css::uno::Reference< css::lang::XSingleServiceFactory >(
- m_xContext->getServiceManager()->createInstanceWithContext(sCreator, m_xContext), css::uno::UNO_QUERY_THROW);
+ xCreator.set( m_xContext->getServiceManager()->createInstanceWithContext(sCreator, m_xContext), css::uno::UNO_QUERY_THROW);
}
catch(const css::uno::Exception&)
{}
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index b409735f330e..20fb3104bf1b 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -201,7 +201,7 @@ void SAL_CALL CloseDispatcher::dispatchWithNotification(const css::util::URL&
// They call us back by using our c++ interface.
m_xResultListener = xListener;
- m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
+ m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
aWriteLock.clear();
// <- SAFE ----------------------------------
@@ -492,7 +492,7 @@ bool CloseDispatcher::implts_closeFrame()
{
SolarMutexGuard g;
- m_xCloseFrame = css::uno::WeakReference< css::frame::XFrame >();
+ m_xCloseFrame.clear();
}
return true;
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 5dda8e56e9cf..2382c2ba1ea2 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -468,9 +468,9 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_searchProt
// create it
try
{
- xHandler = css::uno::Reference< css::frame::XDispatchProvider >(
+ xHandler.set(
css::uno::Reference<css::lang::XMultiServiceFactory>(m_xContext->getServiceManager(), css::uno::UNO_QUERY_THROW)
- ->createInstance(aHandler.m_sUNOName),
+ ->createInstance(aHandler.m_sUNOName),
css::uno::UNO_QUERY);
}
catch(const css::uno::Exception&) {}
@@ -529,7 +529,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_searchProt
css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreateDispatchHelper( EDispatchHelper eHelper ,
const css::uno::Reference< css::frame::XFrame >& xOwner ,
const OUString& sTarget ,
- sal_Int32 nSearchFlags)
+ sal_Int32 nSearchFlags)
{
css::uno::Reference< css::frame::XDispatch > xDispatchHelper;
@@ -543,7 +543,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
if ( ! m_xMenuDispatcher.is() )
{
MenuDispatcher* pDispatcher = new MenuDispatcher( m_xContext, xOwner );
- m_xMenuDispatcher = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ m_xMenuDispatcher.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
xDispatchHelper = m_xMenuDispatcher;
}
@@ -552,7 +552,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
case E_CREATEDISPATCHER :
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, sTarget, nSearchFlags);
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
break;
@@ -562,7 +562,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
if (xDesktop.is())
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, SPECIALTARGET_BLANK, 0);
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
}
break;
@@ -573,7 +573,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
if (xDesktop.is())
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, SPECIALTARGET_DEFAULT, 0);
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
}
break;
@@ -581,21 +581,21 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_getOrCreat
case E_SELFDISPATCHER :
{
LoadDispatcher* pDispatcher = new LoadDispatcher(m_xContext, xOwner, SPECIALTARGET_SELF, 0);
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
break;
case E_CLOSEDISPATCHER :
{
CloseDispatcher* pDispatcher = new CloseDispatcher( m_xContext, xOwner, sTarget );
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
break;
case E_STARTMODULEDISPATCHER :
{
StartModuleDispatcher* pDispatcher = new StartModuleDispatcher( m_xContext, xOwner );
- xDispatchHelper = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
+ xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pDispatcher), css::uno::UNO_QUERY );
}
break;
}
diff --git a/framework/source/dispatch/interceptionhelper.cxx b/framework/source/dispatch/interceptionhelper.cxx
index 44124da8237c..ad707f3a6aaf 100644
--- a/framework/source/dispatch/interceptionhelper.cxx
+++ b/framework/source/dispatch/interceptionhelper.cxx
@@ -106,7 +106,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
// If no list exist register these interceptor for all dispatch events with "*"!
InterceptorInfo aInfo;
- aInfo.xInterceptor = css::uno::Reference< css::frame::XDispatchProvider >(xInterceptor, css::uno::UNO_QUERY);
+ aInfo.xInterceptor.set(xInterceptor, css::uno::UNO_QUERY);
css::uno::Reference< css::frame::XInterceptorInfo > xInfo(xInterceptor, css::uno::UNO_QUERY);
if (xInfo.is())
aInfo.lURLPattern = xInfo->getInterceptedURLs();
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index e342560fa169..7c34d436b8aa 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -184,7 +184,7 @@ void SAL_CALL MenuDispatcher::disposing( const EventObject& ) throw( RuntimeExce
}
// Forget our factory.
- m_xContext = uno::Reference< XComponentContext >();
+ m_xContext.clear();
// Remove our menu from system window if it is still there!
if ( m_pMenuManager )
@@ -251,7 +251,7 @@ bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, bool bMenuFromResource
uno::Reference< XController > xController( xFrame->getController(), UNO_QUERY );
if ( xController.is() )
- xModel = uno::Reference< XModel >( xController->getModel(), UNO_QUERY );
+ xModel.set( xController->getModel(), UNO_QUERY );
// retrieve addon popup menus and add them to our menu bar
AddonMenuManager::MergeAddonPopupMenus( xFrame, nPos, pMenuBar, m_xContext );
diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx
index 9839fd5933f8..bd19c85e3e4d 100644
--- a/framework/source/dispatch/oxt_handler.cxx
+++ b/framework/source/dispatch/oxt_handler.cxx
@@ -69,7 +69,7 @@ Oxt_Handler::~Oxt_Handler()
css::frame::DispatchResultEvent aEvent;
aEvent.State = css::frame::DispatchResultState::FAILURE;
m_xListener->dispatchFinished( aEvent );
- m_xListener = css::uno::Reference< css::frame::XDispatchResultListener >();
+ m_xListener.clear();
}
}
diff --git a/framework/source/dispatch/popupmenudispatcher.cxx b/framework/source/dispatch/popupmenudispatcher.cxx
index 7e7b569ad194..0db118cf1073 100644
--- a/framework/source/dispatch/popupmenudispatcher.cxx
+++ b/framework/source/dispatch/popupmenudispatcher.cxx
@@ -297,7 +297,7 @@ void SAL_CALL PopupMenuDispatcher::disposing( const EventObject& ) throw( Runtim
}
// Forget our factory.
- m_xContext = uno::Reference< XComponentContext >();
+ m_xContext.clear();
}
}
@@ -323,8 +323,7 @@ void PopupMenuDispatcher::impl_RetrievePopupControllerQuery()
OUString aMenuBar( "private:resource/menubar/menubar" );
xMenuBar = xLayoutManager->getElement( aMenuBar );
- m_xPopupCtrlQuery = css::uno::Reference< css::container::XNameAccess >(
- xMenuBar, css::uno::UNO_QUERY );
+ m_xPopupCtrlQuery.set( xMenuBar, css::uno::UNO_QUERY );
}
}
catch ( const css::uno::RuntimeException& )
diff --git a/framework/source/fwe/classes/framelistanalyzer.cxx b/framework/source/fwe/classes/framelistanalyzer.cxx
index b13797182e30..bc892a2606ac 100644
--- a/framework/source/fwe/classes/framelistanalyzer.cxx
+++ b/framework/source/fwe/classes/framelistanalyzer.cxx
@@ -73,8 +73,8 @@ void FrameListAnalyzer::impl_analyze()
m_bReferenceIsHidden = false;
m_bReferenceIsHelp = false;
m_bReferenceIsBacking = false;
- m_xHelp = css::uno::Reference< css::frame::XFrame >();
- m_xBackingComponent = css::uno::Reference< css::frame::XFrame >();
+ m_xHelp.clear();
+ m_xBackingComponent.clear();
// try to get the task container by using the given supplier
css::uno::Reference< css::container::XIndexAccess > xFrameContainer(m_xSupplier->getFrames(), css::uno::UNO_QUERY);
@@ -229,7 +229,7 @@ void FrameListAnalyzer::impl_analyze()
bool bHidden = false;
if ((m_eDetectMode & E_HIDDEN) == E_HIDDEN )
{
- xSet = css::uno::Reference< css::beans::XPropertySet >(xFrame, css::uno::UNO_QUERY);
+ xSet.set(xFrame, css::uno::UNO_QUERY);
if (xSet.is())
{
xSet->getPropertyValue(FRAME_PROPNAME_ISHIDDEN) >>= bHidden;
diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx
index 140dfafeea5e..1a0aabeaa207 100644
--- a/framework/source/fwe/dispatch/interaction.cxx
+++ b/framework/source/fwe/dispatch/interaction.cxx
@@ -117,8 +117,8 @@ RequestFilterSelect_Impl::RequestFilterSelect_Impl( const OUString& sURL )
m_pFilter = new ContinuationFilterSelect;
m_lContinuations.realloc( 2 );
- m_lContinuations[0] = css::uno::Reference< css::task::XInteractionContinuation >( m_pAbort );
- m_lContinuations[1] = css::uno::Reference< css::task::XInteractionContinuation >( m_pFilter );
+ m_lContinuations[0].set( m_pAbort );
+ m_lContinuations[1].set( m_pFilter );
}
// return abort state of interaction
diff --git a/framework/source/fwe/helper/actiontriggerhelper.cxx b/framework/source/fwe/helper/actiontriggerhelper.cxx
index 91bc33f6de65..2098c13ff09c 100644
--- a/framework/source/fwe/helper/actiontriggerhelper.cxx
+++ b/framework/source/fwe/helper/actiontriggerhelper.cxx
@@ -243,9 +243,8 @@ Reference< XPropertySet > CreateActionTrigger( sal_uInt16 nItemId, const Menu* p
Reference< XMultiServiceFactory > xMultiServiceFactory( rActionTriggerContainer, UNO_QUERY );
if ( xMultiServiceFactory.is() )
{
- xPropSet = Reference< XPropertySet >( xMultiServiceFactory->createInstance(
- "com.sun.star.ui.ActionTrigger" ),
- UNO_QUERY );
+ xPropSet.set( xMultiServiceFactory->createInstance( "com.sun.star.ui.ActionTrigger" ),
+ UNO_QUERY );
Any a;
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 7c1247e9bb2a..8d47ee48dace 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -256,7 +256,7 @@ throw( SAXException, RuntimeException, std::exception )
{
++m_nElementDepth;
m_bMenuBarMode = true;
- m_xReader = Reference< XDocumentHandler >( new OReadMenuBarHandler( m_xMenuBarContainer, m_xContainerFactory ));
+ m_xReader.set( new OReadMenuBarHandler( m_xMenuBarContainer, m_xContainerFactory ));
m_xReader->startDocument();
}
@@ -339,7 +339,7 @@ throw( SAXException, RuntimeException, std::exception )
Reference< XIndexContainer > xSubItemContainer;
if ( m_xContainerFactory.is() )
- xSubItemContainer = Reference< XIndexContainer >( m_xContainerFactory->createInstanceWithContext( xComponentContext ), UNO_QUERY );
+ xSubItemContainer.set( m_xContainerFactory->createInstanceWithContext( xComponentContext ), UNO_QUERY );
if ( xSubItemContainer.is() )
{
@@ -390,7 +390,7 @@ throw( SAXException, RuntimeException, std::exception )
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
}
- m_xReader = Reference< XDocumentHandler >( new OReadMenuHandler( xSubItemContainer, m_xContainerFactory ));
+ m_xReader.set( new OReadMenuHandler( xSubItemContainer, m_xContainerFactory ));
m_xReader->startDocument();
}
}
@@ -467,7 +467,7 @@ throw( SAXException, RuntimeException, std::exception )
{
++m_nElementDepth;
m_bMenuPopupMode = true;
- m_xReader = Reference< XDocumentHandler >( new OReadMenuPopupHandler( m_xMenuContainer, m_xContainerFactory ));
+ m_xReader.set( new OReadMenuPopupHandler( m_xMenuContainer, m_xContainerFactory ));
m_xReader->startDocument();
}
else
@@ -552,7 +552,7 @@ throw( SAXException, RuntimeException, std::exception )
// Container must be factory to create sub container
Reference< XIndexContainer > xSubItemContainer;
if ( m_xContainerFactory.is() )
- xSubItemContainer = Reference< XIndexContainer >( m_xContainerFactory->createInstanceWithContext( m_xComponentContext ), UNO_QUERY );
+ xSubItemContainer.set( m_xContainerFactory->createInstanceWithContext( m_xComponentContext ), UNO_QUERY );
// read attributes for menu
for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
@@ -602,7 +602,7 @@ throw( SAXException, RuntimeException, std::exception )
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
}
- m_xReader = Reference< XDocumentHandler >( new OReadMenuHandler( xSubItemContainer, m_xContainerFactory ));
+ m_xReader.set( new OReadMenuHandler( xSubItemContainer, m_xContainerFactory ));
m_xReader->startDocument();
}
else if ( rName == ELEMENT_MENUITEM )
@@ -733,7 +733,7 @@ OWriteMenuDocumentHandler::OWriteMenuDocumentHandler(
m_xWriteDocumentHandler( rDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
+ m_xEmptyList.set( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
}
diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx
index 323b34a1b1ab..01f974fafa93 100644
--- a/framework/source/fwe/xml/statusbardocumenthandler.cxx
+++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx
@@ -488,7 +488,7 @@ OWriteStatusBarDocumentHandler::OWriteStatusBarDocumentHandler(
m_xWriteDocumentHandler( rWriteDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
+ m_xEmptyList.set( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
m_aXMLStatusBarNS = XMLNS_STATUSBAR_PREFIX;
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 922fe4497d9d..db0bf828fd56 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -658,7 +658,7 @@ OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler(
m_rItemAccess( rItemAccess )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
+ m_xEmptyList.set( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;
m_aXMLToolbarNS = XMLNS_TOOLBAR_PREFIX;
diff --git a/framework/source/fwi/classes/propertysethelper.cxx b/framework/source/fwi/classes/propertysethelper.cxx
index 52b6972ebd41..8f1e6acc2da2 100644
--- a/framework/source/fwi/classes/propertysethelper.cxx
+++ b/framework/source/fwi/classes/propertysethelper.cxx
@@ -187,7 +187,7 @@ void SAL_CALL PropertySetHelper::setPropertyValue(const OUString& sProperty,
aEvent.PropertyHandle = aPropInfo.Handle;
aEvent.OldValue = aCurrentValue;
aEvent.NewValue = aValue;
- aEvent.Source = css::uno::Reference< css::uno::XInterface >(m_xBroadcaster.get(), css::uno::UNO_QUERY);
+ aEvent.Source.set(m_xBroadcaster.get(), css::uno::UNO_QUERY);
if (m_bReleaseLockOnCall)
{
diff --git a/framework/source/fwi/jobs/configaccess.cxx b/framework/source/fwi/jobs/configaccess.cxx
index 08dac5561033..0c1921f7c457 100644
--- a/framework/source/fwi/jobs/configaccess.cxx
+++ b/framework/source/fwi/jobs/configaccess.cxx
@@ -152,7 +152,7 @@ void ConfigAccess::close()
css::uno::Reference< css::util::XChangesBatch > xFlush(m_xConfig, css::uno::UNO_QUERY);
if (xFlush.is())
xFlush->commitChanges();
- m_xConfig = css::uno::Reference< css::uno::XInterface >();
+ m_xConfig.clear();
m_eMode = E_CLOSED;
}
}
diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx
index 75e1e0e991c9..28ad0f1771ea 100644
--- a/framework/source/fwi/uielement/constitemcontainer.cxx
+++ b/framework/source/fwi/uielement/constitemcontainer.cxx
@@ -156,7 +156,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference
pSubContainer = new ConstItemContainer( *pSource );
else
pSubContainer = new ConstItemContainer( rSubContainer );
- xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
+ xReturn.set( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
}
return xReturn;
diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx
index 92e96a493fd0..2abde0fd4e07 100644
--- a/framework/source/fwi/uielement/itemcontainer.cxx
+++ b/framework/source/fwi/uielement/itemcontainer.cxx
@@ -123,7 +123,7 @@ Reference< XIndexAccess > ItemContainer::deepCopyContainer( const Reference< XIn
pSubContainer = new ItemContainer( *pSource, rMutex );
else
pSubContainer = new ItemContainer( rSubContainer, rMutex );
- xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
+ xReturn.set( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
}
return xReturn;
diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx
index c08a1ca58e73..93eb5d140e25 100644
--- a/framework/source/fwi/uielement/rootitemcontainer.cxx
+++ b/framework/source/fwi/uielement/rootitemcontainer.cxx
@@ -133,7 +133,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference<
pSubContainer = new ItemContainer( *pSource, m_aShareMutex );
else
pSubContainer = new ItemContainer( rSubContainer, m_aShareMutex );
- xReturn = Reference< XIndexAccess >( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
+ xReturn.set( static_cast< OWeakObject* >( pSubContainer ), UNO_QUERY );
}
return xReturn;
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index cd2bdfa67ef0..68c7f58e05ff 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -68,7 +68,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration
Sequence< css::uno::Reference< XComponent > > seqComponents;
impl_collectAllChildComponents( css::uno::Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents );
OComponentEnumeration* pEnumeration = new OComponentEnumeration( seqComponents );
- xReturn = css::uno::Reference< XEnumeration >( static_cast<OWeakObject*>(pEnumeration), UNO_QUERY );
+ xReturn.set( static_cast<OWeakObject*>(pEnumeration), UNO_QUERY );
}
// Return result of this operation.
@@ -144,7 +144,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
if ( !xController.is() )
{
// Controller not exist - use the VCL-component.
- xComponent = css::uno::Reference< XComponent >( xFrame->getComponentWindow(), UNO_QUERY );
+ xComponent.set( xFrame->getComponentWindow(), UNO_QUERY );
}
else
{
@@ -153,12 +153,12 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
if ( xModel.is() )
{
// Model exist - use the model as component.
- xComponent = css::uno::Reference< XComponent >( xModel, UNO_QUERY );
+ xComponent.set( xModel, UNO_QUERY );
}
else
{
// Model not exist - use the controller as component.
- xComponent = css::uno::Reference< XComponent >( xController, UNO_QUERY );
+ xComponent.set( xController, UNO_QUERY );
}
}
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 224d1558c6bb..c644fde29d3c 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -292,7 +292,7 @@ void OFrames::impl_resetObject()
// This instance can't work if the weakreference to owner is invalid!
// Destroy this to reset this object.
- m_xOwner = WeakReference< XFrame >();
+ m_xOwner.clear();
// Reset pointer to shared container to!
m_pFrameContainer = NULL;
}
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 4b902cda0398..dd76976b691b 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -399,7 +399,7 @@ void StatusIndicatorFactory::impl_createProgress()
{
// use vcl based progress implementation in plugged mode
VCLStatusIndicator* pVCLProgress = new VCLStatusIndicator(xWindow);
- xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pVCLProgress), css::uno::UNO_QUERY);
+ xProgress.set(static_cast< css::task::XStatusIndicator* >(pVCLProgress), css::uno::UNO_QUERY);
}
else if (xFrame.is())
{
@@ -418,7 +418,7 @@ void StatusIndicatorFactory::impl_createProgress()
css::uno::Reference< css::ui::XUIElement > xProgressBar = xLayoutManager->getElement(sPROGRESS_RESOURCE);
if (xProgressBar.is())
- xProgress = css::uno::Reference< css::task::XStatusIndicator >(xProgressBar->getRealInterface(), css::uno::UNO_QUERY);
+ xProgress.set(xProgressBar->getRealInterface(), css::uno::UNO_QUERY);
xLayoutManager->unlock();
}
}
@@ -460,7 +460,7 @@ void StatusIndicatorFactory::impl_showProgress()
css::uno::Reference< css::ui::XUIElement > xProgressBar = xLayoutManager->getElement(sPROGRESS_RESOURCE);
if (xProgressBar.is())
- xProgress = css::uno::Reference< css::task::XStatusIndicator >(xProgressBar->getRealInterface(), css::uno::UNO_QUERY);
+ xProgress.set(xProgressBar->getRealInterface(), css::uno::UNO_QUERY);
}
}
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 8048b084d276..15104f5fb8b6 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -139,7 +139,7 @@ void SAL_CALL TagWindowAsModified::disposing(const css::lang::EventObject& aEven
(aEvent.Source == xFrame)
)
{
- m_xFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xFrame.clear();
return;
}
@@ -149,7 +149,7 @@ void SAL_CALL TagWindowAsModified::disposing(const css::lang::EventObject& aEven
(aEvent.Source == xModel)
)
{
- m_xModel = css::uno::Reference< css::frame::XModel >();
+ m_xModel.clear();
return;
}
}
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 9343024d351b..95da84c75fda 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -457,7 +457,7 @@ void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAc
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( xSettings, UNO_QUERY );
if ( xReplace.is() )
- m_xConfigData = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY );
+ m_xConfigData.set( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY );
else
m_xConfigData = xSettings;
diff --git a/framework/source/interaction/quietinteraction.cxx b/framework/source/interaction/quietinteraction.cxx
index 3b27f1815d4d..c31d5788cac3 100644
--- a/framework/source/interaction/quietinteraction.cxx
+++ b/framework/source/interaction/quietinteraction.cxx
@@ -65,16 +65,16 @@ void SAL_CALL QuietInteraction::handle( const css::uno::Reference< css::task::XI
for (sal_Int32 i=0; i<nCount; ++i)
{
if ( ! xAbort.is() )
- xAbort = css::uno::Reference< css::task::XInteractionAbort >( lContinuations[i], css::uno::UNO_QUERY );
+ xAbort.set( lContinuations[i], css::uno::UNO_QUERY );
if( ! xApprove.is() )
- xApprove = css::uno::Reference< css::task::XInteractionApprove >( lContinuations[i], css::uno::UNO_QUERY );
+ xApprove.set( lContinuations[i], css::uno::UNO_QUERY );
if ( ! xFilter.is() )
- xFilter = css::uno::Reference< css::document::XInteractionFilterSelect >( lContinuations[i], css::uno::UNO_QUERY );
+ xFilter.set( lContinuations[i], css::uno::UNO_QUERY );
if ( ! xFOptions.is() )
- xFOptions = css::uno::Reference< css::document::XInteractionFilterOptions >( lContinuations[i], css::uno::UNO_QUERY );
+ xFOptions.set( lContinuations[i], css::uno::UNO_QUERY );
}
// differ between abortable interactions (error, unknown filter ...)
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index eb31a948bca1..79c976e69433 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -55,7 +55,7 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
m_xDesktop = css::frame::Desktop::create(m_xContext);
- m_xConfig = css::uno::Reference< css::container::XNameAccess >(
+ m_xConfig.set(
::comphelper::ConfigurationHelper::openConfig(
m_xContext,
"/org.openoffice.Setup/Office/Factories",
@@ -81,13 +81,13 @@ DEFINE_INIT_SERVICE(HelpOnStartup,
// Start listening for disposing events of these services,
// so we can react e.g. for an office shutdown
css::uno::Reference< css::lang::XComponent > xComponent;
- xComponent = css::uno::Reference< css::lang::XComponent >(m_xModuleManager, css::uno::UNO_QUERY);
+ xComponent.set(m_xModuleManager, css::uno::UNO_QUERY);
if (xComponent.is())
xComponent->addEventListener(static_cast< css::lang::XEventListener* >(this));
- xComponent = css::uno::Reference< css::lang::XComponent >(m_xDesktop, css::uno::UNO_QUERY);
+ xComponent.set(m_xDesktop, css::uno::UNO_QUERY);
if (xComponent.is())
xComponent->addEventListener(static_cast< css::lang::XEventListener* >(this));
- xComponent = css::uno::Reference< css::lang::XComponent >(m_xConfig, css::uno::UNO_QUERY);
+ xComponent.set(m_xConfig, css::uno::UNO_QUERY);
if (xComponent.is())
xComponent->addEventListener(static_cast< css::lang::XEventListener* >(this));
}
@@ -187,7 +187,7 @@ OUString HelpOnStartup::its_getModuleIdFromEnv(const css::uno::Sequence< css::be
if (xController.is())
xFrame = xController->getFrame();
if (xFrame.is() && xFrame->isTop())
- xDesktopCheck = css::uno::Reference< css::frame::XDesktop >(xFrame->getCreator(), css::uno::UNO_QUERY);
+ xDesktopCheck.set(xFrame->getCreator(), css::uno::UNO_QUERY);
if (!xDesktopCheck.is())
return OUString();
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index bcf91bc6ac2c..9c4a094d8f1e 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -181,9 +181,9 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
// We must check for the supported interface on demand!
// But we preferr the synchronous one ...
m_xJob = m_xContext->getServiceManager()->createInstanceWithContext(m_aJobCfg.getService(), m_xContext);
- xSJob = css::uno::Reference< css::task::XJob >(m_xJob, css::uno::UNO_QUERY);
+ xSJob.set(m_xJob, css::uno::UNO_QUERY);
if (!xSJob.is())
- xAJob = css::uno::Reference< css::task::XAsyncJob >(m_xJob, css::uno::UNO_QUERY);
+ xAJob.set(m_xJob, css::uno::UNO_QUERY);
// execute it asynchron
if (xAJob.is())
@@ -297,12 +297,12 @@ void Job::die()
}
}
- m_xJob = css::uno::Reference< css::uno::XInterface >();
- m_xFrame = css::uno::Reference< css::frame::XFrame >();
- m_xModel = css::uno::Reference< css::frame::XModel >();
- m_xDesktop = css::uno::Reference< css::frame::XDesktop2 >();
- m_xResultListener = css::uno::Reference< css::frame::XDispatchResultListener >();
- m_xResultSourceFake = css::uno::Reference< css::uno::XInterface >();
+ m_xJob.clear();
+ m_xFrame.clear();
+ m_xModel.clear();
+ m_xDesktop.clear();
+ m_xResultListener.clear();
+ m_xResultSourceFake.clear();
m_bPendingCloseFrame = false;
m_bPendingCloseModel = false;
}
@@ -633,7 +633,7 @@ void SAL_CALL Job::jobFinished( /*IN*/ const css::uno::Reference< css::task::XAs
impl_reactForJobResult(aResult);
// Let the job die!
- m_xJob = css::uno::Reference< css::uno::XInterface >();
+ m_xJob.clear();
}
// And let the start method "execute()" finishing it's job.
@@ -813,12 +813,12 @@ void SAL_CALL Job::disposing( const css::lang::EventObject& aEvent ) throw(css::
}
else if (m_xFrame.is() && aEvent.Source == m_xFrame)
{
- m_xFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xFrame.clear();
m_bListenOnFrame = false;
}
else if (m_xModel.is() && aEvent.Source == m_xModel)
{
- m_xModel = css::uno::Reference< css::frame::XModel >();
+ m_xModel.clear();
m_bListenOnModel = false;
}
diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx
index 907cd3fe002c..c45364d209a4 100644
--- a/framework/source/jobs/jobdispatch.cxx
+++ b/framework/source/jobs/jobdispatch.cxx
@@ -214,7 +214,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL JobDispatch::queryDispatch
JobURL aAnalyzedURL(aURL.Complete);
if (aAnalyzedURL.isValid())
- xDispatch = css::uno::Reference< css::frame::XDispatch >( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY );
+ xDispatch.set( static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY );
return xDispatch;
}
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 898a0e43c6b8..7a21bfbc6d82 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -112,7 +112,7 @@ vcl::Window* getWindowFromXUIElement( const uno::Reference< ui::XUIElement >& xU
SolarMutexGuard aGuard;
uno::Reference< awt::XWindow > xWindow;
if ( xUIElement.is() )
- xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY );
+ xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
return VCLUnoHelper::GetWindow( xWindow );
}
@@ -170,7 +170,7 @@ uno::Reference< awt::XWindowPeer > createToolkitWindow( const uno::Reference< un
aDescriptor.Type = awt::WindowClass_SIMPLE;
aDescriptor.WindowServiceName = OUString::createFromAscii( pService );
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = uno::Reference< awt::XWindowPeer >( rParent, uno::UNO_QUERY );
+ aDescriptor.Parent.set( rParent, uno::UNO_QUERY );
aDescriptor.Bounds = awt::Rectangle(0,0,0,0);
aDescriptor.WindowAttributes = 0;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 9220e31d0d2f..260ee34325fb 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -142,7 +142,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) :
if (!comphelper::LibreOfficeKit::isActive())
{
m_pToolbarManager = new ToolbarLayoutManager( xContext, Reference<XUIElementFactory>(m_xUIElementFactoryManager, UNO_QUERY_THROW), this );
- m_xToolbarManager = uno::Reference< ui::XUIConfigurationListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY );
+ m_xToolbarManager.set( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY );
}
m_aAsyncLayoutTimer.SetTimeout( 50 );
@@ -289,7 +289,7 @@ void LayoutManager::implts_reset( bool bAttached )
try
{
// Add listener to new module ui configuration manager
- xModuleCfgMgr = Reference< XUIConfiguration >( xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier ), UNO_QUERY );
+ xModuleCfgMgr.set( xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier ), UNO_QUERY );
if ( xModuleCfgMgr.is() )
xModuleCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
@@ -331,7 +331,7 @@ void LayoutManager::implts_reset( bool bAttached )
try
{
- xDocCfgMgr = Reference< XUIConfiguration >( xUIConfigurationManagerSupplier->getUIConfigurationManager(), UNO_QUERY );
+ xDocCfgMgr.set( xUIConfigurationManagerSupplier->getUIConfigurationManager(), UNO_QUERY );
if ( xDocCfgMgr.is() )
xDocCfgMgr->addConfigurationListener( Reference< XUIConfigurationListener >( static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
@@ -834,7 +834,7 @@ void LayoutManager::implts_destroyStatusBar()
SolarMutexClearableGuard aWriteLock;
m_aStatusBarElement.m_aName.clear();
- xCompStatusBar = Reference< XComponent >( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
+ xCompStatusBar.set( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
m_aStatusBarElement.m_xUIElement.clear();
aWriteLock.clear();
@@ -877,8 +877,8 @@ void LayoutManager::implts_createProgressBar()
Reference< awt::XWindow > xContainerWindow;
SolarMutexResettableGuard aWriteLock;
- xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
- xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
+ xStatusBar.set( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
+ xProgressBar.set( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
xProgressBarBackup = m_xProgressBarBackup;
m_xProgressBarBackup.clear();
xContainerWindow = m_xContainerWindow;
@@ -918,8 +918,7 @@ void LayoutManager::implts_createProgressBar()
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
aWriteLock.reset();
- m_aProgressBarElement.m_xUIElement = Reference< XUIElement >(
- static_cast< cppu::OWeakObject* >( pWrapper ), UNO_QUERY );
+ m_aProgressBarElement.m_xUIElement.set( static_cast< cppu::OWeakObject* >( pWrapper ), UNO_QUERY );
aWriteLock.clear();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -970,13 +969,13 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
SolarMutexClearableGuard aReadLock;
- xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
- xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
+ xStatusBar.set( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
+ xProgressBar.set( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
xContainerWindow = m_xContainerWindow;
Reference< awt::XWindow > xWindow;
if ( xStatusBar.is() )
- xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY );
+ xWindow.set( xStatusBar->getRealInterface(), UNO_QUERY );
else if ( xProgressBar.is() )
{
ProgressBarWrapper* pWrapper = static_cast<ProgressBarWrapper*>(xProgressBar.get());
@@ -1009,8 +1008,8 @@ bool LayoutManager::implts_showProgressBar()
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
SolarMutexClearableGuard aWriteLock;
- xStatusBar = Reference< XUIElement >( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
- xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
+ xStatusBar.set( m_aStatusBarElement.m_xUIElement, UNO_QUERY );
+ xProgressBar.set( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
bool bVisible( m_bVisible );
m_aProgressBarElement.m_bVisible = true;
@@ -1018,7 +1017,7 @@ bool LayoutManager::implts_showProgressBar()
{
if ( xStatusBar.is() && !m_aStatusBarElement.m_bMasterHide )
{
- xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY );
+ xWindow.set( xStatusBar->getRealInterface(), UNO_QUERY );
}
else if ( xProgressBar.is() )
{
@@ -1053,7 +1052,7 @@ bool LayoutManager::implts_hideProgressBar()
bool bHideStatusBar( false );
SolarMutexGuard g;
- xProgressBar = Reference< XUIElement >( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
+ xProgressBar.set( m_aProgressBarElement.m_xUIElement, UNO_QUERY );
bool bInternalStatusBar( false );
if ( xProgressBar.is() )
@@ -1064,7 +1063,7 @@ bool LayoutManager::implts_hideProgressBar()
xWindow = pWrapper->getStatusBar();
Reference< ui::XUIElement > xStatusBarElement = m_aStatusBarElement.m_xUIElement;
if ( xStatusBarElement.is() )
- xStatusBar = Reference< awt::XWindow >( xStatusBarElement->getRealInterface(), UNO_QUERY );
+ xStatusBar.set( xStatusBarElement->getRealInterface(), UNO_QUERY );
bInternalStatusBar = xStatusBar != xWindow;
}
m_aProgressBarElement.m_bVisible = false;
@@ -1176,7 +1175,7 @@ throw (uno::RuntimeException, std::exception)
pSysWindow->SetMenuBar(pMenuBar);
m_bInplaceMenuSet = true;
- m_xInplaceMenuBar = Reference< XComponent >( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY );
+ m_xInplaceMenuBar.set( static_cast<OWeakObject *>(m_pInplaceMenuBar), UNO_QUERY );
}
aWriteLock.clear();
@@ -1370,7 +1369,7 @@ void LayoutManager::implts_reparentChildWindows()
{
try
{
- xStatusBarWindow = Reference< awt::XWindow >( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY );
+ xStatusBarWindow.set( aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY );
}
catch (const RuntimeException&)
{
@@ -2485,7 +2484,7 @@ throw (uno::RuntimeException, std::exception)
Reference< awt::XWindow > xWindow;
if ( bStatusBarVisible && bVisible && xStatusBar.is() )
- xWindow = Reference< awt::XWindow >( xStatusBar->getRealInterface(), UNO_QUERY );
+ xWindow.set( xStatusBar->getRealInterface(), UNO_QUERY );
else if ( xProgressBar.is() && !xStatusBar.is() && bProgressBarVisible )
{
ProgressBarWrapper* pWrapper = static_cast<ProgressBarWrapper*>(xProgressBar.get());
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index bde6b83204bd..1bf595367766 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1021,7 +1021,7 @@ void ToolbarLayoutManager::setParentWindow(
uno::Reference< awt::XWindow > xBottomDockWindow( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY );
SolarMutexClearableGuard aWriteLock;
- m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY );
+ m_xContainerWindow.set( xParentWindow, uno::UNO_QUERY );
m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_TOP] = xTopDockWindow;
m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_LEFT] = xLeftDockWindow;
m_xDockAreaWindows[ui::DockingArea_DOCKINGAREA_RIGHT] = xRightDockWindow;
@@ -1352,7 +1352,7 @@ void ToolbarLayoutManager::implts_reparentToolbars()
{
// We have to retrieve the window reference with try/catch as it is
// possible that all elements have been disposed!
- xWindow = uno::Reference< awt::XWindow >( xUIElement->getRealInterface(), uno::UNO_QUERY );
+ xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
}
catch (const uno::RuntimeException&)
{
@@ -1688,7 +1688,7 @@ uno::Reference< awt::XWindow > ToolbarLayoutManager::implts_getXWindow( const OU
{
if ( pIter->m_aName == aName && pIter->m_xUIElement.is() )
{
- xWindow = uno::Reference< awt::XWindow >( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY );
+ xWindow.set( pIter->m_xUIElement->getRealInterface(), uno::UNO_QUERY );
break;
}
}
@@ -3634,7 +3634,7 @@ throw (uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- xWindow = uno::Reference< awt::XWindow2 >( e.Source, uno::UNO_QUERY );
+ xWindow.set( e.Source, uno::UNO_QUERY );
pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
@@ -3837,8 +3837,8 @@ throw (uno::RuntimeException, std::exception)
try
{
- xCfgMgr = uno::Reference< ui::XUIConfigurationManager >( rEvent.Source, uno::UNO_QUERY );
- xPropSet = uno::Reference< beans::XPropertySet >( xCfgMgr->getSettings( rEvent.ResourceURL, sal_False ), uno::UNO_QUERY );
+ xCfgMgr.set( rEvent.Source, uno::UNO_QUERY );
+ xPropSet.set( xCfgMgr->getSettings( rEvent.ResourceURL, sal_False ), uno::UNO_QUERY );
if ( xPropSet.is() )
xPropSet->getPropertyValue("UIName") >>= aUIName;
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 967264b743ff..18b43ebdb4ae 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -881,7 +881,7 @@ bool LoadEnv::impl_handleContent()
css::uno::Reference< css::frame::XNotifyingDispatch > xHandler;
try
{
- xHandler = css::uno::Reference< css::frame::XNotifyingDispatch >(xLoaderFactory->createInstance(sHandler), css::uno::UNO_QUERY);
+ xHandler.set(xLoaderFactory->createInstance(sHandler), css::uno::UNO_QUERY);
if (!xHandler.is())
continue;
}
@@ -969,12 +969,10 @@ bool LoadEnv::impl_furtherDocsAllowed()
comphelper::OInteractionAbort* pAbort = new comphelper::OInteractionAbort();
comphelper::OInteractionApprove* pApprove = new comphelper::OInteractionApprove();
- lContinuations[0] = css::uno::Reference< css::task::XInteractionContinuation >(
- static_cast< css::task::XInteractionContinuation* >(pAbort),
- css::uno::UNO_QUERY_THROW);
- lContinuations[1] = css::uno::Reference< css::task::XInteractionContinuation >(
- static_cast< css::task::XInteractionContinuation* >(pApprove),
- css::uno::UNO_QUERY_THROW);
+ lContinuations[0].set( static_cast< css::task::XInteractionContinuation* >(pAbort),
+ css::uno::UNO_QUERY_THROW);
+ lContinuations[1].set( static_cast< css::task::XInteractionContinuation* >(pApprove),
+ css::uno::UNO_QUERY_THROW);
css::task::ErrorCodeRequest aErrorCode;
aErrorCode.ErrCode = ERRCODE_SFX_NOMOREDOCUMENTSALLOWED;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 76960f78b066..d7da617df0a5 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1893,7 +1893,7 @@ void AutoRecovery::implts_readConfig()
AutoRecovery::TDocumentInfo aInfo;
aInfo.NewTempURL.clear();
- aInfo.Document = css::uno::Reference< css::frame::XModel >();
+ aInfo.Document.clear();
xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_ORIGINALURL)) >>= aInfo.OrgURL;
xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_TEMPURL)) >>= aInfo.OldTempURL;
xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_TEMPLATEURL)) >>= aInfo.TemplateURL;
@@ -1954,10 +1954,9 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
if (! xCFG.is())
{
// open module config on demand and cache the update access
- xCFG = css::uno::Reference< css::container::XNameAccess >(
- ::comphelper::ConfigurationHelper::openConfig(m_xContext, OUString(CFG_PACKAGE_MODULES),
- ::comphelper::ConfigurationHelper::E_STANDARD),
- css::uno::UNO_QUERY_THROW);
+ xCFG.set( ::comphelper::ConfigurationHelper::openConfig(m_xContext, OUString(CFG_PACKAGE_MODULES),
+ ::comphelper::ConfigurationHelper::E_STANDARD),
+ css::uno::UNO_QUERY_THROW);
/* SAFE */ {
osl::MutexGuard g2(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
@@ -2074,7 +2073,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
try
{
- xCFG = css::uno::Reference< css::container::XHierarchicalNameAccess >(implts_openConfig(), css::uno::UNO_QUERY_THROW);
+ xCFG.set(implts_openConfig(), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xCheck;
xCFG->getByHierarchicalName(OUString(CFG_ENTRY_RECOVERYLIST)) >>= xCheck;
@@ -2108,7 +2107,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo& rIn
css::uno::Reference< css::beans::XPropertySet > xSet;
bool bNew = (!xCheck->hasByName(sID));
if (bNew)
- xSet = css::uno::Reference< css::beans::XPropertySet >(xCreate->createInstance(), css::uno::UNO_QUERY_THROW);
+ xSet.set(xCreate->createInstance(), css::uno::UNO_QUERY_THROW);
else
xCheck->getByName(sID) >>= xSet;
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 8ef42297d4f3..de006a7f8522 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -95,7 +95,7 @@ void Desktop::constructorInit()
// Attention: We share our frame container with this helper. Container is threadsafe himself ... So I think we can do that.
// But look on dispose() for right order of deinitialization.
OFrames* pFramesHelper = new OFrames( this, &m_aChildTaskContainer );
- m_xFramesHelper = css::uno::Reference< css::frame::XFrames >( static_cast< ::cppu::OWeakObject* >(pFramesHelper), css::uno::UNO_QUERY );
+ m_xFramesHelper.set( static_cast< ::cppu::OWeakObject* >(pFramesHelper), css::uno::UNO_QUERY );
// Initialize a new dispatchhelper-object to handle dispatches.
// We use these helper as slave for our interceptor helper ... not directly!
@@ -108,14 +108,14 @@ void Desktop::constructorInit()
// Hold interception helper by reference only - not by pointer!
// So it's easier to destroy it.
InterceptionHelper* pInterceptionHelper = new InterceptionHelper( this, xDispatchProvider );
- m_xDispatchHelper = css::uno::Reference< css::frame::XDispatchProvider >( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
+ m_xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
OUStringBuffer sUntitledPrefix (256);
sUntitledPrefix.append (FWK_RESSTR(STR_UNTITLED_DOCUMENT));
sUntitledPrefix.append (" ");
::comphelper::NumberedCollection* pNumbers = new ::comphelper::NumberedCollection ();
- m_xTitleNumberGenerator = css::uno::Reference< css::frame::XUntitledNumbers >(static_cast< ::cppu::OWeakObject* >(pNumbers), css::uno::UNO_QUERY_THROW);
+ m_xTitleNumberGenerator.set(static_cast< ::cppu::OWeakObject* >(pNumbers), css::uno::UNO_QUERY_THROW);
pNumbers->setOwner ( static_cast< ::cppu::OWeakObject* >(this) );
pNumbers->setUntitledPrefix ( sUntitledPrefix.makeStringAndClear () );
@@ -532,7 +532,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::getCurrentFrame() th
while( xNext.is() )
{
xLast = xNext;
- xNext = css::uno::Reference< css::frame::XFramesSupplier >( xNext->getActiveFrame(), css::uno::UNO_QUERY );
+ xNext.set( xNext->getActiveFrame(), css::uno::UNO_QUERY );
}
}
return css::uno::Reference< css::frame::XFrame >( xLast, css::uno::UNO_QUERY );
@@ -1142,7 +1142,7 @@ void SAL_CALL Desktop::dispatchFinished( const css::frame::DispatchResultEvent&
SolarMutexGuard g;
if( m_eLoadState != E_INTERACTION )
{
- m_xLastFrame = css::uno::Reference< css::frame::XFrame >();
+ m_xLastFrame.clear();
m_eLoadState = E_FAILED;
if( aEvent.State == css::frame::DispatchResultState::SUCCESS )
{
@@ -1213,13 +1213,13 @@ void SAL_CALL Desktop::handle( const css::uno::Reference< css::task::XInteractio
for( sal_Int32 nStep=0; nStep<nCount; ++nStep )
{
if( ! xAbort.is() )
- xAbort = css::uno::Reference< css::task::XInteractionAbort >( lContinuations[nStep], css::uno::UNO_QUERY );
+ xAbort.set( lContinuations[nStep], css::uno::UNO_QUERY );
if( ! xApprove.is() )
- xApprove = css::uno::Reference< css::task::XInteractionApprove >( lContinuations[nStep], css::uno::UNO_QUERY );
+ xApprove.set( lContinuations[nStep], css::uno::UNO_QUERY );
if( ! xFilterSelect.is() )
- xFilterSelect = css::uno::Reference< css::document::XInteractionFilterSelect >( lContinuations[nStep], css::uno::UNO_QUERY );
+ xFilterSelect.set( lContinuations[nStep], css::uno::UNO_QUERY );
}
// differ between abortable interactions (error, unknown filter ...)
@@ -1535,7 +1535,7 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
if( !xController.is() )
{
// Controller not exist - use the VCL-component.
- xComponent = css::uno::Reference< css::lang::XComponent >( xFrame->getComponentWindow(), css::uno::UNO_QUERY );
+ xComponent.set( xFrame->getComponentWindow(), css::uno::UNO_QUERY );
}
else
{
@@ -1544,12 +1544,12 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
if( xModel.is() )
{
// Model exist - use the model as component.
- xComponent = css::uno::Reference< css::lang::XComponent >( xModel, css::uno::UNO_QUERY );
+ xComponent.set( xModel, css::uno::UNO_QUERY );
}
else
{
// Model not exist - use the controller as component.
- xComponent = css::uno::Reference< css::lang::XComponent >( xController, css::uno::UNO_QUERY );
+ xComponent.set( xController, css::uno::UNO_QUERY );
}
}
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 4548670d6d46..1c0b9d163bbe 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -120,7 +120,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
css::uno::Reference< css::frame::XDispatchResultListener > xListener(xTHIS, css::uno::UNO_QUERY);
/* SAFE { */
osl::ClearableMutexGuard aWriteLock(m_mutex);
- m_xBroadcaster = css::uno::Reference< css::uno::XInterface >(xNotifyDispatch, css::uno::UNO_QUERY);
+ m_xBroadcaster.set(xNotifyDispatch, css::uno::UNO_QUERY);
m_aResult = css::uno::Any();
m_aBlock.reset();
aWriteLock.clear();
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 74d7f51c6d57..c10e13575c87 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -524,26 +524,26 @@ void Frame::initListeners()
css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( static_cast< ::cppu::OWeakObject* >(pDispatchHelper), css::uno::UNO_QUERY );
DispatchInformationProvider* pInfoHelper = new DispatchInformationProvider(m_xContext, this);
- m_xDispatchInfoHelper = css::uno::Reference< css::frame::XDispatchInformationProvider >( static_cast< ::cppu::OWeakObject* >(pInfoHelper), css::uno::UNO_QUERY );
+ m_xDispatchInfoHelper.set( static_cast< ::cppu::OWeakObject* >(pInfoHelper), css::uno::UNO_QUERY );
// Initialize a new interception helper object to handle dispatches and implement an interceptor mechanism.
// Set created dispatch provider as slowest slave of it.
// Hold interception helper by reference only - not by pointer!
// So it's easier to destroy it.
InterceptionHelper* pInterceptionHelper = new InterceptionHelper( this, xDispatchProvider );
- m_xDispatchHelper = css::uno::Reference< css::frame::XDispatchProvider >( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
+ m_xDispatchHelper.set( static_cast< ::cppu::OWeakObject* >(pInterceptionHelper), css::uno::UNO_QUERY );
// Initialize a new XFrames-helper-object to handle XIndexAccess and XElementAccess.
// We hold member as reference ... not as pointer too!
// Attention: We share our frame container with this helper. Container is threadsafe himself ... So I think we can do that.
// But look on dispose() for right order of deinitialization.
OFrames* pFramesHelper = new OFrames( this, &m_aChildFrameContainer );
- m_xFramesHelper = css::uno::Reference< css::frame::XFrames >( static_cast< ::cppu::OWeakObject* >(pFramesHelper), css::uno::UNO_QUERY );
+ m_xFramesHelper.set( static_cast< ::cppu::OWeakObject* >(pFramesHelper), css::uno::UNO_QUERY );
// Initialize a the drop target listener.
// We hold member as reference ... not as pointer too!
OpenFileDropTargetListener* pDropListener = new OpenFileDropTargetListener( m_xContext, this );
- m_xDropTargetListener = css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >( static_cast< ::cppu::OWeakObject* >(pDropListener), css::uno::UNO_QUERY );
+ m_xDropTargetListener.set( static_cast< ::cppu::OWeakObject* >(pDropListener), css::uno::UNO_QUERY );
// Safe impossible cases
// We can't work without these helpers!
@@ -853,7 +853,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
// Initialize title functionality
TitleHelper* pTitleHelper = new TitleHelper( xContext );
- m_xTitleHelper = css::uno::Reference< css::frame::XTitle >(static_cast< ::cppu::OWeakObject* >(pTitleHelper), css::uno::UNO_QUERY_THROW);
+ m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pTitleHelper), css::uno::UNO_QUERY_THROW);
pTitleHelper->setOwner(xThis);
}
@@ -2038,7 +2038,7 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException, std::exception
if( m_xParent.is() )
{
m_xParent->getFrames()->remove( xThis );
- m_xParent = css::uno::Reference< css::frame::XFramesSupplier >();
+ m_xParent.clear();
}
/* } SAFE */
@@ -2565,7 +2565,7 @@ void SAL_CALL Frame::disposing( const css::lang::EventObject& aEvent ) throw( cs
aWriteLock.clear();
implts_stopWindowListening();
aWriteLock.reset();
- m_xContainerWindow = css::uno::Reference< css::awt::XWindow >();
+ m_xContainerWindow.clear();
}
}
@@ -2801,7 +2801,7 @@ void Frame::impl_disposeContainerWindow( css::uno::Reference< css::awt::XWindow
// All VclComponents are XComponents; so call dispose before discarding
// a css::uno::Reference< XVclComponent >, because this frame is the owner of the window
xWindow->dispose();
- xWindow = css::uno::Reference< css::awt::XWindow >();
+ xWindow.clear();
}
}
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 6764d1e1cbe7..fadcaf5321b4 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -1462,8 +1462,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld()
if (! xCfg.is())
{
- xCfg = css::uno::Reference< css::container::XNameAccess >(
- ::comphelper::ConfigurationHelper::openConfig(
+ xCfg.set( ::comphelper::ConfigurationHelper::openConfig(
m_xContext,
CFG_NODE_OLD,
::comphelper::ConfigurationHelper::E_STANDARD), // not readonly! Sometimes we need write access there !!!
@@ -1490,8 +1489,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew()
if (! xCfg.is())
{
- xCfg = css::uno::Reference< css::container::XNameAccess >(
- ::comphelper::ConfigurationHelper::openConfig(
+ xCfg.set( ::comphelper::ConfigurationHelper::openConfig(
m_xContext,
CFG_NODE_NEW,
::comphelper::ConfigurationHelper::E_STANDARD),
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index bbe7a818a09b..70c1651707f8 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -238,7 +238,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
if ( ! xParentWindow.is())
bTopWindow = false;
else
- xParentWindowPeer = css::uno::Reference< css::awt::XWindowPeer >(xParentWindow, css::uno::UNO_QUERY_THROW);
+ xParentWindowPeer.set(xParentWindow, css::uno::UNO_QUERY_THROW);
}
// describe window properties.
@@ -248,7 +248,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
aDescriptor.Type = css::awt::WindowClass_TOP;
aDescriptor.WindowServiceName = "window";
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >();
+ aDescriptor.Parent.clear();
aDescriptor.Bounds = aPosSize;
aDescriptor.WindowAttributes = css::awt::WindowAttribute::BORDER |
css::awt::WindowAttribute::MOVEABLE |
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index bacd8f74ad57..cd541f0e17d8 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -318,13 +318,13 @@ throw (css::uno::Exception, css::uno::RuntimeException, std::exception)
// describe top window properties.
aDescriptor.Type = css::awt::WindowClass_TOP;
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >();
+ aDescriptor.Parent.clear();
aDescriptor.Bounds = css::awt::Rectangle( 0, 0, aSize.Width, aSize.Height );
aDescriptor.WindowAttributes = 0;
try
{
- xTopWindow = css::uno::Reference< css::awt::XTopWindow >( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
+ xTopWindow.set( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
}
catch ( const css::uno::RuntimeException& )
{
@@ -356,21 +356,21 @@ throw (css::uno::Exception, css::uno::RuntimeException, std::exception)
// describe container window properties.
aDescriptor.Type = css::awt::WindowClass_SIMPLE;
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( xTopWindow, css::uno::UNO_QUERY );
+ aDescriptor.Parent.set( xTopWindow, css::uno::UNO_QUERY );
aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0);
aDescriptor.WindowAttributes = 0;
- xContainerWindow = css::uno::Reference< css::awt::XWindow >( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
+ xContainerWindow.set( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
// create a tab control window properties
aDescriptor.Type = css::awt::WindowClass_SIMPLE;
aDescriptor.WindowServiceName = "tabcontrol";
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >( xTopWindow, css::uno::UNO_QUERY );
+ aDescriptor.Parent.set( xTopWindow, css::uno::UNO_QUERY );
aDescriptor.Bounds = css::awt::Rectangle( 0,0,0,0 );
aDescriptor.WindowAttributes = 0;
- xTabControl = css::uno::Reference< css::awt::XWindow >( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
+ xTabControl.set( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
if ( xContainerWindow.is() && xTabControl.is() )
{
@@ -435,11 +435,11 @@ void SAL_CALL TabWindow::dispose() throw (css::uno::RuntimeException, std::excep
if ( xComponent.is() )
xComponent->dispose();
- xComponent = css::uno::Reference< css::lang::XComponent >( xContainerWindow, css::uno::UNO_QUERY );
+ xComponent.set( xContainerWindow, css::uno::UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
- xComponent = css::uno::Reference< css::lang::XComponent >( xTopWindow, css::uno::UNO_QUERY );
+ xComponent.set( xTopWindow, css::uno::UNO_QUERY );
if ( xComponent.is() )
xComponent->dispose();
diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx
index 08f8e77c2298..e343a78b2a1d 100644
--- a/framework/source/tabwin/tabwinfactory.cxx
+++ b/framework/source/tabwin/tabwinfactory.cxx
@@ -109,7 +109,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception )
css::awt::WindowDescriptor aDescriptor;
aDescriptor.Type = css::awt::WindowClass_TOP;
aDescriptor.ParentIndex = -1;
- aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >();
+ aDescriptor.Parent.clear();
aDescriptor.Bounds = css::awt::Rectangle(0,0,0,0);
aDescriptor.WindowAttributes = css::awt::WindowAttribute::BORDER|
css::awt::WindowAttribute::SIZEABLE|
@@ -118,8 +118,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception )
css::awt::WindowAttribute::MINSIZE;
// create a parent window
- xTopWindow = css::uno::Reference< css::awt::XTopWindow >(
- xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
+ xTopWindow.set( xToolkit->createWindow( aDescriptor ), css::uno::UNO_QUERY );
}
if ( xTopWindow.is() )
@@ -133,8 +132,7 @@ throw ( css::uno::Exception, css::uno::RuntimeException, std::exception )
aArgs[0] = css::uno::makeAny( aPropValue );
pTabWindow->initialize( aArgs );
- xReturn = css::uno::Reference< css::uno::XInterface >(
- static_cast< OWeakObject* >( pTabWindow ), css::uno::UNO_QUERY );
+ xReturn.set( static_cast< OWeakObject* >( pTabWindow ), css::uno::UNO_QUERY );
}
return xReturn;
diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx
index 6f54ba58f8d6..b13a66edca5a 100644
--- a/framework/source/uiconfiguration/globalsettings.cxx
+++ b/framework/source/uiconfiguration/globalsettings.cxx
@@ -231,8 +231,7 @@ bool GlobalSettings_Access::impl_initConfigAccess()
aPropValue.Value = css::uno::makeAny( sal_True );
aArgs[1] = css::uno::makeAny( aPropValue );
- m_xConfigAccess = css::uno::Reference< css::container::XNameAccess >(
- xConfigProvider->createInstanceWithArguments(
+ m_xConfigAccess.set(xConfigProvider->createInstanceWithArguments(
SERVICENAME_CFGREADACCESS, aArgs ),
css::uno::UNO_QUERY );
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 2de5f0e9a90d..0287af110eb6 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -544,7 +544,7 @@ bool ImageManagerImpl::implts_storeUserImages(
}
// Commit user bitmaps storage
- xTransaction = uno::Reference< XTransactedObject >( xUserBitmapsStorage, UNO_QUERY );
+ xTransaction.set( xUserBitmapsStorage, UNO_QUERY );
if ( xTransaction.is() )
xTransaction->commit();
}
@@ -554,7 +554,7 @@ bool ImageManagerImpl::implts_storeUserImages(
ImagesConfiguration::StoreImages( m_xContext, xOutputStream, aUserImageListInfo );
// Commit user image storage
- xTransaction = uno::Reference< XTransactedObject >( xUserImageStorage, UNO_QUERY );
+ xTransaction.set( xUserImageStorage, UNO_QUERY );
if ( xTransaction.is() )
xTransaction->commit();
}
@@ -584,12 +584,12 @@ bool ImageManagerImpl::implts_storeUserImages(
uno::Reference< XTransactedObject > xTransaction;
// Commit user image storage
- xTransaction = uno::Reference< XTransactedObject >( xUserImageStorage, UNO_QUERY );
+ xTransaction.set( xUserImageStorage, UNO_QUERY );
if ( xTransaction.is() )
xTransaction->commit();
// Commit user bitmaps storage
- xTransaction = uno::Reference< XTransactedObject >( xUserBitmapsStorage, UNO_QUERY );
+ xTransaction.set( xUserBitmapsStorage, UNO_QUERY );
if ( xTransaction.is() )
xTransaction->commit();
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 6aa77d2a10fb..9f9999e414ee 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -436,9 +436,9 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream ));
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer );
if ( pRootItemContainer )
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
else
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -459,7 +459,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -476,7 +476,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -508,7 +508,7 @@ void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElement
}
// At least we provide an empty settings container!
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer() ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer() ), UNO_QUERY );
}
ModuleUIConfigurationManager::UIElementData* ModuleUIConfigurationManager::impl_findUIElementData( const OUString& aResourceURL, sal_Int16 nElementType, bool bLoad )
@@ -903,8 +903,7 @@ ModuleUIConfigurationManager::ModuleUIConfigurationManager(
}
// initialize root storages for all resource types
- m_xUserRootCommit = css::uno::Reference< css::embed::XTransactedObject >(
- m_pStorageHandler[css::ui::UIElementType::MENUBAR]->getOrCreateRootStorageUser(), css::uno::UNO_QUERY); // can be empty
+ m_xUserRootCommit.set( m_pStorageHandler[css::ui::UIElementType::MENUBAR]->getOrCreateRootStorageUser(), css::uno::UNO_QUERY); // can be empty
m_xDefaultConfigStorage = m_pStorageHandler[css::ui::UIElementType::MENUBAR]->getParentStorageShare(
m_pStorageHandler[css::ui::UIElementType::MENUBAR]->getWorkingStorageShare());
m_xUserConfigStorage = m_pStorageHandler[css::ui::UIElementType::MENUBAR]->getParentStorageUser(
@@ -1226,7 +1225,7 @@ throw (css::container::NoSuchElementException, css::lang::IllegalArgumentExcepti
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
if ( xReplace.is() )
- pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ pDataSettings->xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
else
pDataSettings->xSettings = aNewData;
pDataSettings->bDefault = false;
@@ -1264,7 +1263,7 @@ throw (css::container::NoSuchElementException, css::lang::IllegalArgumentExcepti
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
if ( xReplace.is() )
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
else
aUIElementData.xSettings = aNewData;
aUIElementData.aName = RetrieveNameFromResourceURL( ResourceURL ) + m_aXMLPostfix;
@@ -1415,7 +1414,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException,
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
if ( xReplace.is() )
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
else
aUIElementData.xSettings = aNewData;
aUIElementData.aName = RetrieveNameFromResourceURL( NewResourceURL ) + m_aXMLPostfix;
@@ -1457,8 +1456,8 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager()
if ( !m_xModuleImageManager.is() )
{
- m_xModuleImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xContext )),
- UNO_QUERY );
+ m_xModuleImageManager.set( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xContext )),
+ UNO_QUERY );
Reference< XInitialization > xInit( m_xModuleImageManager, UNO_QUERY );
Sequence< Any > aPropSeq( 3 );
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index 2172f3e3cdff..704343a3e8fe 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -331,7 +331,7 @@ bool ConfigurationAccess_UICategory::initializeConfigAccess()
aPropValue.Value <<= m_aConfigCategoryAccess;
aArgs[0] <<= aPropValue;
- m_xConfigAccess = Reference< XNameAccess >( m_xConfigProvider->createInstanceWithArguments(
+ m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", aArgs ),UNO_QUERY );
if ( m_xConfigAccess.is() )
{
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 153265749e10..0451b6732a0a 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -354,9 +354,9 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType,
Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream ));
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer );
if ( pRootItemContainer )
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
else
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -377,7 +377,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType,
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
ToolBoxConfiguration::LoadToolBox( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -394,7 +394,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType,
Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY );
StatusBarConfiguration::LoadStatusBar( m_xContext, xInputStream, xIndexContainer );
RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer );
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, true ) ), UNO_QUERY );
return;
}
catch ( const css::lang::WrappedTargetException& )
@@ -426,7 +426,7 @@ void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType,
}
// At least we provide an empty settings container!
- aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer()), UNO_QUERY );
+ aUIElementData.xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer()), UNO_QUERY );
}
UIConfigurationManager::UIElementData* UIConfigurationManager::impl_findUIElementData( const OUString& aResourceURL, sal_Int16 nElementType, bool bLoad )
@@ -981,7 +981,7 @@ throw (css::container::NoSuchElementException, css::lang::IllegalArgumentExcepti
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
if ( xReplace.is() )
- pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ pDataSettings->xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
else
pDataSettings->xSettings = aNewData;
@@ -1109,7 +1109,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException,
// Create a copy of the data if the container is not const
Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY );
if ( xReplace.is() )
- pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
+ pDataSettings->xSettings.set( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY );
else
pDataSettings->xSettings = aNewData;
@@ -1153,8 +1153,8 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw
if ( !m_xImageManager.is() )
{
- m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( m_xContext )),
- UNO_QUERY );
+ m_xImageManager.set( static_cast< cppu::OWeakObject *>( new ImageManager( m_xContext )),
+ UNO_QUERY );
Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY );
Sequence< Any > aPropSeq( 2 );
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index bccb30d9795a..31bc9b123449 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1249,7 +1249,7 @@ bool ConfigurationAccess_WindowState::impl_initializeConfigAccess()
aPropValue.Value <<= sal_True;
aArgs[1] <<= aPropValue;
- m_xConfigAccess = Reference< XNameAccess >( m_xConfigProvider->createInstanceWithArguments(
+ m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess", aArgs ), UNO_QUERY );
if ( m_xConfigAccess.is() )
{
@@ -1410,7 +1410,7 @@ throw (css::container::NoSuchElementException, css::lang::WrappedTargetException
{
Reference< XNameAccess > xResourceURLWindowState;
ConfigurationAccess_WindowState* pModuleWindowState = new ConfigurationAccess_WindowState( aWindowStateConfigFile, m_xContext );
- xResourceURLWindowState = Reference< XNameAccess >( static_cast< cppu::OWeakObject* >( pModuleWindowState ),UNO_QUERY );
+ xResourceURLWindowState.set( static_cast< cppu::OWeakObject* >( pModuleWindowState ),UNO_QUERY );
pModuleIter->second = xResourceURLWindowState;
a <<= xResourceURLWindowState;
}
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 1e57e9252d57..ead89e761b90 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -295,9 +295,9 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
try
{
- xController = Reference< XStatusListener >( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
- aURL, aArgs, m_xContext ),
- UNO_QUERY );
+ xController.set( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
+ aURL, aArgs, m_xContext ),
+ UNO_QUERY );
}
catch ( uno::Exception& )
{
@@ -309,7 +309,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
::cppu::OWeakObject* pController = 0;
pController = ToolBarMerger::CreateController( m_xContext, m_xFrame, m_pToolBar, aURL, nId, nWidth, aControlType );
- xController = Reference< XStatusListener >( pController, UNO_QUERY );
+ xController.set( pController, UNO_QUERY );
}
// insert controller to the map
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx
index b2d3e2864b01..793a521b3bd1 100644
--- a/framework/source/uielement/addonstoolbarwrapper.cxx
+++ b/framework/source/uielement/addonstoolbarwrapper.cxx
@@ -116,7 +116,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
pToolBar = VclPtr<ToolBox>::Create( pWindow, nStyles );
pToolBarManager = new AddonsToolBarManager( m_xContext, xFrame, m_aResourceURL, pToolBar );
- m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
+ m_xToolBarManager.set( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
}
}
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 9b14be816952..fb5bca7ac7f2 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -827,7 +827,7 @@ IMPL_LINK_TYPED( MenuBarManager, Activate, Menu *, pMenu, bool )
if ( m_xDispatchProvider.is() )
xDispatchProvider = m_xDispatchProvider;
else
- xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
+ xDispatchProvider.set( m_xFrame, UNO_QUERY );
if ( xDispatchProvider.is() )
{
@@ -1223,7 +1223,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pNewPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pMenu->SetPopupMenu( nItemId, pNewPopupMenu );
- pItemHandler->xPopupMenu = Reference< css::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
+ pItemHandler->xPopupMenu.set( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
pItemHandler->aMenuItemURL = aItemCommand;
m_aMenuItemHandlerVector.push_back( pItemHandler );
delete pPopup;
@@ -1353,7 +1353,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pMenu->SetPopupMenu( pItemHandler->nItemId, pPopupMenu );
- pItemHandler->xPopupMenu = Reference< css::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
+ pItemHandler->xPopupMenu.set( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
if ( bAccessibilityEnabled && CreatePopupMenuController( pItemHandler ) )
{
@@ -1529,7 +1529,7 @@ void MenuBarManager::RetrieveImageManagers()
if ( xSupplier.is() )
{
Reference< XUIConfigurationManager > xDocUICfgMgr( xSupplier->getUIConfigurationManager(), UNO_QUERY );
- m_xDocImageManager = Reference< XImageManager >( xDocUICfgMgr->getImageManager(), UNO_QUERY );
+ m_xDocImageManager.set( xDocUICfgMgr->getImageManager(), UNO_QUERY );
m_xDocImageManager->addConfigurationListener(
Reference< XUIConfigurationListener >(
static_cast< OWeakObject* >( this ), UNO_QUERY ));
@@ -1957,7 +1957,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame,Menu* pAddonMenu,boo
VCLXPopupMenu* pVCLXPopupMenu = new VCLXPopupMenu;
PopupMenu* pCtlPopupMenu = static_cast<PopupMenu *>(pVCLXPopupMenu->GetMenu());
pAddonMenu->SetPopupMenu( pMenuItemHandler->nItemId, pCtlPopupMenu );
- pMenuItemHandler->xPopupMenu = Reference< css::awt::XPopupMenu >( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
+ pMenuItemHandler->xPopupMenu.set( static_cast<OWeakObject *>(pVCLXPopupMenu), UNO_QUERY );
}
}
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 4e149cf97127..71c21ba786c0 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -186,13 +186,13 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
false,
true );
- m_xMenuBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pMenuBarManager ), UNO_QUERY );
+ m_xMenuBarManager.set( static_cast< OWeakObject *>( pMenuBarManager ), UNO_QUERY );
}
// Initialize toolkit menu bar implementation to have awt::XMenuBar for data exchange.
// Don't use this toolkit menu bar or one of its functions. It is only used as a data container!
pAwtMenuBar = new VCLXMenuBar( pVCLMenuBar );
- m_xMenuBar = Reference< XMenuBar >( static_cast< OWeakObject *>( pAwtMenuBar ), UNO_QUERY );
+ m_xMenuBar.set( static_cast< OWeakObject *>( pAwtMenuBar ), UNO_QUERY );
}
}
}
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 0788fd468d57..9ffa365c32f5 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -391,7 +391,7 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent
osl::ClearableMutexGuard aLock( m_aMutex );
xPopupMenu = m_xPopupMenu;
- xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
+ xDispatchProvider.set( m_xFrame, UNO_QUERY );
xContext = m_xContext;
xURLTransformer = m_xURLTransformer;
aLock.clear();
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx
index 20ccae7d434d..916b0017eef5 100644
--- a/framework/source/uielement/progressbarwrapper.cxx
+++ b/framework/source/uielement/progressbarwrapper.cxx
@@ -313,9 +313,8 @@ throw (uno::RuntimeException, std::exception)
uno::Reference< lang::XComponent >(
static_cast< cppu::OWeakObject* >( this ),
uno::UNO_QUERY ));
- xComp = uno::Reference< uno::XInterface >(
- static_cast< cppu::OWeakObject* >( pWrapper ),
- uno::UNO_QUERY );
+ xComp.set(static_cast< cppu::OWeakObject* >( pWrapper ),
+ uno::UNO_QUERY );
m_xProgressBarIfacWrapper = xComp;
}
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 7bdd262de1a4..6311bff9e17c 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -276,7 +276,7 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
Sequence< PropertyValue > aArgsList;
osl::ClearableMutexGuard aLock( m_aMutex );
- xDispatchProvider = Reference< XDispatchProvider >( m_xFrame, UNO_QUERY );
+ xDispatchProvider.set( m_xFrame, UNO_QUERY );
aLock.clear();
if (( nIndex >= 0 ) &&
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 8a0448f64c24..317d5396f1e0 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -363,8 +363,7 @@ void StatusBarManager::CreateControllers()
if ( m_xStatusbarControllerFactory.is() &&
m_xStatusbarControllerFactory->hasController( aCommandURL, m_aModuleIdentifier ))
{
- xController = uno::Reference< frame::XStatusbarController >(
- m_xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(
+ xController.set(m_xStatusbarControllerFactory->createInstanceWithArgumentsAndContext(
aCommandURL, aArgs, m_xContext ),
uno::UNO_QUERY );
bInit = false; // Initialization is done through the factory service
@@ -394,8 +393,7 @@ void StatusBarManager::CreateControllers()
}
if ( pController )
- xController = uno::Reference< frame::XStatusbarController >(
- static_cast< ::cppu::OWeakObject *>( pController ),
+ xController.set(static_cast< ::cppu::OWeakObject *>( pController ),
uno::UNO_QUERY );
}
diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx
index 6a4f6dae1bc2..1aab781592a6 100644
--- a/framework/source/uielement/statusbarwrapper.cxx
+++ b/framework/source/uielement/statusbarwrapper.cxx
@@ -113,7 +113,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments )
pStatusBar = VclPtr<FrameworkStatusBar>::Create( pWindow, nStyles );
pStatusBarManager = new StatusBarManager( m_xContext, xFrame, m_aResourceURL, pStatusBar );
static_cast<FrameworkStatusBar*>(pStatusBar)->SetStatusBarManager( pStatusBarManager );
- m_xStatusBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pStatusBarManager ), UNO_QUERY );
+ m_xStatusBarManager.set( static_cast< OWeakObject *>( pStatusBarManager ), UNO_QUERY );
pStatusBar->SetUniqueId( HID_STATUSBAR );
}
}
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 524fa2ebdb9b..deba211b0d6e 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -913,9 +913,8 @@ void ToolBarManager::CreateControllers()
}
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
- xController = Reference< XStatusListener >( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext(
- aCommandURL, aArgs, m_xContext ),
- UNO_QUERY );
+ xController.set( m_xToolbarControllerFactory->createInstanceWithArgumentsAndContext( aCommandURL, aArgs, m_xContext ),
+ UNO_QUERY );
bInit = false; // Initialization is done through the factory service
}
@@ -948,7 +947,7 @@ void ToolBarManager::CreateControllers()
MenuDescriptionMap::iterator it = m_aMenuMap.find( nId );
if ( it == m_aMenuMap.end() )
{
- xController = Reference< XStatusListener >(
+ xController.set(
new GenericToolbarController( m_xContext, m_xFrame, m_pToolBar, nId, aCommandURL ));
// Accessibility support: Set toggle button role for specific commands
@@ -957,13 +956,13 @@ void ToolBarManager::CreateControllers()
m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | ToolBoxItemBits::CHECKABLE );
}
else
- xController = Reference< XStatusListener >(
+ xController.set(
new MenuToolbarController( m_xContext, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] ));
}
}
else if ( pController )
{
- xController = Reference< XStatusListener >( static_cast< ::cppu::OWeakObject *>( pController ), UNO_QUERY );
+ xController.set( static_cast< ::cppu::OWeakObject *>( pController ), UNO_QUERY );
}
}
@@ -1109,7 +1108,7 @@ void ToolBarManager::AddImageOrientationListener()
Reference< XStatusListener >( static_cast< ::cppu::OWeakObject *>( this ), UNO_QUERY ),
m_xContext,
m_xFrame );
- m_xImageOrientationListener = Reference< XComponent >( static_cast< ::cppu::OWeakObject *>(
+ m_xImageOrientationListener.set( static_cast< ::cppu::OWeakObject *>(
pImageOrientation ), UNO_QUERY );
pImageOrientation->addStatusListener(
OUString( ".uno:ImageOrientation" ));
@@ -1162,7 +1161,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if ( xSupplier.is() )
{
m_xDocUICfgMgr.set( xSupplier->getUIConfigurationManager(), UNO_QUERY );
- m_xDocImageManager = Reference< XImageManager >( m_xDocUICfgMgr->getImageManager(), UNO_QUERY );
+ m_xDocImageManager.set( m_xDocUICfgMgr->getImageManager(), UNO_QUERY );
m_xDocImageManager->addConfigurationListener(
Reference< XUIConfigurationListener >(
static_cast< OWeakObject* >( this ), UNO_QUERY ));
@@ -1183,7 +1182,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
theModuleUIConfigurationManagerSupplier::get( m_xContext );
m_xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
- m_xModuleImageManager = Reference< XImageManager >( m_xUICfgMgr->getImageManager(), UNO_QUERY );
+ m_xModuleImageManager.set( m_xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
static_cast< OWeakObject* >( this ), UNO_QUERY ));
}
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 60740696d077..4789e1c5a823 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -152,7 +152,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th
pToolBar = VclPtr<ToolBox>::Create( pWindow, nStyles );
pToolBarManager = new ToolBarManager( m_xContext, xFrame, m_aResourceURL, pToolBar );
- m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
+ m_xToolBarManager.set( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
pToolBar->WillUsePopupMode( bPopupMode );
}
}
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index efe4d042bc1c..9603cb12c6a6 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -205,7 +205,7 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
if ( xContainer.is() )
xContainer->removeContainerListener(m_xConfigListener);
- xContainer = Reference< XContainer >( m_xConfigAccessPopups, UNO_QUERY );
+ xContainer.set( m_xConfigAccessPopups, UNO_QUERY );
if ( xContainer.is() )
xContainer->removeContainerListener(m_xConfigAccessListener);
}
@@ -511,7 +511,7 @@ bool ConfigurationAccess_UICommand::initializeConfigAccess()
aPropValue.Value <<= m_aConfigCmdAccess;
aArgs[0] <<= aPropValue;
- m_xConfigAccess = Reference< XNameAccess >( m_xConfigProvider->createInstanceWithArguments(
+ m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", aArgs ),UNO_QUERY );
if ( m_xConfigAccess.is() )
{
@@ -526,7 +526,7 @@ bool ConfigurationAccess_UICommand::initializeConfigAccess()
aPropValue.Value <<= m_aConfigPopupAccess;
aArgs[0] <<= aPropValue;
- m_xConfigAccessPopups = Reference< XNameAccess >( m_xConfigProvider->createInstanceWithArguments(
+ m_xConfigAccessPopups.set( m_xConfigProvider->createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess", aArgs ),UNO_QUERY );
if ( m_xConfigAccessPopups.is() )
{
@@ -586,7 +586,7 @@ void SAL_CALL ConfigurationAccess_UICommand::disposing( const EventObject& aEven
m_xConfigAccess.clear();
else
{
- xIfac2 = Reference< XInterface >( m_xConfigAccessPopups, UNO_QUERY );
+ xIfac1.set( m_xConfigAccessPopups, UNO_QUERY );
if ( xIfac1 == xIfac2 )
m_xConfigAccessPopups.clear();
}
@@ -679,7 +679,7 @@ throw (css::container::NoSuchElementException, css::lang::WrappedTargetException
ConfigurationAccess_UICommand* pUICommands = new ConfigurationAccess_UICommand( aCommandFile,
m_xGenericUICommands,
m_xContext );
- xUICommands = Reference< XNameAccess >( static_cast< cppu::OWeakObject* >( pUICommands ),UNO_QUERY );
+ xUICommands.set( static_cast< cppu::OWeakObject* >( pUICommands ),UNO_QUERY );
pIter->second = xUICommands;
a <<= xUICommands;
}
diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx
index ba6d53f6cc77..07485df4455f 100644
--- a/framework/source/uifactory/addonstoolbarfactory.cxx
+++ b/framework/source/uifactory/addonstoolbarfactory.cxx
@@ -215,7 +215,7 @@ throw ( css::container::NoSuchElementException,
SolarMutexGuard aGuard;
AddonsToolBarWrapper* pToolBarWrapper = new AddonsToolBarWrapper( m_xContext );
- xToolBar = Reference< css::ui::XUIElement >( static_cast<OWeakObject *>(pToolBarWrapper), UNO_QUERY );
+ xToolBar.set( static_cast<OWeakObject *>(pToolBarWrapper), UNO_QUERY );
Reference< XInitialization > xInit( xToolBar, UNO_QUERY );
xInit->initialize( aPropSeq );
}
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx
index 7c7be1c67c25..fdc06a6e4d0a 100644
--- a/framework/source/uifactory/factoryconfiguration.cxx
+++ b/framework/source/uifactory/factoryconfiguration.cxx
@@ -201,7 +201,7 @@ void ConfigurationAccess_ControllerFactory::readConfigurationData()
try
{
- m_xConfigAccess = Reference< XNameAccess >( m_xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGREADACCESS,aArgs ), UNO_QUERY );
+ m_xConfigAccess.set( m_xConfigProvider->createInstanceWithArguments(SERVICENAME_CFGREADACCESS,aArgs ), UNO_QUERY );
}
catch ( const WrappedTargetException& )
{
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index f2a86863e25a..232073a7d3ab 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -601,7 +601,7 @@ OWriteImagesDocumentHandler::OWriteImagesDocumentHandler(
m_xWriteDocumentHandler( rWriteDocumentHandler )
{
::comphelper::AttributeList* pList = new ::comphelper::AttributeList;
- m_xEmptyList = Reference< XAttributeList >( static_cast<XAttributeList *>(pList), UNO_QUERY );
+ m_xEmptyList.set( static_cast<XAttributeList *>(pList), UNO_QUERY );
m_aAttributeType = ATTRIBUTE_TYPE_CDATA;
m_aXMLImageNS = XMLNS_IMAGE_PREFIX;
m_aXMLXlinkNS = XMLNS_XLINK_PREFIX;