diff options
author | Henry Castro <hcastro@collabora.com> | 2016-12-16 23:23:31 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2017-01-07 00:20:59 +0000 |
commit | 0ad4b2570f06aa014f8446757931afa1f2305458 (patch) | |
tree | c173384d7dfacb2e9e3e6e51f78432703092e262 /svtools | |
parent | 6af9609284e33c9a8501cbda9ef4c82f30a16b41 (diff) |
lok: refill font list if empty
After preinit stage the font list is empty
when creating documents.
Reviewed-on: https://gerrit.libreoffice.org/32108
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Conflicts:
sd/source/ui/docshell/docshel4.cxx
svtools/source/control/ctrltool.cxx
Change-Id: Ia6938d521626f4b4022f0f993e77c017e4932415
Reviewed-on: https://gerrit.libreoffice.org/32796
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrltool.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index fdbd04baa294..4a31b22ba7f4 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -32,6 +32,7 @@ #include <svtools/svtresid.hxx> #include <svtools/ctrltool.hxx> #include <o3tl/typed_flags_set.hxx> +#include <comphelper/lok.hxx> // Standard Fontgroessen fuer scalierbare Fonts const sal_IntPtr FontList::aStdSizeAry[] = @@ -248,7 +249,13 @@ void FontList::ImplInsertFonts(OutputDevice* pDevice, bool bInsertData) nType = FontListFontNameType::PRINTER; // inquire all fonts from the device - int const n = pDevice->GetDevFontCount(); + int n = pDevice->GetDevFontCount(); + if (n == 0 && comphelper::LibreOfficeKit::isActive()) + { + pDevice->RefreshFontData(true); + n = pDevice->GetDevFontCount(); + } + for (int i = 0; i < n; ++i) { FontMetric aFontMetric = pDevice->GetDevFont( i ); |