summaryrefslogtreecommitdiff
path: root/sc/source/core/data/column.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/column.cxx')
-rw-r--r--sc/source/core/data/column.cxx103
1 files changed, 54 insertions, 49 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 350b5b19a67f..5c9b00ee12a1 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -88,11 +88,10 @@ ScColumn::ScColumn() :
maBroadcasters(MAXROWCOUNT),
maCellsEvent(this),
maCells(maCellsEvent),
- nCol( 0 ),
- nTab( 0 ),
pAttrArray( nullptr ),
- pDocument( nullptr ),
- mnBlkCountFormula(0)
+ mnBlkCountFormula(0),
+ nCol( 0 ),
+ nTab( 0 )
{
maCells.resize(MAXROWCOUNT);
}
@@ -107,11 +106,10 @@ void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool bEmptyA
{
nCol = nNewCol;
nTab = nNewTab;
- pDocument = pDoc;
if ( !bEmptyAttrArray )
- pAttrArray = new ScAttrArray( nCol, nTab, pDocument, &pDocument->maTabs[nTab]->aNextColAttrArray, bEmptyAttrArray );
+ pAttrArray = new ScAttrArray( nCol, nTab, pDoc, &pDoc->maTabs[nTab]->aNextColAttrArray, bEmptyAttrArray );
else
- pAttrArray = new ScAttrArray( nCol, nTab, pDocument, nullptr, true );
+ pAttrArray = new ScAttrArray( nCol, nTab, pDoc, nullptr, true );
}
SCsROW ScColumn::GetNextUnprotected( SCROW nRow, bool bUp ) const
@@ -276,7 +274,7 @@ bool ScColumn::HasSelectionMatrixFragment(const ScMarkData& rMark) const
aCurOrigin = aOrigin;
const ScFormulaCell* pFCell;
if (pCell->GetMatrixFlag() == MM_REFERENCE)
- pFCell = pDocument->GetFormulaCell(aOrigin);
+ pFCell = GetDoc()->GetFormulaCell(aOrigin);
else
pFCell = pCell;
@@ -388,7 +386,7 @@ const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW nStartRow, SCROW nEndRo
const ScPatternAttr* pMaxPattern = nullptr;
size_t nMaxCount = 0;
- ScAttrIterator aAttrIter( pAttrArray, nStartRow, nEndRow, pDocument->GetDefPattern() );
+ ScAttrIterator aAttrIter( pAttrArray, nStartRow, nEndRow, GetDoc()->GetDefPattern() );
const ScPatternAttr* pPattern;
SCROW nAttrRow1 = 0, nAttrRow2 = 0;
@@ -408,6 +406,7 @@ const ScPatternAttr* ScColumn::GetMostUsedPattern( SCROW nStartRow, SCROW nEndRo
sal_uInt32 ScColumn::GetNumberFormat( SCROW nStartRow, SCROW nEndRow ) const
{
+ ScDocument* pDocument = GetDoc();
SCROW nPatStartRow, nPatEndRow;
const ScPatternAttr* pPattern = pAttrArray->GetPatternRange(nPatStartRow, nPatEndRow, nStartRow);
sal_uInt32 nFormat = pPattern->GetNumberFormat(pDocument->GetFormatTable());
@@ -424,7 +423,7 @@ sal_uInt32 ScColumn::GetNumberFormat( SCROW nStartRow, SCROW nEndRow ) const
sal_uInt32 ScColumn::GetNumberFormat( SCROW nRow ) const
{
- return pAttrArray->GetPattern( nRow )->GetNumberFormat( pDocument->GetFormatTable() );
+ return pAttrArray->GetPattern( nRow )->GetNumberFormat( GetDoc()->GetFormatTable() );
}
SCsROW ScColumn::ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray )
@@ -493,7 +492,7 @@ void ScColumn::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rM
void ScColumn::ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
{
const SfxItemSet* pSet = &rPatAttr.GetItemSet();
- SfxItemPoolCache aCache( pDocument->GetPool(), pSet );
+ SfxItemPoolCache aCache( GetDoc()->GetPool(), pSet );
const ScPatternAttr* pPattern = pAttrArray->GetPattern( nRow );
@@ -509,7 +508,7 @@ void ScColumn::ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPattern
ScEditDataArray* pDataArray )
{
const SfxItemSet* pSet = &rPatAttr.GetItemSet();
- SfxItemPoolCache aCache( pDocument->GetPool(), pSet );
+ SfxItemPoolCache aCache( GetDoc()->GetPool(), pSet );
pAttrArray->ApplyCacheArea( nStartRow, nEndRow, &aCache, pDataArray );
}
@@ -517,8 +516,8 @@ void ScColumn::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, short nNewType )
{
const SfxItemSet* pSet = &rPattern.GetItemSet();
- SfxItemPoolCache aCache( pDocument->GetPool(), pSet );
- SvNumberFormatter* pFormatter = pDocument->GetFormatTable();
+ SfxItemPoolCache aCache( GetDoc()->GetPool(), pSet );
+ SvNumberFormatter* pFormatter = GetDoc()->GetFormatTable();
SCROW nEndRow = rRange.aEnd.Row();
for ( SCROW nRow = rRange.aStart.Row(); nRow <= nEndRow; nRow++ )
{
@@ -611,6 +610,7 @@ const ScStyleSheet* ScColumn::GetSelectionStyle( const ScMarkData& rMark, bool&
const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
+ ScDocument* pDocument = GetDoc();
ScMultiSelIter aMultiIter( rMark.GetMultiSelData(), nCol );
SCROW nTop;
SCROW nBottom;
@@ -642,7 +642,7 @@ const ScStyleSheet* ScColumn::GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRo
const ScStyleSheet* pStyle = nullptr;
const ScStyleSheet* pNewStyle;
- ScAttrIterator aAttrIter( pAttrArray, nRow1, nRow2, pDocument->GetDefPattern() );
+ ScAttrIterator aAttrIter( pAttrArray, nRow1, nRow2, GetDoc()->GetDefPattern() );
SCROW nRow;
SCROW nDummy;
const ScPatternAttr* pPattern;
@@ -699,7 +699,7 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )
// in order to only create a new SetItem, we don't need SfxItemPoolCache.
//TODO: Warning: SfxItemPoolCache seems to create to many Refs for the new SetItem ??
- ScDocumentPool* pDocPool = pDocument->GetPool();
+ ScDocumentPool* pDocPool = GetDoc()->GetPool();
const ScPatternAttr* pOldPattern = pAttrArray->GetPattern( nRow );
std::unique_ptr<ScPatternAttr> pTemp(new ScPatternAttr(*pOldPattern));
@@ -928,7 +928,7 @@ public:
std::vector<EditTextObject*> aCloned;
aCloned.reserve(nDataSize);
for (; it != itEnd; ++it)
- aCloned.push_back(ScEditUtil::Clone(**it, mrDestCol.GetDoc()));
+ aCloned.push_back(ScEditUtil::Clone(**it, *mrDestCol.GetDoc()));
maDestPos.miCellPos = mrDestCol.GetCellStore().set(
maDestPos.miCellPos, nTopRow, aCloned.begin(), aCloned.end());
@@ -947,10 +947,10 @@ public:
for (; it != itEnd; ++it, aDestPos.IncRow())
{
const ScFormulaCell& rOld = **it;
- if (rOld.GetDirty() && mrSrcCol.GetDoc().GetAutoCalc())
+ if (rOld.GetDirty() && mrSrcCol.GetDoc()->GetAutoCalc())
const_cast<ScFormulaCell&>(rOld).Interpret();
- aCloned.push_back(new ScFormulaCell(rOld, mrDestCol.GetDoc(), aDestPos));
+ aCloned.push_back(new ScFormulaCell(rOld, *mrDestCol.GetDoc(), aDestPos));
}
// Group the cloned formula cells.
@@ -1047,6 +1047,7 @@ void ScColumn::CopyStaticToDocument(
aDestPos.miCellPos = rDestCol.maCells.begin();
+ ScDocument* pDocument = GetDoc();
std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nRow1);
sc::CellStoreType::const_iterator it = aPos.first;
size_t nOffset = aPos.second;
@@ -1158,6 +1159,7 @@ void ScColumn::CopyStaticToDocument(
void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDestCol )
{
+ ScDocument* pDocument = GetDoc();
std::pair<sc::CellStoreType::const_iterator,size_t> aPos = maCells.position(nSrcRow);
sc::CellStoreType::const_iterator it = aPos.first;
bool bSet = true;
@@ -1172,10 +1174,10 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
case sc::element_type_edittext:
{
EditTextObject* p = sc::edittext_block::at(*it->data, aPos.second);
- if (pDocument == rDestCol.pDocument)
+ if (pDocument == rDestCol.GetDoc())
rDestCol.maCells.set(nDestRow, p->Clone());
else
- rDestCol.maCells.set(nDestRow, ScEditUtil::Clone(*p, *rDestCol.pDocument));
+ rDestCol.maCells.set(nDestRow, ScEditUtil::Clone(*p, *rDestCol.GetDoc()));
}
break;
case sc::element_type_formula:
@@ -1186,7 +1188,7 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
ScAddress aDestPos = p->aPos;
aDestPos.SetRow(nDestRow);
- ScFormulaCell* pNew = new ScFormulaCell(*p, *rDestCol.pDocument, aDestPos);
+ ScFormulaCell* pNew = new ScFormulaCell(*p, *rDestCol.GetDoc(), aDestPos);
rDestCol.SetFormulaCell(nDestRow, pNew);
}
break;
@@ -1204,7 +1206,7 @@ void ScColumn::CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDes
if (pNote)
{
pNote = pNote->Clone(ScAddress(nCol, nSrcRow, nTab),
- rDestCol.GetDoc(),
+ *rDestCol.GetDoc(),
ScAddress(rDestCol.nCol, nDestRow, rDestCol.nTab),
false);
rDestCol.maCellNotes.set(nDestRow, pNote);
@@ -1265,7 +1267,7 @@ class CopyAsLinkHandler
ScTokenArray aArr;
aArr.AddSingleReference(aRef);
- return new ScFormulaCell(&mrDestCol.GetDoc(), ScAddress(mrDestCol.GetCol(), nRow, mrDestCol.GetTab()), aArr);
+ return new ScFormulaCell(mrDestCol.GetDoc(), ScAddress(mrDestCol.GetCol(), nRow, mrDestCol.GetTab()), aArr);
}
void createRefBlock(const sc::CellStoreType::value_type& aNode, size_t nOffset, size_t nDataSize)
@@ -1338,7 +1340,7 @@ public:
ScAddress aSrcPos(mrSrcCol.GetCol(), nRow, mrSrcCol.GetTab());
for (; it != itEnd; ++it, aSrcPos.IncRow(), ++nRow)
{
- if (!canCopyValue(mrSrcCol.GetDoc(), aSrcPos, mnCopyFlags))
+ if (!canCopyValue(*mrSrcCol.GetDoc(), aSrcPos, mnCopyFlags))
continue;
maDestPos.miCellPos = mrDestCol.GetCellStore().set(maDestPos.miCellPos, nRow, createRefCell(nRow));
@@ -1422,14 +1424,14 @@ class CopyByCloneHandler
if (bForceFormula || bCloneFormula)
{
// Clone as formula cell.
- ScFormulaCell* pCell = new ScFormulaCell(rSrcCell, mrDestCol.GetDoc(), aDestPos, mnFormulaCellCloneFlags);
+ ScFormulaCell* pCell = new ScFormulaCell(rSrcCell, *mrDestCol.GetDoc(), aDestPos, mnFormulaCellCloneFlags);
pCell->SetDirtyVar();
mrDestCol.SetFormulaCell(maDestPos, nRow, pCell, meListenType);
setDefaultAttrToDest(nRow);
return;
}
- if (mrDestCol.GetDoc().IsUndo())
+ if (mrDestCol.GetDoc()->IsUndo())
return;
if (bCloneValue)
@@ -1438,7 +1440,7 @@ class CopyByCloneHandler
if (nErr != FormulaError::NONE)
{
// error codes are cloned with values
- ScFormulaCell* pErrCell = new ScFormulaCell(&mrDestCol.GetDoc(), aDestPos);
+ ScFormulaCell* pErrCell = new ScFormulaCell(mrDestCol.GetDoc(), aDestPos);
pErrCell->SetErrCode(nErr);
mrDestCol.SetFormulaCell(maDestPos, nRow, pErrCell, meListenType);
setDefaultAttrToDest(nRow);
@@ -1450,7 +1452,7 @@ class CopyByCloneHandler
{
if (rSrcCell.IsValue())
{
- if (canCopyValue(mrSrcCol.GetDoc(), ScAddress(mrSrcCol.GetCol(), nRow, mrSrcCol.GetTab()), mnCopyFlags))
+ if (canCopyValue(*mrSrcCol.GetDoc(), ScAddress(mrSrcCol.GetCol(), nRow, mrSrcCol.GetTab()), mnCopyFlags))
{
maDestPos.miCellPos = mrDestCol.GetCellStore().set(
maDestPos.miCellPos, nRow, rSrcCell.GetValue());
@@ -1471,7 +1473,7 @@ class CopyByCloneHandler
if (rSrcCell.IsMultilineResult())
{
// Clone as an edit text object.
- EditEngine& rEngine = mrDestCol.GetDoc().GetEditEngine();
+ EditEngine& rEngine = mrDestCol.GetDoc()->GetEditEngine();
rEngine.SetText(aStr.getString());
maDestPos.miCellPos =
mrDestCol.GetCellStore().set(maDestPos.miCellPos, nRow, rEngine.CreateTextObject());
@@ -1557,7 +1559,7 @@ public:
ScAddress aSrcPos(mrSrcCol.GetCol(), nRow, mrSrcCol.GetTab());
for (; it != itEnd; ++it, aSrcPos.IncRow(), ++nRow)
{
- if (!canCopyValue(mrSrcCol.GetDoc(), aSrcPos, mnCopyFlags))
+ if (!canCopyValue(*mrSrcCol.GetDoc(), aSrcPos, mnCopyFlags))
continue;
maDestPos.miCellPos = mrDestCol.GetCellStore().set(maDestPos.miCellPos, nRow, *it);
@@ -1618,7 +1620,7 @@ public:
std::vector<EditTextObject*> aCloned;
aCloned.reserve(nDataSize);
for (; it != itEnd; ++it)
- aCloned.push_back(ScEditUtil::Clone(**it, mrDestCol.GetDoc()));
+ aCloned.push_back(ScEditUtil::Clone(**it, *mrDestCol.GetDoc()));
maDestPos.miCellPos = mrDestCol.GetCellStore().set(
maDestPos.miCellPos, nRow, aCloned.begin(), aCloned.end());
@@ -1703,8 +1705,8 @@ void ScColumn::CopyToColumn(
// Compare the ScDocumentPool* to determine if we are copying
// within the same document. If not, re-intern shared strings.
svl::SharedStringPool* pSharedStringPool =
- (pDocument->GetPool() != rColumn.pDocument->GetPool()) ?
- &rColumn.pDocument->GetSharedStringPool() : nullptr;
+ (GetDoc()->GetPool() != rColumn.GetDoc()->GetPool()) ?
+ &rColumn.GetDoc()->GetSharedStringPool() : nullptr;
CopyByCloneHandler aFunc(*this, rColumn, rCxt.getBlockPosition(rColumn.nTab, rColumn.nCol), nFlags,
pSharedStringPool, bGlobalNamesToLocal);
aFunc.setStartListening(rCxt.isStartListening());
@@ -1755,6 +1757,7 @@ void ScColumn::CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const
void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
{
// This is the scenario table, the data is copied into it
+ ScDocument* pDocument = GetDoc();
ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, pDocument->GetDefPattern() );
SCROW nStart = -1, nEnd = -1;
const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
@@ -1783,6 +1786,7 @@ void ScColumn::CopyScenarioFrom( const ScColumn& rSrcCol )
void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
{
// This is the scenario table, the data is copied to the other
+ ScDocument* pDocument = GetDoc();
ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, pDocument->GetDefPattern() );
SCROW nStart = -1, nEnd = -1;
const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
@@ -1791,7 +1795,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
if ( static_cast<const ScMergeFlagAttr&>(pPattern->GetItem( ATTR_MERGE_FLAG )).IsScenario() )
{
rDestCol.DeleteArea( nStart, nEnd, InsertDeleteFlags::CONTENTS );
- sc::CopyToDocContext aCxt(*rDestCol.pDocument);
+ sc::CopyToDocContext aCxt(*rDestCol.GetDoc());
CopyToColumn(aCxt, nStart, nEnd, InsertDeleteFlags::CONTENTS, false, rDestCol);
sc::RefUpdateContext aRefCxt(*pDocument);
@@ -1808,7 +1812,7 @@ void ScColumn::CopyScenarioTo( ScColumn& rDestCol ) const
bool ScColumn::TestCopyScenarioTo( const ScColumn& rDestCol ) const
{
bool bOk = true;
- ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, pDocument->GetDefPattern() );
+ ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, GetDoc()->GetDefPattern() );
SCROW nStart = 0, nEnd = 0;
const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
while (pPattern && bOk)
@@ -1826,7 +1830,7 @@ void ScColumn::MarkScenarioIn( ScMarkData& rDestMark ) const
{
ScRange aRange( nCol, 0, nTab );
- ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, pDocument->GetDefPattern() );
+ ScAttrIterator aAttrIter( pAttrArray, 0, MAXROW, GetDoc()->GetDefPattern() );
SCROW nStart = -1, nEnd = -1;
const ScPatternAttr* pPattern = aAttrIter.Next( nStart, nEnd );
while (pPattern)
@@ -1963,6 +1967,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol)
rCol.CellStorageModified();
// Broadcast on moved ranges. Area-broadcast only.
+ ScDocument* pDocument = GetDoc();
ScHint aHint(SC_HINT_DATACHANGED, ScAddress(nCol, 0, nTab));
ScAddress& rPos = aHint.GetAddress();
sc::SingleColumnSpanSet::SpansType::const_iterator itRange = aRanges.begin(), itRangeEnd = aRanges.end();
@@ -2391,7 +2396,7 @@ bool ScColumn::UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc
if (rCxt.meMode == URM_COPY)
return UpdateReferenceOnCopy(rCxt, pUndoDoc);
- if (IsEmptyData() || pDocument->IsClipOrUndo())
+ if (IsEmptyData() || GetDoc()->IsClipOrUndo())
// Cells in this column are all empty, or clip or undo doc. No update needed.
return false;
@@ -3140,7 +3145,7 @@ bool ScColumn::IsFormulaDirty( SCROW nRow ) const
void ScColumn::CheckVectorizationState()
{
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
CheckVectorizationHandler aFunc;
sc::ProcessFormula(maCells, aFunc);
}
@@ -3148,8 +3153,8 @@ void ScColumn::CheckVectorizationState()
void ScColumn::SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt )
{
// is only done documentwide, no FormulaTracking
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
- SetDirtyHandler aFunc(*pDocument, rCxt);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
+ SetDirtyHandler aFunc(*GetDoc(), rCxt);
sc::ProcessFormula(maCells, aFunc);
}
@@ -3157,7 +3162,7 @@ void ScColumn::SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rB
{
// Set all formula cells in the range dirty, and pick up all non-formula
// cells for later broadcasting. We don't broadcast here.
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
SetDirtyOnRangeHandler aHdl(*this);
sc::ProcessFormula(maCells.begin(), maCells, nRow1, nRow2, aHdl, aHdl);
@@ -3203,7 +3208,7 @@ bool ScColumn::BroadcastBroadcasters( SCROW nRow1, SCROW nRow2, ScHint& rHint )
void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode eMode )
{
// broadcasts everything within the range, with FormulaTracking
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
switch (eMode)
{
@@ -3235,7 +3240,7 @@ void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode eMode )
// formulas via ScDocument::Broadcast(), which
// BroadcastBroadcastersHandler doesn't, so explicitly
// track them here.
- pDocument->TrackFormulas();
+ GetDoc()->TrackFormulas();
}
}
break;
@@ -3244,7 +3249,7 @@ void ScColumn::SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode eMode )
void ScColumn::SetTableOpDirty( const ScRange& rRange )
{
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
SetTableOpDirtyOnRangeHandler aHdl(*this);
@@ -3254,7 +3259,7 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange )
void ScColumn::SetDirtyAfterLoad()
{
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
SetDirtyAfterLoadHandler aFunc;
sc::ProcessFormula(maCells, aFunc);
}
@@ -3281,14 +3286,14 @@ public:
void ScColumn::SetDirtyIfPostponed()
{
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
SetDirtyIfPostponedHandler aFunc;
sc::ProcessFormula(maCells, aFunc);
}
void ScColumn::BroadcastRecalcOnRefMove()
{
- sc::AutoCalcSwitch aSwitch(*pDocument, false);
+ sc::AutoCalcSwitch aSwitch(*GetDoc(), false);
RecalcOnRefMoveCollector aFunc;
sc::ProcessFormula(maCells, aFunc);
BroadcastCells(aFunc.getDirtyRows(), SC_HINT_DATACHANGED);
@@ -3429,7 +3434,7 @@ void ScColumn::TransferListeners(
}
// Remove any broadcasters that have no listeners.
- RemoveEmptyBroadcasterHandler aFuncRemoveEmpty(*pDocument, nCol, nTab);
+ RemoveEmptyBroadcasterHandler aFuncRemoveEmpty(*GetDoc(), nCol, nTab);
sc::ProcessBroadcaster(maBroadcasters.begin(), maBroadcasters, nRow1, nRow2, aFuncRemoveEmpty);
aFuncRemoveEmpty.purge();
}