From 0008c67004d3eb8e1fc7a5e13cd50269ba80e7d2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 18 Mar 2016 11:02:37 +0200 Subject: drop unused params from SvLBoxItem and all it's subclasses looks like this is fallout from commit ac7acb0a "Merged SvTreeListBox and SvLBox." (in year 2012) Change-Id: Iaebeae64fc7cd3ba11f5f45b53bcb65bf906e906 --- sd/source/ui/animations/CustomAnimationList.cxx | 25 +++++++++++-------------- sd/source/ui/dlg/dlgassim.cxx | 19 +++++++------------ sd/source/ui/dlg/sdtreelb.cxx | 2 +- 3 files changed, 19 insertions(+), 27 deletions(-) (limited to 'sd/source/ui') diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index dcbefcaf8b49..07138faa9c04 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include "sdresid.hxx" @@ -203,7 +204,7 @@ static OUString getDescription( const Any& rTarget, bool bWithText = true ) class CustomAnimationListEntryItem : public SvLBoxString { public: - CustomAnimationListEntryItem(SvTreeListEntry*, sal_uInt16 nFlags, const OUString& aDescription, + CustomAnimationListEntryItem(const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent); virtual ~CustomAnimationListEntryItem(); void InitViewData(SvTreeListBox*,SvTreeListEntry*,SvViewDataItem*) override; @@ -222,8 +223,8 @@ private: const long nItemMinHeight = 38; }; -CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) -: SvLBoxString( pEntry, nFlags, aDescription ) +CustomAnimationListEntryItem::CustomAnimationListEntryItem( const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) +: SvLBoxString( aDescription ) , mpParent( pParent ) , msDescription( aDescription ) , msEffectName( OUString() ) @@ -376,7 +377,7 @@ CustomAnimationListEntry::~CustomAnimationListEntry() class CustomAnimationTriggerEntryItem : public SvLBoxString { public: - CustomAnimationTriggerEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, const OUString& aDescription ); + CustomAnimationTriggerEntryItem( const OUString& aDescription ); virtual ~CustomAnimationTriggerEntryItem(); void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) override; SvLBoxItem* Create() const override; @@ -389,8 +390,8 @@ private: const long nIconWidth = 19; }; -CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& aDescription ) -: SvLBoxString( pEntry, nFlags, aDescription ), msDescription( aDescription ) +CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( const OUString& aDescription ) +: SvLBoxString( aDescription ), msDescription( aDescription ) { } @@ -656,13 +657,11 @@ void CustomAnimationList::update() if( xShape.is() ) { SvTreeListEntry* pLBoxEntry = new CustomAnimationListEntry; - pLBoxEntry->AddItem(std::unique_ptr( - new SvLBoxContextBmp(pLBoxEntry, 0, Image(), Image(), false))); + pLBoxEntry->AddItem(o3tl::make_unique(Image(), Image(), false)); OUString aDescription = SD_RESSTR(STR_CUSTOMANIMATION_TRIGGER); aDescription += ": "; aDescription += getShapeDescription( xShape, false ); - pLBoxEntry->AddItem(std::unique_ptr( - new CustomAnimationTriggerEntryItem(pLBoxEntry, 0, aDescription))); + pLBoxEntry->AddItem(o3tl::make_unique(aDescription)); Insert( pLBoxEntry ); SvViewDataEntry* pViewData = GetViewData( pLBoxEntry ); if( pViewData ) @@ -766,10 +765,8 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect ) // create an entry for the effect SvTreeListEntry* pEntry = new CustomAnimationListEntry( pEffect ); - pEntry->AddItem(std::unique_ptr(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); - pEntry->AddItem(std::unique_ptr( - new CustomAnimationListEntryItem(pEntry, 0, aDescription, pEffect, this))); + pEntry->AddItem(o3tl::make_unique(Image(), Image(), false)); + pEntry->AddItem(o3tl::make_unique(aDescription, pEffect, this)); if( pParentEntry ) { diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index 20a3dea9ccf4..fe439cd83f8c 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -26,6 +26,7 @@ #include #include +#include #include "svtools/svlbitm.hxx" #include "svtools/treelistentry.hxx" @@ -94,12 +95,9 @@ SvTreeListEntry* SdPageListControl::InsertPage( const OUString& rPageName ) { SvTreeListEntry* pEntry = new SvTreeListEntry; - pEntry->AddItem(std::unique_ptr(new SvLBoxButton( - pEntry, SvLBoxButtonKind_enabledCheckbox, 0, m_pCheckButton))); - pEntry->AddItem(std::unique_ptr(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); // otherwise boom! - pEntry->AddItem(std::unique_ptr(new SvLBoxString( - pEntry, 0, rPageName))); + pEntry->AddItem(o3tl::make_unique(SvLBoxButtonKind_enabledCheckbox, m_pCheckButton)); + pEntry->AddItem(o3tl::make_unique(Image(), Image(), false)); // otherwise boom! + pEntry->AddItem(o3tl::make_unique(rPageName)); GetModel()->Insert( pEntry ); @@ -109,12 +107,9 @@ SvTreeListEntry* SdPageListControl::InsertPage( const OUString& rPageName ) void SdPageListControl::InsertTitle( SvTreeListEntry* pParent, const OUString& rTitle ) { SvTreeListEntry* pEntry = new SvTreeListEntry; - pEntry->AddItem(std::unique_ptr(new SvLBoxString( - pEntry, 0, OUString()))); - pEntry->AddItem(std::unique_ptr(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); // otherwise boom! - pEntry->AddItem(std::unique_ptr(new SvLBoxString( - pEntry, 0, rTitle))); + pEntry->AddItem(o3tl::make_unique(OUString())); + pEntry->AddItem(o3tl::make_unique(Image(), Image(), false)); // otherwise boom! + pEntry->AddItem(o3tl::make_unique(rTitle)); GetModel()->Insert( pEntry,pParent ); } diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 726f13271794..0e0babdc0ab2 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -372,7 +372,7 @@ void SdPageObjsTLB::InitEntry(SvTreeListEntry* pEntry, sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); SvLBoxString& rCol = static_cast(pEntry->GetItem( nColToHilite )); - pEntry->ReplaceItem(o3tl::make_unique(pEntry, 0, rCol.GetText()), nColToHilite ); + pEntry->ReplaceItem(o3tl::make_unique(rCol.GetText()), nColToHilite ); } void SdPageObjsTLB::SaveExpandedTreeItemState(SvTreeListEntry* pEntry, std::vector& vectTreeItem) -- cgit