openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arie...@apache.org
Subject svn commit: r1486375 - in /openoffice/trunk/main: forms/source/component/ framework/source/uielement/ odk/examples/DevelopersGuide/GUI/ offapi/com/sun/star/awt/ offapi/type_reference/ qadevOOo/tests/java/ifc/frame/ toolkit/inc/toolkit/awt/ toolkit/sour...
Date Sat, 25 May 2013 22:10:53 GMT
Author: arielch
Date: Sat May 25 22:10:51 2013
New Revision: 1486375

URL: http://svn.apache.org/r1486375
Log:
i121542 - css::awt::XPopupMenu::execute() needs a css::awt::Rectangle

Modified:
    openoffice/trunk/main/forms/source/component/ImageControl.cxx
    openoffice/trunk/main/framework/source/uielement/langselectionstatusbarcontroller.cxx
    openoffice/trunk/main/framework/source/uielement/popupmenucontroller.cxx
    openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
    openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl
    openoffice/trunk/main/offapi/type_reference/types.rdb
    openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java
    openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx
    openoffice/trunk/main/toolkit/source/awt/vclxmenu.cxx

Modified: openoffice/trunk/main/forms/source/component/ImageControl.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/forms/source/component/ImageControl.cxx?rev=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/forms/source/component/ImageControl.cxx (original)
+++ openoffice/trunk/main/forms/source/component/ImageControl.cxx Sat May 25 22:10:51 2013
@@ -925,7 +925,7 @@ void OImageControlControl::mousePressed(
             if ( impl_isEmptyGraphics_nothrow() )
 				xMenu->enableItem( ID_CLEAR_GRAPHICS, sal_False );
 
-			awt::Point aPos( e.X, e.Y );
+			awt::Rectangle aRect( e.X, e.Y, 0, 0 );
 			if ( ( e.X < 0 ) || ( e.Y < 0 ) )
 			{	// context menu triggered by keyboard
 				// position it in the center of the control
@@ -935,12 +935,12 @@ void OImageControlControl::mousePressed(
 				if ( xWindow.is() )
 				{
 					awt::Rectangle aPosSize = xWindow->getPosSize();
-					aPos.X = aPosSize.Width / 2;
-					aPos.Y = aPosSize.Height / 2;
+					aRect.X = aPosSize.Width / 2;
+					aRect.Y = aPosSize.Height / 2;
 				}
 			}
 
-			const sal_Int16 nResult = xMenu->execute( xWindowPeer, aPos, PopupMenuDirection::EXECUTE_DEFAULT
);
+			const sal_Int16 nResult = xMenu->execute( xWindowPeer, aRect, PopupMenuDirection::EXECUTE_DEFAULT
);
 
 			switch ( nResult )
 			{

Modified: openoffice/trunk/main/framework/source/uielement/langselectionstatusbarcontroller.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/uielement/langselectionstatusbarcontroller.cxx?rev=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/uielement/langselectionstatusbarcontroller.cxx
(original)
+++ openoffice/trunk/main/framework/source/uielement/langselectionstatusbarcontroller.cxx
Sat May 25 22:10:51 2013
@@ -203,7 +203,8 @@ throw (::com::sun::star::uno::RuntimeExc
     //
 
 	Reference< awt::XWindowPeer > xParent( m_xParentWindow, UNO_QUERY );
-	sal_Int16 nId = xPopupMenu->execute( xParent, aPos, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16
);
+    com::sun::star::awt::Rectangle aRect( aPos.X, aPos.Y, 0, 0 );
+	sal_Int16 nId = xPopupMenu->execute( xParent, aRect, com::sun::star::awt::PopupMenuDirection::EXECUTE_UP+16
);
     //click "More..."
     if ( nId && m_xFrame.is() )
     {

Modified: openoffice/trunk/main/framework/source/uielement/popupmenucontroller.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/uielement/popupmenucontroller.cxx?rev=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/uielement/popupmenucontroller.cxx (original)
+++ openoffice/trunk/main/framework/source/uielement/popupmenucontroller.cxx Sat May 25 22:10:51
2013
@@ -66,7 +66,7 @@ class PopupMenuControllerImpl
 };
 
 //========================================================================
-// class PopupMenuController
+// class PopupMenuController REMOVE REMOVE REMOVE
 //========================================================================
 
 PopupMenuController::PopupMenuController( const Reference< lang::XMultiServiceFactory
>& rServiceManager )
@@ -221,7 +221,7 @@ Reference< awt::XWindow > SAL_CALL Popup
 		}
 		pToolBox->SetItemDown( nItemId, sal_True );
 		Reference< awt::XWindowPeer > xPeer( getParent(), UNO_QUERY_THROW );
-		mxPopupMenu->execute( xPeer, awt::Point( aRect.getX(), aRect.getY() ), 0 );
+		mxPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 );
 		pToolBox->SetItemDown( nItemId, sal_False );
 	}
 	catch( Exception& )

Modified: openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/UnoMenu2.java
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/UnoMenu2.java?rev=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/UnoMenu2.java (original)
+++ openoffice/trunk/main/odk/examples/DevelopersGuide/GUI/UnoMenu2.java Sat May 25 22:10:51
2013
@@ -20,7 +20,7 @@
  *************************************************************/
 
 import com.sun.star.awt.MouseEvent;
-import com.sun.star.awt.Point;
+import com.sun.star.awt.Rectangle;
 import com.sun.star.awt.XControl;
 import com.sun.star.awt.XMouseListener;
 import com.sun.star.awt.XTopWindow;
@@ -99,7 +99,7 @@ public UnoMenu2(XComponentContext _xCont
 
     public void mousePressed(MouseEvent mouseEvent) {
         if (mouseEvent.PopupTrigger){
-            Point aPos = new Point(mouseEvent.X, mouseEvent.Y);
+            Rectangle aPos = new Rectangle(mouseEvent.X, mouseEvent.Y, 0, 0);
             XControl xControl = (XControl) UnoRuntime.queryInterface(XControl.class, mouseEvent.Source);
             getPopupMenu().execute( xControl.getPeer(), aPos, com.sun.star.awt.PopupMenuDirection.EXECUTE_DEFAULT);
         }

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=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl (original)
+++ openoffice/trunk/main/offapi/com/sun/star/awt/XPopupMenu.idl Sat May 25 22:10:51 2013
@@ -23,7 +23,7 @@
 #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/Rectangle.idl>
 #include <com/sun/star/awt/XMenu.idl>
 #include <com/sun/star/graphic/XGraphic.idl>
 
@@ -84,7 +84,8 @@ published interface XPopupMenu: XMenu
             the parent window.
 
         @param Position
-            the coordinates where the popup menu should be executed.
+            a <type>Rectangle</type> representing the coordinates system
+            where the popup menu should be executed.
 
         @param Direction
             the direction in which a popup menu will grow, as specified
@@ -94,7 +95,7 @@ published interface XPopupMenu: XMenu
             returns the selected item or <code>0</code>, if cancelled.
      */
     short execute( [in] XWindowPeer Parent,
-                   [in] Point Position,
+                   [in] Rectangle Position,
                    [in] short Direction );
 
     /** queries if the <type>PopupMenu</type> is being.

Modified: openoffice/trunk/main/offapi/type_reference/types.rdb
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/offapi/type_reference/types.rdb?rev=1486375&r1=1486374&r2=1486375&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=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java (original)
+++ openoffice/trunk/main/qadevOOo/tests/java/ifc/frame/_XPopupMenuController.java Sat May
25 22:10:51 2013
@@ -61,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.Point
pos, short param) {
+        public short execute(com.sun.star.awt.XWindowPeer xWindowPeer, com.sun.star.awt.Rectangle
pos, short param) {
             System.out.println("execute called.");
             return 0;
         }

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=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx (original)
+++ openoffice/trunk/main/toolkit/inc/toolkit/awt/vclxmenu.hxx Sat May 25 22:10:51 2013
@@ -120,7 +120,7 @@ public:
     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_Int16 SAL_CALL execute( const css::uno::Reference< css::awt::XWindowPeer
>& Parent, const css::awt::Rectangle& 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);

Modified: openoffice/trunk/main/toolkit/source/awt/vclxmenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/toolkit/source/awt/vclxmenu.cxx?rev=1486375&r1=1486374&r2=1486375&view=diff
==============================================================================
--- openoffice/trunk/main/toolkit/source/awt/vclxmenu.cxx (original)
+++ openoffice/trunk/main/toolkit/source/awt/vclxmenu.cxx Sat May 25 22:10:51 2013
@@ -578,7 +578,7 @@ throw(css::uno::RuntimeException)
 
 sal_Int16 VCLXMenu::execute(
     const css::uno::Reference< css::awt::XWindowPeer >& rxWindowPeer,
-    const css::awt::Point& rPos,
+    const css::awt::Rectangle& rPos,
     sal_Int16 nFlags )
 throw(css::uno::RuntimeException)
 {
@@ -588,9 +588,8 @@ throw(css::uno::RuntimeException)
     sal_Int16 nRet = 0;
     if ( mpMenu && IsPopupMenu() )
     {
-        const ::Point aPoint = VCLPoint( rPos );
         nRet = ((PopupMenu*)mpMenu)->Execute( VCLUnoHelper::GetWindow( rxWindowPeer ),
-                                              ::Rectangle(aPoint,aPoint),
+                                              VCLRectangle( rPos ),
                                               nFlags | POPUPMENU_NOMOUSEUPCLOSE );
     }
     return nRet;



Mime
View raw message