diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-09-27 12:37:00 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-09-27 15:07:12 +0100 |
commit | 642553238cc531f39049150ff52cf4e152b5abe6 (patch) | |
tree | 01e757db902775fe32e3af3ec43f9df7f8dac138 /vcl/source/window/window2.cxx | |
parent | bc406a77b582ab799428b9fbf05afdbed75dbeb7 (diff) |
add GetParentDialog to VCL's Window, and remove DLGWIN & cut/paste
Diffstat (limited to 'vcl/source/window/window2.cxx')
-rw-r--r-- | vcl/source/window/window2.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index ee607c4dbd27..47492db1c9fc 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1478,6 +1478,22 @@ WindowType Window::GetType() const { return mpWindowImpl->mnType; } + +Window* Window::GetParentDialog() const +{ + const Window *pWindow = this; + + while( pWindow ) + { + if( pWindow->IsDialog() ) + break; + + pWindow = pWindow->GetParent(); + } + + return const_cast<Window *>(pWindow); +} + sal_Bool Window::IsSystemWindow() const { return mpWindowImpl->mbSysWin; |