openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1425458 [2/3] - in /openoffice/trunk/main: chart2/source/controller/main/ forms/source/component/ framework/inc/uielement/ framework/source/uielement/ odk/examples/DevelopersGuide/GUI/ odk/examples/cpp/StatusbarController/SelectionModeStat...
Date Sun, 23 Dec 2012 12:29:22 GMT
Modified: openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl Sun Dec 23 12:29:21 2012
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,86 +7,179 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
+#ifndef __com_sun_star_awt_XPopupMenu_idl__
+#define __com_sun_star_awt_XPopupMenu_idl__
+
+#include <com/sun/star/awt/KeyEvent.idl>
+#include <com/sun/star/awt/Point.idl>
+#include <com/sun/star/awt/XMenu.idl>
+#include <com/sun/star/graphic/XGraphic.idl>
+
+module com {  module sun {  module star {  module awt {
+
+published interface XWindowPeer;
 
-#ifndef __com_sun_star_awt_XPopupMenu_idl__ 
-#define __com_sun_star_awt_XPopupMenu_idl__ 
- 
-#ifndef __com_sun_star_awt_XMenu_idl__ 
-#include <com/sun/star/awt/XMenu.idl> 
-#endif 
- 
-#ifndef __com_sun_star_awt_Rectangle_idl__ 
-#include <com/sun/star/awt/Rectangle.idl> 
-#endif 
- 
-//============================================================================= 
- 
- module com {  module sun {  module star {  module awt {  
- 
- published interface XWindowPeer; 
- 
-//============================================================================= 
- 
 /** controls a popup menu.
  */
 published interface XPopupMenu: XMenu
-{ 
-	//------------------------------------------------------------------------- 
-	 
-	/** inserts a separator at the specified position.
-	 */
-	[oneway] void insertSeparator( [in] short nPos ); 
- 
-	//------------------------------------------------------------------------- 
-	 
-	/** sets the menu default item.
-	 */
-	[oneway] void setDefaultItem( [in] short nItemId ); 
- 
-	//------------------------------------------------------------------------- 
-	 
-	/** returns the menu default item.
-	 */
-	short getDefaultItem(); 
- 
-	//------------------------------------------------------------------------- 
-	 
-	/** sets the state of the item to be checked or unchecked.
-	 */
-	[oneway] void checkItem( [in] short nItemId, 
-			 [in] boolean bCheck ); 
- 
-	//------------------------------------------------------------------------- 
-	 
-	/** returns whether the item is checked or unchecked.
-	 */
-	boolean isItemChecked( [in] short nItemId ); 
- 
-	//------------------------------------------------------------------------- 
-	 
-	/** executes the popup menu and returns the selected item 
-		or <code>0</code>, if cancelled.
-	 */
-	short execute( [in] XWindowPeer Parent, 
-			 [in] Rectangle Area, 
-			 [in] short Direction ); 
- 
-}; 
- 
-//============================================================================= 
- 
-}; }; }; };  
- 
-#endif 
+{
+    /** inserts a separator at the specified position.
+
+        @param nItemPos
+            specifies the position where the menu separator will be insterted.
+     */
+    [oneway] void insertSeparator( [in] short nItemPos );
+
+    /** sets the menu default item.
+
+        @param nItemId
+            specifies the menu item identifier.
+     */
+    [oneway] void setDefaultItem( [in] short nItemId );
+
+    /** returns the menu default item.
+
+        @return
+            the ID of the default item.
+     */
+    short getDefaultItem();
+
+    /** sets the state of the item to be checked or unchecked.
+
+        @param nItemId
+            specifies the menu item identifier.
+
+        @param bCheck
+            specifies if the item is checked (<TRUE/>) or unchecked (<FALSE/>).
+     */
+    [oneway] void checkItem( [in] short nItemId,
+                             [in] boolean bCheck );
+
+    /** returns whether the item is checked or unchecked.
+
+        @param nItemId
+            specifies the menu item identifier.
+
+        @return
+            <TRUE/> if the item is checked, <FALSE/> otherwise.
+     */
+    boolean isItemChecked( [in] short nItemId );
+
+    /** executes the popup menu and returns the selected item
+        or <code>0</code>, if cancelled.
+
+        @param Parent
+            the parent window.
+
+        @param Position
+            the coordinates where the popup menu should be executed.
+
+        @param Direction
+            the direction in which a popup menu will grow, as specified
+            by one of the <type>PopupMenuDirection</type> constants.
+
+        @return
+            returns the selected item or <code>0</code>, if cancelled.
+     */
+    short execute( [in] XWindowPeer Parent,
+                   [in] Point Position,
+                   [in] short Direction );
+
+    /** queries if the <type>PopupMenu</type> is being.
+
+        <p>Returns <TRUE/> only if the <type>PopupMenu</type> is
being executed
+        as a result of invoking <member >XPopupMenu::execute()</member>; that
is,
+        for a <type>PopupMenu</type> activated by a <type>MenuBar</type>
item,
+        this methods returns <FALSE/>.</p>
+
+        @return
+            <TRUE/> if the <type>PopupMenu</type> is being executed,
+            <FALSE/> otherwise.
+
+        @see <member >XPopupMenu::execute()</member>
+    */
+    boolean isInExecute();
+
+    /** ends the execution of the <type>PopupMenu</type>.
+        <p><member scope="com::sun::star::awt">XPopupMenu::execute()</member>
+        will then return 0.</p>
+
+        @see <member scope="com::sun::star::awt">XPopupMenu::execute()</member>
+    */
+    void endExecute();
+
+    /** sets the <type>KeyEvent</type> for the menu item.
+
+        <p>The <type>KeyEvent</type> is <b>only</b> used as
a container to transport
+        the shortcut information, this methods only draws the text corresponding to
+        this keyboard shortcut. The client code is responsible for listening to
+        keyboard events (typicaly done via <type>XUserInputInterception</type>),
+        and dispatch the respective command.</p>
+
+        @param nItemId
+            specifies the menu item identifier for which the <type>KeyEvent</type>
should be set.
+
+        @param aKeyEvent
+            specifies the <type>KeyEvent</type> for the menu item.
+    */
+    void setAcceleratorKeyEvent( [in] short nItemId,
+                                 [in] KeyEvent aKeyEvent );
+
+    /** retrieves the <type>KeyEvent</type> for the menu item.
+
+        <p>The <type>KeyEvent</type> is <b>only</b> used as
a container to transport
+        the shortcut information, so that in this case
+        <member scope="::com::sun::star::lang::">EventObject::Source</member>
is <NULL/>.</p>
+
+        @param nItemId
+            specifies the menu item identifier for which the <type>KeyEvent</type>
should be retrieved.
+
+        @return
+            the <type>KeyEvent</type> struct assigned to the requested menu item.
+    */
+    KeyEvent getAcceleratorKeyEvent( [in] short nItemId );
+
+    /** sets the image for the menu item.
+
+        @param nItemId
+            specifies the menu item identifier for which the image should be set.
+
+        @param xGraphic
+            specifies the image for the menu item.
+
+        @param bScale
+            if <TRUE/>, the image will be scaled to the standard size used internally
by
+            the implementation.
+    */
+    void setItemImage( [in] short nItemId,
+                       [in] ::com::sun::star::graphic::XGraphic xGraphic,
+                       [in] boolean bScale );
+
+    /** retrieves the image for the menu item.
+
+        @param nItemId
+            specifies the menu item identifier for which the image should be retrieved.
+
+        @return
+            a <type scope="::com::sun::star::graphic::">XGraphic</type> reference
+            to the current image for the requested menu item.
+    */
+    ::com::sun::star::graphic::XGraphic getItemImage( [in] short nItemId );
+
+};
+
+}; }; }; };
+
+#endif

