[Libreoffice-commits] core.git: vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Fri May 23 02:47:11 PDT 2014


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

New commits:
commit 938a070f5d71f8e7c703dcbf2098e44b9d8c5a5f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Fri May 23 19:41:01 2014 +1000

    move lcl_createWindowInfo to correct spot in window.cxx
    
    Change-Id: Icfcfe379db2ba8eee89314108df47bae024e060e

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 67a1c6a..244a48d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -140,6 +140,29 @@ Window::Window( Window* pParent, const ResId& rResId )
         Show();
 }
 
+#if OSL_DEBUG_LEVEL > 0
+namespace
+{
+    OString lcl_createWindowInfo(const Window& i_rWindow)
+    {
+        // skip border windows, they don't carry information which helps diagnosing the problem
+        const Window* pWindow( &i_rWindow );
+        while ( pWindow && ( pWindow->GetType() == WINDOW_BORDERWINDOW ) )
+            pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD );
+        if ( !pWindow )
+            pWindow = &i_rWindow;
+
+        OStringBuffer aErrorString;
+        aErrorString.append(' ');
+        aErrorString.append(typeid( *pWindow ).name());
+        aErrorString.append(" (");
+        aErrorString.append(OUStringToOString(pWindow->GetText(), RTL_TEXTENCODING_UTF8));
+        aErrorString.append(")");
+        return aErrorString.makeStringAndClear();
+    }
+}
+#endif
+
 Window::~Window()
 {
     vcl::LazyDeletor<Window>::Undelete( this );
@@ -1401,43 +1424,6 @@ sal_uInt16 Window::ImplHitTest( const Point& rFramePos )
     return nHitTest;
 }
 
-bool Window::ImplIsRealParentPath( const Window* pWindow ) const
-{
-    pWindow = pWindow->GetParent();
-    while ( pWindow )
-    {
-        if ( pWindow == this )
-            return true;
-        pWindow = pWindow->GetParent();
-    }
-
-    return false;
-}
-
-bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const
-{
-    do
-    {
-        if ( !bSystemWindow && pWindow->ImplIsOverlapWindow() )
-            break;
-
-        pWindow = pWindow->ImplGetParent();
-
-        if ( pWindow == this )
-            return true;
-    }
-    while ( pWindow );
-
-    return false;
-}
-
-bool Window::ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const
-{
-    if ( this == pWindow )
-        return true;
-    return ImplIsChild( pWindow, bSystemWindow );
-}
-
 int Window::ImplTestMousePointerSet()
 {
     // as soon as mouse is captured, switch mouse-pointer
@@ -1494,6 +1480,43 @@ PointerStyle Window::ImplGetMousePointer() const
     return ePointerStyle;
 }
 
+bool Window::ImplIsRealParentPath( const Window* pWindow ) const
+{
+    pWindow = pWindow->GetParent();
+    while ( pWindow )
+    {
+        if ( pWindow == this )
+            return true;
+        pWindow = pWindow->GetParent();
+    }
+
+    return false;
+}
+
+bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const
+{
+    do
+    {
+        if ( !bSystemWindow && pWindow->ImplIsOverlapWindow() )
+            break;
+
+        pWindow = pWindow->ImplGetParent();
+
+        if ( pWindow == this )
+            return true;
+    }
+    while ( pWindow );
+
+    return false;
+}
+
+bool Window::ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const
+{
+    if ( this == pWindow )
+        return true;
+    return ImplIsChild( pWindow, bSystemWindow );
+}
+
 void Window::ImplResetReallyVisible()
 {
     bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible;
@@ -3383,29 +3406,6 @@ void Window::ImplNewInputContext()
         pFocusWin->mpFontCache->Release( pFontEntry );
 }
 
-#if OSL_DEBUG_LEVEL > 0
-namespace
-{
-    OString lcl_createWindowInfo(const Window& i_rWindow)
-    {
-        // skip border windows, they don't carry information which helps diagnosing the problem
-        const Window* pWindow( &i_rWindow );
-        while ( pWindow && ( pWindow->GetType() == WINDOW_BORDERWINDOW ) )
-            pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD );
-        if ( !pWindow )
-            pWindow = &i_rWindow;
-
-        OStringBuffer aErrorString;
-        aErrorString.append(' ');
-        aErrorString.append(typeid( *pWindow ).name());
-        aErrorString.append(" (");
-        aErrorString.append(OUStringToOString(pWindow->GetText(), RTL_TEXTENCODING_UTF8));
-        aErrorString.append(")");
-        return aErrorString.makeStringAndClear();
-    }
-}
-#endif
-
 void Window::doLazyDelete()
 {
     SystemWindow* pSysWin = dynamic_cast<SystemWindow*>(this);


More information about the Libreoffice-commits mailing list