[Libreoffice-commits] core.git: Branch 'aoo/trunk' - framework/source

Ariel Constenla-Haile arielch at apache.org
Thu Apr 17 23:07:24 PDT 2014


 framework/source/uielement/popuptoolbarcontroller.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 46d6cabf120e6c1cdf4b01548f435a5ae6f72ae2
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Fri Apr 18 05:40:56 2014 +0000

    i124706 - Consider the toolbar alignment when executing the PopupMenu

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 5e160d4..f269d81 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -156,10 +156,13 @@ PopupMenuToolbarController::createPopupWindow()
         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 )


More information about the Libreoffice-commits mailing list