Kaydet (Commit) 938a070f authored tarafından Chris Sherlock's avatar Chris Sherlock

move lcl_createWindowInfo to correct spot in window.cxx

Change-Id: Icfcfe379db2ba8eee89314108df47bae024e060e
üst 7772b310
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment