[Libreoffice-commits] core.git: framework/source

Ariel Constenla-Haile arielch at apache.org
Fri Apr 18 01:59:29 PDT 2014


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

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

    Resolves: #i124706# Consider the toolbar alignment...
    
    when executing the PopupMenu
    
    (cherry picked from commit 46d6cabf120e6c1cdf4b01548f435a5ae6f72ae2)
    
    Conflicts:
    	framework/source/uielement/popuptoolbarcontroller.cxx
    
    Change-Id: Icfccdd35c1849ea00a1ea706aedac25de794bbf6

diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index e871cae..df569dc 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -187,10 +187,13 @@ PopupMenuToolbarController::createPopupWindow()
         return xRet;
 
     pToolBox->SetItemDown( m_nToolBoxId, 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, false );
 
     if ( nId )


More information about the Libreoffice-commits mailing list