diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-18 11:02:37 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-18 11:03:00 +0200 |
commit | 0008c67004d3eb8e1fc7a5e13cd50269ba80e7d2 (patch) | |
tree | f366492e90770d9a2c5bfcc8e2f38eae01095e72 /cui | |
parent | f1ff9375184607b86ae8807d7cf1220962425b51 (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')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 12 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 9 | ||||
-rw-r--r-- | cui/source/customize/macropg.cxx | 14 | ||||
-rw-r--r-- | cui/source/dialogs/thesdlg.cxx | 17 | ||||
-rw-r--r-- | cui/source/dialogs/thesdlg_impl.hxx | 3 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/optHeaderTabListbox.cxx | 6 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 54 | ||||
-rw-r--r-- | cui/source/options/optfltr.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 27 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 31 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 6 |
12 files changed, 89 insertions, 122 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index f94988db63f9..c32a4d3873e8 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -634,7 +634,7 @@ static long AccCfgTabs[] = class SfxAccCfgLBoxString_Impl : public SvLBoxString { public: - SfxAccCfgLBoxString_Impl(SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText); + SfxAccCfgLBoxString_Impl(const OUString& sText); virtual ~SfxAccCfgLBoxString_Impl(); @@ -643,8 +643,8 @@ public: }; -SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl(SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText) - : SvLBoxString(pEntry, nFlags, sText) +SfxAccCfgLBoxString_Impl::SfxAccCfgLBoxString_Impl(const OUString& sText) + : SvLBoxString(sText) {} SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() @@ -925,10 +925,8 @@ void SfxAcceleratorConfigPage::CreateCustomItems(SvTreeListEntry* pEntry, const OUString& sCol1 , const OUString& sCol2) { - - pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol1), 1); - - pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol2), 2); + pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(sCol1), 1); + pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(sCol2), 2); } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index c238dc7121c8..6aa6838a9967 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -64,6 +64,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/random.hxx> #include <unotools/configmgr.hxx> +#include <o3tl/make_unique.hxx> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/FileSystemStorageFactory.hpp> #include <com/sun/star/frame/XFramesSupplier.hpp> @@ -1554,8 +1555,8 @@ void ContextMenuSaveInData::Reset() class PopupPainter : public SvLBoxString { public: - PopupPainter( SvTreeListEntry* pEntry, const OUString& rStr ) - : SvLBoxString( pEntry, 0, rStr ) + PopupPainter( const OUString& rStr ) + : SvLBoxString( rStr ) { } virtual ~PopupPainter() { } @@ -2335,9 +2336,7 @@ SvTreeListEntry* SvxConfigPage::InsertEntryIntoUI( pNewEntryData->GetStyle() & css::ui::ItemStyle::DROP_DOWN ) { // add new popup painter, it gets destructed by the entry - pNewEntry->ReplaceItem( - std::unique_ptr<PopupPainter>(new PopupPainter(pNewEntry, aName)), - pNewEntry->ItemCount() - 1 ); + pNewEntry->ReplaceItem( o3tl::make_unique<PopupPainter>(aName), pNewEntry->ItemCount() - 1 ); } } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 8b1bbc021b16..6e7c2dedcfa8 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -41,6 +41,7 @@ #include <svx/dialogs.hrc> #include <vcl/builderfactory.hxx> #include <comphelper/namedvaluecollection.hxx> +#include <o3tl/make_unique.hxx> #include <algorithm> #include <iterator> @@ -446,16 +447,15 @@ class IconLBoxString : public SvLBoxString int m_nxImageOffset; public: - IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, - Image* pMacroImg, Image* pComponentImg ); + IconLBoxString( const OUString& sText, Image* pMacroImg, Image* pComponentImg ); virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; }; -IconLBoxString::IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& sText, +IconLBoxString::IconLBoxString( const OUString& sText, Image* pMacroImg, Image* pComponentImg ) - : SvLBoxString( pEntry, nFlags, sText ) + : SvLBoxString( sText ) , m_pMacroImg( pMacroImg ) , m_pComponentImg( pComponentImg ) { @@ -552,8 +552,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) OUString* pEventName = new OUString( sEventName ); _pE->SetUserData( static_cast<void*>(pEventName) ); OUString sNew( eventURL ); - _pE->ReplaceItem(std::unique_ptr<IconLBoxString>(new IconLBoxString( - _pE, 0, sNew, &mpImpl->aMacroImg, &mpImpl->aComponentImg)), + _pE->ReplaceItem(o3tl::make_unique<IconLBoxString>(sNew, &mpImpl->aMacroImg, &mpImpl->aComponentImg), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( _pE ); rListBox.Select( _pE ); @@ -699,8 +698,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* // update the listbox entry pImpl->pEventLB->SetUpdateMode( false ); - pE->ReplaceItem(std::unique_ptr<IconLBoxString>(new IconLBoxString( - pE, 0, sEventURL, &pImpl->aMacroImg, &pImpl->aComponentImg)), + pE->ReplaceItem(o3tl::make_unique<IconLBoxString>(sEventURL, &pImpl->aMacroImg, &pImpl->aComponentImg), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 556de064cd19..3e95c310e34f 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -43,6 +43,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <osl/file.hxx> +#include <o3tl/make_unique.hxx> #include <stack> #include <algorithm> @@ -137,11 +138,8 @@ void ReplaceEdit::SetText( const OUString& rStr, const Selection& rNewSelection // class ThesaurusAlternativesCtrl ---------------------------------- -AlternativesString::AlternativesString( - ThesaurusAlternativesCtrl &rControl, - SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr ) : - - SvLBoxString( pEntry, nFlags, rStr ), +AlternativesString::AlternativesString( ThesaurusAlternativesCtrl &rControl, const OUString& rStr ) : + SvLBoxString( rStr ), m_rControlImpl( rControl ) { } @@ -230,13 +228,10 @@ SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const OUS { aText = OUString::number( nVal ) + ". "; } - pEntry->AddItem(std::unique_ptr<SvLBoxString>( - new SvLBoxString(pEntry, 0, OUString()))); // add empty column + pEntry->AddItem(o3tl::make_unique<SvLBoxString>(OUString())); // add empty column aText += rText; - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>( - new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false))); // otherwise crash - pEntry->AddItem(std::unique_ptr<AlternativesString>( - new AlternativesString( *this, pEntry, 0, aText))); + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); // otherwise crash + pEntry->AddItem(o3tl::make_unique<AlternativesString>(*this, aText)); SetExtraData( pEntry, AlternativesExtraData( rText, bIsHeader ) ); GetModel()->Insert( pEntry ); diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index 2546ecc5844b..fb529346de18 100644 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -50,8 +50,7 @@ class AlternativesString : public SvLBoxString ThesaurusAlternativesCtrl& m_rControlImpl; public: - AlternativesString( ThesaurusAlternativesCtrl &rControl, - SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr ); + AlternativesString( ThesaurusAlternativesCtrl &rControl, const OUString& rStr ); virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 3625d82722d5..c6f906902987 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -29,6 +29,7 @@ #include <dialmgr.hxx> #include "helpid.hrc" #include <cuires.hrc> +#include <o3tl/make_unique.hxx> /*********************************************************************/ /* */ @@ -123,18 +124,13 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(OUString& rFont1, OUString& rF if( !pCheckButtonData ) pCheckButtonData = new SvLBoxButtonData( m_pCheckLB ); - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); // otherwise boom! + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); // otherwise boom! - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, - SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, - SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString( - pEntry, 0, rFont1))); - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString( - pEntry, 0, rFont2))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont1)); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont2)); return pEntry; } diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index e5e274ff8864..5a6039b42ac2 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -31,8 +31,8 @@ namespace svx class OptLBoxString_Impl : public SvLBoxString { public: - OptLBoxString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rTxt ) : - SvLBoxString( pEntry, nFlags, rTxt ) {} + OptLBoxString_Impl( const OUString& rTxt ) : + SvLBoxString( rTxt ) {} virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; @@ -70,7 +70,7 @@ void OptHeaderTabListBox::InitEntry( SvTreeListEntry* pEntry, const OUString& rT { // initialize all columns with own class (column 0 == Bitmap) SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nCol )); - pEntry->ReplaceItem(o3tl::make_unique<OptLBoxString_Impl>(pEntry, 0, rCol.GetText()), nCol); + pEntry->ReplaceItem(o3tl::make_unique<OptLBoxString_Impl>(rCol.GetText()), nCol); } } 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 ); } diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index b990d188e0ef..03262fb2bb53 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -337,16 +337,16 @@ void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType, pCheckButtonData = new SvLBoxButtonData( m_pCheckLB ); pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>( - new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false))); + new SvLBoxContextBmp(Image(), Image(), false))); pEntry->AddItem(std::unique_ptr<SvLBoxButton>( - new SvLBoxButton(pEntry, loadEnabled ? SvLBoxButtonKind_enabledCheckbox - : SvLBoxButtonKind_disabledCheckbox, - 0, pCheckButtonData))); + new SvLBoxButton(loadEnabled ? SvLBoxButtonKind_enabledCheckbox + : SvLBoxButtonKind_disabledCheckbox, + pCheckButtonData))); pEntry->AddItem(std::unique_ptr<SvLBoxButton>( - new SvLBoxButton(pEntry, saveEnabled ? SvLBoxButtonKind_enabledCheckbox - : SvLBoxButtonKind_disabledCheckbox, - 0, pCheckButtonData))); - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, _rTxt))); + new SvLBoxButton(saveEnabled ? SvLBoxButtonKind_enabledCheckbox + : SvLBoxButtonKind_disabledCheckbox, + pCheckButtonData))); + pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(_rTxt))); pEntry->SetUserData( reinterpret_cast<void*>(_nType) ); m_pCheckLB->Insert( pEntry ); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index cdf0b3237283..e25312724918 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -30,6 +30,7 @@ #include <sfx2/sfxuno.hxx> #include <sfx2/dispatch.hxx> #include <tools/urlobj.hxx> +#include <o3tl/make_unique.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <comphelper/processfactory.hxx> #include <com/sun/star/linguistic2/LinguServiceManager.hpp> @@ -259,8 +260,7 @@ class BrwStringDic_Impl : public SvLBoxString { public: - BrwStringDic_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const OUString& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} + BrwStringDic_Impl( const OUString& rStr ) : SvLBoxString( rStr ) {} virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; @@ -436,8 +436,7 @@ class BrwString_Impl : public SvLBoxString { public: - BrwString_Impl( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const OUString& rStr ) : SvLBoxString( pEntry, nFlags, rStr ) {} + BrwString_Impl( const OUString& rStr ) : SvLBoxString( rStr ) {} virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; @@ -1784,15 +1783,11 @@ SvTreeListEntry* SvxLinguTabPage::CreateEntry( OUString& rTxt, sal_uInt16 nCol ) pCheckButtonData = new SvLBoxButtonData(m_pLinguOptionsCLB); if (CBCOL_FIRST == nCol) - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton( - pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); if (CBCOL_SECOND == nCol) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString( - pEntry, 0, ""))); // empty column - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); - pEntry->AddItem(std::unique_ptr<BrwString_Impl>(new BrwString_Impl( - pEntry, 0, rTxt))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); // empty column + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); + pEntry->AddItem(o3tl::make_unique<BrwString_Impl>(rTxt)); return pEntry; } @@ -1917,11 +1912,11 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol } if (CBCOL_FIRST == nCol) - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); if (CBCOL_SECOND == nCol) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); // empty column - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( pEntry, 0, Image(), Image(), false))); - pEntry->AddItem(std::unique_ptr<BrwStringDic_Impl>(new BrwStringDic_Impl(pEntry, 0, rTxt))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); // empty column + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); + pEntry->AddItem(o3tl::make_unique<BrwStringDic_Impl>(rTxt)); return pEntry; } diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 33c6d4cef3f6..e5b29cfe6814 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -45,6 +45,7 @@ #include <com/sun/star/smarttags/XSmartTagRecognizer.hpp> #include <com/sun/star/smarttags/XSmartTagAction.hpp> #include <rtl/strbuf.hxx> +#include <o3tl/make_unique.hxx> #include "autocdlg.hxx" #include "helpid.hrc" @@ -329,8 +330,7 @@ class OfaImpBrwString : public SvLBoxString { public: - OfaImpBrwString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, - const OUString& rStr ) : SvLBoxString(pEntry,nFlags,rStr){} + OfaImpBrwString( const OUString& rStr ) : SvLBoxString(rStr){} virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override; @@ -472,19 +472,18 @@ SvTreeListEntry* OfaSwAutoFmtOptionsPage::CreateEntry(OUString& rTxt, sal_uInt16 m_pCheckLB->SetCheckButtonData( pCheckButtonData ); } - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>(new SvLBoxContextBmp( - pEntry, 0, Image(), Image(), false))); + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); if (nCol == CBCOL_SECOND) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); else - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); if (nCol == CBCOL_FIRST) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); else - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); - pEntry->AddItem(std::unique_ptr<OfaImpBrwString>(new OfaImpBrwString( pEntry, 0, rTxt))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); + pEntry->AddItem(o3tl::make_unique<OfaImpBrwString>(rTxt)); return pEntry; } @@ -1802,21 +1801,19 @@ SvTreeListEntry* OfaQuoteTabPage::CreateEntry(OUString& rTxt, sal_uInt16 nCol) m_pSwCheckLB->SetCheckButtonData(pCheckButtonData); } - pEntry->AddItem(std::unique_ptr<SvLBoxContextBmp>( - new SvLBoxContextBmp(pEntry, 0, Image(), Image(), false))); + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); if (nCol == CBCOL_SECOND) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); else - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton(pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); if (nCol == CBCOL_FIRST) - pEntry->AddItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pEntry, 0, ""))); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); else - pEntry->AddItem(std::unique_ptr<SvLBoxButton>(new SvLBoxButton( - pEntry, SvLBoxButtonKind_enabledCheckbox, 0, pCheckButtonData))); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind_enabledCheckbox, pCheckButtonData)); - pEntry->AddItem(std::unique_ptr<OfaImpBrwString>(new OfaImpBrwString(pEntry, 0, rTxt))); + pEntry->AddItem(o3tl::make_unique<OfaImpBrwString>(rTxt)); return pEntry; } diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 5e599ae4788f..0100c8114998 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -35,6 +35,7 @@ #include "headertablistbox.hxx" #include "svtools/svlbitm.hxx" #include "svtools/treelistentry.hxx" +#include <o3tl/make_unique.hxx> using ::com::sun::star::uno::Reference; using ::com::sun::star::frame::XFrame; @@ -340,7 +341,7 @@ bool _SfxMacroTabPage::AssignDeleteHdl(Control* pBtn) } mpImpl->pEventLB->SetUpdateMode( false ); - pE->ReplaceItem(std::unique_ptr<SvLBoxString>(new SvLBoxString(pE, 0, sScriptURI)), LB_MACROS_ITEMPOS); + pE->ReplaceItem(o3tl::make_unique<SvLBoxString>(sScriptURI), LB_MACROS_ITEMPOS); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); rListBox.MakeVisible( pE ); @@ -433,8 +434,7 @@ void _SfxMacroTabPage::FillEvents() if( sOld != sNew ) { - pE->ReplaceItem(std::unique_ptr<SvLBoxString>(new SvLBoxString( - pE, 0, sNew)), LB_MACROS_ITEMPOS); + pE->ReplaceItem(o3tl::make_unique<SvLBoxString>(sNew), LB_MACROS_ITEMPOS); rListBox.GetModel()->InvalidateEntry( pE ); } } |