diff options
Diffstat (limited to 'dbaccess/source/ui/browser/genericcontroller.cxx')
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index af2835ec1ee9..984552361f80 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -2,9 +2,9 @@ * * $RCSfile: genericcontroller.cxx,v $ * - * $Revision: 1.48 $ + * $Revision: 1.49 $ * - * last change: $Author: fs $ $Date: 2002-11-19 09:28:50 $ + * last change: $Author: hr $ $Date: 2003-03-19 17:52:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1163,4 +1163,22 @@ void OGenericUnoController::openHelpAgent(sal_Int32 _nHelpId) } } // ----------------------------------------------------------------------------- +Reference< ::com::sun::star::awt::XWindow> OGenericUnoController::getTopMostContainerWindow() const +{ + Reference< ::com::sun::star::awt::XWindow> xWindow; + // get the top most window + if ( m_xCurrentFrame.is() ) + { + xWindow = m_xCurrentFrame->getContainerWindow(); + Reference<XFrame> xFrame = m_xCurrentFrame; + while ( xFrame.is() && !xFrame->isTop() ) + { + xFrame = Reference<XFrame>(xFrame->getCreator(),UNO_QUERY); + } + if ( xFrame.is() ) + xWindow = xFrame->getContainerWindow(); + } + return xWindow; +} +// ----------------------------------------------------------------------------- |