Modified: openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/makefile.mk Sun Dec 23 12:29:21 2012
@@ -312,7 +312,6 @@ IDLFILES=\
 	XWindowListener.idl\
 	XWindowListener2.idl\
 	XWindowPeer.idl\
-	XMenuExtended.idl\
 	MaxChildrenException.idl\
 	XDialog2.idl\
 	XLayoutContainer.idl\
@@ -321,10 +320,6 @@ IDLFILES=\
 	XLayoutRoot.idl\
 	XLayoutUnit.idl \
 	MenuItemType.idl \
-	MenuLogo.idl \
-	XMenuExtended2.idl \
-	XMenuBarExtended.idl \
-	XPopupMenuExtended.idl \
 	XItemList.idl \
 	XItemListListener.idl \
 	ItemListEvent.idl \

Modified: openoffice/trunk/main/offapi/type_reference/types.rdb
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/type_reference/types.rdb?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
Binary files - no diff available.

Modified: openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java (original)
+++ openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java Sun Dec
23 12:29:21 2012
@@ -23,7 +23,9 @@
 
 package ifc.frame;
 
+import com.sun.star.graphic.XGraphic;
 import com.sun.star.awt.XPopupMenu;
+import com.sun.star.awt.KeyEvent;
 import com.sun.star.frame.XPopupMenuController;
 import lib.MultiMethodTest;
 
