From d8db205e7fdedddee10ac81a32a28df1e0ad6c56 Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Fri, 18 Apr 2014 05:40:56 +0000 Subject: Resolves: #i124706# Consider the toolbar alignment... when executing the PopupMenu (cherry picked from commit 46d6cabf120e6c1cdf4b01548f435a5ae6f72ae2) Conflicts: framework/source/uielement/popuptoolbarcontroller.cxx Change-Id: Icfccdd35c1849ea00a1ea706aedac25de794bbf6 --- framework/source/uielement/popuptoolbarcontroller.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index e871caec08c2..df569dc3e714 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 ) -- cgit