summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-04-01 16:04:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-04-02 08:22:00 +0200
commit7b74a1f41c5dd004e4d3af50b79cfd006ec59ab8 (patch)
treebba06ac5d13943f4eed74e1f9f61ee1b7a30b9c8 /sc/inc
parent65a0d51b37241413bf3d6dcba49b30d1d90d82d2 (diff)
tdf#120445 File-open ODS: Slower as compared to LibO 4.4.7.2
This takes opening the file from 21s to 9.4s on my machine Change-Id: I38248f3c9acfa413fc105fcbe9ece06192389d46 Reviewed-on: https://gerrit.libreoffice.org/70073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/markarr.hxx6
-rw-r--r--sc/inc/markmulti.hxx10
2 files changed, 7 insertions, 9 deletions
diff --git a/sc/inc/markarr.hxx b/sc/inc/markarr.hxx
index 4b538d9131fe..d30168d0471e 100644
--- a/sc/inc/markarr.hxx
+++ b/sc/inc/markarr.hxx
@@ -43,17 +43,19 @@ friend class ScDocument; // for FillInfo
public:
ScMarkArray();
ScMarkArray( ScMarkArray&& rArray );
+ ScMarkArray( const ScMarkArray& rArray );
~ScMarkArray();
void Reset( bool bMarked = false, SCSIZE nNeeded = 1 );
bool GetMark( SCROW nRow ) const;
void SetMarkArea( SCROW nStartRow, SCROW nEndRow, bool bMarked );
bool IsAllMarked( SCROW nStartRow, SCROW nEndRow ) const;
bool HasOneMark( SCROW& rStartRow, SCROW& rEndRow ) const;
- bool HasEqualRowsMarked( const ScMarkArray& rOther ) const;
bool HasMarks() const { return ( nCount > 1 || ( nCount == 1 && pData[0].bMarked ) ); }
- void CopyMarksTo( ScMarkArray& rDestMarkArray ) const;
+ ScMarkArray& operator=( ScMarkArray const & rSource );
+ ScMarkArray& operator=( ScMarkArray&& rSource );
+ bool operator==(ScMarkArray const & rOther ) const;
bool Search( SCROW nRow, SCSIZE& nIndex ) const;
diff --git a/sc/inc/markmulti.hxx b/sc/inc/markmulti.hxx
index ee92da37ce61..dc0f0b23ce35 100644
--- a/sc/inc/markmulti.hxx
+++ b/sc/inc/markmulti.hxx
@@ -23,13 +23,13 @@
#include "segmenttree.hxx"
#include "markarr.hxx"
-#include <map>
+#include <vector>
class ScMultiSel
{
private:
- typedef std::map<SCCOL, ScMarkArray> MapType;
+ typedef std::vector<ScMarkArray> MapType;
MapType aMultiSelContainer;
ScMarkArray aRowSel;
@@ -43,11 +43,7 @@ public:
ScMultiSel& operator=(const ScMultiSel& rMultiSel);
ScMultiSel& operator=(const ScMultiSel&& rMultiSel) = delete;
- SCCOL size() const
- {
- return static_cast<SCCOL>( aMultiSelContainer.size() );
- }
-
+ SCCOL GetMultiSelectionCount() const;
bool HasMarks( SCCOL nCol ) const;
bool HasOneMark( SCCOL nCol, SCROW& rStartRow, SCROW& rEndRow ) const;
bool GetMark( SCCOL nCol, SCROW nRow ) const;