summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 12:58:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-12 12:42:22 +0200
commite722564d40143fa029fe10d22a625539c795ee04 (patch)
tree5b4aab88bfa6d35917707d4d8ebe92e78a30c0e5 /sd
parent5dd762ddc1829a86e7b4e23076143bc01d6073ad (diff)
make SvLBoxItem::Clone return a std::unique_ptr
and combine the Create/Clone methods into one Change-Id: Ia982be6b50135b8d368d84070327689be6b3d890 Reviewed-on: https://gerrit.libreoffice.org/52745 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index c2908041be6d..5008b9f631ea 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -202,8 +202,7 @@ public:
CustomAnimationListEntryItem(const OUString& aDescription,
const CustomAnimationEffectPtr& pEffect, CustomAnimationList* pParent);
void InitViewData(SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* = nullptr) override;
- SvLBoxItem* Create() const override;
- void Clone(SvLBoxItem* pSource) override;
+ virtual std::unique_ptr<SvLBoxItem> Clone(SvLBoxItem const * pSource) const override;
virtual void Paint(const Point&, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* pView,const SvTreeListEntry& rEntry) override;
@@ -328,15 +327,11 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev,
rRenderContext.DrawText(aPos, rRenderContext.GetEllipsisString(msEffectName, rDev.GetOutputSizePixel().Width() - aPos.X()));
}
-SvLBoxItem* CustomAnimationListEntryItem::Create() const
+std::unique_ptr<SvLBoxItem> CustomAnimationListEntryItem::Clone(SvLBoxItem const *) const
{
return nullptr;
}
-void CustomAnimationListEntryItem::Clone( SvLBoxItem* )
-{
-}
-
class CustomAnimationListEntry : public SvTreeListEntry
{
public:
@@ -364,8 +359,7 @@ public:
explicit CustomAnimationTriggerEntryItem( const OUString& aDescription );
void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* = nullptr ) override;
- SvLBoxItem* Create() const override;
- void Clone( SvLBoxItem* pSource ) override;
+ virtual std::unique_ptr<SvLBoxItem> Clone(SvLBoxItem const * pSource) const override;
virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
@@ -428,15 +422,11 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD
rRenderContext.Pop();
}
-SvLBoxItem* CustomAnimationTriggerEntryItem::Create() const
+std::unique_ptr<SvLBoxItem> CustomAnimationTriggerEntryItem::Clone(SvLBoxItem const *) const
{
return nullptr;
}
-void CustomAnimationTriggerEntryItem::Clone( SvLBoxItem* )
-{
-}
-
CustomAnimationList::CustomAnimationList( vcl::Window* pParent )
: SvTreeListBox( pParent, WB_TABSTOP | WB_BORDER | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT )
, mbIgnorePaint(false)