summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-08-10 10:16:00 +0000
committerMalte Timmermann <mt@openoffice.org>2001-08-10 10:16:00 +0000
commit90b83176d95f85fd6323e3c16b1004d35c008ed4 (patch)
treefb803a776ffb6a757278ef7279e7fd33e76c940e
parent4c6403777fef151feba6a81ecf6abfbb57c053c5 (diff)
#88020# Dialog can have a MenuBar
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx5
-rw-r--r--toolkit/source/controls/unocontrols.cxx15
2 files changed, 14 insertions, 6 deletions
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index bd5a7c4f87f1..ac1c63ee1b1e 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: mt $ $Date: 2001-08-10 09:51:19 $
+ * last change: $Author: mt $ $Date: 2001-08-10 11:15:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -239,6 +239,7 @@ class UnoDialogControl : public UnoControlContainer,
public ::com::sun::star::awt::XDialog
{
private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar;
TopWindowListenerMultiplexer maTopWindowListeners;
protected:
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index d3b4511ec9e0..c9a263372c19 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unocontrols.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: mt $ $Date: 2001-08-10 10:03:01 $
+ * last change: $Author: mt $ $Date: 2001-08-10 11:16:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -671,6 +671,7 @@ void UnoDialogControl::createPeer( const uno::Reference< awt::XToolkit > & rxToo
UnoControlContainer::createPeer( rxToolkit, rParentPeer );
uno::Reference < awt::XTopWindow > xTW( mxPeer, uno::UNO_QUERY );
+ xTW->setMenuBar( mxMenuBar );
if ( maTopWindowListeners.getLength() )
xTW->addTopWindowListener( &maTopWindowListeners );
}
@@ -746,9 +747,15 @@ void UnoDialogControl::toBack( ) throw (::com::sun::star::uno::RuntimeException
}
}
-void UnoDialogControl::setMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >& ) throw (::com::sun::star::uno::RuntimeException)
+void UnoDialogControl::setMenuBar( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar >& rxMenuBar ) throw (::com::sun::star::uno::RuntimeException)
{
- DBG_ERROR( "UnoDialogControl::setMenuBar niy" );
+ mxMenuBar = rxMenuBar;
+ if ( getPeer().is() )
+ {
+ uno::Reference< awt::XTopWindow > xTW( getPeer(), uno::UNO_QUERY );
+ if( xTW.is() )
+ xTW->setMenuBar( mxMenuBar );
+ }
}
// beans::XPropertiesChangeListener