[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - include/vcl sd/source svtools/source vcl/source
Henry Castro
hcastro at collabora.com
Mon Dec 19 17:11:44 UTC 2016
include/vcl/outdev.hxx | 1 +
sd/source/ui/docshell/docshel4.cxx | 1 +
svtools/source/control/ctrltool.cxx | 7 +++++++
vcl/source/outdev/font.cxx | 5 +++++
4 files changed, 14 insertions(+)
New commits:
commit d8b22b3e6c1247b344c8cf446815f237e1d3ecd2
Author: Henry Castro <hcastro at collabora.com>
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.
Change-Id: Ia6938d521626f4b4022f0f993e77c017e4932415
Reviewed-on: https://gerrit.libreoffice.org/32108
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index a146c86..bc8b20e 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1258,6 +1258,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/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 6728237..54a19a3 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -164,6 +164,7 @@ void DrawDocShell::UpdateFontList()
pRefDevice = GetPrinter(true);
else
pRefDevice = SD_MOD()->GetVirtualRefDevice();
+
mpFontList = new FontList( pRefDevice, nullptr, false );
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 282462e..9d806cf 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[] =
@@ -250,6 +251,12 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
// inquire all fonts from the device
int n = pDevice->GetDevFontCount();
+ if (n == 0 && comphelper::LibreOfficeKit::isActive())
+ {
+ pDevice->RefreshFontData(true);
+ n = pDevice->GetDevFontCount();
+ }
+
sal_uInt16 i;
for( i = 0; i < n; i++ )
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index a7c8b3a..edc7cfc 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -568,6 +568,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 )
More information about the Libreoffice-commits
mailing list