You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2014/04/18 07:40:57 UTC

svn commit: r1588417 - /openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx

Author: arielch
Date: Fri Apr 18 05:40:56 2014
New Revision: 1588417

URL: http://svn.apache.org/r1588417
Log:
i124706 - Consider the toolbar alignment when executing the PopupMenu

Modified:
    openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx

Modified: openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx?rev=1588417&r1=1588416&r2=1588417&view=diff
==============================================================================
--- openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx (original)
+++ openoffice/trunk/main/framework/source/uielement/popuptoolbarcontroller.cxx Fri Apr 18 05:40:56 2014
@@ -156,10 +156,13 @@ PopupMenuToolbarController::createPopupW
         return xRet;
 
     pToolBox->SetItemDown( m_nToolBoxId, sal_True );
+    WindowAlign eAlign( pToolBox->GetAlign() );
     sal_uInt16 nId = m_xPopupMenu->execute(
         css::uno::Reference< css::awt::XWindowPeer >( getParent(), css::uno::UNO_QUERY ),
         VCLUnoHelper::ConvertToAWTRect( pToolBox->GetItemRect( m_nToolBoxId ) ),
-        css::awt::PopupMenuDirection::EXECUTE_DEFAULT );
+        ( eAlign == WINDOWALIGN_TOP || eAlign == WINDOWALIGN_BOTTOM ) ?
+            css::awt::PopupMenuDirection::EXECUTE_DOWN :
+            css::awt::PopupMenuDirection::EXECUTE_RIGHT );
     pToolBox->SetItemDown( m_nToolBoxId, sal_False );
 
     if ( nId )