summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 09:49:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-14 13:05:39 +0200
commitdb12ecd5d77670db5a61fb16b9372d7fd7da858c (patch)
treeeb9c7c44624a1686b04af8e15d369652bbfe03d1
parentf2de8a282a131f0294c41fa994083df47d5d61f0 (diff)
simplify calls to IsStreamValid/SetStreamValid
just add a short-circuit check inside SetStreamValid, and we can simplify all of the call sites Change-Id: Ib3d19455c60fe9569faf548b1fefbc274d03574c Reviewed-on: https://gerrit.libreoffice.org/42267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/core/data/attarray.cxx12
-rw-r--r--sc/source/core/data/documen7.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/table1.cxx33
-rw-r--r--sc/source/core/data/table2.cxx50
-rw-r--r--sc/source/core/data/table5.cxx23
-rw-r--r--sc/source/core/tool/detfunc.cxx3
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx3
-rw-r--r--sc/source/ui/docshell/arealink.cxx3
-rw-r--r--sc/source/ui/docshell/docfunc.cxx18
-rw-r--r--sc/source/ui/docshell/docsh.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx3
-rw-r--r--sc/source/ui/docshell/olinefun.cxx12
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx3
-rw-r--r--sc/source/ui/view/formatsh.cxx3
16 files changed, 65 insertions, 111 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 89cc629c6c4c..9109336115ca 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -147,8 +147,7 @@ void ScAttrArray::Reset( const ScPatternAttr* pPattern )
}
mvData.resize(0);
- if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, false);
+ pDocument->SetStreamValid(nTab, false);
mvData.resize(1);
const ScPatternAttr* pNewPattern = static_cast<const ScPatternAttr*>( &pDocPool->Put(*pPattern) );
@@ -597,8 +596,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
RemoveCellCharAttribs(nStartRow, nEndRow, pPattern, pDataArray);
}
- if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, false);
+ pDocument->SetStreamValid(nTab, false);
}
}
@@ -675,8 +673,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
}
while ((nStart <= nEndRow) && (nPos < mvData.size()));
- if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, false);
+ pDocument->SetStreamValid(nTab, false);
}
#if DEBUG_SC_TESTATTRARRAY
@@ -903,8 +900,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac
}
while (nStart <= nEndRow);
- if (pDocument->IsStreamValid(nTab))
- pDocument->SetStreamValid(nTab, false);
+ pDocument->SetStreamValid(nTab, false);
}
#if DEBUG_SC_TESTATTRARRAY
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 299f5e70d089..8292a04deb27 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -75,7 +75,7 @@ void ScDocument::Broadcast( const ScHint& rHint )
if ( rHint.GetAddress() != BCA_BRDCST_ALWAYS )
{
SCTAB nTab = rHint.GetAddress().Tab();
- if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && maTabs[nTab]->IsStreamValid())
+ if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
maTabs[nTab]->SetStreamValid(false);
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 961f6456235d..8070b6f6df5c 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -248,7 +248,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
InvalidateTextWidth( nullptr, nullptr, bNumFormatChanged );
for (SCTAB nTab=0; nTab<=MAXTAB; ++nTab)
- if (maTabs[nTab] && maTabs[nTab]->IsStreamValid())
+ if (maTabs[nTab])
maTabs[nTab]->SetStreamValid( false );
sal_uLong nOldFormat =
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 90d37f08485c..86b57f4077e6 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -911,7 +911,7 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc
// but the XML stream must be re-generated.
TableContainer::iterator it = maTabs.begin();
for (; it != maTabs.end(); ++it)
- if ( *it && (*it)->IsStreamValid())
+ if ( *it )
(*it)->SetStreamValid( false );
if (comphelper::LibreOfficeKit::isActive() && GetDrawLayer())
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index c2416406abb4..ced6c3474f95 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -386,7 +386,7 @@ const OUString& ScTable::GetUpperName() const
void ScTable::SetVisible( bool bVis )
{
- if (bVisible != bVis && IsStreamValid())
+ if (bVisible != bVis)
SetStreamValid(false);
bVisible = bVis;
@@ -394,6 +394,8 @@ void ScTable::SetVisible( bool bVis )
void ScTable::SetStreamValid( bool bSet, bool bIgnoreLock )
{
+ if (!bStreamValid && !bSet)
+ return; // shortcut
if ( bIgnoreLock || !pDocument->IsStreamValidLocked() )
bStreamValid = bSet;
}
@@ -419,8 +421,7 @@ void ScTable::SetTabBgColor(const Color& rColor)
{
// The tab color has changed. Set this table 'modified'.
aTabBgColor = rColor;
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
}
@@ -440,8 +441,7 @@ void ScTable::SetLink( ScLinkMode nMode,
aLinkTab = rTab; // Sheet name in source file
nLinkRefreshDelay = nRefreshDelay; // refresh delay in seconds, 0==off
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
sal_uInt16 ScTable::GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
@@ -1668,7 +1668,7 @@ void ScTable::UpdateReference(
}
}
- if (bUpdated && IsStreamValid())
+ if (bUpdated)
SetStreamValid(false);
if(mpCondFormatList)
@@ -1717,8 +1717,7 @@ void ScTable::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
for (SCCOL i=0; i < aCol.size(); i++)
aCol[i].UpdateInsertTab(rCxt);
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
@@ -1747,8 +1746,7 @@ void ScTable::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
for (SCCOL i = 0; i < aCol.size(); ++i)
aCol[i].UpdateDeleteTab(rCxt);
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::UpdateMoveTab(
@@ -1776,8 +1774,7 @@ void ScTable::UpdateMoveTab(
pProgress->SetState(pProgress->GetState() + aCol[i].GetCodeCount());
}
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::UpdateCompile( bool bForceIfNameInUse )
@@ -2016,8 +2013,7 @@ void ScTable::SetRepeatColRange( const ScRange* pNew )
{
setPrintRange( pRepeatColRange, pNew );
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
InvalidatePageBreaks();
}
@@ -2026,8 +2022,7 @@ void ScTable::SetRepeatRowRange( const ScRange* pNew )
{
setPrintRange( pRepeatRowRange, pNew );
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
InvalidatePageBreaks();
}
@@ -2037,8 +2032,7 @@ void ScTable::ClearPrintRanges()
aPrintRanges.clear();
bPrintEntireSheet = false;
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
InvalidatePageBreaks(); // #i117952# forget page breaks for an old print range
}
@@ -2049,8 +2043,7 @@ void ScTable::AddPrintRange( const ScRange& rNew )
if( aPrintRanges.size() < 0xFFFF )
aPrintRanges.push_back( rNew );
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
InvalidatePageBreaks();
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d14e699db9a3..bf6ca8ffae94 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -132,8 +132,7 @@ void ScTable::SetSheetEvents( const ScSheetEvents* pNew )
SetCalcNotification( false ); // discard notifications before the events were set
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::SetCalcNotification( bool bSet )
@@ -197,10 +196,9 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE
InvalidatePageBreaks();
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
void ScTable::DeleteRow(
@@ -256,10 +254,9 @@ void ScTable::DeleteRow(
InvalidatePageBreaks();
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
bool ScTable::TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const
@@ -350,10 +347,9 @@ void ScTable::InsertCol(
InvalidatePageBreaks();
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
void ScTable::DeleteCol(
@@ -419,10 +415,9 @@ void ScTable::DeleteCol(
InvalidatePageBreaks();
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
void ScTable::DeleteArea(
@@ -452,10 +447,9 @@ void ScTable::DeleteArea(
mpCondFormatList->DeleteArea( nCol1, nRow1, nCol2, nRow2 );
}
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast )
@@ -488,10 +482,9 @@ void ScTable::DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMa
ApplySelectionCache( &aCache, rMark );
}
- if (IsStreamValid())
- // TODO: In the future we may want to check if the table has been
- // really modified before setting the stream invalid.
- SetStreamValid(false);
+ // TODO: In the future we may want to check if the table has been
+ // really modified before setting the stream invalid.
+ SetStreamValid(false);
}
// pTable = Clipboard
@@ -3722,7 +3715,7 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
// #i102616# actions that modify the draw page size count as sheet modification
// (exception: InitDrawLayer)
- if (bResetStreamValid && IsStreamValid())
+ if (bResetStreamValid)
SetStreamValid(false);
}
@@ -3732,8 +3725,7 @@ void ScTable::SetRangeName(ScRangeName* pNew)
mpRangeName = pNew;
//fdo#39792: mark stream as invalid, otherwise new ScRangeName will not be written to file
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
ScRangeName* ScTable::GetRangeName() const
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index de411231e13e..7d66956eef23 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -307,8 +307,7 @@ void ScTable::RemoveManualBreaks()
maColManualBreaks.clear();
InvalidatePageBreaks();
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
bool ScTable::HasManualBreaks() const
@@ -320,16 +319,14 @@ void ScTable::SetRowManualBreaks( const ::std::set<SCROW>& rBreaks )
{
maRowManualBreaks = rBreaks;
InvalidatePageBreaks();
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::SetColManualBreaks( const ::std::set<SCCOL>& rBreaks )
{
maColManualBreaks = rBreaks;
InvalidatePageBreaks();
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) const
@@ -591,8 +588,7 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
if (bChanged)
{
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
{ // Scoped bulk broadcast.
// Only subtotal formula cells will accept the notification of
@@ -619,10 +615,7 @@ void ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
bChanged = mpHiddenCols->setFalse(nStartCol, nEndCol);
if (bChanged)
- {
- if (IsStreamValid())
- SetStreamValid(false);
- }
+ SetStreamValid(false);
}
void ScTable::CopyColHidden(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
@@ -1064,8 +1057,7 @@ void ScTable::SetProtection(const ScTableProtection* pProtect)
else
pTabProtection.reset();
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
ScTableProtection* ScTable::GetProtection()
@@ -1161,8 +1153,7 @@ void ScTable::SetPageStyle( const OUString& rName )
if ( pNewStyle ) // also without the old one (for UpdateStdNames)
aPageStyle = aStrNew;
- if (IsStreamValid())
- SetStreamValid(false);
+ SetStreamValid(false);
}
}
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 57db80d0b553..c0ea9f4626d0 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -271,8 +271,7 @@ void ScCommentData::UpdateCaptionSet( const SfxItemSet& rItemSet )
void ScDetectiveFunc::Modified()
{
- if (pDoc->IsStreamValid(nTab))
- pDoc->SetStreamValid(nTab, false);
+ pDoc->SetStreamValid(nTab, false);
}
inline bool Intersect( SCCOL nStartCol1, SCROW nStartRow1, SCCOL nEndCol1, SCROW nEndRow1,
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 05f84ef5d756..6e87a29d4f57 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -704,8 +704,7 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC
{
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
}
}
else
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 4e4c8ab847af..b81513afd987 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -161,8 +161,7 @@ void ScAreaLink::Closed()
}
SCTAB nDestTab = aDestArea.aStart.Tab();
- if (rDoc.IsStreamValid(nDestTab))
- rDoc.SetStreamValid(nDestTab, false);
+ rDoc.SetStreamValid(nDestTab, false);
SvBaseLink::Closed();
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 308fc524ff64..210bd18e33a2 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -114,8 +114,7 @@ IMPL_LINK( ScDocFunc, NotifyDrawUndo, SdrUndoAction*, pUndoAction, void )
ScDocument& rDoc = rDocShell.GetDocument();
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
}
// paint row above the range (because of lines after AdjustRowHeight)
@@ -1212,8 +1211,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow )
if( rDoc.IsUndoEnabled() )
rDocShell.GetUndoManager()->AddUndoAction( new ScUndoShowHideNote( rDocShell, rPos, bShow ) );
- if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), false);
+ rDoc.SetStreamValid(rPos.Tab(), false);
ScTabView::OnLOKNoteStateChanged(pNote);
@@ -1242,8 +1240,7 @@ void ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool
//! Undo !!!
- if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), false);
+ rDoc.SetStreamValid(rPos.Tab(), false);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -1297,8 +1294,7 @@ void ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c
// repaint cell (to make note marker visible)
rDocShell.PostPaintCell( rPos );
- if (rDoc.IsStreamValid(rPos.Tab()))
- rDoc.SetStreamValid(rPos.Tab(), false);
+ rDoc.SetStreamValid(rPos.Tab(), false);
aModificator.SetDocumentModified();
@@ -3679,8 +3675,7 @@ bool ScDocFunc::InsertPageBreak( bool bColumn, const ScAddress& rPos,
rDoc.InvalidatePageBreaks(nTab);
rDoc.UpdatePageBreaks( nTab );
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
if (bColumn)
{
@@ -3743,8 +3738,7 @@ bool ScDocFunc::RemovePageBreak( bool bColumn, const ScAddress& rPos,
rDoc.UpdatePageBreaks( nTab );
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
if (bColumn)
{
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 1eea60ecd5d4..19116b128b5e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3102,10 +3102,8 @@ void ScDocShell::UseSheetSaveEntries()
{
// if no positions were set (for example, export to other format),
// reset all "valid" flags
-
for (nTab = 0; nTab < nTabCount; ++nTab)
- if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, false);
+ aDocument.SetStreamValid(nTab, false);
}
}
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 9dc6b4bd97af..2067d04761e7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1284,8 +1284,7 @@ void ScDocShell::DoHardRecalc()
// use hard recalc also to disable stream-copying of all sheets
// (somewhat consistent with charts)
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (aDocument.IsStreamValid(nTab))
- aDocument.SetStreamValid(nTab, false);
+ aDocument.SetStreamValid(nTab, false);
PostPaintGridAll();
}
diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx
index 7e5277232d72..aaa8f3ede600 100644
--- a/sc/source/ui/docshell/olinefun.cxx
+++ b/sc/source/ui/docshell/olinefun.cxx
@@ -110,8 +110,7 @@ void ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool b
pUndoTab, bColumns, true ) );
}
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
PaintPartFlags nParts = PaintPartFlags::NONE; // Data range hasn't been changed
if ( bColumns )
@@ -173,8 +172,7 @@ void ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool
pUndoTab, bColumns, false ) );
}
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
PaintPartFlags nParts = PaintPartFlags::NONE; // Data range hasn't been changed
if ( bColumns )
@@ -239,8 +237,7 @@ bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord )
rDoc.UpdatePageBreaks( nTab );
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab,
PaintPartFlags::Grid | PaintPartFlags::Left | PaintPartFlags::Top | PaintPartFlags::Size );
@@ -306,8 +303,7 @@ void ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord )
pUndoDoc, pUndoTab ) );
}
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PaintPartFlags::Left | PaintPartFlags::Top | PaintPartFlags::Size );
rDocShell.SetDocumentModified();
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index a7a33488b9a9..8b4052657eb7 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -178,8 +178,7 @@ void FuText::StopEditMode()
// invalidate stream positions only for the affected sheet
rDoc.LockStreamValid(false);
- if (rDoc.IsStreamValid(aNotePos.Tab()))
- rDoc.SetStreamValid(aNotePos.Tab(), false);
+ rDoc.SetStreamValid(aNotePos.Tab(), false);
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 479db4170881..e845a5798b44 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -887,8 +887,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
- if (rDoc.IsStreamValid(nTab))
- rDoc.SetStreamValid(nTab, false);
+ rDoc.SetStreamValid(nTab, false);
sal_uLong nOldFormat = static_cast<const SfxUInt32Item&>(aOldSet.
Get( ATTR_VALUE_FORMAT )).GetValue();