[Libreoffice-commits] core.git: sd/source

Stephan Bergmann sbergman at redhat.com
Fri Feb 17 15:20:47 UTC 2017


 sd/source/ui/framework/factories/BasicViewFactory.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit fbaec92d4366caa35e2db8fdb60d8f3976453b65
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 17 16:20:22 2017 +0100

    No need for mpWrapper member
    
    Change-Id: I5b0526dd6fe76735fb25b7864e71e36e4f0eeb98

diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index b608cb3..28916b6 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -59,7 +59,6 @@ class BasicViewFactory::ViewDescriptor
 public:
     Reference<XResource> mxView;
     std::shared_ptr<sd::ViewShell> mpViewShell;
-    ViewShellWrapper* mpWrapper;
     Reference<XResourceId> mxViewId;
     static bool CompareView (const std::shared_ptr<ViewDescriptor>& rpDescriptor,
         const Reference<XResource>& rxView)
@@ -300,22 +299,22 @@ std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView (
         mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get());
 
         Reference<awt::XWindow> xWindow(rxPane->getWindow());
-        pDescriptor->mpWrapper = new ViewShellWrapper(
+        rtl::Reference<ViewShellWrapper> wrapper(new ViewShellWrapper(
             pDescriptor->mpViewShell,
             rxViewId,
-            xWindow);
+            xWindow));
 
         // register ViewShellWrapper on pane window
         if (xWindow.is())
         {
-            xWindow->addWindowListener(pDescriptor->mpWrapper);
+            xWindow->addWindowListener(wrapper.get());
             if (pDescriptor->mpViewShell != nullptr)
             {
                 pDescriptor->mpViewShell->Resize();
             }
         }
 
-        pDescriptor->mxView.set( pDescriptor->mpWrapper->queryInterface( cppu::UnoType<XResource>::get() ), UNO_QUERY_THROW );
+        pDescriptor->mxView = wrapper.get();
     }
 
     return pDescriptor;


More information about the Libreoffice-commits mailing list