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/lwpfont.hxx | |
parent | coverity#708822 Unused pointer value (diff) | |
download | core-fa49b57806e1215f156a525cf9123078a32841cb.tar.gz core-fa49b57806e1215f156a525cf9123078a32841cb.zip |
Fix memory leaks, by refcounting XFFont
Change-Id: Iecfddf21f19313f46ee2544fad9c4df1e399e0f5
Diffstat (limited to 'lotuswordpro/source/filter/lwpfont.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpfont.hxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpfont.hxx b/lotuswordpro/source/filter/lwpfont.hxx index f8e057802719..cda119dd5eae 100644 --- a/lotuswordpro/source/filter/lwpfont.hxx +++ b/lotuswordpro/source/filter/lwpfont.hxx @@ -124,7 +124,7 @@ public: void Read(LwpObjectStream *pStrm); inline sal_uInt16 GetFaceID(){return m_nFaceName;} inline sal_uInt16 GetAltFaceID(){return m_nAltFaceName;} - void Override(XFFont* pFont); + void Override(rtl::Reference<XFFont> const & pFont); inline bool IsFaceNameOverridden(); inline bool IsAltFaceNameOverridden(); private: @@ -174,7 +174,7 @@ private: public: void Read(LwpObjectStream *pStrm); - void Override(sal_uInt16 index, XFFont* pFont); + void Override(sal_uInt16 index, rtl::Reference<XFFont> const & pFont); }; class LwpFontAttrEntry @@ -192,7 +192,7 @@ public: ~LwpFontAttrEntry(){} public: void Read(LwpObjectStream *pStrm); - void Override(XFFont*pFont); + void Override(rtl::Reference<XFFont> const & pFont); private: sal_uInt16 m_nAttrBits; sal_uInt16 m_nAttrOverrideBits; @@ -257,7 +257,7 @@ public: ~LwpFontAttrManager(); public: void Read(LwpObjectStream *pStrm); - void Override(sal_uInt16 index, XFFont*pFont); + void Override(sal_uInt16 index, rtl::Reference<XFFont> const & pFont); private: sal_uInt16 m_nCount; LwpFontAttrEntry* m_pFontAttrs; @@ -274,12 +274,12 @@ private: public: void Read(LwpObjectStream *pStrm); - XFFont* CreateOverrideFont(sal_uInt32 fontID, sal_uInt32 overID); - XFFont* CreateFont(sal_uInt32 fontID); + rtl::Reference<XFFont> CreateOverrideFont(sal_uInt32 fontID, sal_uInt32 overID); + rtl::Reference<XFFont> CreateFont(sal_uInt32 fontID); OUString GetNameByID(sal_uInt32 fontID); private: - void Override(sal_uInt32 fontID, XFFont* pFont); + void Override(sal_uInt32 fontID, rtl::Reference<XFFont> const & pFont); inline sal_uInt16 GetFontNameIndex(sal_uInt32 fontID); inline sal_uInt16 GetFontAttrIndex(sal_uInt32 fontID); }; |