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

Noel Grandin noelgrandin at gmail.com
Tue Oct 17 07:05:20 UTC 2017


 sc/inc/compressedarray.hxx                     |   11 +++--------
 sc/source/core/data/compressedarray.cxx        |    9 ++++-----
 sdext/source/pdfimport/inc/genericelements.hxx |    4 ++--
 sdext/source/pdfimport/inc/imagecontainer.hxx  |    4 ++--
 sdext/source/pdfimport/inc/pdfiprocessor.hxx   |    4 ++--
 sdext/source/pdfimport/inc/treevisiting.hxx    |    4 ++--
 sdext/source/pdfimport/pdfiadaptor.cxx         |    2 +-
 7 files changed, 16 insertions(+), 22 deletions(-)

New commits:
commit 79fe112cdd9d59982739c04026297055e4bd8ab0
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Oct 15 20:30:55 2017 +0200

    Simplify ScCompressedArray constructor
    
    nobody is setting a custom delta
    
    Change-Id: I5dd9ac691fb226697eb8cb2b6b0b673552a4f049
    Reviewed-on: https://gerrit.libreoffice.org/43437
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/inc/compressedarray.hxx b/sc/inc/compressedarray.hxx
index 86063049b774..93cbac83172d 100644
--- a/sc/inc/compressedarray.hxx
+++ b/sc/inc/compressedarray.hxx
@@ -25,8 +25,6 @@
 
 #include "scdllapi.h"
 
-const size_t nScCompressedArrayDelta = 4;
-
 /** Compressed array of row (or column) entries, e.g. heights, flags, ...
 
     The array stores ranges of values such that equal consecutive values occupy only
@@ -70,8 +68,7 @@ public:
 
     /** Construct with nMaxAccess=MAXROW, for example. */
                                 ScCompressedArray( A nMaxAccess,
-                                        const D& rValue,
-                                        size_t nDelta = nScCompressedArrayDelta );
+                                        const D& rValue );
     /** Construct from a plain array of D */
                                 ScCompressedArray( A nMaxAccess,
                                         const D* pDataArray, size_t nDataCount );
@@ -119,7 +116,6 @@ public:
 protected:
     size_t                      nCount;
     size_t                      nLimit;
-    size_t                      nDelta;
     DataEntry*                  pData;
     A                           nMaxAccess;
 };
@@ -176,9 +172,8 @@ template< typename A, typename D > class ScBitMaskCompressedArray : public ScCom
 {
 public:
                                 ScBitMaskCompressedArray( A nMaxAccessP,
-                                        const D& rValue,
-                                        size_t nDeltaP = nScCompressedArrayDelta )
-                                    : ScCompressedArray<A,D>( nMaxAccessP, rValue, nDeltaP)
+                                        const D& rValue )
+                                    : ScCompressedArray<A,D>( nMaxAccessP, rValue )
                                     {}
                                 ScBitMaskCompressedArray( A nMaxAccessP,
                                         const D* pDataArray, size_t nDataCount )
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index a1426792086d..6d4c67fa0e61 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -23,12 +23,12 @@
 
 #include <algorithm>
 
+static const size_t nScCompressedArrayDelta = 4;
+
 template< typename A, typename D >
-ScCompressedArray<A,D>::ScCompressedArray( A nMaxAccessP, const D& rValue,
-        size_t nDeltaP )
+ScCompressedArray<A,D>::ScCompressedArray( A nMaxAccessP, const D& rValue )
     : nCount(1)
     , nLimit(1)
