summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx19
-rw-r--r--sw/source/uibase/shells/frmsh.cxx15
2 files changed, 25 insertions, 9 deletions
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index f48e3568312b..16e068d20372 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -293,11 +293,16 @@ SwSpellPopup::SwSpellPopup(
uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
- OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) );
- m_xPopupMenu->SetItemText(m_nSpellDialogId,
- vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName));
- m_xPopupMenu->SetItemText(m_nCorrectDialogId,
- vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:AutoCorrectDlg", aModuleName));
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:SpellingAndGrammarDialog", aModuleName);
+ m_xPopupMenu->SetItemText(m_nSpellDialogId,
+ vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties));
+ }
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AutoCorrectDlg", aModuleName);
+ m_xPopupMenu->SetItemText(m_nCorrectDialogId,
+ vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties));
+ }
if (comphelper::LibreOfficeKit::isActive())
{
@@ -307,6 +312,7 @@ SwSpellPopup::SwSpellPopup(
m_xPopupMenu->HideItem(m_nCorrectMenuId);
}
sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId);
+ OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) );
m_xPopupMenu->InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos);
m_xPopupMenu->SetHelpId(MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
@@ -516,8 +522,9 @@ SwSpellPopup::SwSpellPopup(
OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
OUString aIgnoreSelection( SwResId( STR_IGNORE_SELECTION ) );
+ auto aCommandProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:SpellingAndGrammarDialog", aModuleName);
m_xPopupMenu->SetItemText(m_nSpellDialogId,
- vcl::CommandInfoProvider::GetPopupLabelForCommand(".uno:SpellingAndGrammarDialog", aModuleName));
+ vcl::CommandInfoProvider::GetPopupLabelForCommand(aCommandProperties));
sal_uInt16 nItemPos = m_xPopupMenu->GetItemPos(m_nIgnoreWordId);
m_xPopupMenu->InsertItem(MN_IGNORE_SELECTION, aIgnoreSelection, MenuItemBits::NONE, OString(), nItemPos);
m_xPopupMenu->SetHelpId(MN_IGNORE_SELECTION, HID_LINGU_IGNORE_SELECTION);
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 14874c78f544..be2997a8a5db 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -880,16 +880,25 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
{
case SID_OBJECT_ALIGN_UP :
case FN_FRAME_ALIGN_VERT_TOP:
- sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(".uno:AlignTop", aModuleName);
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignTop", aModuleName);
+ sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
break;
+ }
case SID_OBJECT_ALIGN_MIDDLE:
case FN_FRAME_ALIGN_VERT_CENTER:
- sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(".uno:AlignVerticalCenter", aModuleName);
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignVerticalCenter", aModuleName);
+ sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
break;
+ }
case SID_OBJECT_ALIGN_DOWN:
case FN_FRAME_ALIGN_VERT_BOTTOM:
- sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(".uno:AlignBottom", aModuleName);
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:AlignBottom", aModuleName);
+ sNewLabel = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
break;
+ }
}
}
if ( !sNewLabel.isEmpty() )