summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
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.
}
}