[Libreoffice-commits] core.git: sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Mon Apr 3 14:44:13 UTC 2017


 sw/inc/shellio.hxx                  |    1 +
 sw/source/core/txtnode/swfntcch.cxx |    5 +++++
 sw/source/filter/ww8/ww8par.cxx     |    2 ++
 3 files changed, 8 insertions(+)

New commits:
commit af16eb5a225e00018d11896d4f447716d1f1124d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Apr 3 15:24:26 2017 +0100

    flush writer fontcache after TestImportDOC
    
    to get around leak sanitizer
    
    Change-Id: I45f0caefc14c35476e92887058031dddd92afb81

diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 298f4c465647..893990b22305 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -179,6 +179,7 @@ protected:
 
 extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName);
 extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(SvStream &rStream);
+SAL_DLLPUBLIC_EXPORT void FlushFontCache();
 
 class SW_DLLPUBLIC Reader
 {
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index 9e938dc6bee5..58269d218431 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -60,4 +60,9 @@ SwCacheObj *SwFontAccess::NewObj( )
     return new SwFontObj( m_pOwner, pShell );
 }
 
+SAL_DLLPUBLIC_EXPORT void FlushFontCache()
+{
+    pSwFontCache->Flush();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 85e17a57f258..eb75ce5f0413 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6216,6 +6216,8 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName)
     bool bRet = pReader->Read(*pD, OUString(), aPaM, OUString()) == 0;
     delete pReader;
 
+    FlushFontCache();
+
     return bRet;
 }
 


More information about the Libreoffice-commits mailing list