summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-13 16:55:45 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-16 08:21:23 +0200
commita0b3e81aeb10488c4746360dc1669f3aed71cb67 (patch)
treea3df6591183ff4574aeb2c857df3a865d7c53944 /svx
parent9d5b5eb966b5144ea7ccc17427ed96e89b7a40d7 (diff)
make StyleManager::CreateStylePreviewRenderer return std::unique_ptr
consequently fixing memory leak in sw/ Change-Id: Id66657cb8310baf42b0475cdef5e3618406974eb Reviewed-on: https://gerrit.libreoffice.org/52842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/styles/CommonStyleManager.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/styles/CommonStyleManager.cxx b/svx/source/styles/CommonStyleManager.cxx
index 2dd825bcecef..e88b97aad7d3 100644
--- a/svx/source/styles/CommonStyleManager.cxx
+++ b/svx/source/styles/CommonStyleManager.cxx
@@ -14,11 +14,11 @@
namespace svx
{
-sfx2::StylePreviewRenderer* CommonStyleManager::CreateStylePreviewRenderer(
+std::unique_ptr<sfx2::StylePreviewRenderer> CommonStyleManager::CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight)
{
- return new CommonStylePreviewRenderer(mrShell, rOutputDev, pStyle, nMaxHeight);
+ return std::unique_ptr<sfx2::StylePreviewRenderer>(new CommonStylePreviewRenderer(mrShell, rOutputDev, pStyle, nMaxHeight));
}
} // end svx namespace