diff options
author | Eike Rathke <erack@redhat.com> | 2015-02-05 11:32:13 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-02-05 11:52:51 +0100 |
commit | 47230a036fe35b9a7a7c0609232849fcbb51efcc (patch) | |
tree | 15f08a8c276e885ce6abc685114e4782e27e1546 /sc/inc | |
parent | de68bb85145e68fc170b8eab0fa3357cd7165421 (diff) |
Resolves: tdf#88792 do not hold a ScFormulaCell** in group area listener
... as the mdds storage segment may change when a formula cell is
inserted at a position such that two segments are merged into a new one.
Change-Id: I449a89005418aff7ea12099ea931b786959dbc3b
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 1 | ||||
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/inc/grouparealistener.hxx | 10 | ||||
-rw-r--r-- | sc/inc/table.hxx | 1 |
4 files changed, 11 insertions, 3 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 1911a9535e24..b5b9f0c99093 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -361,6 +361,7 @@ public: void GetFormula( SCROW nRow, OUString& rFormula ) const; const ScFormulaCell* GetFormulaCell( SCROW nRow ) const; ScFormulaCell* GetFormulaCell( SCROW nRow ); + ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow ) const; CellType GetCellType( SCROW nRow ) const; SCSIZE GetCellCount() const; sal_uInt32 GetWeightedCount() const; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index d3fe564ddc19..4c8aea481143 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -79,6 +79,7 @@ struct SetFormulaDirtyContext; class RefMovedHint; struct SortUndoParam; struct ReorderParam; +class FormulaGroupAreaListener; } @@ -266,6 +267,7 @@ friend class ScDocumentImport; friend class sc::DocumentStreamAccess; friend class sc::ColumnSpanSet; friend class sc::EditTextIterator; +friend class sc::FormulaGroupAreaListener; typedef ::std::vector<ScTable*> TableContainer; private: diff --git a/sc/inc/grouparealistener.hxx b/sc/inc/grouparealistener.hxx index 9fa4e3dd7a98..71de7ee29586 100644 --- a/sc/inc/grouparealistener.hxx +++ b/sc/inc/grouparealistener.hxx @@ -16,6 +16,8 @@ #include <svl/listener.hxx> class ScFormulaCell; +class ScDocument; +class ScColumn; namespace sc { @@ -24,7 +26,8 @@ class BulkDataHint; class FormulaGroupAreaListener : public SvtListener { ScRange maRange; - ScFormulaCell** mppTopCell; + const ScColumn* mpColumn; + SCROW mnTopCellRow; SCROW mnGroupLen; bool mbStartFixed; bool mbEndFixed; @@ -33,8 +36,8 @@ class FormulaGroupAreaListener : public SvtListener public: - FormulaGroupAreaListener( - const ScRange& rRange, ScFormulaCell** ppTopCell, SCROW nGroupLen, bool bStartFixed, bool bEndFixed ); + FormulaGroupAreaListener( const ScRange& rRange, const ScDocument& rDocument, + const ScAddress& rTopCellPos, SCROW nGroupLen, bool bStartFixed, bool bEndFixed ); virtual ~FormulaGroupAreaListener(); @@ -64,6 +67,7 @@ public: private: void notifyCellChange( const SfxHint& rHint, const ScAddress& rPos ); void notifyBulkChange( const BulkDataHint& rHint ); + const ScFormulaCell* getTopCell() const; }; } diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index a05f5da9741c..e6857f2d1fca 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -220,6 +220,7 @@ friend class ScDocumentImport; friend class sc::DocumentStreamAccess; friend class sc::ColumnSpanSet; friend class sc::EditTextIterator; +friend class sc::FormulaGroupAreaListener; public: ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName, |