diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-02 10:04:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-02 12:23:16 +0200 |
commit | 5797d29e9ead0a3dd181b616dfcc968a9127012d (patch) | |
tree | ec8828c4c2e7617f8d8e9334507bab517aed6dc9 /framework/source/tabwin | |
parent | 4ea0390faa22037f1d4f703c0882a027cf2ae643 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: Ic979f8a7734d0ef7a915d47a875cdcd460c0cc58
Diffstat (limited to 'framework/source/tabwin')
-rw-r--r-- | framework/source/tabwin/tabwindow.cxx | 16 | ||||
-rw-r--r-- | framework/source/tabwin/tabwinfactory.cxx | 8 |
2 files changed, 11 insertions, 13 deletions
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; |