diff options
author | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
commit | 3c1d4742e649fe9c8aed8c2817fe3e1f3364f298 (patch) | |
tree | e0c6e02c89aa9227726c9469da1001b3e29c41df /framework/source/uielement/popuptoolbarcontroller.cxx | |
parent | c5c31e2aeaedbdf76e1f38d3c385e34f5ed875ca (diff) |
Resync to trunk, windows non-pro buildaoo/aw080
Diffstat (limited to 'framework/source/uielement/popuptoolbarcontroller.cxx')
-rw-r--r-- | framework/source/uielement/popuptoolbarcontroller.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 5e160d40b275..81a7546da187 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 ) @@ -336,7 +339,7 @@ void NewToolbarController::functionExecuted( const OUString &rCommand ) If the given URL can be located as an action command of one menu item of the popup menu of this control, we return sal_True. Otherwhise we return sal_False. Further we return a fallback URL, in case we have to return sal_False. Because - the outside code must select a valid item of the popup menu everytime ... + the outside code must select a valid item of the popup menu every time ... and we define it here. By the way this m ethod was written to handle error situations gracefully. E.g. it can be called during creation time but then we have no valid menu. For this case we know another fallback URL. @@ -344,7 +347,7 @@ void NewToolbarController::functionExecuted( const OUString &rCommand ) @param rPopupMenu pounts to the popup menu, on which item we try to locate the given URL - Can be NULL! Search will be supressed then. + Can be NULL! Search will be suppressed then. @param sURL the URL for searching |