summaryrefslogtreecommitdiff
path: root/slideshow
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 /slideshow
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 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index f5a41c48a561..e3d22e5033f2 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -168,8 +168,7 @@ GDIMetaFileSharedPtr getMetaFile( const uno::Reference< lang::XComponent >&
// TODO(P3): Move creation of DummyRenderer out of the
// loop! Either by making it static, or transforming
// the whole thing here into a class.
- DummyRenderer* pRenderer( new DummyRenderer() );
- uno::Reference< graphic::XGraphicRenderer > xRenderer( pRenderer );
+ rtl::Reference<DummyRenderer> xRenderer( new DummyRenderer() );
// creating the graphic exporter
uno::Reference< drawing::XGraphicExportFilter > xExporter =
@@ -180,7 +179,7 @@ GDIMetaFileSharedPtr getMetaFile( const uno::Reference< lang::XComponent >&
aProps[0].Value <<= OUString("SVM");
aProps[1].Name = "GraphicRenderer";
- aProps[1].Value <<= xRenderer;
+ aProps[1].Value <<= uno::Reference< graphic::XGraphicRenderer >(xRenderer);
uno::Sequence< beans::PropertyValue > aFilterData(4);
aFilterData[0].Name = "ScrollText";
@@ -203,7 +202,7 @@ GDIMetaFileSharedPtr getMetaFile( const uno::Reference< lang::XComponent >&
if( !xExporter->filter( aProps ) )
return GDIMetaFileSharedPtr();
- GDIMetaFileSharedPtr xMtf = pRenderer->getMtf( (mtfLoadFlags & MTF_LOAD_FOREIGN_SOURCE) != 0 );
+ GDIMetaFileSharedPtr xMtf = xRenderer->getMtf( (mtfLoadFlags & MTF_LOAD_FOREIGN_SOURCE) != 0 );
// pRenderer is automatically destroyed when xRenderer
// goes out of scope