summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-29 11:13:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-29 21:18:13 +0100
commitb7d12aab92b919e3b8a68be2ce2c7599f1d9dc7f (patch)
treea6e02f0884dcd3d38d9b0e4ee173133f63887e8a /framework
parentd521438710cf977b21dcec71d78bbfac966a1061 (diff)
can use css::awt::XPopupMenu::setCommand
instead of PopupMenu::SetItemCommand since... commit 9aa4101c53e483be1d25c1e5aaad2cf542540a56 Date: Wed Feb 25 16:57:46 2004 +0000 INTEGRATION: CWS layoutmanager (1.3.146); FILE MERGED 2004/01/19 10:03:03 cd 1.3.146.2: #111899# Added new interface to support set/get commands/help URL Change-Id: I3ec9126aa601a30bf6376a18659c81198b78c4d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126039 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/objectmenucontroller.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index 7300eab60030..62b5586eeea9 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -23,10 +23,8 @@
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <svtools/popupmenucontrollerbase.hxx>
-#include <toolkit/awt/vclxmenu.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
-#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
@@ -81,17 +79,10 @@ ObjectMenuController::ObjectMenuController( const css::uno::Reference< css::uno:
void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescriptor >& rVerbCommandSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
const css::embed::VerbDescriptor* pVerbCommandArray = rVerbCommandSeq.getConstArray();
- VCLXPopupMenu* pPopupMenu = static_cast<VCLXPopupMenu *>(comphelper::getFromUnoTunnel<VCLXMenu>( rPopupMenu ));
- PopupMenu* pVCLPopupMenu = nullptr;
SolarMutexGuard aSolarMutexGuard;
resetPopupMenu( rPopupMenu );
- if ( pPopupMenu )
- pVCLPopupMenu = static_cast<PopupMenu *>(pPopupMenu->GetMenu());
-
- if ( !pVCLPopupMenu )
- return;
static const OUStringLiteral aVerbCommand( u".uno:ObjectMenue?VerbID:short=" );
for ( sal_Int32 i = 0; i < rVerbCommandSeq.getLength(); i++ )
@@ -100,10 +91,8 @@ void ObjectMenuController::fillPopupMenu( const Sequence< css::embed::VerbDescri
if ( rVerb.VerbAttributes & css::embed::VerbAttributes::MS_VERBATTR_ONCONTAINERMENU )
{
m_xPopupMenu->insertItem( i+1, rVerb.VerbName, 0, i );
- // use VCL popup menu pointer to set vital information that are not part of the awt implementation
-
OUString aCommand = aVerbCommand + OUString::number( rVerb.VerbID );
- pVCLPopupMenu->SetItemCommand( i+1, aCommand ); // Store verb command
+ m_xPopupMenu->setCommand( i+1, aCommand ); // Store verb command
}
}
}