diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2020-01-15 08:49:53 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2020-01-16 17:26:25 +0100 |
commit | 041bd6c4f9df32637b595a2e472d776de76fb54e (patch) | |
tree | c0115496df0413f9c74ca56f6fc01d6db5eac325 /vcl | |
parent | 6e6fdb62e3eecf2c3848da357ba96d2083a71e46 (diff) |
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/+/86857
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/CustomWidgetDraw.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx index 677c575b96bb..343f5cd75a4e 100644 --- a/vcl/headless/CustomWidgetDraw.cxx +++ b/vcl/headless/CustomWidgetDraw.cxx @@ -24,7 +24,8 @@ CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics) : m_rGraphics(rGraphics) { #ifndef DISABLE_DYNLOADING - 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 +46,8 @@ CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics) pSVData->maNWFData.mbNoFocusRects = true; pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true; } + else + s_bMissingLibrary = true; } #endif } |