@@ -59,7 +61,7 @@ public class _XPopupMenuController exten
             System.out.println("enableItem called.");
         }
         
-        public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle
rectangle, short param) {
+        public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Point
pos, short param) {
             System.out.println("execute called.");
             return 0;
         }
@@ -131,5 +133,94 @@ public class _XPopupMenuController exten
         public void setPopupMenu(short param, com.sun.star.awt.XPopupMenu xPopupMenu) {
             System.out.println("setPopupMenu called.");
         }
+
+        public XGraphic getItemImage(short param ) {
+            System.out.println("getItemImage called.");
+            return null;
+        }
+
+        public void setItemImage(short param, XGraphic param1, boolean param2 ) {
+            System.out.println("setItemImage called.");
+        }
+
+        public KeyEvent getAcceleratorKeyEvent(short param ) {
+            System.out.println("getAcceleratorKeyEvent called.");
+            return new KeyEvent();
+        }
+
+        public void setAcceleratorKeyEvent(short param, KeyEvent param1 ) {
+            System.out.println("setAcceleratorKeyEvent called.");
+        }
+
+        public void endExecute() {
+            System.out.println("endExecute called.");
+        }
+
+        public boolean isInExecute() {
+            System.out.println("isInExecute called.");
+            return false;
+        }
+
+        public boolean isPopupMenu() {
+            System.out.println("isPopupMenu called.");
+            return true;
+        }
+
+        public String getTipHelpText(short param ) {
+            System.out.println("getTipHelpText called.");
+            return null;
+        }
+
+        public void setTipHelpText(short param, String param1 ) {
+            System.out.println("setTipHelpText called.");
+        }
+
+        public String getHelpText(short param ) {
+            System.out.println("getHelpText called.");
+            return null;
+        }
+
+        public void setHelpText(short param, String param1 ) {
+            System.out.println("setHelpText called.");
+        }
+
+        public String getHelpCommand(short param ) {
+            System.out.println("getHelpCommand called.");
+            return null;
+        }
+
+        public void setHelpCommand(short param, String param1 ) {
+            System.out.println("setHelpCommand called.");
+        }
+
+        public String getCommand(short param ) {
+            System.out.println("getCommand called.");
+            return null;
+        }
+
+        public void setCommand(short param, String param1 ) {
+            System.out.println("setCommand called.");
+        }
+
+        public void enableAutoMnemonics(boolean param ) {
+            System.out.println("enableAutoMnemonics called.");
+        }
+
+        public void hideDisabledEntries(boolean param ) {
+            System.out.println("hideDisabledEntries called.");
+        }
+
+        public com.sun.star.awt.MenuItemType getItemType(short param ) {
+            System.out.println("getItemType called.");
+            return com.sun.star.awt.MenuItemType.DONTKNOW;
+        }
+
+        public void setItemType(com.sun.star.awt.MenuItemType param ) {
+            System.out.println("setItemType called.");
+        }
+
+        public void clear() {
+            System.out.println("clear called.");
+        }
     }
 }

