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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 16 06:59:08 UTC 2018


 sc/source/filter/excel/excrecds.cxx |    9 +++++----
 sc/source/filter/inc/excrecds.hxx   |    2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit c135f51b050dfa7ef095fe8a5b73cde37219a8dd
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Aug 15 14:36:48 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 16 08:58:39 2018 +0200

    loplugin:returnconstant in XclExpAutofilter
    
    Change-Id: Ibd57de5b8309048ec29e869f3058b0a8bb26df71
    Reviewed-on: https://gerrit.libreoffice.org/59134
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index af3a90b75f2d..804f815c59d1 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -702,7 +702,10 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
         return true;
 
     if (GetOutput() != EXC_OUTPUT_BINARY && rItems.size() > 1)
-        return AddMultiValueEntry(rEntry);
+    {
+        AddMultiValueEntry(rEntry);
+        return true;
+    }
 
     bool bConflict = false;
     OUString  sText;
@@ -809,15 +812,13 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
     return bConflict;
 }
 
-bool XclExpAutofilter::AddMultiValueEntry( const ScQueryEntry& rEntry )
+void XclExpAutofilter::AddMultiValueEntry( const ScQueryEntry& rEntry )
 {
     meType = MultiValue;
     const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
     ScQueryEntry::QueryItemsType::const_iterator itr = rItems.begin(), itrEnd = rItems.end();
     for (; itr != itrEnd; ++itr)
         maMultiValues.push_back(itr->maString.getString());
-
-    return false;
 }
 
 void XclExpAutofilter::WriteBody( XclExpStream& rStrm )
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index f201a9578638..1364c678f609 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -393,7 +393,7 @@ public:
 
     bool                    HasCondition() const;
     bool                    AddEntry( const ScQueryEntry& rEntry );
-    bool                    AddMultiValueEntry( const ScQueryEntry& rEntry );
+    void                    AddMultiValueEntry( const ScQueryEntry& rEntry );
 
     virtual void            SaveXml( XclExpXmlStream& rStrm ) override;
 };


More information about the Libreoffice-commits mailing list