From e2a5932da7a3df9f6440f8326520061caa2342c1 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 26 Jul 2018 16:14:46 +1000 Subject: tdf#41063: don't jump to cursor when saving MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Caolán McNamara --- sw/inc/docsh.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sw/inc') 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 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 LockAllViews(); }; /** Find the right DocShell and create a new one: -- cgit v1.2.3