diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-21 14:47:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-04 19:31:58 +0000 |
commit | 2511e272481172b439d167fd8b09d14c755f223d (patch) | |
tree | 3ebe2f3e84753cecd4f1270f837e00871f5ff1ec /sc/inc | |
parent | f76b8d1cfe07e84744bc57a22e815d347f3f8f23 (diff) |
Resolves: tdf#90285 during sheet copying the old sheets retain their old index
at the point that ScDocument::CopyTab calls StartListeners so when
void ScColumn::StartListening(sc::StartListeningContext& rCxt...
calls rCxt.getBlockPosition(nTab) it calls it with the old nTab index
in ScDocument::maTabs, so the return block position is not correct.
Here I bubble down the requested ScAddress and use its Tab/Col/Row
members rather than trust the members of the indexed-into elements
Change-Id: I291e8c1146c2caa4d0976780b1ee6bcc41994e3c
Reviewed-on: https://gerrit.libreoffice.org/26552
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 4 | ||||
-rw-r--r-- | sc/inc/table.hxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 68fb09c2f34a..611496868d1c 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -528,8 +528,8 @@ public: void StartListening( SvtListener& rLst, SCROW nRow ); void EndListening( SvtListener& rLst, SCROW nRow ); - void StartListening( sc::StartListeningContext& rCxt, SCROW nRow, SvtListener& rListener ); - void EndListening( sc::EndListeningContext& rCxt, SCROW nRow, SvtListener& rListener ); + void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ); + void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ); void StartListeners( sc::StartListeningContext& rCxt, bool bAll ); void SetDirtyIfPostponed(); void BroadcastRecalcOnRefMove(); diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 0f0887ef9718..0450f6b103df 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1084,8 +1084,8 @@ private: void StartListening( const ScAddress& rAddress, SvtListener* pListener ); void EndListening( const ScAddress& rAddress, SvtListener* pListener ); - void StartListening( sc::StartListeningContext& rCxt, SCCOL nCol, SCROW nRow, SvtListener& rListener ); - void EndListening( sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow, SvtListener& rListener ); + void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ); + void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener ); void AttachFormulaCells( sc::StartListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void DetachFormulaCells( sc::EndListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); |