diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-01-21 21:26:50 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-22 08:38:28 +0100 |
commit | 0c64df243259f574daaa4bc03bc4ddcc791c9073 (patch) | |
tree | 657a489d604ae2f7938369ef1789e746df0a3e69 /reportdesign/source | |
parent | fd8a724d22c92e3ebef4a3da126baaac3d3bde79 (diff) |
o3tl::make_unique -> std::make_unique in i18npool...reportdesign
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: I8bee1344f7df82536f31bc5e4ec4fd379cac1d04
Reviewed-on: https://gerrit.libreoffice.org/66704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/sdr/ReportUndoFactory.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/UndoEnv.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 13 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionView.cxx | 3 |
4 files changed, 11 insertions, 15 deletions
diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx index 1033a3eabc2d..3ceba3851749 100644 --- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx +++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx @@ -20,7 +20,6 @@ #include <RptObject.hxx> #include <UndoActions.hxx> #include <strings.hrc> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -35,9 +34,9 @@ static std::unique_ptr<SdrUndoAction> lcl_createUndo(SdrObject& rObject, Action uno::Reference< report::XSection> xSection = pObj->getSection(); uno::Reference< report::XGroup> xGroup = xSection->getGroup(); if ( xGroup.is() ) - return o3tl::make_unique<OUndoGroupSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OGroupHelper::getMemberFunction(xSection),xGroup,xReportComponent,pCommentId); + return std::make_unique<OUndoGroupSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OGroupHelper::getMemberFunction(xSection),xGroup,xReportComponent,pCommentId); else - return o3tl::make_unique<OUndoReportSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OReportHelper::getMemberFunction(xSection),xSection->getReportDefinition(),xReportComponent,pCommentId); + return std::make_unique<OUndoReportSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OReportHelper::getMemberFunction(xSection),xSection->getReportDefinition(),xReportComponent,pCommentId); } diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 5d6b46cff3a6..0b3e081df367 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -44,7 +44,6 @@ #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> #include <osl/mutex.hxx> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -392,7 +391,7 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) if ( xContainer.is() ) { m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( - o3tl::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(), + std::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } @@ -458,7 +457,7 @@ void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY); if ( xFunctions.is() ) { - m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( o3tl::make_unique<OUndoContainerAction>( + m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( std::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Removed, xFunctions.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 809357a86495..cefc45f953b3 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -129,7 +129,6 @@ #include <unotools/syslocale.hxx> #include <unotools/viewoptions.hxx> #include <unotools/localedatawrapper.hxx> -#include <o3tl/make_unique.hxx> #include <osl/mutex.hxx> #include <PropertyForward.hxx> @@ -3769,13 +3768,13 @@ void OReportController::switchReportSection(const sal_Int16 _nId) const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO + addUndoAction(std::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getReportHeader) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed )); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO + addUndoAction(std::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getReportFooter) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed @@ -3816,14 +3815,14 @@ void OReportController::switchPageSection(const sal_Int16 _nId) const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OReportSectionUndo>(*m_aReportModel ,SID_PAGEHEADER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getPageHeader) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed )); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OReportSectionUndo>(*m_aReportModel ,SID_PAGEFOOTER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getPageFooter) ,m_xReportDefinition @@ -3870,7 +3869,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert rUndoEnv.AddElement( xGroup->getFunctions() ); } - addUndoAction( o3tl::make_unique<OGroupUndo>( + addUndoAction( std::make_unique<OGroupUndo>( *m_aReportModel, _bAppend ? RID_STR_UNDO_APPEND_GROUP : RID_STR_UNDO_REMOVE_GROUP, _bAppend ? Inserted : Removed, @@ -3904,7 +3903,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader { const OXUndoEnvironment::OUndoEnvLock aLock(m_aReportModel->GetUndoEnv()); if ( _bUndo ) - addUndoAction(o3tl::make_unique<OGroupSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OGroupSectionUndo>(*m_aReportModel ,_bHeader ? SID_GROUPHEADER_WITHOUT_UNDO : SID_GROUPFOOTER_WITHOUT_UNDO ,_bHeader ? ::std::mem_fn(&OGroupHelper::getHeader) : ::std::mem_fn(&OGroupHelper::getFooter) ,xGroup diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index c1c3c48bd853..1181581737cb 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -29,7 +29,6 @@ #include <strings.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -177,7 +176,7 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo ) SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); if ( dynamic_cast< const OCustomShape *>( pObj ) != nullptr ) { - AddUndo( o3tl::make_unique<SdrUndoObjectLayerChange>( *pObj, pObj->GetLayer(), _nLayerNo) ); + AddUndo( std::make_unique<SdrUndoObjectLayerChange>( *pObj, pObj->GetLayer(), _nLayerNo) ); pObj->SetLayer( _nLayerNo ); OObjectBase& rBaseObj = dynamic_cast<OObjectBase&>(*pObj); try |