compilerplugins/clang/staticmethods.cxx |    2 ++
 cui/source/options/optgdlg.cxx          |   13 +++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit c42550f520e896abc59d91d588eb3ae9f0e0609d
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Fri May 22 20:45:46 2020 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Sat May 23 14:04:13 2020 +0200

    show Skia UI controls only on Windows for now (tdf#133166)
    
    Windows is now more or less the only platform where Skia gets used.
    There's also the 'gen' VCL backend on Linux, but that one gets
    used rarely and it's Skia options are still accessible in the expert
    configuration.
    
    Change-Id: Ibec9b8b15e9200f003367b4568432ce93ec63893
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94708
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/compilerplugins/clang/staticmethods.cxx 
b/compilerplugins/clang/staticmethods.cxx
index 1b78d06f6c02..9b631c7eb659 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -159,6 +159,8 @@ bool StaticMethods::TraverseCXXMethodDecl(const 
CXXMethodDecl * pCXXMethodDecl)
             .GlobalNamespace())
         || (fdc.Function("RemoveDdeTopic").Class("SfxApplication")
             .GlobalNamespace())
+        || (fdc.Function("UpdateSkiaStatus").Class("OfaViewTabPage")
+            .GlobalNamespace())
         || (fdc.Function("ReleaseData").Class("ScannerManager")
             .GlobalNamespace()))
     {
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 34bd6857142d..4959c58f4bef 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -713,6 +713,17 @@ OfaViewTabPage::OfaViewTabPage(weld::Container* pPage, 
weld::DialogController* p
         m_xMenuIconBox->hide();
     }
 
+#if !HAVE_FEATURE_SKIA || !defined(_WIN32)
+    // Duplicated also in UpdateSkiaStatus().
+    // 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();
+#endif
+
     m_xFontAntiAliasing->connect_toggled( LINK( this, OfaViewTabPage, 
OnAntialiasingToggled ) );
 
     m_xForceSkia->connect_toggled(LINK(this, OfaViewTabPage, 
OnForceSkiaToggled));
@@ -1107,10 +1118,12 @@ void OfaViewTabPage::UpdateSkiaStatus()
 {
     if (Application::GetToolkitName() == "gtk3")
         return;
+#if HAVE_FEATURE_SKIA && defined(_WIN32)
     // Easier than a custom translation string.
     bool bEnabled = SkiaHelper::isVCLSkiaEnabled();
     m_xSkiaStatusEnabled->set_visible(bEnabled);
     m_xSkiaStatusDisabled->set_visible(!bEnabled);
+#endif
 }
 
 struct LanguageConfig_Impl
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to