diff options
-rw-r--r-- | framework/source/uielement/popuptoolbarcontroller.cxx | 5 |
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 ) |