summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source/filter/lwpfrib.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-06 15:19:50 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-06 15:19:50 +0200
commitfa49b57806e1215f156a525cf9123078a32841cb (patch)
tree5887b9b50ca9734ed708bf22df0cff1187b70a2c /lotuswordpro/source/filter/lwpfrib.cxx
parentcoverity#708822 Unused pointer value (diff)
downloadcore-fa49b57806e1215f156a525cf9123078a32841cb.tar.gz
core-fa49b57806e1215f156a525cf9123078a32841cb.zip
Fix memory leaks, by refcounting XFFont
Change-Id: Iecfddf21f19313f46ee2544fad9c4df1e399e0f5
Diffstat (limited to 'lotuswordpro/source/filter/lwpfrib.cxx')
-rw-r--r--lotuswordpro/source/filter/lwpfrib.cxx6
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();