vcl/source/window/window.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 976f65f94d1e8d4114fc3afe26844f412a3eb6f8
Author: Pranav Kant <[email protected]>
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 <[email protected]>
    Tested-by: Jan Holesovsky <[email protected]>

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);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to