From 95c0d568fdcd0da939c891d861bb470b28079170 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 4 Jun 2013 17:16:58 +0200 Subject: use uno::Reference#clear() method... ...instead of assigning an empty value. Reduces code noise. Change-Id: Ic95b081a41fb740a738c92b3407a9514ccb8b06e --- extensions/source/nsplugin/source/so_instance.cxx | 16 ++++++++-------- extensions/source/propctrlr/eformshelper.cxx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'extensions') diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 7de17815ff0a..57e573802729 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -266,7 +266,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) } //free the input stream, it is hold by the m_xComponent - xInputStream = Reference(); + xInputStream.clear(); debug_fprintf(NSP_LOG_APPEND, "load document success\n"); @@ -352,7 +352,7 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int if(!bRetval){ // try to reload document again debug_fprintf(NSP_LOG_APPEND, "load document error, try to reload it once again\n"); - mxRemoteMSF = Reference< XMultiServiceFactory >(); + mxRemoteMSF.clear(); m_bInit = sal_False; bRetval = LoadDocument(hParent); debug_fprintf(NSP_LOG_APPEND, "load document again, return %d\n", bRetval); @@ -416,12 +416,12 @@ sal_Bool SoPluginInstance::Destroy(void) } } - m_xUnoWin = Reference< awt::XWindow >(); - m_xComponent = Reference< XComponent >(); - m_xFrame = Reference< frame::XFrame2 >(); - m_xFrames = Reference< frame::XFrames >(); - m_xDispatcher = Reference< frame::XDispatchHelper >(); - m_xDispatchProvider = Reference< frame::XDispatchProvider >(); + m_xUnoWin.clear(); + m_xComponent.clear(); + m_xFrame.clear(); + m_xFrames.clear(); + m_xDispatcher.clear(); + m_xDispatchProvider.clear(); return sal_True; } diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index daae33437f13..45352357d809 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -652,7 +652,7 @@ namespace pcr _rElementNames.resize( 0 ); if ( _bPrepentEmptyEntry ) - rMapUINameToElement[ OUString() ] = Reference< XPropertySet >(); + rMapUINameToElement[ OUString() ].clear(); try { -- cgit