[Libreoffice-commits] core.git: 2 commits - chart2/source filter/source include/filter

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 21 10:10:54 UTC 2018


 chart2/source/controller/dialogs/TitleDialogData.cxx    |    4 ++--
 chart2/source/controller/inc/ChartController.hxx        |    2 +-
 chart2/source/controller/inc/TitleDialogData.hxx        |    2 +-
 chart2/source/controller/main/ChartController_Tools.cxx |    5 +++--
 filter/source/msfilter/svdfppt.cxx                      |    6 +++---
 include/filter/msfilter/svdfppt.hxx                     |    2 +-
 6 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 91b6145090e6e5194493ac7e7dfb3b4096df906f
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 20 13:48:53 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 21 12:10:42 2018 +0200

    loplugin:useuniqueptr in TitleDialogData
    
    Change-Id: Idec568c868411056d1c8aa1a93c36008b223ce57
    Reviewed-on: https://gerrit.libreoffice.org/59356
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index e859ffceb2b5..907bc7324fda 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -27,11 +27,11 @@ namespace chart
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
 
-TitleDialogData::TitleDialogData( ReferenceSizeProvider* pRefSizeProvider )
+TitleDialogData::TitleDialogData( std::unique_ptr<ReferenceSizeProvider> pRefSizeProvider )
         : aPossibilityList(7)
         , aExistenceList(7)
         , aTextList(7)
-        , apReferenceSizeProvider( pRefSizeProvider )
+        , apReferenceSizeProvider( std::move(pRefSizeProvider) )
 {
     for (sal_Int32 i = 0; i < 7; i++)
     {
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index 2cf1978811db..b6c9db260d15 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -418,7 +418,7 @@ private:
     rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
 
     bool impl_isDisposedOrSuspended() const;
-    ReferenceSizeProvider* impl_createReferenceSizeProvider();
+    std::unique_ptr<ReferenceSizeProvider> impl_createReferenceSizeProvider();
     void impl_adaptDataSeriesAutoResize();
 
     void impl_createDrawViewController();
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
index 634ed5b76138..6deeb2050b1d 100644
--- a/chart2/source/controller/inc/TitleDialogData.hxx
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -36,7 +36,7 @@ struct TitleDialogData
     css::uno::Sequence< OUString > aTextList;
     std::unique_ptr< ReferenceSizeProvider > apReferenceSizeProvider;
 
-    TitleDialogData(ReferenceSizeProvider* pReferenzeSizeProvider = nullptr);
+    TitleDialogData(std::unique_ptr<ReferenceSizeProvider> pReferenzeSizeProvider = nullptr);
 
     void readFromModel( const css::uno::Reference< css::frame::XModel >& xChartModel );
     /* return true if anything has changed;
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index a8269b760edf..90cc52855380 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -69,6 +69,7 @@
 #include <svx/svdundo.hxx>
 #include <svx/unoapi.hxx>
 #include <svx/unopage.hxx>
+#include <o3tl/make_unique.hxx>
 
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <tools/diagnose_ex.h>
@@ -155,11 +156,11 @@ bool lcl_deleteDataCurve(
 
 } // anonymous namespace
 
-ReferenceSizeProvider* ChartController::impl_createReferenceSizeProvider()
+std::unique_ptr<ReferenceSizeProvider> ChartController::impl_createReferenceSizeProvider()
 {
     awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
 
-    return new ReferenceSizeProvider(
+    return o3tl::make_unique<ReferenceSizeProvider>(
         aPageSize, Reference<chart2::XChartDocument>(getModel(), uno::UNO_QUERY));
 }
 
commit 34b1a8c2c75f32f0c352acb4f1fd9fd3c2ff00cb
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 20 11:22:08 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 21 12:10:29 2018 +0200

    loplugin:useuniqueptr in PPTNumberFormatCreator
    
    Change-Id: I6c2e155834d3c75807bee12b1ab03d575b6a8413
    Reviewed-on: https://gerrit.libreoffice.org/59355
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 8324da907f30..dee401a652da 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3383,7 +3383,7 @@ PPTExtParaProv::~PPTExtParaProv()
 {
 }
 
-PPTNumberFormatCreator::PPTNumberFormatCreator( PPTExtParaProv* pParaProv )
+PPTNumberFormatCreator::PPTNumberFormatCreator( std::unique_ptr<PPTExtParaProv> pParaProv )
     : nIsBullet(0)
     , nBulletChar(0)
     , nBulletFont(0)
@@ -3391,7 +3391,7 @@ PPTNumberFormatCreator::PPTNumberFormatCreator( PPTExtParaProv* pParaProv )
     , nBulletColor(0)
     , nTextOfs(0)
     , nBulletOfs(0)
-    , pExtParaProv(pParaProv)
+    , pExtParaProv(std::move(pParaProv))
 {
 }
 
@@ -4075,7 +4075,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
                               const PPTTextParagraphStyleAtomInterpreter& rTxPFStyle,
                               const PPTTextSpecInfo& rTextSpecInfo ) :
 
-    PPTNumberFormatCreator  ( new PPTExtParaProv( rManager, rIn, &rSlideHd ) ),
+    PPTNumberFormatCreator  ( o3tl::make_unique<PPTExtParaProv>( rManager, rIn, &rSlideHd ) ),
     maTxSI                  ( rTextSpecInfo )
 {
     sal_uInt32 nOldFilePos = rIn.Tell();
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 6fba3b703a6b..143a1d51b5f0 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -825,7 +825,7 @@ class PPTNumberFormatCreator
 
 protected:
 
-    PPTNumberFormatCreator( PPTExtParaProv* );
+    PPTNumberFormatCreator( std::unique_ptr<PPTExtParaProv> );
     ~PPTNumberFormatCreator();
 
 public:


More information about the Libreoffice-commits mailing list