diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-06 15:19:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-06 15:19:50 +0200 |
commit | fa49b57806e1215f156a525cf9123078a32841cb (patch) | |
tree | 5887b9b50ca9734ed708bf22df0cff1187b70a2c /lotuswordpro/source/filter/lwpfrib.cxx | |
parent | c50c800f9c183f12aa75d64a386c3b9f20731d70 (diff) |
Fix memory leaks, by refcounting XFFont
Change-Id: Iecfddf21f19313f46ee2544fad9c4df1e399e0f5
Diffstat (limited to 'lotuswordpro/source/filter/lwpfrib.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpfrib.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx index f753ece9c430..4543c9607787 100644 --- a/lotuswordpro/source/filter/lwpfrib.cxx +++ b/lotuswordpro/source/filter/lwpfrib.cxx @@ -242,7 +242,7 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry) //we only read four modifiers, in these modifiers,CodePage and LangOverride are not styles, //so we can only handle fontid and characstyle, if others ,we should not reg style //note by ,1-27 - XFFont* pFont; + rtl::Reference<XFFont> pFont; XFTextStyle* pStyle = NULL; m_StyleName = ""; XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); @@ -412,9 +412,9 @@ void LwpFrib::ConvertHyperLink(XFContentContainer* pXFPara,LwpHyperlinkMgr* pHyp * @descr: Get the current frib font style * @return: XFFont pointer */ -XFFont* LwpFrib::GetFont() +rtl::Reference<XFFont> LwpFrib::GetFont() { - XFFont* pFont = NULL; + rtl::Reference<XFFont> pFont; if(m_pModifiers&&m_pModifiers->FontID) { LwpFoundry* pFoundry = m_pPara->GetFoundry(); |