Kaydet (Commit) be877a9f authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Clear column data array cache when the document content changes.

Change-Id: I09ffa455e79199e37ca6168753ec9ef4d5aa33dc
üst 0fb33f60
......@@ -2018,6 +2018,11 @@ public:
formula::VectorRefArray FetchVectorRefArray( const ScAddress& rPos, SCROW nLength );
/**
* Called whenever the value of a cell inside the document is modified.
*/
void CellContentModified();
SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
......
......@@ -2862,6 +2862,13 @@ void ScColumn::SetFormulaResults( SCROW nRow, const double* pResults, size_t nLe
rCell.ResetDirty();
rCell.SetChanged(true);
}
std::vector<SCROW> aRows;
aRows.reserve(nLen);
for (size_t i = 0; i < nLen; ++i)
aRows.push_back(nRow+i);
BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
void ScColumn::SetFormulaResults( SCROW nRow, const formula::FormulaTokenRef* pResults, size_t nLen )
......@@ -2888,6 +2895,13 @@ void ScColumn::SetFormulaResults( SCROW nRow, const formula::FormulaTokenRef* pR
rCell.ResetDirty();
rCell.SetChanged(true);
}
std::vector<SCROW> aRows;
aRows.reserve(nLen);
for (size_t i = 0; i < nLen; ++i)
aRows.push_back(nRow+i);
BroadcastCells(aRows, SC_HINT_DATACHANGED);
}
void ScColumn::SetNumberFormat( SCROW nRow, sal_uInt32 nNumberFormat )
......
......@@ -2313,6 +2313,11 @@ ScDocument::NumFmtMergeHandler::~NumFmtMergeHandler()
mpDoc->pFormatExchangeList = NULL;
}
void ScDocument::CellContentModified()
{
mpFormulaGroupCxt.reset();
}
SvtBroadcaster* ScDocument::GetBroadcaster( const ScAddress& rPos )
{
ScTable* pTab = FetchTable(rPos.Tab());
......
......@@ -3047,6 +3047,7 @@ ScDocShellModificator::~ScDocShellModificator()
void ScDocShellModificator::SetDocumentModified()
{
ScDocument* pDoc = rDocShell.GetDocument();
pDoc->CellContentModified();
if ( !pDoc->IsImportingXML() )
{
// AutoCalcShellDisabled temporaer restaurieren
......
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