[Libreoffice-commits] core.git: 2 commits - sc/source toolkit/source vcl/source
Caolán McNamara
caolanm at redhat.com
Thu Nov 26 01:20:18 PST 2015
sc/source/ui/view/hdrcont.cxx | 4 ++--
toolkit/source/awt/vclxtoolkit.cxx | 2 +-
vcl/source/window/mouse.cxx | 4 ++--
vcl/source/window/window.cxx | 6 +++---
4 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 4584e3a6df74b1d83c077f3b33a6515c2aab1aa5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 26 09:19:23 2015 +0000
test for IsMouseCaptured before releasing mouse
like the other call sites do
Change-Id: I77250f172f9d9ce97e5982bafbc8f042e9343acc
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index 2018821..690e5d1 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -879,8 +879,8 @@ void ScHeaderControl::StopMarking()
// don't call pSelEngine->Reset, so selection across the parts of
// a split/frozen view is possible
-
- ReleaseMouse();
+ if (IsMouseCaptured())
+ ReleaseMouse();
}
void ScHeaderControl::ShowDragHelp()
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 198e4cd..330cb70 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -468,10 +468,10 @@ void Window::ReleaseMouse()
ImplSVData* pSVData = ImplGetSVData();
- SAL_WARN_IF( pSVData->maWinData.mpCaptureWin.get() != this, "vcl",
+ SAL_WARN_IF(!IsMouseCaptured(), "vcl",
"Window::ReleaseMouse(): window doesn't have the mouse capture" );
- if ( pSVData->maWinData.mpCaptureWin.get() == this )
+ if (IsMouseCaptured())
{
pSVData->maWinData.mpCaptureWin = nullptr;
mpWindowImpl->mpFrame->CaptureMouse( false );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 48be717..8901512 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -249,13 +249,13 @@ void Window::dispose()
DBG_ASSERT( pSVData->maWinData.mpTrackWin.get() != this,
"Window::~Window(): Window is in TrackingMode" );
- DBG_ASSERT( pSVData->maWinData.mpCaptureWin.get() != this,
- "Window::~Window(): Window has the mouse captured" );
+ DBG_ASSERT(!IsMouseCaptured(),
+ "Window::~Window(): Window has the mouse captured");
// due to old compatibility
if ( pSVData->maWinData.mpTrackWin == this )
EndTracking();
- if ( pSVData->maWinData.mpCaptureWin == this )
+ if (IsMouseCaptured())
ReleaseMouse();
if ( pSVData->maWinData.mpDefDialogParent == this )
pSVData->maWinData.mpDefDialogParent = nullptr;
commit 5e1546ccbce1c8fcea16c191edc1409da04c9193
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 26 09:19:06 2015 +0000
downgrade warning to info
Change-Id: Ia607226f73020396e3f47a13d304272b0143668c
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index a1100a8..00c0a14 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1269,7 +1269,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits );
DBG_ASSERT( pNewWindow, "createWindow: Unknown Component!" );
- SAL_WARN_IF( !pNewComp, "toolkit", "createWindow: No special Interface!" );
+ SAL_INFO_IF( !pNewComp, "toolkit", "createWindow: No special Interface!" );
if ( pNewWindow )
{
More information about the Libreoffice-commits
mailing list