summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/config/optcomp.cxx45
-rw-r--r--sw/source/uibase/inc/optcomp.hxx4
-rw-r--r--sw/uiconfig/swriter/ui/optcompatpage.ui124
3 files changed, 1 insertions, 172 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: */
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index c98f17f0a3cd..d4ebbcb6b58e 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -40,15 +40,11 @@ private:
std::unique_ptr<SwCompatibilityOptPage_Impl> m_pImpl;
// saved options after "Reset"; used in "FillItemSet" for comparison
sal_uInt32 m_nSavedOptions;
- bool m_bSavedMSFormsMenuOption;
// controls
std::unique_ptr<weld::Frame> m_xMain;
- std::unique_ptr<weld::Frame> m_xGlobalOptionsFrame;
std::unique_ptr<weld::ComboBox> m_xFormattingLB;
- std::unique_ptr<weld::ComboBox> m_xGlobalOptionsLB;
std::unique_ptr<weld::TreeView> m_xOptionsLB;
- std::unique_ptr<weld::TreeView> m_xGlobalOptionsCLB;
std::unique_ptr<weld::Button> m_xDefaultPB;
// handler
diff --git a/sw/uiconfig/swriter/ui/optcompatpage.ui b/sw/uiconfig/swriter/ui/optcompatpage.ui
index bed96ec03c1f..17e6042187e9 100644
--- a/sw/uiconfig/swriter/ui/optcompatpage.ui
+++ b/sw/uiconfig/swriter/ui/optcompatpage.ui
@@ -16,20 +16,6 @@
<column type="gboolean"/>
</columns>
</object>
- <object class="GtkTreeStore" id="liststore2">
- <columns>
- <!-- column-name check1 -->
- <column type="gboolean"/>
- <!-- column-name text -->
- <column type="gchararray"/>
- <!-- column-name id -->
- <column type="gchararray"/>
- <!-- column-name checkvis1 -->
- <column type="gboolean"/>
- <!-- column-name checktri1 -->
- <column type="gboolean"/>
- </columns>
- </object>
<object class="GtkBox" id="OptCompatPage">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -39,111 +25,6 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkFrame" id="globalcompatframe">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">False</property>
- <property name="label-xalign">0</property>
- <property name="shadow-type">none</property>
- <child>
- <!-- n-columns=1 n-rows=2 -->
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="margin-start">12</property>
- <property name="margin-top">6</property>
- <property name="hexpand">True</property>
- <property name="vexpand">False</property>
- <property name="row-spacing">5</property>
- <child>
- <object class="GtkScrolledWindow" id="globaloptioncheckboxscroll">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="shadow-type">in</property>
- <child>
- <object class="GtkTreeView" id="globaloptioncheckbox">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="receives-default">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="model">liststore2</property>
- <property name="headers-visible">False</property>
- <property name="search-column">0</property>
- <property name="show-expanders">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Macro Library List-selection1"/>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn6">
- <property name="resizable">True</property>
- <property name="spacing">6</property>
- <property name="alignment">0.5</property>
- <child>
- <object class="GtkCellRendererToggle" id="cellrenderer7"/>
- <attributes>
- <attribute name="visible">3</attribute>
- <attribute name="active">0</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn8">
- <property name="resizable">True</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderer9"/>
- <attributes>
- <attribute name="text">1</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="globaloptions">
- <property name="can-focus">False</property>
- <property name="no-show-all">True</property>
- <items>
- <item translatable="yes" context="optcompatpage|globalcompatoptions">Reorganize Form menu for Microsoft compatibility</item>
- </items>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">1</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="optcompatpage|label2">Global Compatibility Options</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<object class="GtkFrame" id="compatframe">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -179,9 +60,6 @@
<property name="headers-visible">False</property>
<property name="search-column">0</property>
<property name="show-expanders">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
- </child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn4">
<property name="resizable">True</property>
@@ -280,7 +158,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child internal-child="accessible">