#i106045# invalidate stream positions for sheet operations, better handling of loaded formula results
This commit is contained in:
parent
2f3859b83e
commit
9634b3fc0d
6 changed files with 50 additions and 2 deletions
|
@ -1641,8 +1641,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
|
|||
if ( eOld == svHybridCell ) // string result from SetFormulaResultString?
|
||||
eOld = svString; // ScHybridCellToken has a valid GetString method
|
||||
|
||||
// #i106045# use approxEqual to compare with stored value
|
||||
bContentChanged = (eOld != eNew ||
|
||||
(eNew == svDouble && aResult.GetDouble() != aNewResult.GetDouble()) ||
|
||||
(eNew == svDouble && !rtl::math::approxEqual( aResult.GetDouble(), aNewResult.GetDouble() )) ||
|
||||
(eNew == svString && aResult.GetString() != aNewResult.GetString()));
|
||||
}
|
||||
}
|
||||
|
@ -1662,7 +1663,8 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
|
|||
if ( bChanged && !bContentChanged && pDocument->IsStreamValid(aPos.Tab()) )
|
||||
{
|
||||
if ( ( eOld == svUnknown && ( eNew == svError || ( eNew == svDouble && aNewResult.GetDouble() == 0.0 ) ) ) ||
|
||||
( eOld == svHybridCell && eNew == svString && aResult.GetString() == aNewResult.GetString() ) )
|
||||
( eOld == svHybridCell && eNew == svString && aResult.GetString() == aNewResult.GetString() ) ||
|
||||
( eOld == svDouble && eNew == svDouble && rtl::math::approxEqual( aResult.GetDouble(), aNewResult.GetDouble() ) ) )
|
||||
{
|
||||
// no change, see above
|
||||
}
|
||||
|
|
|
@ -238,6 +238,9 @@ void ScTable::SetName( const String& rNewName )
|
|||
bIsOlk = bOderSo = TRUE;
|
||||
aName = rNewName;
|
||||
aUpperName.Erase(); // invalidated if the name is changed
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
const String& ScTable::GetUpperName() const
|
||||
|
@ -291,6 +294,9 @@ void ScTable::SetLink( BYTE nMode,
|
|||
aLinkOpt = rOpt; // Filter-Optionen
|
||||
aLinkTab = rTab; // Tabellenname in Quelldatei
|
||||
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
USHORT ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
|
||||
|
@ -1457,17 +1463,26 @@ void ScTable::DoColResize( SCCOL nCol1, SCCOL nCol2, SCSIZE nAdd )
|
|||
void ScTable::SetRepeatColRange( const ScRange* pNew )
|
||||
{
|
||||
SET_PRINTRANGE( pRepeatColRange, pNew );
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
void ScTable::SetRepeatRowRange( const ScRange* pNew )
|
||||
{
|
||||
SET_PRINTRANGE( pRepeatRowRange, pNew );
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
void ScTable::ClearPrintRanges()
|
||||
{
|
||||
aPrintRanges.clear();
|
||||
bPrintEntireSheet = FALSE;
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
void ScTable::AddPrintRange( const ScRange& rNew )
|
||||
|
@ -1475,6 +1490,9 @@ void ScTable::AddPrintRange( const ScRange& rNew )
|
|||
bPrintEntireSheet = FALSE;
|
||||
if( aPrintRanges.size() < 0xFFFF )
|
||||
aPrintRanges.push_back( rNew );
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
//UNUSED2009-05 void ScTable::SetPrintRange( const ScRange& rNew )
|
||||
|
|
|
@ -249,6 +249,9 @@ void ScTable::RemoveManualBreaks()
|
|||
|
||||
if (pRowFlags)
|
||||
pRowFlags->AndValue( 0, MAXROW, sal::static_int_cast<BYTE>(~CR_MANUALBREAK) );
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
BOOL ScTable::HasManualBreaks() const
|
||||
|
@ -287,6 +290,9 @@ void ScTable::SetProtection(const ScTableProtection* pProtect)
|
|||
pTabProtection.reset(new ScTableProtection(*pProtect));
|
||||
else
|
||||
pTabProtection.reset(NULL);
|
||||
|
||||
if (IsStreamValid())
|
||||
SetStreamValid(FALSE);
|
||||
}
|
||||
|
||||
ScTableProtection* ScTable::GetProtection()
|
||||
|
|
|
@ -172,6 +172,10 @@ void __EXPORT ScAreaLink::Closed()
|
|||
bAddUndo = FALSE; // nur einmal
|
||||
}
|
||||
|
||||
SCTAB nDestTab = aDestArea.aStart.Tab();
|
||||
if (pDoc->IsStreamValid(nDestTab))
|
||||
pDoc->SetStreamValid(nDestTab, FALSE);
|
||||
|
||||
SvBaseLink::Closed();
|
||||
}
|
||||
|
||||
|
|
|
@ -3079,6 +3079,9 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
|
|||
pDoc->SetRowFlags( static_cast<SCROW>(nPos), nTab, nFlags );
|
||||
pDoc->UpdatePageBreaks( nTab );
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
if (bColumn)
|
||||
{
|
||||
rDocShell.PostPaint( static_cast<SCCOL>(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID );
|
||||
|
@ -3135,6 +3138,9 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
|
|||
pDoc->SetRowFlags( static_cast<SCROW>(nPos), nTab, nFlags );
|
||||
pDoc->UpdatePageBreaks( nTab );
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
if (bColumn)
|
||||
{
|
||||
rDocShell.PostPaint( static_cast<SCCOL>(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID );
|
||||
|
|
|
@ -137,6 +137,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b
|
|||
pUndoTab, bColumns, TRUE ) );
|
||||
}
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
USHORT nParts = 0; // Datenbereich nicht geaendert
|
||||
if ( bColumns )
|
||||
nParts |= PAINT_TOP;
|
||||
|
@ -200,6 +203,9 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL
|
|||
pUndoTab, bColumns, FALSE ) );
|
||||
}
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
USHORT nParts = 0; // Datenbereich nicht geaendert
|
||||
if ( bColumns )
|
||||
nParts |= PAINT_TOP;
|
||||
|
@ -265,6 +271,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi )
|
|||
|
||||
pDoc->UpdatePageBreaks( nTab );
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
|
||||
PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
|
||||
rDocShell.SetDocumentModified();
|
||||
|
@ -333,6 +342,9 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA
|
|||
pUndoDoc, pUndoTab ) );
|
||||
}
|
||||
|
||||
if (pDoc->IsStreamValid(nTab))
|
||||
pDoc->SetStreamValid(nTab, FALSE);
|
||||
|
||||
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE );
|
||||
rDocShell.SetDocumentModified();
|
||||
lcl_InvalidateOutliner( rDocShell.GetViewBindings() );
|
||||
|
|
Loading…
Reference in a new issue