diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-01-21 23:47:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-01-28 09:52:28 +0100 |
commit | 4e8a15ca224760e8f36952528b2b47def78fd865 (patch) | |
tree | 963bbbe22d03a82fa3a82bc3fa74d4ebf848a1fe /sfx2 | |
parent | 5238ff887849b0d94c6da00a07b57984a86b6ee6 (diff) |
o3tl::make_unique -> std::make_unique in sax...svtools (except sc)
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e
Reviewed-on: https://gerrit.libreoffice.org/66751
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/pch/precompiled_sfx.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/bindings.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/view/classificationhelper.cxx | 3 |
13 files changed, 18 insertions, 28 deletions
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index 654a08c76255..dd4f40f6583f 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -351,7 +351,6 @@ #include <i18nlangtag/i18nlangtagdllapi.h> #include <i18nlangtag/lang.h> #include <i18nlangtag/languagetag.hxx> -#include <o3tl/make_unique.hxx> #include <o3tl/typed_flags_set.hxx> #include <officecfg/Office/Common.hxx> #include <sax/tools/converter.hxx> diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index bde14fdef12c..20aa4cfab3a9 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -874,7 +874,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( vcl::Window& rWindow, if ( rWindow.GetParent() != pWorkWin ) rWindow.SetParent( pWorkWin ); - auto pChild = o3tl::make_unique<SfxChild_Impl>(rWindow, rWindow.GetSizePixel(), + auto pChild = std::make_unique<SfxChild_Impl>(rWindow, rWindow.GetSizePixel(), eAlign, rWindow.IsVisible()); aChildren.push_back(std::move(pChild)); @@ -889,7 +889,7 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl(std::shared_ptr<SfxModelessDial DBG_ASSERT( aChildren.size() < 255, "too many children" ); DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" ); - auto pChild = o3tl::make_unique<SfxChild_Impl>(rController, eAlign); + auto pChild = std::make_unique<SfxChild_Impl>(rController, eAlign); aChildren.push_back(std::move(pChild)); bSorted = false; diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 4fc4a651d73b..062c969f0bc9 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -83,7 +83,6 @@ #include "fltlst.hxx" #include <sfx2/request.hxx> #include <arrdecl.hxx> -#include <o3tl/make_unique.hxx> #include <vector> #include <memory> @@ -273,7 +272,7 @@ namespace return *aImpl; // first Matcher created for this factory - aImplArr.push_back(o3tl::make_unique<SfxFilterMatcher_Impl>(aName)); + aImplArr.push_back(std::make_unique<SfxFilterMatcher_Impl>(aName)); return *aImplArr.back().get(); } } diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index e1803db01f56..0a4e1fcc7169 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -795,7 +795,7 @@ void SfxBindings::Register_Impl( SfxControllerItem& rItem, bool bInternal ) if ( nPos >= pImpl->pCaches.size() || pImpl->pCaches[nPos]->GetId() != nId ) { - pImpl->pCaches.insert( pImpl->pCaches.begin() + nPos, o3tl::make_unique<SfxStateCache>(nId) ); + pImpl->pCaches.insert( pImpl->pCaches.begin() + nPos, std::make_unique<SfxStateCache>(nId) ); DBG_ASSERT( nPos == 0 || pImpl->pCaches[nPos]->GetId() > pImpl->pCaches[nPos-1]->GetId(), "" ); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 40c7652c1f42..b505412d3b4f 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -847,7 +847,7 @@ void SfxDispatcher::Execute_(SfxShell& rShell, const SfxSlot& rSlot, { if ( bool(eCallMode & SfxCallMode::RECORD) ) rReq.AllowRecording( true ); - xImp->xPoster->Post(o3tl::make_unique<SfxRequest>(rReq)); + xImp->xPoster->Post(std::make_unique<SfxRequest>(rReq)); return; } } diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 8117185768df..4c38ae64ec5a 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -39,7 +39,6 @@ #include <bitmaps.hlst> #include <officecfg/Office/Common.hxx> -#include <o3tl/make_unique.hxx> using namespace ::com::sun::star; using namespace com::sun::star::uno; @@ -219,7 +218,7 @@ BitmapEx RecentDocsView::getDefaultThumbnail(const OUString &rURL) void RecentDocsView::insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId) { - AppendItem( o3tl::make_unique<RecentDocsViewItem>(*this, rURL, rTitle, rThumbnail, nId, mnItemMaxSize) ); + AppendItem( std::make_unique<RecentDocsViewItem>(*this, rURL, rTitle, rThumbnail, nId, mnItemMaxSize) ); } void RecentDocsView::Reload() diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 94e4b16cc764..bba646d4ff53 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -71,8 +71,6 @@ #include <map> #include <memory> -#include <o3tl/make_unique.hxx> - #include <sal/log.hxx> #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <comphelper/lok.hxx> @@ -209,7 +207,7 @@ std::unique_ptr< css::uno::ContextLayer > EnsureJavaContext() if (xHandler.is()) return nullptr; // No need to add new layer: JavaContext already present } - return o3tl::make_unique< css::uno::ContextLayer >(new svt::JavaContext(xContext)); + return std::make_unique< css::uno::ContextLayer >(new svt::JavaContext(xContext)); } } #endif diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 1297ff1358e2..8bc31fc87e0e 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -206,7 +206,7 @@ SfxDockingWrapper::SfxDockingWrapper( vcl::Window* pParentWnd , std::unique_ptr<SfxChildWindow> SfxDockingWrapper::CreateImpl(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo) { - return o3tl::make_unique<SfxDockingWrapper>(pParent, nId, pBindings, pInfo); + return std::make_unique<SfxDockingWrapper>(pParent, nId, pBindings, pInfo); } void SfxDockingWrapper::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) @@ -215,7 +215,7 @@ void SfxDockingWrapper::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChil for (int i=0; i < NUM_OF_DOCKINGWINDOWS; i++ ) { sal_uInt16 nID = sal_uInt16(SID_DOCKWIN_START+i); - auto pFact = o3tl::make_unique<SfxChildWinFactory>( SfxDockingWrapper::CreateImpl, nID, 0xffff ); + auto pFact = std::make_unique<SfxChildWinFactory>( SfxDockingWrapper::CreateImpl, nID, 0xffff ); pFact->aInfo.nFlags |= nFlags; pFact->aInfo.bVisible = bVis; SfxChildWindow::RegisterChildWindow(pMod, std::move(pFact)); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b82638a82770..8131c34a9df8 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -70,7 +70,6 @@ #include <sfx2/StyleManager.hxx> #include <sfx2/StylePreviewRenderer.hxx> -#include <o3tl/make_unique.hxx> #define STD_ENTRY_HEIGHT 17 @@ -587,7 +586,7 @@ static SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox, if (officecfg::Office::Common::StylesAndFormatting::Preview::get()) { - pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(pEntry->getName(), eStyleFamily), 1); + pTreeListEntry->ReplaceItem(std::make_unique<StyleLBoxString>(pEntry->getName(), eStyleFamily), 1); } pBox->GetModel()->InvalidateEntry(pTreeListEntry); @@ -1206,7 +1205,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(StyleFlags nFlags) SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], nullptr, false, nPos); if (officecfg::Office::Common::StylesAndFormatting::Preview::get()) { - pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(aStrings[nPos], eFam), 1); + pTreeListEntry->ReplaceItem(std::make_unique<StyleLBoxString>(aStrings[nPos], eFam), 1); } aFmtLb->GetModel()->InvalidateEntry(pTreeListEntry); } @@ -2010,7 +2009,7 @@ IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, PreviewHdl, Button*, void) SvTreeListEntry* pTreeListEntry = aFmtLb->GetEntry(nPos); OUString aEntryStr = aFmtLb->GetEntryText(pTreeListEntry); const SfxStyleFamily eFam = aPreviewCheckbox->IsChecked() ? GetFamilyItem_Impl()->GetFamily(): SfxStyleFamily::None; - pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(aEntryStr, eFam), 1); + pTreeListEntry->ReplaceItem(std::make_unique<StyleLBoxString>(aEntryStr, eFam), 1); aFmtLb->GetModel()->InvalidateEntry(pTreeListEntry); aFmtLb->Recalc(); } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index d12448d7f252..3cc4fc64664a 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -73,7 +73,6 @@ #include <com/sun/star/security/DocumentSignatureInformation.hpp> #include <com/sun/star/security/DocumentDigitalSignatures.hpp> #include <com/sun/star/security/XCertificate.hpp> -#include <o3tl/make_unique.hxx> #include <tools/urlobj.hxx> #include <tools/fileutil.hxx> #include <unotools/configmgr.hxx> @@ -1400,7 +1399,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b if (comphelper::isFileUrl(aDestURL) || !aDest.removeSegment()) { - pFileLock = o3tl::make_unique<osl::File>(aDestURL); + pFileLock = std::make_unique<osl::File>(aDestURL); auto rc = pFileLock->open(osl_File_OpenFlag_Write); if (rc == osl::FileBase::E_ACCES) bHandleSysLocked = true; diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index ead24be42953..d92c89644526 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -94,7 +94,6 @@ using namespace ::ucbhelper; #include <svtools/templatefoldercache.hxx> #include <unotools/ucbhelper.hxx> -#include <o3tl/make_unique.hxx> #include <memory> #include <vector> @@ -1022,7 +1021,7 @@ bool SfxDocumentTemplates::InsertDir if ( xTemplates->addGroup( rText ) ) { - return pImp->InsertRegion( o3tl::make_unique<RegionData_Impl>( pImp.get(), rText ), nRegion ); + return pImp->InsertRegion( std::make_unique<RegionData_Impl>( pImp.get(), rText ), nRegion ); } return false; @@ -1353,7 +1352,7 @@ void RegionData_Impl::AddEntry( const OUString& rTitle, if ( pPos ) nPos = *pPos; - auto pEntry = o3tl::make_unique<DocTempl_EntryData_Impl>( + auto pEntry = std::make_unique<DocTempl_EntryData_Impl>( this, rTitle ); pEntry->SetTargetURL( rTargetURL ); pEntry->SetHierarchyURL( aLinkURL ); @@ -1492,7 +1491,7 @@ void SfxDocTemplate_Impl::DeleteRegion( size_t nIndex ) void SfxDocTemplate_Impl::AddRegion( const OUString& rTitle, Content& rContent ) { - auto pRegion = o3tl::make_unique<RegionData_Impl>( this, rTitle ); + auto pRegion = std::make_unique<RegionData_Impl>( this, rTitle ); auto pRegionTmp = pRegion.get(); if ( ! InsertRegion( std::move(pRegion), size_t(-1) ) ) diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index a314e538763a..2e818c133c4e 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -44,7 +44,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/namedvaluecollection.hxx> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <com/sun/star/lang/XInitialization.hpp> @@ -118,7 +117,7 @@ SidebarController::SidebarController ( mpResourceManager() { // Decks and panel collections for this sidebar - mpResourceManager = o3tl::make_unique<ResourceManager>(); + mpResourceManager = std::make_unique<ResourceManager>(); } rtl::Reference<SidebarController> SidebarController::create( diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index 3b6fd0612b47..c3d2f96c2f6f 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -24,7 +24,6 @@ #include <i18nlangtag/languagetag.hxx> #include <sfx2/infobar.hxx> #include <sfx2/objsh.hxx> -#include <o3tl/make_unique.hxx> #include <comphelper/processfactory.hxx> #include <unotools/pathoptions.hxx> #include <unotools/ucbstreamhelper.hxx> @@ -555,7 +554,7 @@ bool SfxClassificationHelper::ShowPasteInfo(SfxClassificationCheckPasteResult eR } SfxClassificationHelper::SfxClassificationHelper(const uno::Reference<document::XDocumentProperties>& xDocumentProperties, bool bUseLocalizedPolicy) - : m_pImpl(o3tl::make_unique<Impl>(xDocumentProperties, bUseLocalizedPolicy)) + : m_pImpl(std::make_unique<Impl>(xDocumentProperties, bUseLocalizedPolicy)) { if (!xDocumentProperties.is()) return; |