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/lwpdrawobj.cxx | |
parent | c50c800f9c183f12aa75d64a386c3b9f20731d70 (diff) |
Fix memory leaks, by refcounting XFFont
Change-Id: Iecfddf21f19313f46ee2544fad9c4df1e399e0f5
Diffstat (limited to 'lotuswordpro/source/filter/lwpdrawobj.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpdrawobj.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index d3ac87db2bb8..6ef548bd3654 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -972,7 +972,7 @@ LwpDrawTextBox::~LwpDrawTextBox() } } -void LwpDrawTextBox::SetFontStyle(XFFont* pFont, SdwTextBoxRecord* pRec) +void LwpDrawTextBox::SetFontStyle(rtl::Reference<XFFont> const & pFont, SdwTextBoxRecord* pRec) { // color XFColor aXFColor(pRec->aTextColor.nR, pRec->aTextColor.nG, @@ -1065,7 +1065,7 @@ OUString LwpDrawTextBox::RegisterStyle() // font style // the pFont need to be deleted myself? - XFFont* pFont = new XFFont(); + rtl::Reference<XFFont> pFont = new XFFont(); rtl_TextEncoding aEncoding = RTL_TEXTENCODING_MS_1252; OUString aFontName = OUString((sal_Char*)m_aTextRec.tmpTextFaceName, @@ -1257,7 +1257,7 @@ OUString LwpDrawTextArt::RegisterStyle() // font style // the pFont need to be deleted myself? - XFFont* pFont = new XFFont(); + rtl::Reference<XFFont> pFont = new XFFont(); rtl_TextEncoding aEncoding = RTL_TEXTENCODING_MS_1252; OUString aFontName = OUString((sal_Char*)m_aTextArtRec.tmpTextFaceName, |