[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - cui/source cui/uiconfig

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 26 21:12:10 UTC 2020


 cui/source/options/optgdlg.cxx |   40 ----------------------------------------
 cui/source/options/optgdlg.hxx |    2 --
 cui/uiconfig/ui/optviewpage.ui |   23 +++--------------------
 3 files changed, 3 insertions(+), 62 deletions(-)

New commits:
commit b4e5a0e06d50853f057c1a192f4ee6bd5ee90fe0
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Oct 16 12:22:38 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 26 22:11:35 2020 +0100

    remove ui for 'forceskia' AKA 'ignore skia denylist' (tdf#137159)
    
    I originally copy&pasted this from the OpenGL code, but now that I
    think of it, having an easy checkbox to make LO use drivers that LO
    decides are faulty is a bad idea. There's still the expert
    configuration if somebody insists (and if they're not expert
    enough to find the expert setting then they better not mess with it),
    but this is asking for unnecessary trouble.
    This also solves the problem that the UI option is misleading. As
    the description in Common.xcs says, "This one forces the use of Skia
    even if the denylist would block the driver.", so the option is
    independent of the 'enable skia' option, but the UI didn't make it
    appear so.
    
    Change-Id: I74bf3574f16899405272dbb3aec54580a5e3f0bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104425
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit fea1d3a487faef85b2b7aa8a87075f81ea22af76)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104506
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b9122d3d00e2..1972354ccd3f 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -108,7 +108,6 @@ class SkiaCfg
 {
 private:
     bool mbUseSkia;
-    bool mbForceSkia;
     bool mbForceSkiaRaster;
     bool mbModified;
 
@@ -117,11 +116,9 @@ public:
     ~SkiaCfg();
 
     bool useSkia() const;
-    bool forceSkia() const;
     bool forceSkiaRaster() const;
 
     void setUseSkia(bool bSkia);
-    void setForceSkia(bool bSkia);
     void setForceSkiaRaster(bool bSkia);
 
     void reset();
@@ -136,7 +133,6 @@ SkiaCfg::SkiaCfg():
 void SkiaCfg::reset()
 {
     mbUseSkia = officecfg::Office::Common::VCL::UseSkia::get();
-    mbForceSkia = officecfg::Office::Common::VCL::ForceSkia::get();
     mbForceSkiaRaster = officecfg::Office::Common::VCL::ForceSkiaRaster::get();
     mbModified = false;
 }
@@ -151,8 +147,6 @@ SkiaCfg::~SkiaCfg()
         std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
         if (!officecfg::Office::Common::VCL::UseSkia::isReadOnly())
             officecfg::Office::Common::VCL::UseSkia::set(mbUseSkia, batch);
-        if (!officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
-            officecfg::Office::Common::VCL::ForceSkia::set(mbForceSkia, batch);
         if (!officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
             officecfg::Office::Common::VCL::ForceSkiaRaster::set(mbForceSkiaRaster, batch);
         batch->commit();
@@ -167,11 +161,6 @@ bool SkiaCfg::useSkia() const
     return mbUseSkia;
 }
 
-bool SkiaCfg::forceSkia() const
-{
-    return mbForceSkia;
-}
-
 bool SkiaCfg::forceSkiaRaster() const
 {
     return mbForceSkiaRaster;
@@ -186,15 +175,6 @@ void SkiaCfg::setUseSkia(bool bSkia)
     }
 }
 
-void SkiaCfg::setForceSkia(bool bSkia)
-{
-    if (mbForceSkia != bSkia)
-    {
-        mbForceSkia = bSkia;
-        mbModified = true;
-    }
-}
-
 void SkiaCfg::setForceSkiaRaster(bool bSkia)
 {
     if (mbForceSkiaRaster != bSkia)
@@ -696,7 +676,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     , m_xUseHardwareAccell(m_xBuilder->weld_check_button("useaccel"))
     , m_xUseAntiAliase(m_xBuilder->weld_check_button("useaa"))
     , m_xUseSkia(m_xBuilder->weld_check_button("useskia"))
-    , m_xForceSkia(m_xBuilder->weld_check_button("forceskia"))
     , m_xForceSkiaRaster(m_xBuilder->weld_check_button("forceskiaraster"))
     , m_xSkiaStatusEnabled(m_xBuilder->weld_label("skiaenabled"))
     , m_xSkiaStatusDisabled(m_xBuilder->weld_label("skiadisabled"))
@@ -706,7 +685,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     if (Application::GetToolkitName() == "gtk3")
     {
         m_xUseSkia->hide();
-        m_xForceSkia->hide();
         m_xForceSkiaRaster->hide();
         m_xSkiaStatusEnabled->hide();
         m_xSkiaStatusDisabled->hide();
@@ -718,7 +696,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     // For now Skia is used mainly on Windows, hide the controls everywhere else.
     // It can also be used on Linux, but only with the rarely used 'gen' backend.
     m_xUseSkia->hide();
-    m_xForceSkia->hide();
     m_xForceSkiaRaster->hide();
     m_xSkiaStatusEnabled->hide();
     m_xSkiaStatusDisabled->hide();
@@ -726,7 +703,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
 
     m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, OnAntialiasingToggled ) );
 
-    m_xForceSkia->connect_toggled(LINK(this, OfaViewTabPage, OnForceSkiaToggled));
     m_xForceSkiaRaster->connect_toggled(LINK(this, OfaViewTabPage, OnForceSkiaRasterToggled));
 
     // Set known icon themes
@@ -756,8 +732,6 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, weld::DialogController* p
     // FIXME: should really add code to show a 'lock' icon here.
     if (officecfg::Office::Common::VCL::UseSkia::isReadOnly())
         m_xUseSkia->set_sensitive(false);
-    if (officecfg::Office::Common::VCL::ForceSkia::isReadOnly())
-        m_xForceSkia->set_sensitive(false);
     if (officecfg::Office::Common::VCL::ForceSkiaRaster::isReadOnly())
         m_xForceSkiaRaster->set_sensitive(false);
 
@@ -776,15 +750,6 @@ IMPL_LINK_NOARG( OfaViewTabPage, OnAntialiasingToggled, weld::ToggleButton&, voi
     m_xAAPointLimit->set_sensitive(bAAEnabled);
 }
 
-IMPL_LINK_NOARG(OfaViewTabPage, OnForceSkiaToggled, weld::ToggleButton&, void)
-{
-    if (m_xForceSkia->get_active())
-    {
-        // Ignoring the Skia blacklist implies that Skia is on.
-        m_xUseSkia->set_active(true);
-    }
-}
-
 IMPL_LINK_NOARG(OfaViewTabPage, OnForceSkiaRasterToggled, weld::ToggleButton&, void)
 {
     if (m_xForceSkiaRaster->get_active())
@@ -951,11 +916,9 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
     }
 
     if (m_xUseSkia->get_state_changed_from_saved() ||
-        m_xForceSkia->get_state_changed_from_saved() ||
         m_xForceSkiaRaster->get_state_changed_from_saved())
     {
         mpSkiaConfig->setUseSkia(m_xUseSkia->get_active());
-        mpSkiaConfig->setForceSkia(m_xForceSkia->get_active());
         mpSkiaConfig->setForceSkiaRaster(m_xForceSkiaRaster->get_active());
         bModified = true;
     }
@@ -988,7 +951,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
     }
 
     if (m_xUseSkia->get_state_changed_from_saved() ||
-        m_xForceSkia->get_state_changed_from_saved() ||
         m_xForceSkiaRaster->get_state_changed_from_saved())
     {
         SolarMutexGuard aGuard;
@@ -1100,7 +1062,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
         m_xUseAntiAliase->save_state();
     }
     m_xUseSkia->set_active(mpSkiaConfig->useSkia());
-    m_xForceSkia->set_active(mpSkiaConfig->forceSkia());
     m_xForceSkiaRaster->set_active(mpSkiaConfig->forceSkiaRaster());
 
     m_xFontAntiAliasing->save_state();
@@ -1108,7 +1069,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
     m_xFontShowCB->save_state();
 
     m_xUseSkia->save_state();
-    m_xForceSkia->save_state();
     m_xForceSkiaRaster->save_state();
 
     OnAntialiasingToggled(*m_xFontAntiAliasing);
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index 8ddec9631087..e01bca949c43 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -112,7 +112,6 @@ private:
     std::unique_ptr<weld::CheckButton> m_xUseHardwareAccell;
     std::unique_ptr<weld::CheckButton> m_xUseAntiAliase;
     std::unique_ptr<weld::CheckButton> m_xUseSkia;
-    std::unique_ptr<weld::CheckButton> m_xForceSkia;
     std::unique_ptr<weld::CheckButton> m_xForceSkiaRaster;
 
     std::unique_ptr<weld::Label> m_xSkiaStatusEnabled;
@@ -122,7 +121,6 @@ private:
     std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB;
 
     DECL_LINK(OnAntialiasingToggled, weld::ToggleButton&, void);
-    DECL_LINK(OnForceSkiaToggled, weld::ToggleButton&, void);
     DECL_LINK(OnForceSkiaRasterToggled, weld::ToggleButton&, void);
     void UpdateSkiaStatus();
 
diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index 023b8dccede1..693d25340734 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -524,23 +524,6 @@
                         <property name="top_attach">2</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkCheckButton" id="forceskia">
-                        <property name="label" translatable="yes" context="optviewpage|forceskia">Ignore Skia blacklist</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes" context="optviewpage|forceskia|tooltip_text">Requires restart. Enabling this may expose driver bugs</property>
-                        <property name="margin_left">12</property>
-                        <property name="use_underline">True</property>
-                        <property name="xalign">0</property>
-                        <property name="draw_indicator">True</property>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                      </packing>
-                    </child>
                     <child>
                       <object class="GtkCheckButton" id="forceskiaraster">
                         <property name="label" translatable="yes" context="optviewpage|forceskiaraster">Force Skia software rendering</property>
@@ -555,7 +538,7 @@
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">4</property>
+                        <property name="top_attach">3</property>
                       </packing>
                     </child>
                     <child>
@@ -567,7 +550,7 @@
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">5</property>
+                        <property name="top_attach">4</property>
                       </packing>
                     </child>
                     <child>
@@ -579,7 +562,7 @@
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">6</property>
+                        <property name="top_attach">5</property>
                       </packing>
                     </child>
                   </object>


More information about the Libreoffice-commits mailing list