summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2016-12-16 23:23:31 -0400
committerAndras Timar <andras.timar@collabora.com>2017-02-17 23:46:49 +0100
commitfdef726607a3512829c17c6c306f608f69cde1f7 (patch)
tree4ae084153060218632092f8a4a348728764b584a /svtools
parent97eaa05c40a926a9e16a109028ca8c829d34cb34 (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> (cherry picked from commit 0ad4b2570f06aa014f8446757931afa1f2305458)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrltool.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 974af100fa7c..341a1f83e8bb 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[] =
@@ -249,7 +250,13 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
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 );