Modified: openoffice/trunk/main/svtools/inc/svtools/popupmenucontrollerbase.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/inc/svtools/popupmenucontrollerbase.hxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/inc/svtools/popupmenucontrollerbase.hxx (original)
+++ openoffice/trunk/main/svtools/inc/svtools/popupmenucontrollerbase.hxx Sun Dec 23 12:29:21
2012
@@ -86,10 +86,10 @@ namespace svt
 		    virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent&
Event ) throw ( ::com::sun::star::uno::RuntimeException ) = 0;
 
             // XMenuListener
-            virtual void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
-            virtual void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent
) throw (::com::sun::star::uno::RuntimeException);
-            virtual void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent
) throw (::com::sun::star::uno::RuntimeException);
-            virtual void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
+            virtual void SAL_CALL itemHighlighted( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
+            virtual void SAL_CALL itemSelected( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
+            virtual void SAL_CALL itemActivated( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
+            virtual void SAL_CALL itemDeactivated( const ::com::sun::star::awt::MenuEvent&
rEvent ) throw (::com::sun::star::uno::RuntimeException);
 
             // XDispatchProvider
             virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch
> SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const ::rtl::OUString&
sTarget, sal_Int32 nFlags ) throw( ::com::sun::star::uno::RuntimeException );

Modified: openoffice/trunk/main/svtools/source/uno/popupmenucontrollerbase.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/uno/popupmenucontrollerbase.cxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/svtools/source/uno/popupmenucontrollerbase.cxx (original)
+++ openoffice/trunk/main/svtools/source/uno/popupmenucontrollerbase.cxx Sun Dec 23 12:29:21
2012
@@ -38,7 +38,6 @@
 #include <com/sun/star/awt/MenuItemStyle.hpp>
 #include <com/sun/star/frame/XDispatchProvider.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/awt/XMenuExtended.hpp>
 
 //_________________________________________________________________________________________________________________
 //	includes of other projects
@@ -103,17 +102,9 @@ void PopupMenuControllerBase::throwIfDis
 // protected function
 void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu
>& rPopupMenu )
 {
-    VCLXPopupMenu* pPopupMenu = 0;
     if ( rPopupMenu.is() && rPopupMenu->getItemCount() > 0 )
     {
-         pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu );
-         if ( pPopupMenu )
-         {
-            vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
-    
-            PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu();
-            pVCLPopupMenu->Clear();
-         }
+        rPopupMenu->clear();
     }
 }
 
@@ -151,7 +142,7 @@ void SAL_CALL PopupMenuControllerBase::d
 }
 
 // XMenuListener
-void SAL_CALL PopupMenuControllerBase::highlight( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemHighlighted( const awt::MenuEvent& ) throw
(RuntimeException)
 {
 }
 
@@ -163,17 +154,16 @@ void PopupMenuControllerBase::impl_selec
 		_xDispatch->dispatch( aURL, aArgs );
 }
 
