summaryrefslogtreecommitdiff
path: root/cui/source/options/optaboutconfig.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-18 11:02:37 +0200
committerNoel Grandin <noel@peralex.com>2016-03-18 11:03:00 +0200
commit0008c67004d3eb8e1fc7a5e13cd50269ba80e7d2 (patch)
treef366492e90770d9a2c5bfcc8e2f38eae01095e72 /cui/source/options/optaboutconfig.cxx
parentf1ff9375184607b86ae8807d7cf1220962425b51 (diff)
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
Diffstat (limited to 'cui/source/options/optaboutconfig.cxx')
-rw-r--r--cui/source/options/optaboutconfig.cxx54
1 files changed, 22 insertions, 32 deletions
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 94e46864f1f0..112dbf294f61 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/util/SearchFlags.hpp>
#include <com/sun/star/util/SearchAlgorithms2.hpp>
#include <unotools/textsearch.hxx>
+#include <o3tl/make_unique.hxx>
#include <vector>
#include <iostream>
@@ -204,11 +205,11 @@ void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const OUS
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
- new SvLBoxContextBmp( pEntry, 0, Image(), Image(), false))); //It is needed, otherwise causes crash
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, rProp)));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, rStatus)));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, rType)));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, rValue)));
+ new SvLBoxContextBmp( Image(), Image(), false))); //It is needed, otherwise causes crash
+ pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(rProp)));
+ pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(rStatus)));
+ pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(rType)));
+ pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(rValue)));
pEntry->SetUserData( new UserData(rPropertyPath) );
if(bInsertToPrefBox)
@@ -281,18 +282,14 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
{
// not leaf node
SvTreeListEntry* pEntry = new SvTreeListEntry;
- pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
- new SvLBoxContextBmp(pEntry, 0, SvTreeListBox::GetDefaultExpandedNodeImage(),
- SvTreeListBox::GetDefaultCollapsedNodeImage(), false)));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( pEntry, 0, seqItems[i])));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(
+ SvTreeListBox::GetDefaultExpandedNodeImage(),
+ SvTreeListBox::GetDefaultCollapsedNodeImage(), false));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(seqItems[i]));
//It is needed, without this the selection line will be truncated.
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( pEntry, 0, "")));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( pEntry, 0, "")));
- pEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( pEntry, 0, "")));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
pEntry->SetUserData( new UserData(xNextNameAccess, lineage + 1) );
pEntry->EnableChildrenOnDemand();
@@ -780,8 +777,7 @@ IMPL_LINK_NOARG_TYPED( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
);
if (it != m_prefBoxEntries.end())
{
- (*it)->ReplaceItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( (*it).get(), 0, sDialogValue)), 4);
+ (*it)->ReplaceItem(o3tl::make_unique<SvLBoxString>(sDialogValue), 4);
SvTreeListEntries::iterator modifiedIt = std::find_if(
m_modifiedPrefBoxEntries.begin(), m_modifiedPrefBoxEntries.end(),
@@ -794,9 +790,7 @@ IMPL_LINK_NOARG_TYPED( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void )
if( modifiedIt != m_modifiedPrefBoxEntries.end())
{
- (*modifiedIt)->ReplaceItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString((*modifiedIt).get(), 0, sDialogValue)),
- 4);
+ (*modifiedIt)->ReplaceItem(o3tl::make_unique<SvLBoxString>(sDialogValue), 4);
}
else
{
@@ -890,18 +884,14 @@ void CuiAboutConfigTabPage::InsertEntry( SvTreeListEntry *pEntry)
if(!hasEntry)
{
pParentEntry = new SvTreeListEntry;
- pParentEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(
- new SvLBoxContextBmp(pParentEntry, 0, SvTreeListBox::GetDefaultExpandedNodeImage(),
- SvTreeListBox::GetDefaultCollapsedNodeImage(), false)));
- pParentEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString(pParentEntry, 0, sParentName)));
+ pParentEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(
+ SvTreeListBox::GetDefaultExpandedNodeImage(),
+ SvTreeListBox::GetDefaultCollapsedNodeImage(), false));
+ pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>(sParentName));
//It is needed, without this the selection line will be truncated.
- pParentEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString(pParentEntry, 0, "")));
- pParentEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString(pParentEntry, 0, "")));
- pParentEntry->AddItem(std::unique_ptr<SvLBoxString>(
- new SvLBoxString( pParentEntry, 0, "")));
+ pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
+ pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
+ pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
pParentEntry->EnableChildrenOnDemand(false);
m_pPrefBox->Insert( pParentEntry, pGrandParentEntry );
}