summaryrefslogtreecommitdiff
path: root/sc/inc/clipcontext.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-11-10 18:45:21 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-18 08:31:53 -0500
commitff5aad0a26aac46a3a540ac6ed2b7eca4a8cd23d (patch)
tree14072cd770393b9734df69e7ec8152d0c1f7da88 /sc/inc/clipcontext.hxx
parent136eed0f538a7b647323773c47a692d65f5b2ae9 (diff)
Speed up pasting of single row onto multiple destination rows.
This is an extension of the earlier paste optimization of a single cell across multiple destination cells. Change-Id: I3a60300d3d0e11420d997bea8f7f540e948f56cc
Diffstat (limited to 'sc/inc/clipcontext.hxx')
-rw-r--r--sc/inc/clipcontext.hxx29
1 files changed, 19 insertions, 10 deletions
diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index 5f558cd5fe74..ccaca6770202 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -54,10 +54,12 @@ class CopyFromClipContext : public ClipContextBase
ScDocument* mpClipDoc;
InsertDeleteFlags mnInsertFlag;
InsertDeleteFlags mnDeleteFlag;
- ScCellValue maSingleCell;
+
+ std::vector<ScCellValue> maSingleCells;
+ std::vector<const ScPatternAttr*> maSinglePatterns;
+ std::vector<const ScPostIt*> maSingleNotes;
+
ScConditionalFormatList* mpCondFormatList;
- const ScPatternAttr* mpSinglePattern;
- const ScPostIt* mpSingleNote;
bool mbAsLink:1;
bool mbSkipAttrForEmptyCells:1;
bool mbCloneNotes:1;
@@ -96,16 +98,23 @@ public:
void setDeleteFlag( InsertDeleteFlags nFlag );
InsertDeleteFlags getDeleteFlag() const;
- ScCellValue& getSingleCell();
+ /**
+ * Set the column size of a "single cell" row, which is used when copying
+ * a single row of cells in a clip doc and pasting it into multiple
+ * rows by replicating it.
+ */
+ void setSingleCellColumnSize( size_t nSize );
- void setCondFormatList( ScConditionalFormatList* pCondFormatList );
- ScConditionalFormatList* getCondFormatList();
+ ScCellValue& getSingleCell( size_t nColOffset );
- const ScPatternAttr* getSingleCellPattern() const;
- void setSingleCellPattern( const ScPatternAttr* pAttr );
+ const ScPatternAttr* getSingleCellPattern( size_t nColOffset ) const;
+ void setSingleCellPattern( size_t nColOffset, const ScPatternAttr* pAttr );
- const ScPostIt* getSingleCellNote() const;
- void setSingleCellNote( const ScPostIt* pNote );
+ const ScPostIt* getSingleCellNote( size_t nColOffset ) const;
+ void setSingleCellNote( size_t nColOffset, const ScPostIt* pNote );
+
+ void setCondFormatList( ScConditionalFormatList* pCondFormatList );
+ ScConditionalFormatList* getCondFormatList();
void setTableProtected( bool b );
bool isTableProtected() const;