diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-28 21:30:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 13:23:02 +0000 |
commit | 2adc91069d73d47bfae2a78ff408d21339aba17c (patch) | |
tree | a2140549609fa57adfa2beff6a6dc2c5e3adf8eb | |
parent | 9f45441144d7aacfb3e46b8b61f16886c4962d54 (diff) |
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@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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 <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 ); |