summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-03 15:24:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-04-03 15:43:38 +0100
commitaf16eb5a225e00018d11896d4f447716d1f1124d (patch)
tree9455e7c10cc22537a77f5eccea51288772a5da80
parent605d3a2858ea585be35eb159a0fa4ce410d64ae9 (diff)
flush writer fontcache after TestImportDOC
to get around leak sanitizer Change-Id: I45f0caefc14c35476e92887058031dddd92afb81
-rw-r--r--sw/inc/shellio.hxx1
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
3 files changed, 8 insertions, 0 deletions
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;
}