-    , nDelta( nDeltaP > 0 ? nDeltaP : 1)
     , pData( new DataEntry[1])
     , nMaxAccess( nMaxAccessP)
 {
@@ -41,7 +41,6 @@ ScCompressedArray<A,D>::ScCompressedArray( A nMaxAccessP, const D* pDataArray,
         size_t nDataCount )
     : nCount(0)
     , nLimit( nDataCount)
-    , nDelta( nScCompressedArrayDelta)
     , pData( new DataEntry[nDataCount])
     , nMaxAccess( nMaxAccessP)
 {
@@ -127,7 +126,7 @@ void ScCompressedArray<A,D>::SetValue( A nStart, A nEnd, const D& rValue )
             size_t nNeeded = nCount + 2;
             if (nLimit < nNeeded)
             {
-                nLimit += nDelta;
+                nLimit += nScCompressedArrayDelta;
                 if (nLimit < nNeeded)
                     nLimit = nNeeded;
                 DataEntry* pNewData = new DataEntry[nLimit];
commit b8c6a3486bb11c61539a19ae72fc938f67e9470e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Oct 16 22:46:05 2017 +0200

    Move sdext/source/pdfimport/tree include files to common include directory
    
    ...that are included from various source directories.  Change done in
    preparation of loplugin:includeform.
    
    Change-Id: Ie46f4b940ceeb34fd8883dc17f56a072f625ee3a
    Reviewed-on: https://gerrit.libreoffice.org/43442
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/inc/genericelements.hxx
similarity index 98%
rename from sdext/source/pdfimport/tree/genericelements.hxx
rename to sdext/source/pdfimport/inc/genericelements.hxx
index 3d2703768ae1..9a5db64016fd 100644
--- a/sdext/source/pdfimport/tree/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_GENERICELEMENTS_HXX
-#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_GENERICELEMENTS_HXX
+#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_GENERICELEMENTS_HXX
+#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_GENERICELEMENTS_HXX
 
 #include "pdfihelper.hxx"
 #include "treevisiting.hxx"
diff --git a/sdext/source/pdfimport/tree/imagecontainer.hxx b/sdext/source/pdfimport/inc/imagecontainer.hxx
similarity index 92%
rename from sdext/source/pdfimport/tree/imagecontainer.hxx
rename to sdext/source/pdfimport/inc/imagecontainer.hxx
index a24b2f9a02b5..2c7af596f441 100644
--- a/sdext/source/pdfimport/tree/imagecontainer.hxx
+++ b/sdext/source/pdfimport/inc/imagecontainer.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_IMAGECONTAINER_HXX
-#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_IMAGECONTAINER_HXX
+#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_IMAGECONTAINER_HXX
+#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_IMAGECONTAINER_HXX
 
 #include "pdfihelper.hxx"
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
similarity index 98%
rename from sdext/source/pdfimport/tree/pdfiprocessor.hxx
rename to sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 81facadfd9fd..fae6c0fc5382 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_PDFIPROCESSOR_HXX
-#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_PDFIPROCESSOR_HXX
+#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFIPROCESSOR_HXX
+#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFIPROCESSOR_HXX
 
 #include <com/sun/star/util/XStringMapping.hpp>
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
diff --git a/sdext/source/pdfimport/tree/treevisiting.hxx b/sdext/source/pdfimport/inc/treevisiting.hxx
similarity index 95%
rename from sdext/source/pdfimport/tree/treevisiting.hxx
rename to sdext/source/pdfimport/inc/treevisiting.hxx
index 97a3f18f6f58..ec6d429d2ab9 100644
--- a/sdext/source/pdfimport/tree/treevisiting.hxx
+++ b/sdext/source/pdfimport/inc/treevisiting.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_TREEVISITING_HXX
-#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_TREE_TREEVISITING_HXX
+#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_TREEVISITING_HXX
+#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_TREEVISITING_HXX
 
 #include <sal/config.h>
 #include <list>
diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx
index 7553aafc914f..badcb5a3f67b 100644
--- a/sdext/source/pdfimport/pdfiadaptor.cxx
+++ b/sdext/source/pdfimport/pdfiadaptor.cxx
@@ -24,7 +24,7 @@
 #include "odfemitter.hxx"
 #include "inc/wrapper.hxx"
 #include "inc/contentsink.hxx"
-#include "tree/pdfiprocessor.hxx"
+#include "pdfiprocessor.hxx"
 
 #include <osl/file.h>
 #include <osl/thread.h>


More information about the Libreoffice-commits mailing list