summaryrefslogtreecommitdiff
path: root/include/sfx2/StyleManager.hxx
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 /include/sfx2/StyleManager.hxx
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 'include/sfx2/StyleManager.hxx')
-rw-r--r--include/sfx2/StyleManager.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sfx2/StyleManager.hxx b/include/sfx2/StyleManager.hxx
index 7c3bcfeb1d3f..593da26d7f4c 100644
--- a/include/sfx2/StyleManager.hxx
+++ b/include/sfx2/StyleManager.hxx
@@ -18,6 +18,7 @@
#include <svl/style.hxx>
#include <sfx2/objsh.hxx>
+#include <memory>
namespace sfx2
{
@@ -37,7 +38,7 @@ public:
SfxStyleSheetBase* Search(const OUString& rStyleName, SfxStyleFamily eFamily);
- virtual StylePreviewRenderer* CreateStylePreviewRenderer(
+ virtual std::unique_ptr<StylePreviewRenderer> CreateStylePreviewRenderer(
OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
long nMaxHeight) = 0;
};