[Libreoffice-commits] core.git: include/vcl vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 17 07:09:46 PDT 2014
include/vcl/dockwin.hxx | 2 -
vcl/source/window/dockmgr.cxx | 55 ++++++++++++++++++++++--------------------
2 files changed, 29 insertions(+), 28 deletions(-)
New commits:
commit f596ee9a79c01ff4a170aa521b349f5ddd234abc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 17 13:24:29 2014 +0100
coverity#708644 Uninitialized pointer field
Change-Id: I329c6b1d901286892e9e03afa299c635e25c59cb
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 3872f33..1587be0 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -117,8 +117,6 @@ private:
mbStartDockingEnabled:1,
mbLocked:1;
- void ImplInitData();
-
DECL_LINK( PopupModeEnd, void* );
void ImplEnableStartDocking( bool bEnable = true ) { mbStartDockingEnabled = bEnable; }
bool ImplStartDockingEnabled() { return mbStartDockingEnabled; }
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 799fcbe..bcffef5 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -795,20 +795,39 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
}
ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow )
+ : mpDockingWindow(const_cast<Window*>(pWindow))
+ , mpFloatWin(NULL)
+ , mpOldBorderWin(NULL)
+ , mpParent(pWindow->GetParent())
+ , maMaxOutSize( SHRT_MAX, SHRT_MAX )
+ , mnTrackX(0)
+ , mnTrackY(0)
+ , mnTrackWidth(0)
+ , mnTrackHeight(0)
+ , mnDockLeft(0)
+ , mnDockTop(0)
+ , mnDockRight(0)
+ , mnDockBottom(0)
+ , mnFloatBits(WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES))
+ , mbDockCanceled(false)
+ , mbFloatPrevented(false)
+ , mbDockable(true)
+ , mbDocking(false)
+ , mbDragFull(false)
+ , mbLastFloatMode(false)
+ , mbStartFloat(false)
+ , mbTrackDock(false)
+ , mbPinned(false)
+ , mbRollUp(false)
+ , mbDockBtn(false)
+ , mbHideBtn(false)
+ // must be enabled in Window::Notify to prevent permanent docking during mouse move
+ , mbStartDockingEnabled(false)
+ , mbLocked(false)
{
- ImplInitData();
-
- mpDockingWindow = (Window*) pWindow;
- mpParent = pWindow->GetParent();
- mbDockable = true;
- mbLocked = false;
- mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES);
DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow );
if( pDockWin )
mnFloatBits = pDockWin->GetFloatStyle();
-
- // must be enabled in Window::Notify to prevent permanent docking during mouse move
- mbStartDockingEnabled = false;
}
ImplDockingWindowWrapper::~ImplDockingWindowWrapper()
@@ -877,22 +896,6 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
return true;
}
-void ImplDockingWindowWrapper::ImplInitData()
-{
- mpDockingWindow = NULL;
-
- //GetWindow()->mpWindowImpl->mbDockWin = true; // TODO: must be eliminated
- mpFloatWin = NULL;
- mbDockCanceled = false;
- mbFloatPrevented = false;
- mbDocking = false;
- mbPinned = false;
- mbRollUp = false;
- mbDockBtn = false;
- mbHideBtn = false;
- maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
-}
-
void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt )
{
// used during docking of a currently docked window
More information about the Libreoffice-commits
mailing list