diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-07-26 16:14:46 +1000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-07-26 17:42:09 +0200 |
commit | e2a5932da7a3df9f6440f8326520061caa2342c1 (patch) | |
tree | 40aa2ae9c36a5931705ac1e003381e1dbfab23d6 /sw/inc/docsh.hxx | |
parent | 4c702afe205a778b73b50cd95bc4f28b98baca44 (diff) |
tdf#41063: don't jump to cursor when saving
Reuse the fix from commits e12184393f0591b5c5d9218062cc0a4bced6d4e6
and 36c84fa3fbd03e5f651ba9d81e321566c8fcdbd0.
Change-Id: I5b7cdc321c6e30e994732d2c0295e494a172a2e2
Reviewed-on: https://gerrit.libreoffice.org/58034
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/docsh.hxx')
-rw-r--r-- | sw/inc/docsh.hxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index 9a88de3abeb6..f2c17c1747c1 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -51,6 +51,7 @@ class IDocumentDeviceAccess; class IDocumentChartDataProviderAccess; class SwDocShell; class SwDrawModel; +class SwViewShell; namespace svt { class EmbeddedObjectRef; @@ -318,6 +319,17 @@ public: void RegisterAutomationDocumentEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller); void CallAutomationDocumentEventSinks(const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments); void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument > const& xDocument); + + class LockAllViewsGuard + { + std::vector<SwViewShell*> m_aViewWasUnLocked; + + public: + explicit LockAllViewsGuard(SwViewShell* pViewShell); + ~LockAllViewsGuard(); + }; + // Lock all unlocked views, and returns a guard object which unlocks those views when destructed + std::unique_ptr<LockAllViewsGuard> LockAllViews(); }; /** Find the right DocShell and create a new one: |