[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - vcl/source
Pranav Kant
pranavk at collabora.co.uk
Wed Dec 13 19:27:27 UTC 2017
vcl/source/window/window.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 976f65f94d1e8d4114fc3afe26844f412a3eb6f8
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Fri Dec 8 18:06:36 2017 +0530
Use ImplIsFloatingWindow instead of dynamic_cast
Change-Id: I09f351ae5d8d1b5c1a405d7aa8082be6014268b3
(cherry picked from commit 0898ced81a3129b4c36c08e0222f96c513f0fd77)
Reviewed-on: https://gerrit.libreoffice.org/46114
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7eaa26482630..95157d665b1f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3255,7 +3255,7 @@ void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- if (dynamic_cast<FloatingWindow*>(this) != nullptr)
+ if (ImplIsFloatingWindow())
ImplWindowFrameProc(ImplGetBorderWindow(), SalEvent::ExternalMouseButtonDown, &rMouseEvent);
else
ImplWindowFrameProc(this, SalEvent::ExternalMouseButtonDown, &rMouseEvent);
@@ -3266,7 +3266,7 @@ void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- if (dynamic_cast<FloatingWindow*>(this) != nullptr)
+ if (ImplIsFloatingWindow())
ImplWindowFrameProc(ImplGetBorderWindow(), SalEvent::ExternalMouseButtonUp, &rMouseEvent);
else
ImplWindowFrameProc(this, SalEvent::ExternalMouseButtonUp, &rMouseEvent);
@@ -3277,7 +3277,7 @@ void Window::LogicMouseMove(const MouseEvent& rMouseEvent)
// When we're not doing tiled rendering, then positions must be passed as pixels.
assert(comphelper::LibreOfficeKit::isActive());
- if (dynamic_cast<FloatingWindow*>(this) != nullptr)
+ if (ImplIsFloatingWindow())
ImplWindowFrameProc(ImplGetBorderWindow(), SalEvent::ExternalMouseMove, &rMouseEvent);
else
ImplWindowFrameProc(this, SalEvent::ExternalMouseMove, &rMouseEvent);
More information about the Libreoffice-commits
mailing list