Kaydet (Commit) 1634a6d9 authored tarafından Eike Rathke's avatar Eike Rathke

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/69221Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: Jenkins
üst 68bae22d
......@@ -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 );
......
This diff is collapsed.
......@@ -248,9 +248,9 @@ void SharedFormulaUtil::unshareFormulaCell(const CellStoreType::position_type& a
{
// Move the top cell to the next formula cell down.
ScFormulaCell& rNext = *sc::formula_block::at(*it->data, aPos.second+1);
--xGroup->mnLength;
xGroup->mpTopCell = &rNext;
}
--xGroup->mnLength;
}
else if (rCell.aPos.Row() == rCell.GetSharedTopRow() + rCell.GetSharedLength() - 1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment