LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScDocShellModificator Class Reference

Create before modifications of the document and destroy thereafter. More...

#include <docsh.hxx>

Collaboration diagram for ScDocShellModificator:
[legend]

Public Member Functions

 ScDocShellModificator (ScDocShell &)
 
 ~ScDocShellModificator () COVERITY_NOEXCEPT_FALSE
 
void SetDocumentModified ()
 

Private Member Functions

 ScDocShellModificator (const ScDocShellModificator &)=delete
 
ScDocShellModificatoroperator= (const ScDocShellModificator &)=delete
 

Private Attributes

ScDocShellrDocShell
 
std::unique_ptr< ScRefreshTimerProtectormpProtector
 
bool bAutoCalcShellDisabled
 
bool bIdleEnabled
 

Detailed Description

Create before modifications of the document and destroy thereafter.

Call SetDocumentModified() at an instance of this class instead of at ScDocShell.

Remembers in the ctor ScDocument's AutoCalcShellDisabled and IdleDisabled, switches them off and restores them in the dtor, AutoCalcShellDisabled also before a ScDocShell::SetDocumentModified() call if necessary. In the dtor, if ScDocShell's bDocumentModifiedPending is set and bAutoCalcShellDisabled is not set, then ScDocShell::SetDocumentModified() is called.

Several instances can be used in nested calls to ScDocFunc or ScDocShell methods to avoid multiple modified status changes, only the last instance destroyed calls ScDocShell::SetDocumentModified().

Definition at line 450 of file docsh.hxx.

Constructor & Destructor Documentation

ScDocShellModificator::ScDocShellModificator ( const ScDocShellModificator )
privatedelete
ScDocShellModificator::ScDocShellModificator ( ScDocShell rDS)
explicit
ScDocShellModificator::~ScDocShellModificator ( )

Member Function Documentation

ScDocShellModificator& ScDocShellModificator::operator= ( const ScDocShellModificator )
privatedelete
void ScDocShellModificator::SetDocumentModified ( )

Definition at line 3158 of file docsh.cxx.

References bAutoCalcShellDisabled, ScDocument::BroadcastUno(), ScDocShell::GetDocument(), ScDocument::IsAutoCalcShellDisabled(), ScDocument::IsImportingXML(), ScDocument::PrepareFormulaCalc(), rDocShell, ScDocument::SetAutoCalcShellDisabled(), and ScDocShell::SetDocumentModified().

Referenced by ScDBDocFunc::AddDBRange(), ScDocFunc::ApplyAttributes(), ScViewFunc::ApplyPatternLines(), ScViewFunc::ApplySelectionPattern(), ScDocFunc::ApplyStyle(), ScDocFunc::AutoFormat(), ScDocFunc::ChangeIndent(), ScDocFunc::ClearItems(), ScDocFunc::ConvertFormulaToValue(), ScDBDocFunc::CreatePivotTable(), ScExternalRefLink::DataChanged(), ScDBDocFunc::DataPilotUpdate(), ScDocFunc::DeleteCell(), ScDocFunc::DeleteCells(), ScDocFunc::DeleteContents(), ScDBDocFunc::DeleteDBRange(), ScViewFunc::DeleteMulti(), ScDocFunc::DeleteTable(), ScDocFunc::DetectiveAddError(), ScDocFunc::DetectiveAddPred(), ScDocFunc::DetectiveAddSucc(), ScDocFunc::DetectiveDelAll(), ScDocFunc::DetectiveDelPred(), ScDocFunc::DetectiveDelSucc(), ScDocFunc::DetectiveMarkInvalid(), ScUndoTabColor::DoChange(), ScDocShell::DoConsolidate(), ScDBDocFunc::DoImport(), ScDBFunc::DoSubTotals(), ScDBDocFunc::DoSubTotals(), ScViewFunc::EnterData(), ScDocFunc::EnterMatrix(), ScDocFunc::FillAuto(), ScDocFunc::FillSeries(), ScDocFunc::FillSimple(), ScDBFunc::HideAutoFilter(), ScDocFunc::ImportNote(), ScDocFunc::InsertCells(), ScViewFunc::InsertName(), ScDocFunc::InsertNameList(), ScDocFunc::InsertPageBreak(), ScDocFunc::InsertTable(), ScDocShell::MakeScenario(), ScDocFunc::MergeCells(), ScDBDocFunc::ModifyAllDBData(), ScDocFunc::ModifyAllRangeNames(), ScDBDocFunc::ModifyDBData(), ScDocShell::ModifyScenario(), ScPreview::MouseButtonUp(), ScDocFunc::MoveBlock(), ScDocShell::MoveTable(), ScDocShell::NotifyStyle(), ScDocShell::PageStyleModified(), ScViewFunc::PasteFromClipToMultiRanges(), ScViewFunc::PasteMultiRangesFromClip(), ScDocFunc::Protect(), ScDocFunc::ProtectSheet(), ScDBDocFunc::Query(), ScAreaLink::Refresh(), ScTableLink::Refresh(), ScDocFunc::RemovePageBreak(), ScDBDocFunc::RemovePivotTable(), ScViewFunc::RemoveStyleSheetInUse(), ScDBDocFunc::RenameDBRange(), ScDocFunc::RenameTable(), ScDocFunc::ReplaceConditionalFormat(), ScDocFunc::ReplaceNote(), ScDocFunc::SetConditionalFormatList(), ScDocFunc::SetEditCell(), ScDocFunc::SetFormulaCell(), ScDocFunc::SetFormulaCells(), ScDocFunc::SetLayoutRTL(), ScDocFunc::SetNewRangeNames(), ScDocFunc::SetNormalString(), ScDocFunc::SetNoteText(), ScDocShell::SetPrintZoom(), ScDocFunc::SetStringCell(), ScViewFunc::SetStyleSheetToMarked(), ScDocFunc::SetTabBgColor(), ScDocFunc::SetTableVisible(), ScDocFunc::SetValueCell(), ScDocFunc::SetValueCells(), ScDocFunc::SetWidthOrHeight(), ScViewFunc::SetWidthOrHeight(), ScDBDocFunc::Sort(), ScDocFunc::TabOp(), ScDBFunc::ToggleAutoFilter(), ScDocFunc::TransliterateText(), ScDocFunc::UnmergeCells(), ScDocFunc::Unprotect(), ScAnnotationEditSource::UpdateData(), ScDBDocFunc::UpdatePivotTable(), ScViewFunc::UpdateStyleSheetInUse(), and ScDocShell::UseScenario().

Member Data Documentation

bool ScDocShellModificator::bAutoCalcShellDisabled
private

Definition at line 454 of file docsh.hxx.

Referenced by ScDocShellModificator(), SetDocumentModified(), and ~ScDocShellModificator().

bool ScDocShellModificator::bIdleEnabled
private

Definition at line 455 of file docsh.hxx.

Referenced by ScDocShellModificator(), and ~ScDocShellModificator().

std::unique_ptr<ScRefreshTimerProtector> ScDocShellModificator::mpProtector
private

Definition at line 453 of file docsh.hxx.

ScDocShell& ScDocShellModificator::rDocShell
private

Definition at line 452 of file docsh.hxx.

Referenced by ScDocShellModificator(), SetDocumentModified(), and ~ScDocShellModificator().


The documentation for this class was generated from the following files: