summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2023-09-14 10:48:46 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2023-09-14 12:39:12 +0200
commit1d4cd39262fb71f72311e33ac2bdb7d925be5d98 (patch)
tree667f2bb8e90c087cd20d7901fab2d2594f5fed74 /sw/source/ui/config
parentbbd1cae866630e1545b603b2b31417713d63d226 (diff)
Related tdf#157006 - Remove global compatibility options
Clean-up the UI in favor of the advanced options Change-Id: I11ffa643fc577e7eee41f42bd3e16fb290202f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156911 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/optcomp.cxx45
1 files changed, 0 insertions, 45 deletions
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 7d6ecaf24e4d..8620ac451919 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -50,17 +50,12 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(weld::Container* pPage, weld::Dia
, m_pWrtShell(nullptr)
, m_pImpl(new SwCompatibilityOptPage_Impl)
, m_nSavedOptions(0)
- , m_bSavedMSFormsMenuOption(false)
, m_xMain(m_xBuilder->weld_frame("compatframe"))
- , m_xGlobalOptionsFrame(m_xBuilder->weld_frame("globalcompatframe"))
, m_xFormattingLB(m_xBuilder->weld_combo_box("format"))
- , m_xGlobalOptionsLB(m_xBuilder->weld_combo_box("globaloptions"))
, m_xOptionsLB(m_xBuilder->weld_tree_view("options"))
- , m_xGlobalOptionsCLB(m_xBuilder->weld_tree_view("globaloptioncheckbox"))
, m_xDefaultPB(m_xBuilder->weld_button("default"))
{
m_xOptionsLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
- m_xGlobalOptionsCLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
int nPos = 0;
for (int i = static_cast<int>(SvtCompatibilityEntry::Index::Module) + 1;
@@ -80,21 +75,6 @@ SwCompatibilityOptPage::SwCompatibilityOptPage(weld::Container* pPage, weld::Dia
m_xFormattingLB->clear();
- // Set MSOCompatibleFormsMenu entry attributes
- const bool bReadOnly = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::isReadOnly();
- m_xGlobalOptionsCLB->set_sensitive(!bReadOnly);
-
- m_xGlobalOptionsCLB->append();
- const bool bChecked = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get();
- m_xGlobalOptionsCLB->set_toggle(0, bChecked ? TRISTATE_TRUE : TRISTATE_FALSE);
- m_xGlobalOptionsCLB->set_text(0, m_xGlobalOptionsLB->get_text(0), 0);
-
- m_xGlobalOptionsLB->clear();
-
- // tdf#125799, we let only the doc options grow/shrink but give this one more than its bare
- // min request height because there's only one row in it and that looks somewhat abrupt
- m_xGlobalOptionsCLB->set_size_request(-1, m_xGlobalOptionsCLB->get_preferred_size().Height() * 2);
-
InitControls( rSet );
// set handler
@@ -196,7 +176,6 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
else
{
m_xMain->set_sensitive(false);
- m_xGlobalOptionsFrame->set_sensitive(false);
}
const OUString& rText = m_xMain->get_label();
m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle));
@@ -472,27 +451,6 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet* )
if ( bModified )
WriteOptions();
- bool bNewMSFormsMenuOption = m_xGlobalOptionsCLB->get_toggle(0);
- if (m_bSavedMSFormsMenuOption != bNewMSFormsMenuOption)
- {
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::set(bNewMSFormsMenuOption, batch);
- batch->commit();
-
- m_bSavedMSFormsMenuOption = bNewMSFormsMenuOption;
- bModified = true;
-
- // Show a message about that the option needs a restart to be applied
- {
- SolarMutexGuard aGuard;
- if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(),
- GetFrameWeld(), svtools::RESTART_REASON_MSCOMPATIBLE_FORMS_MENU))
- {
- GetDialogController()->response(RET_OK);
- }
- }
- }
-
return bModified;
}
@@ -503,9 +461,6 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet* )
sal_uInt32 nOptions = GetDocumentOptions();
SetCurrentOptions( nOptions );
m_nSavedOptions = nOptions;
-
- m_bSavedMSFormsMenuOption = officecfg::Office::Compatibility::View::MSCompatibleFormsMenu::get();
- m_xGlobalOptionsCLB->set_toggle(0, m_bSavedMSFormsMenuOption ? TRISTATE_TRUE : TRISTATE_FALSE);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */