[Libreoffice-commits] core.git: Branch 'feature/vclptr' - 2 commits - include/vcl vcl/inc vcl/source

Michael Meeks michael.meeks at collabora.com
Fri Apr 10 06:08:46 PDT 2015


 include/vcl/event.hxx          |   17 -----------------
 include/vcl/layout.hxx         |    4 ++--
 vcl/inc/svdata.hxx             |    2 +-
 vcl/source/window/event.cxx    |    3 +--
 vcl/source/window/introwin.cxx |    1 -
 vcl/source/window/window.cxx   |    2 --
 6 files changed, 4 insertions(+), 25 deletions(-)

New commits:
commit 93a8635776834a03fc794cf8eba1e98a88e88be8
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Apr 10 14:14:15 2015 +0100

    Cleanup layout and window merge.
    
    Change-Id: Ic61f85ef159981721420ebc5157bcf09cf09ec51

diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 2575142..650ec61 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -523,7 +523,7 @@ public:
         m_pDisclosureButton->Show();
     }
     virtual ~VclExpander() { disposeOnce(); }
-    virtual void dispose() SAL_OVERRIDE { m_pDisclosureButton.disposeAndClear(); VclBin::dispose(); }
+    virtual void dispose() SAL_OVERRIDE;
     virtual vcl::Window *get_child() SAL_OVERRIDE;
     virtual const vcl::Window *get_child() const SAL_OVERRIDE;
     virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
@@ -561,7 +561,7 @@ class VCL_DLLPUBLIC VclScrolledWindow : public VclBin
 public:
     VclScrolledWindow(vcl::Window *pParent, WinBits nStyle = WB_HIDE | WB_CLIPCHILDREN | WB_AUTOHSCROLL | WB_AUTOVSCROLL);
     virtual ~VclScrolledWindow() { disposeOnce(); }
-    void dispose() SAL_OVERRIDE { m_pVScroll.disposeAndClear(); m_pHScroll.disposeAndClear(); m_aScrollBarBox.clear(); VclBin::dispose(); }
+    virtual void dispose() SAL_OVERRIDE;
     virtual vcl::Window *get_child() SAL_OVERRIDE;
     virtual const vcl::Window *get_child() const SAL_OVERRIDE;
     virtual bool set_property(const OString &rKey, const OString &rValue) SAL_OVERRIDE;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index bcf21e9..cd26b3d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -159,8 +159,6 @@ void Window::dispose()
             xCanvasComponent->dispose();
     }
 
-    mpWindowImpl->mbInDtor = true;
-
     CallEventListeners( VCLEVENT_OBJECT_DYING );
 
     // do not send child events for frames that were registered as native frames
commit 567dbbc5e952170f20673ca795a609220aee792f
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Fri Apr 10 14:12:19 2015 +0100

    Fix NotifyEvent and IntroWindow bits.
    
    Change-Id: Id12dbb9219a9581dd52d1f820c47f3da47b62187

diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index da38cfa..d6829d5 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -436,23 +436,6 @@ public:
     const CommandEvent*     GetCommandEvent() const;
 };
 
-inline NotifyEvent::NotifyEvent()
-{
-    mpWindow    = NULL;
-    mpData      = NULL;
-    mnEventType = MouseNotifyEvent::NONE;
-    mnRetValue  = 0;
-}
-
-inline NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow,
-                                 const void* pEvent, long nRet )
-{
-    mpWindow    = pWindow;
-    mpData      = const_cast<void*>(pEvent);
-    mnEventType  = nEventType;
-    mnRetValue  = nRet;
-}
-
 inline const KeyEvent* NotifyEvent::GetKeyEvent() const
 {
     if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) )
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index d881a8e..67906dd 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -327,7 +327,7 @@ struct ImplSVData
     ImplSVHelpData          maHelpData;                     // indepen data for Help classes
     ImplSVNWFData           maNWFData;
     UnoWrapperBase*         mpUnoWrapper;
-    vcl::Window*            mpIntroWindow;                  // the splash screen
+    VclPtr<vcl::Window>     mpIntroWindow;                  // the splash screen
     DockingManager*         mpDockingManager;
     BlendFrameCache*        mpBlendFrameCache;
     bool                    mbIsTestTool;
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 9a4f1c0..9c95412 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -586,10 +586,9 @@ NotifyEvent::NotifyEvent( MouseNotifyEvent nEventType, vcl::Window* pWindow,
                           const void* pEvent, long nRet )
 {
     mpWindow    = pWindow;
-    mpData      = (void*)pEvent;
+    mpData      = const_cast<void*>(pEvent);
     mnEventType  = nEventType;
     mnRetValue  = nRet;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 3dae19c..d8b4001 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -45,7 +45,6 @@ IntroWindow::~IntroWindow()
 
 void IntroWindow::dispose()
 {
-    // FIXME: really we should have a dispose & a ref-ptr there [!] ...
     ImplSVData* pSVData = ImplGetSVData();
     if ( pSVData->mpIntroWindow.get() == this )
         pSVData->mpIntroWindow = nullptr;


More information about the Libreoffice-commits mailing list