summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2014-04-18 05:40:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-04-18 09:56:45 +0100
commitd8db205e7fdedddee10ac81a32a28df1e0ad6c56 (patch)
treed19f1be6bcd5cd15154fffc24485eeb3ef230dd0 /framework
parent42dd5615429e6273e9169a4bd941ad56fec1e6f6 (diff)
Resolves: #i124706# Consider the toolbar alignment...
when executing the PopupMenu (cherry picked from commit 46d6cabf120e6c1cdf4b01548f435a5ae6f72ae2) Conflicts: framework/source/uielement/popuptoolbarcontroller.cxx Change-Id: Icfccdd35c1849ea00a1ea706aedac25de794bbf6
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/popuptoolbarcontroller.cxx5
1 files changed, 4 insertions, 1 deletions
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 )