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 454 of file docsh.hxx.

Constructor & Destructor Documentation

◆ ScDocShellModificator() [1/2]

ScDocShellModificator::ScDocShellModificator ( const ScDocShellModificator )
privatedelete

◆ ScDocShellModificator() [2/2]

ScDocShellModificator::ScDocShellModificator ( ScDocShell rDS)
explicit

◆ ~ScDocShellModificator()

ScDocShellModificator::~ScDocShellModificator ( )

Member Function Documentation

◆ operator=()

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

◆ SetDocumentModified()

void ScDocShellModificator::SetDocumentModified ( )

Definition at line 3315 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(), sc::ThemeColorChanger::apply(), 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().

Member Data Documentation

◆ bAutoCalcShellDisabled

bool ScDocShellModificator::bAutoCalcShellDisabled
private

Definition at line 458 of file docsh.hxx.

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

◆ bIdleEnabled

bool ScDocShellModificator::bIdleEnabled
private

Definition at line 459 of file docsh.hxx.

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

◆ mpProtector

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

Definition at line 457 of file docsh.hxx.

◆ rDocShell

ScDocShell& ScDocShellModificator::rDocShell
private

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