include/vcl/outdev.hxx | 1 + svtools/source/control/ctrltool.cxx | 9 ++++++++- vcl/source/outdev/font.cxx | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-)
New commits: commit 0ad4b2570f06aa014f8446757931afa1f2305458 Author: Henry Castro <[email protected]> Date: Fri Dec 16 23:23:31 2016 -0400 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 <[email protected]> Tested-by: Michael Meeks <[email protected]> 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 <[email protected]> Reviewed-by: Henry Castro <[email protected]> diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index a2130e0..2e7a5ae 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1211,6 +1211,7 @@ public: int GetDevFontSizeCount( const vcl::Font& ) const; bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); + void RefreshFontData( const bool bNewFontLists ); FontMetric GetFontMetric() const; FontMetric GetFontMetric( const vcl::Font& rFont ) const; diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index fdbd04b..4a31b22 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 ); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index eba3374..572ac67 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -548,6 +548,11 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) } } +void OutputDevice::RefreshFontData( const bool bNewFontLists ) +{ + ImplRefreshFontData( bNewFontLists ); +} + void OutputDevice::ImplRefreshFontData( const bool bNewFontLists ) { // if ( GetOutDevType() == OUTDEV_PRINTER || mpPDFWriter ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
