[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svtools/source

Caolán McNamara caolanm at redhat.com
Wed Aug 3 13:23:33 UTC 2016


 svtools/source/control/ctrlbox.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2adc91069d73d47bfae2a78ff408d21339aba17c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 28 21:30:55 2016 +0100

    Resolves: tdf#94940 don't load font history if option is disabled
    
    Change-Id: I70348b4e4bb85850331044e901c03aabb0d22ef8
    (cherry picked from commit 171586cc4df4a9470251e50ce51338c2d53acf9b)
    Reviewed-on: https://gerrit.libreoffice.org/27657
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index e64b0a5..20fdb89 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -30,6 +30,7 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
 #include <unotools/charclass.hxx>
+#include <unotools/fontoptions.hxx>
 
 #include <svtools/sampletext.hxx>
 #include <svtools/svtresid.hxx>
@@ -982,7 +983,11 @@ void FontNameBox::SaveMRUEntries( const OUString& aFontMRUEntriesFile ) const
 
 void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile )
 {
-    if( aFontMRUEntriesFile.isEmpty() )
+    if (aFontMRUEntriesFile.isEmpty())
+        return;
+
+    SvtFontOptions aFontOpt;
+    if (!aFontOpt.IsFontHistoryEnabled())
         return;
 
     SvFileStream aStream( aFontMRUEntriesFile, StreamMode::READ );


More information about the Libreoffice-commits mailing list