sfx2/source/dialog/dockwin.cxx |   55 +++++++++++++++++------------------------
 1 file changed, 23 insertions(+), 32 deletions(-)

New commits:
commit 7dcbcfcf21cb05a606ab8954abf7c3fddda2c4fe
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Mon Aug 29 15:25:30 2016 +0200

    cppcheck:noConstructor for SfxDockingWindow_Impl
    
    Change-Id: I20d2c5351d7f4d3fd4c42ccc0528afd4c45d4426
    Reviewed-on: https://gerrit.libreoffice.org/28461
    Reviewed-by: Jochen Nitschke <j.nitschke+loger...@ok.de>
    Tested-by: Jochen Nitschke <j.nitschke+loger...@ok.de>

diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index b9fb2c2..137ad50 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -406,6 +406,7 @@ friend class SfxDockingWindow;
     bool                bDockingPrevented;
     OString aWinState;
 
+                        SfxDockingWindow_Impl(SfxDockingWindow *pBase);
     SfxChildAlignment   GetLastAlignment() const
                         { return eLastAlignment; }
     void                SetLastAlignment(SfxChildAlignment eAlign)
@@ -416,6 +417,26 @@ friend class SfxDockingWindow;
                         { eDockAlignment = eAlign; }
 };
 
+SfxDockingWindow_Impl::SfxDockingWindow_Impl(SfxDockingWindow* pBase)
+    :eLastAlignment(SfxChildAlignment::NOALIGNMENT)
+    ,eDockAlignment(SfxChildAlignment::NOALIGNMENT)
+    ,bConstructed(false)
+    ,pSplitWin(nullptr)
+    ,bSplitable(true)
+    ,bEndDocked(false)
+    ,nHorizontalSize(0)
+    ,nVerticalSize(0)
+    ,nLine(0)
+    ,nPos(0)
+    ,nDockLine(0)
+    ,nDockPos(0)
+    ,bNewLine(false)
+    ,bDockingPrevented(false)
+{
+    aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
+    aMoveIdle.SetIdleHdl(LINK(pBase,SfxDockingWindow,TimerHdl));
+}
+
 /*  [Description]
 
     This virtual method of the class FloatingWindow keeps track of changes in
@@ -814,22 +835,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, 
SfxChildWindow *pCW,
     pBindings(pBindinx),
     pMgr(pCW)
 {
-    pImpl.reset( new SfxDockingWindow_Impl );
-    pImpl->bConstructed = false;
-    pImpl->pSplitWin = nullptr;
-    pImpl->bEndDocked = false;
-    pImpl->bDockingPrevented = false;
-
-    pImpl->bSplitable = true;
-
-    // Initially set to default, the alignment is set in the subclass
-    pImpl->nLine = pImpl->nDockLine = 0;
-    pImpl->nPos  = pImpl->nDockPos = 0;
-    pImpl->bNewLine = false;
-    pImpl->SetDockAlignment(SfxChildAlignment::NOALIGNMENT);
-    pImpl->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
-    pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
-    pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
+    pImpl.reset(new SfxDockingWindow_Impl(this));
 }
 
 /** Constructor for the SfxDockingWindow class. A SfxChildWindow will be
@@ -841,22 +847,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, 
SfxChildWindow *pCW,
     , pBindings(pBindinx)
     , pMgr(pCW)
 {
-    pImpl.reset( new SfxDockingWindow_Impl );
-    pImpl->bConstructed = false;
-    pImpl->pSplitWin = nullptr;
-    pImpl->bEndDocked = false;
-    pImpl->bDockingPrevented = false;
-
-    pImpl->bSplitable = true;
-
-    // Initially set to default, the alignment is set in the subclass
-    pImpl->nLine = pImpl->nDockLine = 0;
-    pImpl->nPos  = pImpl->nDockPos = 0;
-    pImpl->bNewLine = false;
-    pImpl->SetDockAlignment(SfxChildAlignment::NOALIGNMENT);
-    pImpl->SetLastAlignment(SfxChildAlignment::NOALIGNMENT);
-    pImpl->aMoveIdle.SetPriority(SchedulerPriority::RESIZE);
-    pImpl->aMoveIdle.SetIdleHdl(LINK(this,SfxDockingWindow,TimerHdl));
+    pImpl.reset(new SfxDockingWindow_Impl(this));
 }
 
 /** Initialization of the SfxDockingDialog class via a SfxChildWinInfo.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to