summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-29 10:23:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-29 17:45:03 +0100
commit896c2d247d43135c12f5bb0d3921ae741f1c5960 (patch)
tree3fc0deca120f96eda04de2439e0d8296e94d898c /framework
parent3e8bfde1e1dd859d4c09337605f92db24a142e44 (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: I2bf9aa64b8c1dcd3bc7356adbfaf5592910eb851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126029 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/fontmenucontroller.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/framework/source/uielement/fontmenucontroller.cxx b/framework/source/uielement/fontmenucontroller.cxx
index a1081e0427f5..ce89834c5035 100644
--- a/framework/source/uielement/fontmenucontroller.cxx
+++ b/framework/source/uielement/fontmenucontroller.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <toolkit/awt/vclxmenu.hxx>
-#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <vcl/i18nhelp.hxx>
@@ -82,17 +81,9 @@ FontMenuController::~FontMenuController()
// private function
void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq, Reference< css::awt::XPopupMenu > const & rPopupMenu )
{
- 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;
std::vector<OUString> aVector;
aVector.reserve(rFontNameSeq.getLength());
@@ -112,7 +103,7 @@ void FontMenuController::fillPopupMenu( const Sequence< OUString >& rFontNameSeq
m_xPopupMenu->checkItem( i+1, true );
// use VCL popup menu pointer to set vital information that are not part of the awt implementation
OUString aFontNameCommand = aFontNameCommandPrefix + INetURLObject::encode( rName, INetURLObject::PART_HTTP_QUERY, INetURLObject::EncodeMechanism::All );
- pVCLPopupMenu->SetItemCommand( i+1, aFontNameCommand ); // Store font name into item command.
+ m_xPopupMenu->setCommand(i + 1, aFontNameCommand); // Store font name into item command.
}
}