-void SAL_CALL PopupMenuControllerBase::select( const awt::MenuEvent& rEvent ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemSelected( const awt::MenuEvent& rEvent ) throw
(RuntimeException)
 {
 	throwIfDisposed();
 
     osl::MutexGuard aLock( m_aMutex );
 
-	Reference< awt::XMenuExtended > xExtMenu( m_xPopupMenu, UNO_QUERY );
-	if( xExtMenu.is() )
+	if( m_xPopupMenu.is() )
 	{
 		Sequence<PropertyValue> aArgs;
-		dispatchCommand( xExtMenu->getCommand( rEvent.MenuId ), aArgs );
+		dispatchCommand( m_xPopupMenu->getCommand( rEvent.MenuId ), aArgs );
 	}
 }
 
@@ -208,11 +198,11 @@ IMPL_STATIC_LINK_NOINSTANCE( PopupMenuCo
     return 0;
 }
 
-void SAL_CALL PopupMenuControllerBase::activate( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemActivated( const awt::MenuEvent& ) throw (RuntimeException)
 {
 }
 
-void SAL_CALL PopupMenuControllerBase::deactivate( const awt::MenuEvent& ) throw (RuntimeException)
+void SAL_CALL PopupMenuControllerBase::itemDeactivated( const awt::MenuEvent& ) throw
(RuntimeException)
 {
 }
 

Modified: openoffice/trunk/main/svx/source/tbxctrls/extrusioncontrols.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/tbxctrls/extrusioncontrols.cxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/tbxctrls/extrusioncontrols.cxx (original)
+++ openoffice/trunk/main/svx/source/tbxctrls/extrusioncontrols.cxx Sun Dec 23 12:29:21 2012
@@ -28,11 +28,6 @@
 
 #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
 
-#include <com/sun/star/util/XURLTransformer.hpp> 
-#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/awt/XPopupMenuExtended.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
-
 #include <vos/mutex.hxx>
 
 #include <svtools/toolbarmenu.hxx>

Modified: openoffice/trunk/main/toolkit/inc/pch/precompiled_toolkit.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/inc/pch/precompiled_toolkit.hxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/inc/pch/precompiled_toolkit.hxx (original)
+++ openoffice/trunk/main/toolkit/inc/pch/precompiled_toolkit.hxx Sun Dec 23 12:29:21 2012
@@ -110,7 +110,6 @@
 #include "com/sun/star/awt/XLayoutConstrains.hpp"
 #include "com/sun/star/awt/XListBox.hpp"
 #include "com/sun/star/awt/XMenuBar.hpp"
-#include "com/sun/star/awt/XMenuExtended.hpp"
 #include "com/sun/star/awt/XMenuListener.hpp"
 #include "com/sun/star/awt/XMessageBox.hpp"
 #include "com/sun/star/awt/XMouseListener.hpp"

Modified: openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx (original)
+++ openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx Sun Dec 23 12:29:21 2012
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,176 +7,144 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
 #ifndef _TOOLKIT_AWT_VCLXMENU_HXX_
 #define _TOOLKIT_AWT_VCLXMENU_HXX_
 
 #include <toolkit/dllapi.h>
-#include <com/sun/star/awt/XMenuBarExtended.hpp>
-#include <com/sun/star/awt/XPopupMenuExtended.hpp>
+#include <toolkit/helper/listenermultiplexer.hxx>
+
+#include <com/sun/star/awt/XMenuBar.hpp>
+#include <com/sun/star/awt/XPopupMenu.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
+
 #include <cppuhelper/weak.hxx>
 #include <osl/mutex.hxx>
-
-#include <tools/list.hxx>
 #include <tools/link.hxx>
+#include <tools/list.hxx>
 
-#include <toolkit/helper/listenermultiplexer.hxx>
+namespace css = ::com::sun::star;
 
 class Menu;
 class MenuBar;
 class VclSimpleEvent;
 
-DECLARE_LIST( PopupMenuRefList, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu
>* )
+DECLARE_LIST( PopupMenuRefList, css::uno::Reference< css::awt::XPopupMenu >* )
 
-//	----------------------------------------------------
-//	class VCLXMenu
-//	----------------------------------------------------
-
-class TOOLKIT_DLLPUBLIC VCLXMenu :  public ::com::sun::star::awt::XMenuBarExtended,
-                                    public ::com::sun::star::awt::XPopupMenuExtended,
-                                    public ::com::sun::star::lang::XServiceInfo,
-                                    public ::com::sun::star::lang::XTypeProvider,
-                                    public ::com::sun::star::lang::XUnoTunnel,
-                                    public ::cppu::OWeakObject
+class TOOLKIT_DLLPUBLIC VCLXMenu : public css::awt::XMenuBar,
+                                   public css::awt::XPopupMenu,
+                                   public css::lang::XServiceInfo,
+                                   public css::lang::XTypeProvider,
+                                   public css::lang::XUnoTunnel,
+                                   public ::cppu::OWeakObject
 {
 private:
-	::osl::Mutex			maMutex;
-	Menu*					mpMenu;
-	MenuListenerMultiplexer	maMenuListeners;
-	PopupMenuRefList		maPopupMenueRefs;
+    ::osl::Mutex                maMutex;
+    Menu*                       mpMenu;
+    MenuListenerMultiplexer     maMenuListeners;
+    PopupMenuRefList            maPopupMenueRefs;
 
 protected:
-	::osl::Mutex&			GetMutex() { return maMutex; }
+    ::osl::Mutex&               GetMutex() { return maMutex; }
 
-	DECL_LINK( 	 	MenuEventListener, VclSimpleEvent* );
+    DECL_LINK( MenuEventListener, VclSimpleEvent* );
 
-	void			ImplCreateMenu( sal_Bool bPopup );
+    void ImplCreateMenu( sal_Bool bPopup );
 
 public:
-					VCLXMenu();
-					VCLXMenu( Menu* pMenu );
-					~VCLXMenu();
-
-
-	Menu*			GetMenu() const { return mpMenu; }
-	sal_Bool			IsPopupMenu() const;
-
-	// ::com::sun::star::uno::XInterface
-    ::com::sun::star::uno::Any	SAL_CALL queryInterface( const ::com::sun::star::uno::Type
& rType ) throw(::com::sun::star::uno::RuntimeException);
-	void						SAL_CALL acquire() throw()	{ OWeakObject::acquire(); }
-	void						SAL_CALL release() throw()	{ OWeakObject::release(); }
-
-	// ::com::sun::star::lang::XUnoTunnel
-	static const ::com::sun::star::uno::Sequence< sal_Int8 >&	GetUnoTunnelId() throw();
-	static VCLXMenu*											GetImplementation( const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface >& rxIFace ) throw();
-	sal_Int64													SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8
>& rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
-
-	// ::com::sun::star::lang::XTypeProvider
-	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >	SAL_CALL getTypes()
throw(::com::sun::star::uno::RuntimeException);
-	::com::sun::star::uno::Sequence< sal_Int8 >						SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
-	// ::com::sun::star::awt::XMenu
-    void SAL_CALL addMenuListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuListener
>& xListener ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL removeMenuListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuListener
>& xListener ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_Int16
nItemStyle, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Int16 SAL_CALL getItemCount(  ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Int16 SAL_CALL getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Int16 SAL_CALL getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Bool SAL_CALL isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException);
-    ::rtl::OUString SAL_CALL getItemText( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Reference<
::com::sun::star::awt::XPopupMenu >& aPopupMenu ) throw(::com::sun::star::uno::RuntimeException);
-    ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > SAL_CALL
getPopupMenu( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException);
-
-	// ::com::sun::star::awt::XPopupMenu
-    void SAL_CALL insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Int16 SAL_CALL getDefaultItem(  ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Bool SAL_CALL isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException);
-    sal_Int16 SAL_CALL execute( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer
>& Parent, const ::com::sun::star::awt::Rectangle& Area, sal_Int16 Direction )
throw(::com::sun::star::uno::RuntimeException);
-
-	// ::com::sun::star::awt::XMenuBar
-
-    // ::com::sun::star::awt::XMenuExtended
-    virtual void SAL_CALL setCommand( sal_Int16 nItemId, const ::rtl::OUString& aCommand
) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString& aHelp
) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getHelpCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException);
-
-    // ========================================================================
-    // ========================================================================
-    // ========================================================================
-
-    // XMenuExtended2 Methods
-    virtual ::sal_Bool SAL_CALL isPopupMenu(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL clear(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::awt::MenuItemType SAL_CALL getItemType( ::sal_Int16 nItemPos
) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL hideDisabledEntries( ::sal_Bool bHide ) throw (::com::sun::star::uno::RuntimeException);
-
-    // XMenuBarExtended Methods
-
-    // XPopupMenuExtended Methods
-    virtual ::sal_Bool SAL_CALL isInExecute(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL endExecute(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setLogo( const ::com::sun::star::awt::MenuLogo& aMenuLogo )
throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::awt::MenuLogo SAL_CALL getLogo(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL enableAutoMnemonics( ::sal_Bool bEnable ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setAcceleratorKeyEvent( ::sal_Int16 nItemId, const ::com::sun::star::awt::KeyEvent&
aKeyEvent ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::awt::KeyEvent SAL_CALL getAcceleratorKeyEvent( ::sal_Int16
nItemId ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& sHelpText
) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getHelpText( ::sal_Int16 nItemId ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUString&
sTipHelpText ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getTipHelpText( ::sal_Int16 nItemId ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setItemImage( ::sal_Int16 nItemId, const ::com::sun::star::uno::Reference<
::com::sun::star::graphic::XGraphic >& xGraphic, ::sal_Bool bScale ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >
SAL_CALL getItemImage( ::sal_Int16 nItemId ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setItemImageAngle( ::sal_Int16 nItemId, ::sal_Int32 nAngle ) throw
(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Int32 SAL_CALL getItemImageAngle( ::sal_Int16 nItemId ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setItemImageMirrorMode( ::sal_Int16 nItemId, ::sal_Bool bMirror
) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL isItemImageInMirrorMode( ::sal_Int16 nItemId ) throw (::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::lang::XServiceInfo
-    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(
 ) throw (::com::sun::star::uno::RuntimeException);
-
+    VCLXMenu();
+    VCLXMenu( Menu* pMenu );
+    ~VCLXMenu();
+
+    Menu*    GetMenu() const { return mpMenu; }
+    sal_Bool IsPopupMenu() const;
+
+    // css::uno::XInterface
+    css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException);
+    void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+    void SAL_CALL release() throw() { OWeakObject::release(); }
+
+    // css::lang::XUnoTunnel
+    static const css::uno::Sequence< sal_Int8 >&  GetUnoTunnelId() throw();
+    static VCLXMenu* GetImplementation( const css::uno::Reference< css::uno::XInterface
>& rxIFace ) throw();
+    sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier
) throw(css::uno::RuntimeException);
+
+    // css::lang::XTypeProvider
+    css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException);
+    css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException);
+
+    // css::awt::XMenu
+    virtual void SAL_CALL addMenuListener( const css::uno::Reference< css::awt::XMenuListener
>& xListener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeMenuListener( const css::uno::Reference< css::awt::XMenuListener
>& xListener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL insertItem( ::sal_Int16 nItemId, const ::rtl::OUString& aText,
::sal_Int16 nItemStyle, ::sal_Int16 nItemPos ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeItem( ::sal_Int16 nItemPos, ::sal_Int16 nCount ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL clear(  ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL getItemCount(  ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL getItemId( ::sal_Int16 nItemPos ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL getItemPos( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual css::awt::MenuItemType SAL_CALL getItemType( ::sal_Int16 nItemPos ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL enableItem( ::sal_Int16 nItemId, ::sal_Bool bEnable ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isItemEnabled( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL hideDisabledEntries( ::sal_Bool bHide ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL enableAutoMnemonics( ::sal_Bool bEnable ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setItemText( ::sal_Int16 nItemId, const ::rtl::OUString& aText
) throw (css::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setCommand( ::sal_Int16 nItemId, const ::rtl::OUString& aCommand
) throw (css::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getCommand( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setHelpCommand( ::sal_Int16 nItemId, const ::rtl::OUString&
aCommand ) throw (css::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getHelpCommand( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString& sHelpText
) throw (css::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getHelpText( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUString&
sTipHelpText ) throw (css::uno::RuntimeException);
+    virtual ::rtl::OUString SAL_CALL getTipHelpText( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isPopupMenu(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setPopupMenu( ::sal_Int16 nItemId, const css::uno::Reference<
css::awt::XPopupMenu >& aPopupMenu ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::awt::XPopupMenu > SAL_CALL getPopupMenu( ::sal_Int16
nItemId ) throw (css::uno::RuntimeException);
+
+    // css::awt::XPopupMenu
+    virtual void SAL_CALL insertSeparator( ::sal_Int16 nItemPos ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setDefaultItem( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL getDefaultItem(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL checkItem( ::sal_Int16 nItemId, ::sal_Bool bCheck ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isItemChecked( ::sal_Int16 nItemId ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int16 SAL_CALL execute( const css::uno::Reference< css::awt::XWindowPeer
>& Parent, const css::awt::Point& Position, ::sal_Int16 Direction ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isInExecute(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL endExecute(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setAcceleratorKeyEvent( ::sal_Int16 nItemId, const css::awt::KeyEvent&
aKeyEvent ) throw (css::uno::RuntimeException);
+    virtual css::awt::KeyEvent SAL_CALL getAcceleratorKeyEvent( ::sal_Int16 nItemId ) throw
(css::uno::RuntimeException);
+    virtual void SAL_CALL setItemImage( ::sal_Int16 nItemId, const css::uno::Reference<
css::graphic::XGraphic >& xGraphic, ::sal_Bool bScale ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL getItemImage( ::sal_Int16
nItemId ) throw (css::uno::RuntimeException);
+
+    // css::lang::XServiceInfo
+    virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw (css::uno::RuntimeException);
+    virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(
 ) throw (css::uno::RuntimeException);
 };
 
-//	----------------------------------------------------
-//	class VCLXMenuBar
-//	----------------------------------------------------
 class TOOLKIT_DLLPUBLIC VCLXMenuBar : public VCLXMenu
 {
 public:
-		VCLXMenuBar();
-        VCLXMenuBar( MenuBar* pMenuBar );
+    VCLXMenuBar();
+    VCLXMenuBar( MenuBar* pMenuBar );
 };
 
-//	----------------------------------------------------
-//	class VCLXPopupMenu
-//	----------------------------------------------------
 class TOOLKIT_DLLPUBLIC VCLXPopupMenu : public VCLXMenu
 {
 public:
-		VCLXPopupMenu();
+    VCLXPopupMenu();
 };
 
-#endif // _TOOLKIT_AWT_VCLXMENU_HXX_
+#endif

Modified: openoffice/trunk/main/toolkit/inc/toolkit/helper/listenermultiplexer.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/inc/toolkit/helper/listenermultiplexer.hxx?rev=1425458&r1=1425457&r2=1425458&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/inc/toolkit/helper/listenermultiplexer.hxx (original)
+++ openoffice/trunk/main/toolkit/inc/toolkit/helper/listenermultiplexer.hxx Sun Dec 23 12:29:21
2012
@@ -209,10 +209,10 @@ DECL_LISTENERMULTIPLEXER_END
 //	class MenuListenerMultiplexer
 //	----------------------------------------------------
 DECL_LISTENERMULTIPLEXER_START( MenuListenerMultiplexer, ::com::sun::star::awt::XMenuListener
)
-    void SAL_CALL highlight( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL select( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL activate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
-    void SAL_CALL deactivate( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+    void SAL_CALL itemHighlighted( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+    void SAL_CALL itemSelected( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+    void SAL_CALL itemActivated( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
+    void SAL_CALL itemDeactivated( const ::com::sun::star::awt::MenuEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
 DECL_LISTENERMULTIPLEXER_END
 
 //	----------------------------------------------------



Mime
View raw message