summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 11:19:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-12 13:04:37 +0200
commit61dd9cafab20af893204deaca81ef26c1e7f7bb0 (patch)
tree295d290223a484138c2bea2f7e000e274815794a /sd
parente722564d40143fa029fe10d22a625539c795ee04 (diff)
make SvxEditSource::Clone return std::unique_ptr
Change-Id: If0d93024a642cc80a2a84d0c15525af1c0596546 Reviewed-on: https://gerrit.libreoffice.org/52715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/text/textapi.cxx6
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx4
-rw-r--r--sd/source/ui/inc/AccessibleOutlineEditSource.hxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index e9806a66a646..40e40dc3fb3b 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -88,7 +88,7 @@ class TextAPIEditSource : public SvxEditSource
// refcounted
std::shared_ptr<TextAPIEditSource_Impl> m_xImpl;
- virtual SvxEditSource* Clone() const override;
+ virtual std::unique_ptr<SvxEditSource> Clone() const override;
virtual SvxTextForwarder* GetTextForwarder() override;
virtual void UpdateData() override;
explicit TextAPIEditSource( const TextAPIEditSource& rSource );
@@ -186,9 +186,9 @@ TextAPIEditSource::TextAPIEditSource(const TextAPIEditSource& rSource)
{
}
-SvxEditSource* TextAPIEditSource::Clone() const
+std::unique_ptr<SvxEditSource> TextAPIEditSource::Clone() const
{
- return new TextAPIEditSource( *this );
+ return std::unique_ptr<SvxEditSource>(new TextAPIEditSource( *this ));
}
void TextAPIEditSource::UpdateData()
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 1b64aebb1687..703aeedbd6a8 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -53,9 +53,9 @@ namespace accessibility
Broadcast( TextHint( SfxHintId::Dying ) );
}
- SvxEditSource* AccessibleOutlineEditSource::Clone() const
+ std::unique_ptr<SvxEditSource> AccessibleOutlineEditSource::Clone() const
{
- return new AccessibleOutlineEditSource(*mpOutliner, mrView, *mpOutlinerView, mrWindow);
+ return std::unique_ptr<SvxEditSource>(new AccessibleOutlineEditSource(*mpOutliner, mrView, *mpOutlinerView, mrWindow));
}
SvxTextForwarder* AccessibleOutlineEditSource::GetTextForwarder()
diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
index 48af77ca7015..b703f8c6d0a0 100644
--- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
+++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
@@ -56,7 +56,7 @@ namespace accessibility
virtual ~AccessibleOutlineEditSource() override;
/// This method is disabled and always returns NULL
- virtual SvxEditSource* Clone() const override;
+ virtual std::unique_ptr<SvxEditSource> Clone() const override;
virtual SvxTextForwarder* GetTextForwarder() override;
virtual SvxViewForwarder* GetViewForwarder() override;
virtual SvxEditViewForwarder* GetEditViewForwarder( bool bCreate = false ) override;