diff options
author | Henry Castro <hcastro@collabora.com> | 2017-06-17 13:52:15 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2017-12-07 19:14:18 +0100 |
commit | 6fd6e3c1d36d67002967f56e47255e360f4b08c1 (patch) | |
tree | 3d733efd3b054513590b211e209972f5328fd292 /include | |
parent | ed50a0a2ce51584fa3a8fba0094220a4bf25c650 (diff) |
lokit: add .uno:DocumentRepair command
Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660
Reviewed-on: https://gerrit.libreoffice.org/38908
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | include/svl/hint.hxx | 1 | ||||
-rw-r--r-- | include/svl/undo.hxx | 10 | ||||
-rw-r--r-- | include/svx/sdrundomanager.hxx | 5 |
4 files changed, 15 insertions, 3 deletions
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 043902f5b26a..7bac74572f8f 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -119,7 +119,7 @@ #define SID_FILE_FILTEROPTIONS (SID_SFX_START + 527) #define SID_RELOAD (SID_SFX_START + 508) #define SID_PRINTDOCDIRECT (SID_SFX_START + 509) -// free (SID_SFX_START + 510) +#define SID_DOC_REPAIR (SID_SFX_START + 510) #define SID_DOC_SERVICE (SID_SFX_START + 511) #define SID_PLUGIN_MODE (SID_SFX_START + 827) #define SID_EXPORTDOC (SID_SFX_START + 829) diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx index bce91f5462ae..4cee3ba569a9 100644 --- a/include/svl/hint.hxx +++ b/include/svl/hint.hxx @@ -35,6 +35,7 @@ enum class SfxHintId { ColorsChanged, LanguageChanged, RedlineChanged, + DocumentRepair, // VCL text hints TextParaInserted, diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index 7791d4a4b333..b0ee7e21f657 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -293,6 +293,7 @@ namespace svl /// adds a new listener to be notified about changes in the UndoManager's state virtual void AddUndoListener( SfxUndoListener& i_listener ) = 0; virtual void RemoveUndoListener( SfxUndoListener& i_listener ) = 0; + virtual bool IsEmptyActions() const = 0; }; } @@ -343,6 +344,8 @@ public: virtual bool IsUndoEnabled() const override; virtual void AddUndoListener( SfxUndoListener& i_listener ) override; virtual void RemoveUndoListener( SfxUndoListener& i_listener ) override; + virtual bool IsEmptyActions() const override; + /** marks the current top-level element of the Undo stack, and returns a unique ID for it */ @@ -379,6 +382,7 @@ protected: undo actions on the then-current level are removed, too. This is continued until the top level is reached. */ void ClearAllLevels(); + virtual void EmptyActionsChanged(); private: size_t ImplLeaveListAction( const bool i_merge, ::svl::undo::impl::UndoManagerGuard& i_guard ); @@ -391,8 +395,10 @@ private: bool ImplIsInListAction_Lock() const; void ImplEnableUndo_Lock( bool const i_enable ); - bool ImplUndo( SfxUndoContext* i_contextOrNull ); - bool ImplRedo( SfxUndoContext* i_contextOrNull ); + bool ImplUndo( SfxUndoContext* i_contextOrNull ); + bool ImplRedo( SfxUndoContext* i_contextOrNull ); + void ImplCheckEmptyActions(); + inline bool ImplIsEmptyActions() const; friend class ::svl::undo::impl::LockGuard; }; diff --git a/include/svx/sdrundomanager.hxx b/include/svx/sdrundomanager.hxx index a42e57e60b36..df9ac0845827 100644 --- a/include/svx/sdrundomanager.hxx +++ b/include/svx/sdrundomanager.hxx @@ -24,6 +24,8 @@ #include <editeng/editund2.hxx> #include <tools/link.hxx> +class SfxObjectShell; + class SVX_DLLPUBLIC SdrUndoManager : public EditUndoManager { private: @@ -35,8 +37,10 @@ private: bool mbEndTextEditTriggeredFromUndo; protected: + SfxObjectShell* m_pDocSh; // call to check for TextEdit active bool isTextEditActive() const; + virtual void EmptyActionsChanged() override; public: SdrUndoManager(); @@ -59,6 +63,7 @@ public: // is needed to detect inside end text edit if it is a regular one or triggered // by a last undo during text edit bool isEndTextEditTriggeredFromUndo() { return mbEndTextEditTriggeredFromUndo; } + void SetDocShell(SfxObjectShell* pDocShell); }; #endif // INCLUDED_SVX_SDRUNDOMANAGER_HXX |