LibreOffice Module sc (master) 1
|
Create before modifications of the document and destroy thereafter. More...
#include <docsh.hxx>
Public Member Functions | |
ScDocShellModificator (ScDocShell &) | |
~ScDocShellModificator () COVERITY_NOEXCEPT_FALSE | |
void | SetDocumentModified () |
Private Member Functions | |
ScDocShellModificator (const ScDocShellModificator &)=delete | |
ScDocShellModificator & | operator= (const ScDocShellModificator &)=delete |
Private Attributes | |
ScDocShell & | rDocShell |
std::unique_ptr< ScRefreshTimerProtector > | mpProtector |
bool | bAutoCalcShellDisabled |
bool | bIdleEnabled |
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().
|
privatedelete |
|
explicit |
Definition at line 3310 of file docsh.cxx.
References bAutoCalcShellDisabled, bIdleEnabled, ScDocument::EnableIdle(), ScDocShell::GetDocument(), ScDocument::IsAutoCalcShellDisabled(), ScDocument::IsIdleEnabled(), rDocShell, and ScDocument::SetAutoCalcShellDisabled().
ScDocShellModificator::~ScDocShellModificator | ( | ) |
Definition at line 3322 of file docsh.cxx.
References bAutoCalcShellDisabled, bIdleEnabled, ScDocument::EnableIdle(), ScDocShell::GetDocument(), ScDocShell::IsDocumentModifiedPending(), rDocShell, ScDocument::SetAutoCalcShellDisabled(), and ScDocShell::SetDocumentModified().
|
privatedelete |
void ScDocShellModificator::SetDocumentModified | ( | ) |
Definition at line 3331 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(), ScViewFunc::CutToClip(), 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(), ScViewFunc::EnterValue(), ScTabViewShell::ExecuteTable(), ScDocFunc::FillAuto(), ScDocFunc::FillSeries(), ScDocFunc::FillSimple(), ScDBFunc::HideAutoFilter(), ScDocFunc::ImportNote(), ScDocFunc::InsertCells(), ScViewFunc::InsertName(), ScDocFunc::InsertNameList(), ScDocFunc::InsertPageBreak(), ScDocFunc::InsertTable(), ScDocShell::MakeScenario(), ScDocFunc::MergeCells(), ScDBFunc::ModifiedAutoFilter(), ScDBDocFunc::ModifyAllDBData(), ScDocFunc::ModifyAllRangeNames(), ScDBDocFunc::ModifyDBData(), ScDocShell::ModifyScenario(), ScPreview::MouseButtonUp(), ScDocFunc::MoveBlock(), ScDocShell::MoveTable(), ScDocShell::NotifyStyle(), ScDocShell::PageStyleModified(), ScViewFunc::PasteFromClip(), ScViewFunc::PasteFromClipToMultiRanges(), ScViewFunc::PasteMultiRangesFromClip(), ScDocFunc::ProtectDocument(), 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(), ScViewFunc::SetWidthOrHeight(), ScDocFunc::SetWidthOrHeight(), ScDBDocFunc::Sort(), ScDocFunc::TabOp(), ScDocFunc::TransliterateText(), ScDocFunc::UnmergeCells(), ScAnnotationEditSource::UpdateData(), ScDBDocFunc::UpdatePivotTable(), ScViewFunc::UpdateStyleSheetInUse(), and ScDocShell::UseScenario().
|
private |
Definition at line 457 of file docsh.hxx.
Referenced by ScDocShellModificator(), SetDocumentModified(), and ~ScDocShellModificator().
|
private |
Definition at line 458 of file docsh.hxx.
Referenced by ScDocShellModificator(), and ~ScDocShellModificator().
|
private |
|
private |
Definition at line 455 of file docsh.hxx.
Referenced by HelperNotifyChanges::NotifyIfChangesListeners(), ScDocShellModificator(), SetDocumentModified(), and ~ScDocShellModificator().