diff options
author | Eike Rathke <erack@redhat.com> | 2019-03-13 18:49:13 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-03-13 22:40:10 +0100 |
commit | 1634a6d926c6cfd8fe92be1f3ae6083d2fb80f5e (patch) | |
tree | 25b60505c975a67196393b1f2af1b20b23ca30a5 /sc/inc | |
parent | 68bae22d127986875fab6e715b0fe53280a499ec (diff) |
Resolves: tdf#123736 re-establish listeners for unshared formula groups
... when replacing one of their formula cells, with another
formula cell or any other cell, passing through
DetachFormulaCell()
Change-Id: Id527307ef5278d87345c6dbfab9d05cb490dfe6c
Reviewed-on: https://gerrit.libreoffice.org/69221
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index a885d0240a2c..8664c81c0c20 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -636,8 +636,16 @@ public: /** * Detach a formula cell that's about to be deleted, or removed from * document storage (if that ever happens). + * + * @param rNewSharedRows collects possible new shared row ranges (top and + * bottom of shared or remaining single twice) resulting from + * unsharing to reestablish listeners on. */ - void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell ); + void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell, + std::vector<SCROW>& rNewSharedRows ); + + /** Re-establish listeners on unshared formula groups */ + void StartListeningUnshared( const std::vector<SCROW>& rNewSharedRows ); void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength ); @@ -692,15 +700,18 @@ public: bool ReservePatternCount( SCSIZE nReserve ); private: - sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow ); - sc::CellStoreType::iterator GetPositionToInsert( const sc::CellStoreType::iterator& it, SCROW nRow ); + sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, std::vector<SCROW>& rNewSharedRows ); + sc::CellStoreType::iterator GetPositionToInsert( const sc::CellStoreType::iterator& it, SCROW nRow, + std::vector<SCROW>& rNewSharedRows ); void AttachNewFormulaCell( const sc::CellStoreType::iterator& itPos, SCROW nRow, ScFormulaCell& rCell, + const std::vector<SCROW>& rNewSharedRows, bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening ); void AttachNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell, + const std::vector<SCROW>& rNewSharedRows, bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening ); void AttachNewFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength ); |