Blame 0001-tdf-117537-block-rentry-to-CheckAndMarkUnknownFont.patch

452c902
From c6c82096301180cfa7942dd9fb9d1cb66c7ecc04 Mon Sep 17 00:00:00 2001
452c902
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
452c902
Date: Thu, 31 May 2018 13:49:40 +0100
452c902
Subject: [PATCH] tdf#117537 block rentry to CheckAndMarkUnknownFont
452c902
452c902
Change-Id: I70e75a39d13e93e929c7aef5407b1100bb2a7c12
452c902
Reviewed-on: https://gerrit.libreoffice.org/55131
452c902
Tested-by: Jenkins <ci@libreoffice.org>
452c902
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
452c902
---
452c902
 svx/source/tbxctrls/tbcontrl.cxx | 8 +++++++-
452c902
 1 file changed, 7 insertions(+), 1 deletion(-)
452c902
452c902
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
452c902
index 997520fd5e32..c5c19346ce3f 100644
452c902
--- a/svx/source/tbxctrls/tbcontrl.cxx
452c902
+++ b/svx/source/tbxctrls/tbcontrl.cxx
452c902
@@ -192,6 +192,7 @@ private:
452c902
     Reference< XDispatchProvider > m_xDispatchProvider;
452c902
     Reference< XFrame >            m_xFrame;
452c902
     bool            mbEndPreview;
452c902
+    bool            mbCheckingUnknownFont;
452c902
 
452c902
     void            ReleaseFocus_Impl();
452c902
     void            EnableControls_Impl();
452c902
@@ -970,7 +971,8 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference<
452c902
     bRelease           ( true ),
452c902
     m_xDispatchProvider( rDispatchProvider ),
452c902
     m_xFrame (_xFrame),
452c902
-    mbEndPreview(false)
452c902
+    mbEndPreview(false),
452c902
+    mbCheckingUnknownFont(false)
452c902
 {
452c902
     SetOptimalSize();
452c902
     EnableControls_Impl();
452c902
@@ -1002,6 +1004,9 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event,
452c902
 {
452c902
     if( event.GetId() != VclEventId::EditModify )
452c902
         return;
452c902
+    if (mbCheckingUnknownFont) //tdf#117537 block rentry
452c902
+        return;
452c902
+    mbCheckingUnknownFont = true;
452c902
     OUString fontname = GetSubEdit()->GetText();
452c902
     lcl_GetDocFontList( &pFontList, this );
452c902
     // If the font is unknown, show it in italic.
452c902
@@ -1024,6 +1029,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent&, event,
452c902
             SetQuickHelpText( SvxResId( RID_SVXSTR_CHARFONTNAME_NOTAVAILABLE ));
452c902
         }
452c902
     }
452c902
+    mbCheckingUnknownFont = false;
452c902
 }
452c902
 
452c902
 void SvxFontNameBox_Impl::Update( const css::awt::FontDescriptor* pFontDesc )
452c902
-- 
452c902
2.17.0
452c902