summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-05 15:51:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-08 07:37:26 +0100
commit04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (patch)
tree7c7c85944d8172033d58c626b44df6f735e0bc38 /writerfilter/source/ooxml
parent72841008bf422dfd8553240b3a78f0474d03523c (diff)
loplugin:refcounting check for one more case
where we might be holding something newly created by pointer instead of by *::Reference Change-Id: Ife6f7acae4252bf56dcdeb95d72e43c523444f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/ooxml')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastHelper.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
index b68baee63b96..89bbf0c850b6 100644
--- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx
@@ -28,7 +28,7 @@ template <class T>
class OOXMLFastHelper
{
public:
- static OOXMLFastContextHandler* createAndSetParentAndDefine
+ static rtl::Reference<OOXMLFastContextHandler> createAndSetParentAndDefine
(OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine);
static void newProperty(OOXMLFastContextHandler * pHandler,
@@ -36,9 +36,9 @@ public:
};
template <class T>
-OOXMLFastContextHandler* OOXMLFastHelper<T>::createAndSetParentAndDefine (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine)
+rtl::Reference<OOXMLFastContextHandler> OOXMLFastHelper<T>::createAndSetParentAndDefine (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine)
{
- OOXMLFastContextHandler * pTmp = new T(pHandler);
+ rtl::Reference<OOXMLFastContextHandler> pTmp = new T(pHandler);
pTmp->setToken(nToken);
pTmp->setId(nId);