diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-03 13:09:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-03 13:40:39 +0100 |
commit | 9f5eb314b0fc74d3779a8ce8116aa219ab82d5aa (patch) | |
tree | b8ee160f1b86df87b94eeccde38ef28cd7c29891 /cui/source/customize/cfgutil.cxx | |
parent | 5dd4c96874db50be7af2a6f3514091c240d0967c (diff) |
loplugin:unusedfields
tweak plugin with the name of another clone method
Change-Id: I47193d31f53f48297c9e773da375c7255ddde282
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87852
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize/cfgutil.cxx')
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 6cac6c02ee35..9b3e9ecdc4f0 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -1066,7 +1066,6 @@ void CuiConfigGroupListBox::SelectMacro( const OUString& rBasic, SvxScriptSelectorDialog::SvxScriptSelectorDialog( weld::Window* pParent, const css::uno::Reference< css::frame::XFrame >& xFrame) : GenericDialogController(pParent, "cui/ui/macroselectordialog.ui", "MacroSelectorDialog") - , m_bShowSlots(false) , m_xDialogDescription(m_xBuilder->weld_label("helpmacro")) , m_xCategories(new CuiConfigGroupListBox(m_xBuilder->weld_tree_view("categories"))) , m_xCommands(new CuiConfigFunctionListBox(m_xBuilder->weld_tree_view("commands"))) @@ -1078,19 +1077,14 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog( , m_xCancelButton(m_xBuilder->weld_button("cancel")) , m_xDescriptionText(m_xBuilder->weld_text_view("description")) { - if (m_bShowSlots) - { - // If we are showing Slot API commands update labels in the UI - m_xDialog->set_title(CuiResId(RID_SVXSTR_SELECTOR_ADD_COMMANDS)); - } m_xCancelButton->show(); m_xDialogDescription->show(); m_xOKButton->show(); - m_xLibraryFT->set_visible(!m_bShowSlots); - m_xCategoryFT->set_visible(m_bShowSlots); - m_xMacronameFT->set_visible(!m_bShowSlots); - m_xCommandsFT->set_visible(m_bShowSlots); + m_xLibraryFT->set_visible(true); + m_xCategoryFT->set_visible(false); + m_xMacronameFT->set_visible(true); + m_xCommandsFT->set_visible(false); const OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); m_xCategories->SetFunctionListBox(m_xCommands.get()); @@ -1168,19 +1162,7 @@ IMPL_LINK(SvxScriptSelectorDialog, ClickHdl, weld::Button&, rButton, void) } else if (&rButton == m_xOKButton.get()) { - // If we are displaying Slot API commands then this the dialog is being - // run from Tools/Configure and we should not close it - if ( !m_bShowSlots ) - { - m_xDialog->response(RET_OK); - } - else - { - // Select the next entry in the list if possible - std::unique_ptr<weld::TreeIter> xIter = m_xCommands->make_iterator(); - if (m_xCommands->get_selected(xIter.get()) && m_xCommands->iter_next_sibling(*xIter)) - m_xCommands->select(*xIter); - } + m_xDialog->response(RET_OK); } } |