framework/source/accelerators/acceleratorconfiguration.cxx | 10 +- framework/source/accelerators/presethandler.cxx | 8 +- framework/source/accelerators/storageholder.cxx | 4 - framework/source/classes/framecontainer.cxx | 4 - framework/source/classes/fwktabwindow.cxx | 5 - framework/source/classes/taskcreator.cxx | 3 framework/source/dispatch/closedispatcher.cxx | 4 - framework/source/dispatch/dispatchprovider.cxx | 20 ++--- framework/source/dispatch/interceptionhelper.cxx | 2 framework/source/dispatch/menudispatcher.cxx | 4 - framework/source/dispatch/oxt_handler.cxx | 2 framework/source/dispatch/popupmenudispatcher.cxx | 5 - framework/source/fwe/classes/framelistanalyzer.cxx | 6 - framework/source/fwe/dispatch/interaction.cxx | 4 - framework/source/fwe/helper/actiontriggerhelper.cxx | 5 - framework/source/fwe/xml/menudocumenthandler.cxx | 14 +-- framework/source/fwe/xml/statusbardocumenthandler.cxx | 2 framework/source/fwe/xml/toolboxdocumenthandler.cxx | 2 framework/source/fwi/classes/propertysethelper.cxx | 2 framework/source/fwi/jobs/configaccess.cxx | 2 framework/source/fwi/uielement/constitemcontainer.cxx | 2 framework/source/fwi/uielement/itemcontainer.cxx | 2 framework/source/fwi/uielement/rootitemcontainer.cxx | 2 framework/source/helper/ocomponentaccess.cxx | 8 +- framework/source/helper/oframes.cxx | 2 framework/source/helper/statusindicatorfactory.cxx | 6 - framework/source/helper/tagwindowasmodified.cxx | 4 - framework/source/helper/uiconfigelementwrapperbase.cxx | 2 framework/source/interaction/quietinteraction.cxx | 8 +- framework/source/jobs/helponstartup.cxx | 10 +- framework/source/jobs/job.cxx | 22 ++--- framework/source/jobs/jobdispatch.cxx | 2 framework/source/layoutmanager/helpers.cxx | 4 - framework/source/layoutmanager/layoutmanager.cxx | 37 ++++------ framework/source/layoutmanager/toolbarlayoutmanager.cxx | 12 +-- framework/source/loadenv/loadenv.cxx | 12 +-- framework/source/services/autorecovery.cxx | 13 +-- framework/source/services/desktop.cxx | 22 ++--- framework/source/services/dispatchhelper.cxx | 2 framework/source/services/frame.cxx | 16 ++-- framework/source/services/pathsettings.cxx | 6 - framework/source/services/taskcreatorsrv.cxx | 4 - framework/source/tabwin/tabwindow.cxx | 16 ++-- framework/source/tabwin/tabwinfactory.cxx | 8 -- framework/source/uiconfiguration/globalsettings.cxx | 3 framework/source/uiconfiguration/imagemanagerimpl.cxx | 8 +- framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 23 ++---- framework/source/uiconfiguration/uicategorydescription.cxx | 2 framework/source/uiconfiguration/uiconfigurationmanager.cxx | 18 ++-- framework/source/uiconfiguration/windowstateconfiguration.cxx | 4 - framework/source/uielement/addonstoolbarmanager.cxx | 8 +- framework/source/uielement/addonstoolbarwrapper.cxx | 2 framework/source/uielement/menubarmanager.cxx | 10 +- framework/source/uielement/menubarwrapper.cxx | 4 - framework/source/uielement/newmenucontroller.cxx | 2 framework/source/uielement/progressbarwrapper.cxx | 5 - framework/source/uielement/recentfilesmenucontroller.cxx | 2 framework/source/uielement/statusbarmanager.cxx | 6 - framework/source/uielement/statusbarwrapper.cxx | 2 framework/source/uielement/toolbarmanager.cxx | 17 ++-- framework/source/uielement/toolbarwrapper.cxx | 2 framework/source/uielement/uicommanddescription.cxx | 10 +- framework/source/uifactory/addonstoolbarfactory.cxx | 2 framework/source/uifactory/factoryconfiguration.cxx | 2 framework/source/xml/imagesdocumenthandler.cxx | 2 65 files changed, 223 insertions(+), 241 deletions(-)
New commits: commit 5797d29e9ead0a3dd181b616dfcc968a9127012d Author: Noel Grandin <n...@peralex.com> Date: Mon Nov 2 10:04:55 2015 +0200 use uno::Reference::set method instead of assignment Change-Id: Ic979f8a7734d0ef7a915d47a875cdcd460c0cc58 diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index d6ef53c..96ccfb1 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 54ee973..35a4173 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 104b66f..2d67e82 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 1b45a82..1eea3b3 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 7ee33f2..3f1bade 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 62d75a7..9c32c50d 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 b409735f..20fb310 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 5dda8e5..2382c2b 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 44124da..ad707f3 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 e342560..7c34d43 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 9839fd5..bd19c85 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 7e7b569..0db118c 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 b137971..bc892a2 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 140dfaf..1a0aabe 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 91bc33f..2098c13 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 7c1247e..8d47ee4 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 323b34a..01f974f 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 922fe44..db0bf82 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 52b6972..8f1e6ac 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 08dac55..0c1921f 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 75e1e0e..28ad0f1 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 92e96a4..2abde0fd 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 c08a1ca..93eb5d1 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 cd2bdfa..68c7f58 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 224d155..c644fde 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 4b902cd..dd76976 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 8048b08..15104f5 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 9343024..95da84c 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 3b27f18..c31d578 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 eb31a94..79c976e 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 bcf91bc..9c4a094 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 907cd3f..c45364d 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 898a0e4..7a21bfb 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 9220e31..260ee34 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 bde6b83..1bf5953 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 967264b..18b43eb 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 76960f7..d7da617 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 8ef4229..de006a7 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 4548670..1c0b9d1 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 74d7f51..c10e135 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 6764d1e..fadcaf5 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 bbe7a81..70c1651 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 bacd8f7..cd541f0 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 08f8e77..e343a78 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 6f54ba5..b13a66e 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 2de5f0e..0287af1 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 6aa77d2..9f9999e 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 2172f3e..704343a 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 1532657..0451b67 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 bccb30d..31bc9b1 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 1e57e92..ead89e7 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 b2d3e28..793a521 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 9b14be8..fb5bca7 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; ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits