summaryrefslogtreecommitdiffstats
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-17 12:40:17 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 20:16:45 -0400
commit96c870ea3dd86649dca7f7228591de7253d6653d (patch)
tree89be9865b1b6fb3755c3adb87fe788fb1dc57c9d /sc/inc
parentMove the boolean flags to the context bucket. (diff)
downloadcore-96c870ea3dd86649dca7f7228591de7253d6653d.tar.gz
core-96c870ea3dd86649dca7f7228591de7253d6653d.zip
Do the same thing for CopyToDocument.
This removes O(n^2) slowness from undo and redo of a large array of cells with empty cells in between. Change-Id: Id87c8ac8986c97ddf305f849a4752f0f92cc5899
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/clipcontext.hxx7
-rw-r--r--sc/inc/column.hxx3
-rw-r--r--sc/inc/table.hxx10
3 files changed, 15 insertions, 5 deletions
diff --git a/sc/inc/clipcontext.hxx b/sc/inc/clipcontext.hxx
index 0df627c77091..4d9224f425b6 100644
--- a/sc/inc/clipcontext.hxx
+++ b/sc/inc/clipcontext.hxx
@@ -83,6 +83,13 @@ public:
bool isCloneNotes() const;
};
+class CopyToDocContext : public ClipContextBase
+{
+public:
+ CopyToDocContext(ScDocument& rDoc);
+ virtual ~CopyToDocContext();
+};
+
}
#endif
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index 4e5688cb51b8..1165ee305311 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -40,6 +40,7 @@ namespace sc {
class EndListeningContext;
class CopyFromClipContext;
class CopyToClipContext;
+ class CopyToDocContext;
struct ColumnBlockPosition;
}
@@ -252,7 +253,7 @@ public:
ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows, SCROW nStartRow, SCROW nEndRow) const;
void CopyToColumn(
- SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, bool bMarked,
+ sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, sal_uInt16 nFlags, bool bMarked,
ScColumn& rColumn, const ScMarkData* pMarkData = NULL, bool bAsLink = false) const;
void UndoToColumn(
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 9b0d4d2f0746..c40e5ec03cc0 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -52,6 +52,7 @@ namespace sc {
class EndListeningContext;
class CopyFromClipContext;
class CopyToClipContext;
+ class CopyToDocContext;
struct ColumnBlockPosition;
}
@@ -396,10 +397,11 @@ public:
void BroadcastInArea( SCCOL nCol1, SCROW nRow1,
SCCOL nCol2, SCROW nRow2 );
- void CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
- sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab,
- const ScMarkData* pMarkData = NULL,
- bool bAsLink = false, bool bColRowFlags = true);
+ void CopyToTable(
+ sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
+ sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab,
+ const ScMarkData* pMarkData = NULL, bool bAsLink = false, bool bColRowFlags = true );
+
void UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nFlags, bool bMarked, ScTable* pDestTab,
const ScMarkData* pMarkData = NULL);