diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-29 17:45:03 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-30 00:02:32 +0200 |
commit | 2036db5ecd227f97e0e5ab403de61b80fff93c38 (patch) | |
tree | e071ab562f91126143c2bc98653c0e2b6e0bae14 /include/sfx2/objsh.hxx | |
parent | expand out macro (diff) | |
download | core-2036db5ecd227f97e0e5ab403de61b80fff93c38.tar.gz core-2036db5ecd227f97e0e5ab403de61b80fff93c38.zip |
tdf#135244: move LockAllViews to SfxObjectShell
... so that it may be called from SfxObjectShell::SaveTo_Impl, and
handle export cases in addition to save (as) handled in tdf#41063.
Change-Id: Ie39196656dd1a95dcb6bab3ae8138c2f5c8729e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99714
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/sfx2/objsh.hxx')
-rw-r--r-- | include/sfx2/objsh.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 1bc1f5352c2c..6a5da58e3ae0 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -218,6 +218,13 @@ protected: // helper method void AddToRecentlyUsedList(); + // Parent class for actual guard objects that would do useful work + class LockAllViewsGuard + { + public: + virtual ~LockAllViewsGuard() {} + }; + public: SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH) @@ -775,6 +782,13 @@ public: /// Gets the certificate that is already picked by the user but not yet used for signing. css::uno::Reference<css::security::XCertificate> GetSignPDFCertificate() const; + + // Lock all unlocked views, and returns a guard object which unlocks those views when destructed + virtual std::unique_ptr<LockAllViewsGuard> LockAllViews() + { + return std::make_unique<LockAllViewsGuard>(); + } + }; #define SFX_GLOBAL_CLASSID \ |