summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-12 12:42:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-12-12 15:59:14 +0100
commit7390401fa21d9ebf35d9473bef6b44b42ea7475d (patch)
tree848e3a4a6948ae358e5b6aaed61a592724b2371c
parent44680910c15223c83f3681f282475e54f134cbdd (diff)
prefer css::awt::XPopupMenu api
Change-Id: I29b91b97e36682473241f3d7ab9cde46765830f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126700 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/mnuctrls/smarttagmenu.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx
index a918418cda78..7408bd09d966 100644
--- a/svx/source/mnuctrls/smarttagmenu.cxx
+++ b/svx/source/mnuctrls/smarttagmenu.cxx
@@ -182,13 +182,15 @@ void SmartTagMenuController::FillMenu()
}
}
- if ( 0 < pVCLMenu->GetItemCount() )
+ sal_Int16 nItemCount = m_xPopupMenu->getItemCount();
+ if (nItemCount > 0)
{
static const OUStringLiteral aCommand = u".uno:AutoCorrectDlg?OpenSmartTag:bool=true";
- pVCLMenu->InsertSeparator();
+ m_xPopupMenu->insertSeparator(nItemCount++);
auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, m_aModuleName);
- pVCLMenu->InsertItem( nMenuId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties) );
- pVCLMenu->SetItemCommand( nMenuId, aCommand );
+ m_xPopupMenu->insertItem(nMenuId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties),
+ 0, nItemCount);
+ m_xPopupMenu->setCommand(nMenuId, aCommand);
}
}