summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}