summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-02-10 20:33:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-23 12:11:31 +0100
commitc13133b613fda3255fab60c03012aff93a5f2f02 (patch)
treeb07846fbcb4bac7c3a24f0570f60b1b6e759fd8f /hwpfilter
parentc181e510c5f5e74f1f6824b64637849aace9ae63 (diff)
loplugin:refcounting check for managing OWeakObject with raw pointer
Change-Id: I7471725f1e658940b5e6993361c327be6ccf0d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111064 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/source/hwpreader.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index d6c34fcb2354..7bc22fa370c7 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -4856,13 +4856,12 @@ HwpImportFilter::HwpImportFilter(const Reference< XComponentContext >& rxContext
try {
Reference< XDocumentHandler > xHandler( rxContext->getServiceManager()->createInstanceWithContext( WRITER_IMPORTER_NAME, rxContext ), UNO_QUERY );
- HwpReader *p = new HwpReader;
+ rtl::Reference<HwpReader> p = new HwpReader;
p->setDocumentHandler( xHandler );
Reference< XImporter > xImporter( xHandler, UNO_QUERY );
rImporter = xImporter;
- Reference< XFilter > xFilter( p );
- rFilter = xFilter;
+ rFilter = p;
}
catch( Exception & )
{