summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/docsh.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc/docsh.hxx')
-rw-r--r--sc/source/ui/inc/docsh.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 964c3ee868c9..4159dd583c9e 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -35,6 +35,7 @@
#include "shellids.hxx"
#include "refreshtimer.hxx"
#include "optutil.hxx"
+#include "docuno.hxx"
#include <boost/unordered_map.hpp>
#include <cppuhelper/implbase1.hxx>
@@ -62,6 +63,7 @@ class ScDocShellModificator;
class ScOptSolverSave;
class ScSheetSaveData;
class ScFlatBoolRowSegments;
+class HelperModelObj;
struct ScColWidthParam;
#if ENABLE_TELEPATHY
class ScCollaboration;
@@ -473,6 +475,34 @@ public:
void SetDocumentModified();
};
+class HelperNotifyChanges
+{
+ private:
+ ScModelObj* pModelObj;
+ bool mbMustPropagateChanges;
+ ScRangeList* mpChangeRanges;
+ OUString mpOperation;
+
+ public:
+ HelperNotifyChanges(ScRangeList* pChangeRanges, const OUString& pOperation)
+ {
+ mpChangeRanges = pChangeRanges;
+ mpOperation = pOperation;
+ if ( pModelObj && pModelObj->HasChangesListeners() )
+ mbMustPropagateChanges = true;
+ }
+ ~HelperNotifyChanges()
+ {
+ if (mbMustPropagateChanges && mpChangeRanges)
+ {
+ pModelObj->NotifyChanges(mpOperation, *mpChangeRanges);
+ }
+ }
+ bool getMustPropagateChanges()
+ {
+ return mbMustPropagateChanges;
+ }
+};
#endif