sc/source/ui/docshell/datastream.cxx    |   11 +++++------
 sc/source/ui/docshell/docsh.cxx         |    2 +-
 sc/source/ui/inc/datastream.hxx         |    8 +++-----
 sc/source/ui/miscdlgs/datastreamdlg.cxx |    5 +----
 4 files changed, 10 insertions(+), 16 deletions(-)

New commits:
commit 883b50c06ea00a5437a757c1a4a49dc27a92e30a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Oct 31 13:46:00 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Nov 1 18:39:52 2023 +0100

    DataStream::mnSettings is unused
    
    found by a new loplugin
    
    Change-Id: I9628e1a5b160f0daf43030a4a61146f1d5a626e9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158755
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/ui/docshell/datastream.cxx 
b/sc/source/ui/docshell/datastream.cxx
index 47a8cd1729c4..998985bb78ff 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -264,16 +264,16 @@ void DataStream::MakeToolbarVisible()
 
 DataStream* DataStream::Set(
     ScDocShell *pShell, const OUString& rURL, const ScRange& rRange,
-    sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings)
+    sal_Int32 nLimit, MoveType eMove)
 {
-    DataStream* pLink = new DataStream(pShell, rURL, rRange, nLimit, eMove, 
nSettings);
+    DataStream* pLink = new DataStream(pShell, rURL, rRange, nLimit, eMove);
     sc::DocumentLinkManager& rMgr = pShell->GetDocument().GetDocLinkManager();
     rMgr.setDataStream(pLink);
     return pLink;
 }
 
 DataStream::DataStream(ScDocShell *pShell, const OUString& rURL, const 
ScRange& rRange,
-        sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings) :
+        sal_Int32 nLimit, MoveType eMove) :
     mpDocShell(pShell),
     maDocAccess(mpDocShell->GetDocument()),
     meOrigMove(NO_MOVE),
@@ -292,7 +292,7 @@ DataStream::DataStream(ScDocShell *pShell, const OUString& 
rURL, const ScRange&
     maImportTimer.SetTimeout(0);
     maImportTimer.SetInvokeHandler( LINK(this, DataStream, ImportTimerHdl) );
 
-    Decode(rURL, rRange, nLimit, eMove, nSettings);
+    Decode(rURL, rRange, nLimit, eMove);
 }
 
 DataStream::~DataStream()
@@ -344,12 +344,11 @@ ScRange DataStream::GetRange() const
 }
 
 void DataStream::Decode(const OUString& rURL, const ScRange& rRange,
-        sal_Int32 nLimit, MoveType eMove, const sal_uInt32 nSettings)
+        sal_Int32 nLimit, MoveType eMove)
 {
     msURL = rURL;
     meMove = eMove;
     meOrigMove = eMove;
-    mnSettings = nSettings;
 
     mbValuesInLine = true; // always true.
 
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 175eb2f9c38a..c951814ce77f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -447,7 +447,7 @@ void processDataStream( ScDocShell& rShell, const 
sc::ImportPostProcessData& rDa
         r.meInsertPos == sc::ImportPostProcessData::DataStream::InsertTop ?
         sc::DataStream::MOVE_DOWN : sc::DataStream::RANGE_DOWN;
 
-    sc::DataStream* pStrm = new sc::DataStream(&rShell, r.maURL, aTopRange, 
nLimit, eMove, 0);
+    sc::DataStream* pStrm = new sc::DataStream(&rShell, r.maURL, aTopRange, 
nLimit, eMove);
     pStrm->SetRefreshOnEmptyLine(r.mbRefreshOnEmpty);
     sc::DocumentLinkManager& rMgr = rShell.GetDocument().GetDocLinkManager();
     rMgr.setDataStream(pStrm);
diff --git a/sc/source/ui/inc/datastream.hxx b/sc/source/ui/inc/datastream.hxx
index 849b3168236e..b7a0a36797f3 100644
--- a/sc/source/ui/inc/datastream.hxx
+++ b/sc/source/ui/inc/datastream.hxx
@@ -62,15 +62,14 @@ public:
     typedef std::vector<Line> LinesType;
 
     enum MoveType { NO_MOVE, RANGE_DOWN, MOVE_DOWN, MOVE_UP };
-    enum { VALUES_IN_LINE = 2 };
 
     static void MakeToolbarVisible();
     static DataStream* Set(ScDocShell *pShell, const OUString& rURL, const 
ScRange& rRange,
-            sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings);
+            sal_Int32 nLimit, MoveType eMove);
 
     DataStream(
         ScDocShell *pShell, const OUString& rURL, const ScRange& rRange,
-        sal_Int32 nLimit, MoveType eMove, sal_uInt32 nSettings);
+        sal_Int32 nLimit, MoveType eMove);
 
     ~DataStream();
 
@@ -81,7 +80,7 @@ public:
 
     void Decode(
         const OUString& rURL, const ScRange& rRange, sal_Int32 nLimit,
-        MoveType eMove, const sal_uInt32 nSettings);
+        MoveType eMove);
 
     bool ImportData();
     void StartImport();
@@ -101,7 +100,6 @@ private:
     ScDocShell* mpDocShell;
     DocumentStreamAccess maDocAccess;
     OUString msURL;
-    sal_uInt32 mnSettings;
     MoveType meOrigMove; // Initial move setting. This one gets saved to file.
     MoveType meMove; // move setting during streaming, which may change in the 
middle.
     bool mbRunning;
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx 
b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index cd03a3e66c53..1876665dabbc 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -161,14 +161,11 @@ void DataStreamDlg::StartStream()
     if (m_xRBMaxLimit->get_active())
         nLimit = m_xEdLimit->get_text().toInt32();
     OUString rURL = m_xCbUrl->get_active_text();
-    sal_uInt32 nSettings = 0;
-    if (m_xRBValuesInLine->get_active())
-        nSettings |= DataStream::VALUES_IN_LINE;
 
     DataStream::MoveType eMove
         = m_xRBRangeDown->get_active() ? DataStream::RANGE_DOWN : 
DataStream::MOVE_DOWN;
 
-    DataStream* pStream = DataStream::Set(m_pDocShell, rURL, aStartRange, 
nLimit, eMove, nSettings);
+    DataStream* pStream = DataStream::Set(m_pDocShell, rURL, aStartRange, 
nLimit, eMove);
     pStream->SetRefreshOnEmptyLine(m_xCBRefreshOnEmpty->get_active());
     DataStream::MakeToolbarVisible();
     pStream->StartImport();

Reply via email to