[Libreoffice-commits] core.git: vcl/inc vcl/source

Caolán McNamara caolanm at redhat.com
Tue Mar 6 20:39:35 UTC 2018


 vcl/inc/CommonSalLayout.hxx        |    1 +
 vcl/source/gdi/CommonSalLayout.cxx |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0c8e2d204f5225c0438da0046898cd92db3b7730
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 6 10:23:06 2018 +0000

    ofz: timeout
    
    Change-Id: I95806c4987cd2d3b745e57d94b94ffd6e3f6227e
    Reviewed-on: https://gerrit.libreoffice.org/50813
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx
index 0947f9eaba2c..3b6e61308248 100644
--- a/vcl/inc/CommonSalLayout.hxx
+++ b/vcl/inc/CommonSalLayout.hxx
@@ -75,6 +75,7 @@ class VCL_DLLPUBLIC CommonSalLayout : public GenericSalLayout
     void                    getScale(double* nXScale, double* nYScale);
 
     hb_set_t*               mpVertGlyphs;
+    bool                    mbFuzzing;
     bool                    HasVerticalAlternate(sal_UCS4 aChar, sal_UCS4 aNextChar);
 
     void                    SetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index fe557ac9c78b..de701febe63b 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -20,6 +20,7 @@
 #include <memory>
 #include <CommonSalLayout.hxx>
 
+#include <unotools/configmgr.hxx>
 #include <vcl/unohelp.hxx>
 #include <scrptrun.h>
 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
@@ -193,6 +194,7 @@ CommonSalLayout::CommonSalLayout(HDC hDC, WinFontInstance& rWinFontInstance, con
 ,   mrWinFontInstance(rWinFontInstance)
 ,   mnAveWidthFactor(1.0f)
 ,   mpVertGlyphs(nullptr)
+,   mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
     mpHbFont = rWinFontFace.GetHbFont();
     if (!mpHbFont)
@@ -240,6 +242,7 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& rCoreTextStyle)
 :   mrFontSelData(rCoreTextStyle.maFontSelData)
 ,   mrCoreTextStyle(rCoreTextStyle)
 ,   mpVertGlyphs(nullptr)
+,   mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
     mpHbFont = rCoreTextStyle.GetHbFont();
     if (!mpHbFont)
@@ -283,6 +286,7 @@ CommonSalLayout::CommonSalLayout(const FontSelectPattern &rFSP,
     , mbUseQt5(bUseQt5)
     , mpQFont(pQt5Font)
     , mpVertGlyphs(nullptr)
+    , mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
     if (mbUseQt5)
     {
@@ -321,6 +325,7 @@ CommonSalLayout::CommonSalLayout(FreetypeFont& rFreetypeFont)
     : mrFontSelData(rFreetypeFont.GetFontSelData())
     , mpFreetypeFont(&rFreetypeFont)
     , mpVertGlyphs(nullptr)
+    , mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
     InitFromFreetypeFont();
 }
@@ -425,7 +430,7 @@ std::shared_ptr<vcl::TextLayoutCache> CommonSalLayout::CreateTextLayoutCache(OUS
 
 void CommonSalLayout::SetNeedFallback(ImplLayoutArgs& rArgs, sal_Int32 nCharPos, bool bRightToLeft)
 {
-    if (nCharPos < 0)
+    if (nCharPos < 0 || mbFuzzing)
         return;
 
     using namespace ::com::sun::star;


More information about the Libreoffice-commits mailing list