summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-12 09:38:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-12 10:09:26 +0100
commit71c4a2b761885c2d5515e89fd5aedf7d1e8a249b (patch)
treec8d9cbd035e2dcf601c18ef28cbb12f4f043295f /vcl
parent533fd775d51472e6cff93487a27136f67f06d77f (diff)
mpDefDialogParent is not used since 2002
i.e. commit c0ae87cb5f2989bc4b8dff4907994d513ee87e39 Author: Stephan Schäfer <ssa@openoffice.org> Date: Tue Oct 22 08:39:05 2002 +0000 #103442# choose DefDialogParent on-the-fly and so calling SetDefDialogParent doesn't achieve anything Change-Id: I2ec72da47b2dac03fdddbdb9eba5ae4bf205eb22
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/svdata.hxx1
-rw-r--r--vcl/source/app/svapp.cxx90
-rw-r--r--vcl/source/window/window.cxx2
3 files changed, 40 insertions, 53 deletions
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index f3f34e74dfb7..5d0b719a02d2 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -181,7 +181,6 @@ struct ImplSVGDIData
struct ImplSVWinData
{
VclPtr<vcl::Window> mpFirstFrame; // First FrameWindow
- VclPtr<vcl::Window> mpDefDialogParent; // Default Dialog Parent
VclPtr<WorkWindow> mpAppWin; // Application-Window
VclPtr<vcl::Window> mpFocusWin; // window, that has the focus
VclPtr<vcl::Window> mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6225104ababf..5a2ae0c8a586 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1431,70 +1431,60 @@ OUString Application::GetToolkitName()
return OUString();
}
-void Application::SetDefDialogParent( vcl::Window* pWindow )
-{
- ImplGetSVData()->maWinData.mpDefDialogParent = pWindow;
-}
-
vcl::Window* Application::GetDefDialogParent()
{
ImplSVData* pSVData = ImplGetSVData();
- // #103442# find some useful dialog parent if there
- // was no default set
- // NOTE: currently even the default is not used
- if( false && pSVData->maWinData.mpDefDialogParent.get() != nullptr )
- return pSVData->maWinData.mpDefDialogParent;
- else
- {
- // always use the topmost parent of the candidate
- // window to avoid using dialogs or floaters
- // as DefDialogParent
+ // find some useful dialog parent
- // current focus frame
- vcl::Window *pWin = nullptr;
- if( (pWin = pSVData->maWinData.mpFocusWin) != nullptr )
- {
- while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent )
- pWin = pWin->mpWindowImpl->mpParent;
+ // always use the topmost parent of the candidate
+ // window to avoid using dialogs or floaters
+ // as DefDialogParent
- // check for corrupted window hierarchy, #122232#, may be we now crash somewhere else
- if( !pWin->mpWindowImpl )
- {
- OSL_FAIL( "Window hierarchy corrupted!" );
- pSVData->maWinData.mpFocusWin = nullptr; // avoid further access
- return nullptr;
- }
+ // current focus frame
+ vcl::Window *pWin = nullptr;
+ if( (pWin = pSVData->maWinData.mpFocusWin) != nullptr )
+ {
+ while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent )
+ pWin = pWin->mpWindowImpl->mpParent;
- if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 )
- {
- return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
- }
+ // check for corrupted window hierarchy, #122232#, may be we now crash somewhere else
+ if( !pWin->mpWindowImpl )
+ {
+ OSL_FAIL( "Window hierarchy corrupted!" );
+ pSVData->maWinData.mpFocusWin = nullptr; // avoid further access
+ return nullptr;
}
- // last active application frame
- if( nullptr != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
+
+ if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 )
{
return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
}
- else
+ }
+
+ // last active application frame
+ if( nullptr != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
+ {
+ return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
+ }
+ else
+ {
+ // first visible top window (may be totally wrong....)
+ pWin = pSVData->maWinData.mpFirstFrame;
+ while( pWin )
{
- // first visible top window (may be totally wrong....)
- pWin = pSVData->maWinData.mpFirstFrame;
- while( pWin )
+ if( pWin->ImplGetWindow()->IsTopWindow() &&
+ pWin->mpWindowImpl->mbReallyVisible &&
+ (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0
+ )
{
- if( pWin->ImplGetWindow()->IsTopWindow() &&
- pWin->mpWindowImpl->mbReallyVisible &&
- (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0
- )
- {
- while( pWin->mpWindowImpl->mpParent )
- pWin = pWin->mpWindowImpl->mpParent;
- return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
- }
- pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
+ while( pWin->mpWindowImpl->mpParent )
+ pWin = pWin->mpWindowImpl->mpParent;
+ return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
}
- // use the desktop
- return nullptr;
+ pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
+ // use the desktop
+ return nullptr;
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 9a4d62ba634c..de678c506131 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -255,8 +255,6 @@ void Window::dispose()
EndTracking();
if (IsMouseCaptured())
ReleaseMouse();
- if ( pSVData->maWinData.mpDefDialogParent == this )
- pSVData->maWinData.mpDefDialogParent = nullptr;
#if OSL_DEBUG_LEVEL > 0
if ( true ) // always perform these tests in debug builds