[Libreoffice-commits] core.git: sc/qa sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 11 10:54:33 UTC 2021


 sc/qa/unit/screenshots/screenshots.cxx |    2 +-
 sc/source/ui/inc/tabvwsh.hxx           |    2 +-
 sc/source/ui/view/formatsh.cxx         |    2 +-
 sc/source/ui/view/tabvwsh5.cxx         |    4 ++--
 sc/source/ui/view/tabvwsha.cxx         |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 3e8574c959492b9d3b0129ba090be8c597cd2f13
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jan 10 20:08:14 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 11 11:53:45 2021 +0100

    MakeNumberInfoItem always passed a non-null ScViewData*
    
    Change-Id: Ibf6c837f841749b7fb25fd448c954105ef78beeb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109067
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx
index 488b14e82c86..2286e0a86955 100644
--- a/sc/qa/unit/screenshots/screenshots.cxx
+++ b/sc/qa/unit/screenshots/screenshots.cxx
@@ -244,7 +244,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID)
             mpItemSet->Put(SfxUInt32Item(ATTR_VALUE_FORMAT,
                            pAttr->GetNumberFormat( rDoc.GetFormatTable() ) ) );
 
-            pNumberInfoItem = ScTabViewShell::MakeNumberInfoItem(rDoc, &rViewData);
+            pNumberInfoItem = ScTabViewShell::MakeNumberInfoItem(rDoc, rViewData);
 
             mpItemSet->MergeRange(SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO);
             mpItemSet->Put(*pNumberInfoItem);
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 2500a8fabf9f..b5d6306e937e 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -347,7 +347,7 @@ public:
 
     void    ForceMove()     { Move(); }
 
-    static std::unique_ptr<SvxNumberInfoItem> MakeNumberInfoItem( ScDocument& rDoc, const ScViewData* pViewData );
+    static std::unique_ptr<SvxNumberInfoItem> MakeNumberInfoItem( ScDocument& rDoc, const ScViewData& rViewData );
 
     static void UpdateNumberFormatter( const SvxNumberInfoItem&  rInfoItem );
 
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 9ac8862d36af..9b38ac794412 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -817,7 +817,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                             }
 
                             std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem(
-                                ScTabViewShell::MakeNumberInfoItem(rDoc, &GetViewData()));
+                                ScTabViewShell::MakeNumberInfoItem(rDoc, GetViewData()));
 
                             pDocSh->PutItem( *pNumberInfoItem );
                             bPage = false;
diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx
index e8a4c857ecc7..948cfd5d5328 100644
--- a/sc/source/ui/view/tabvwsh5.cxx
+++ b/sc/source/ui/view/tabvwsh5.cxx
@@ -310,7 +310,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
     SfxViewShell::Notify( rBC, rHint );
 }
 
-std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocument& rDoc, const ScViewData* pViewData )
+std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocument& rDoc, const ScViewData& rViewData )
 {
 
     // construct NumberInfo item
@@ -319,7 +319,7 @@ std::unique_ptr<SvxNumberInfoItem> ScTabViewShell::MakeNumberInfoItem( ScDocumen
     double              nCellValue      = 0;
     OUString aCellString;
 
-    ScRefCellValue aCell(rDoc, pViewData->GetCurPos());
+    ScRefCellValue aCell(rDoc, rViewData.GetCurPos());
 
     switch (aCell.meType)
     {
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 500104e58d02..95eb9160f772 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -562,7 +562,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
     pOldSet->Put( SfxUInt32Item( ATTR_VALUE_FORMAT,
         pOldAttrs->GetNumberFormat( rDoc.GetFormatTable() ) ) );
 
-    pNumberInfoItem = MakeNumberInfoItem(rDoc, &GetViewData());
+    pNumberInfoItem = MakeNumberInfoItem(rDoc, GetViewData());
 
     pOldSet->MergeRange( SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_INFO );
     pOldSet->Put(*pNumberInfoItem );


More information about the Libreoffice-commits mailing list