[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0-29' - vcl/headless

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 27 09:52:08 UTC 2020


 vcl/headless/CustomWidgetDraw.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a0c91ab17f0ecc5d1592098af1f567c205f37712
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Jan 15 08:49:53 2020 +0000
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Jan 27 10:51:39 2020 +0100

    theming: avoid continually attempting to load missing theme library.
    
    Saves a slew of system-calls.
    
    Change-Id: Ibd9b8695d071dbddd1717b5c9f3349f3696458b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86829
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
index 1414b6f4f510..4890ce12f569 100644
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ b/vcl/headless/CustomWidgetDraw.cxx
@@ -24,7 +24,9 @@ WidgetThemeLibrary* CustomWidgetDraw::s_pWidgetImplementation = nullptr;
 CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics)
     : m_rGraphics(rGraphics)
 {
-    if (!s_pWidgetImplementation)
+    static bool s_bMissingLibrary = false;
+
+    if (!s_pWidgetImplementation && !s_bMissingLibrary)
     {
         OUString aUrl("${LO_LIB_DIR}/" SVLIBRARY("vcl_widget_theme"));
         rtl::Bootstrap::expandMacros(aUrl);
@@ -45,6 +47,8 @@ CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics)
             pSVData->maNWFData.mbNoFocusRects = true;
             pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
         }
+        else
+            s_bMissingLibrary = true;
     }
 }
 


More information about the Libreoffice-commits mailing list