diff options
Diffstat (limited to 'framework/source/uielement/progressbarwrapper.cxx')
-rw-r--r-- | framework/source/uielement/progressbarwrapper.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index ad147111ff50..d92027c92c3a 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -291,17 +291,14 @@ uno::Reference< uno::XInterface > SAL_CALL ProgressBarWrapper::getRealInterface( return uno::Reference< uno::XInterface >(); else { - uno::Reference< uno::XInterface > xComp( m_xProgressBarIfacWrapper ); - if ( !xComp.is() ) + rtl::Reference< StatusIndicatorInterfaceWrapper > pWrapper( m_xProgressBarIfacWrapper ); + if ( !pWrapper.is() ) { - rtl::Reference<StatusIndicatorInterfaceWrapper> pWrapper = - new StatusIndicatorInterfaceWrapper( uno::Reference< lang::XComponent >(this) ); - xComp.set(static_cast< cppu::OWeakObject* >( pWrapper.get() ), - uno::UNO_QUERY ); - m_xProgressBarIfacWrapper = xComp; + pWrapper = new StatusIndicatorInterfaceWrapper( this ); + m_xProgressBarIfacWrapper = pWrapper.get(); } - return xComp; + return static_cast<cppu::OWeakObject*>(pWrapper.get()); } } |