From 2adc91069d73d47bfae2a78ff408d21339aba17c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 28 Jul 2016 21:30:55 +0100 Subject: 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 Reviewed-by: Miklos Vajna --- svtools/source/control/ctrlbox.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index e64b0a59770c..20fdb89c9eaf 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -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 ); -- cgit