From 192f6a41444b62feae03185975c120f770e2938f Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 13 Nov 2014 20:14:27 -0500 Subject: Reduce duplicate broadcasting done when pasting a range of cells from clip. We do pasting from clip in 2 steps: 1) delete the destination range, then 2) paste the content onto the destination range. The old code would broadcast both during 1) and 2). This change consolidates them and do broadcasting only once at the end, and also avoids broadcasting the same cell twice, which the old code sometimes did. Change-Id: Ic524c2b70888ce158619d99cbfb55dea85870497 --- sc/inc/document.hxx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sc/inc/document.hxx') diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 598b0241c443..3124a4cc9826 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1205,8 +1205,11 @@ public: const ScMarkData& rMark ); void DeleteObjectsInSelection( const ScMarkData& rMark ); - void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, InsertDeleteFlags nDelFlag); + void DeleteArea( + SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, + InsertDeleteFlags nDelFlag, bool bBroadcast = true, + sc::ColumnSpanSet* pBroadcastSpans = NULL ); + SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag); void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag); @@ -1254,9 +1257,11 @@ public: void StartListeningFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, InsertDeleteFlags nInsFlag ); - void BroadcastFromClip( SCCOL nCol1, SCROW nRow1, - SCCOL nCol2, SCROW nRow2, - const ScMarkData& rMark, InsertDeleteFlags nInsFlag ); + + void BroadcastFromClip( + SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, + InsertDeleteFlags nInsFlag, sc::ColumnSpanSet& rBroadcastSpans ); + /** If pDestRanges is given it overrides rDestRange, rDestRange in this case is the overall encompassing range. */ void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark, -- cgit