diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-01-17 00:01:31 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-18 09:49:12 +0100 |
commit | ba28af8aa576869a5e6a4f3129af302c824d31a5 (patch) | |
tree | 89fa65a1b964625ea01030d6c80260217f2cde28 /cui/source/options | |
parent | fd1cfd25b48cb4bd5c87e9cb317b37699ca3a1d6 (diff) |
o3tl::make_unique -> std::make_unique in chart2...cui
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: I2ba0b9b44971166bd79527b52745f3c40dc14387
Reviewed-on: https://gerrit.libreoffice.org/66490
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/fontsubs.cxx | 11 | ||||
-rw-r--r-- | cui/source/options/optHeaderTabListbox.cxx | 3 | ||||
-rw-r--r-- | cui/source/options/optaboutconfig.cxx | 39 | ||||
-rw-r--r-- | cui/source/options/optfltr.cxx | 9 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 17 | ||||
-rw-r--r-- | cui/source/options/treeopt.cxx | 15 |
6 files changed, 44 insertions, 50 deletions
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index d95fb1cc3e20..238e8b3dedcb 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -27,7 +27,6 @@ #include <svtools/fontsubstconfig.hxx> #include "fontsubs.hxx" #include <helpids.h> -#include <o3tl/make_unique.hxx> /*********************************************************************/ /* */ @@ -120,13 +119,13 @@ SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(OUString& rFont1, OUString& rF if (!m_xCheckButtonData) m_xCheckButtonData.reset(new SvLBoxButtonData(m_pCheckLB)); - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); // otherwise boom! + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); // otherwise boom! - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); + pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); + pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont1)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rFont2)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rFont1)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rFont2)); return pEntry; } diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index 986f5ac4f164..eb9205335b10 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -23,7 +23,6 @@ #include <vcl/headbar.hxx> #include <vcl/svlbitm.hxx> #include <vcl/treelistentry.hxx> -#include <o3tl/make_unique.hxx> namespace svx { // class OptLBoxString_Impl ---------------------------------------------- @@ -72,7 +71,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>(rCol.GetText()), nCol); + pEntry->ReplaceItem(std::make_unique<OptLBoxString_Impl>(rCol.GetText()), nCol); } } diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index f91faa83b25d..f203320bd0c9 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/util/SearchAlgorithms2.hpp> #include <unotools/textsearch.hxx> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <memory> @@ -204,13 +203,13 @@ void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const OUS bool bInsertToPrefBox) { SvTreeListEntry* pEntry = new SvTreeListEntry; - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>( Image(), Image(), false)); //It is needed, otherwise causes crash - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rProp)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rStatus)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rType)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rValue)); - m_vectorUserData.push_back(o3tl::make_unique<UserData>(rPropertyPath)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rProp)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rStatus)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rType)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rValue)); + m_vectorUserData.push_back(std::make_unique<UserData>(rPropertyPath)); pEntry->SetUserData(m_vectorUserData.back().get()); if(bInsertToPrefBox) @@ -283,16 +282,16 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces { // not leaf node SvTreeListEntry* pEntry = new SvTreeListEntry; - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>( SvTreeListBox::GetDefaultExpandedNodeImage(), SvTreeListBox::GetDefaultCollapsedNodeImage(), false)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(seqItems[i])); + pEntry->AddItem(std::make_unique<SvLBoxString>(seqItems[i])); //It is needed, without this the selection line will be truncated. - pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); - m_vectorUserData.push_back(o3tl::make_unique<UserData>(xNextNameAccess, lineage + 1)); + m_vectorUserData.push_back(std::make_unique<UserData>(xNextNameAccess, lineage + 1)); pEntry->SetUserData(m_vectorUserData.back().get()); pEntry->EnableChildrenOnDemand(); m_pPrefBox->Insert( pEntry, pParentEntry ); @@ -774,7 +773,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void ) ); if (it != m_prefBoxEntries.end()) { - (*it)->ReplaceItem(o3tl::make_unique<SvLBoxString>(sDialogValue), 4); + (*it)->ReplaceItem(std::make_unique<SvLBoxString>(sDialogValue), 4); SvTreeListEntries::iterator modifiedIt = std::find_if( m_modifiedPrefBoxEntries.begin(), m_modifiedPrefBoxEntries.end(), @@ -787,7 +786,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, Button*, void ) if( modifiedIt != m_modifiedPrefBoxEntries.end()) { - (*modifiedIt)->ReplaceItem(o3tl::make_unique<SvLBoxString>(sDialogValue), 4); + (*modifiedIt)->ReplaceItem(std::make_unique<SvLBoxString>(sDialogValue), 4); } else { @@ -887,14 +886,14 @@ void CuiAboutConfigTabPage::InsertEntry( SvTreeListEntry *pEntry) if(!hasEntry) { pParentEntry = new SvTreeListEntry; - pParentEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( + pParentEntry->AddItem(std::make_unique<SvLBoxContextBmp>( SvTreeListBox::GetDefaultExpandedNodeImage(), SvTreeListBox::GetDefaultCollapsedNodeImage(), false)); - pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>(sParentName)); + pParentEntry->AddItem(std::make_unique<SvLBoxString>(sParentName)); //It is needed, without this the selection line will be truncated. - pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); - pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); - pParentEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); + pParentEntry->AddItem(std::make_unique<SvLBoxString>("")); + pParentEntry->AddItem(std::make_unique<SvLBoxString>("")); + pParentEntry->AddItem(std::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 3c48b0132211..1ea0e4ae245d 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <o3tl/make_unique.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/fltrcfg.hxx> #include "optfltr.hxx" @@ -334,16 +333,16 @@ void OfaMSFilterTabPage2::InsertEntry( const OUString& _rTxt, sal_IntPtr _nType, if (!m_xCheckButtonData) m_xCheckButtonData.reset(new SvLBoxButtonData(m_pCheckLB)); - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>( Image(), Image(), false)); - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>( + pEntry->AddItem(std::make_unique<SvLBoxButton>( SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>( + pEntry->AddItem(std::make_unique<SvLBoxButton>( saveEnabled ? SvLBoxButtonKind::EnabledCheckbox : SvLBoxButtonKind::DisabledCheckbox, m_xCheckButtonData.get())); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(_rTxt)); + pEntry->AddItem(std::make_unique<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 20ead90689cb..d9002fddbc46 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -30,7 +30,6 @@ #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> @@ -1662,11 +1661,11 @@ SvTreeListEntry* SvxLinguTabPage::CreateEntry( OUString& rTxt, sal_uInt16 nCol ) m_xCheckButtonData.reset(new SvLBoxButtonData(m_pLinguOptionsCLB)); if (CBCOL_FIRST == nCol) - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); + pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); if (CBCOL_SECOND == nCol) - 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)); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); // empty column + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); + pEntry->AddItem(std::make_unique<BrwString_Impl>(rTxt)); return pEntry; } @@ -1784,11 +1783,11 @@ SvTreeListEntry* SvxEditModulesDlg::CreateEntry( OUString& rTxt, sal_uInt16 nCol } if (CBCOL_FIRST == nCol) - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); + pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, m_xCheckButtonData.get())); if (CBCOL_SECOND == nCol) - 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)); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); // empty column + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false)); + pEntry->AddItem(std::make_unique<BrwStringDic_Impl>(rTxt)); return pEntry; } diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 435fd0acb04c..0555cc339caf 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -75,7 +75,6 @@ #include <editeng/optitems.hxx> #include <editeng/unolingu.hxx> #include <linguistic/misc.hxx> -#include <o3tl/make_unique.hxx> #include <officecfg/Office/OptionsDialog.hxx> #include <osl/module.hxx> #include <osl/process.h> @@ -999,7 +998,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() ? pGroupInfo->m_pShell->CreateItemSet( pGroupInfo->m_nDialogId ) : CreateItemSet( pGroupInfo->m_nDialogId ); if(!pGroupInfo->m_pOutItemSet) - pGroupInfo->m_pOutItemSet = o3tl::make_unique<SfxItemSet>( + pGroupInfo->m_pOutItemSet = std::make_unique<SfxItemSet>( *pGroupInfo->m_pInItemSet->GetPool(), pGroupInfo->m_pInItemSet->GetRanges()); @@ -1096,7 +1095,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId { case SID_GENERAL_OPTIONS: { - pRet = o3tl::make_unique<SfxItemSet>( + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items< SID_HTML_MODE, SID_HTML_MODE, @@ -1137,7 +1136,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId break; case SID_LANGUAGE_OPTIONS : { - pRet = o3tl::make_unique<SfxItemSet>( + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items< SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE, @@ -1205,7 +1204,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId } break; case SID_INET_DLG : - pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_BASIC_ENABLED, SID_BASIC_ENABLED, //SID_OPTIONS_START - ..END SID_SAVEREL_INET, SID_SAVEREL_FSYS, @@ -1214,7 +1213,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId SfxGetpApp()->GetOptions(*pRet); break; case SID_FILTER_DLG: - pRet = o3tl::make_unique<SfxItemSet>( + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items< SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT, @@ -1225,7 +1224,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId break; case SID_SB_STARBASEOPTIONS: - pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_SB_POOLING_ENABLED, SID_SB_DB_REGISTER>{} ); ::offapp::ConnectionPoolConfig::GetOptions(*pRet); svx::DbRegisteredNamesConfig::GetOptions(*pRet); @@ -1234,7 +1233,7 @@ std::unique_ptr<SfxItemSet> OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId case SID_SCH_EDITOPTIONS: { SvxChartOptions aChartOpt; - pRet = o3tl::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_SCH_EDITOPTIONS, SID_SCH_EDITOPTIONS>{} ); + pRet = std::make_unique<SfxItemSet>( SfxGetpApp()->GetPool(), svl::Items<SID_SCH_EDITOPTIONS, SID_SCH_EDITOPTIONS>{} ); pRet->Put( SvxChartColorTableItem( SID_SCH_EDITOPTIONS, aChartOpt.GetDefaultColors() ) ); break; } |