diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-08-22 09:15:15 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2019-12-22 22:14:41 +0100 |
commit | 9b3c7c81299590d6d845f7437f6ab16db0219929 (patch) | |
tree | c899c06bb8ed9c26b37e371dea0bae7bfc79f37b /sfx2 | |
parent | 6ef3027ff9a5ee48e9fe2b8817eeabe444d6ec05 (diff) |
sc: LOK: commit cell edits before saveas
Users typically don't recognize that changes
done to a cell need to be committed (typically
by hitting RETURN) before they are saved to file.
This is especially true on the web.
This patch commits any in-flight changes before
SaveAs. This is currently done only for LOK and
unconditionally at that. This can be controlled
via a flag, if there is such a use-case.
Reviewed-on: https://gerrit.libreoffice.org/78012
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit cc7eb4d345e3fede698a3f255c1938d275305c14)
Reviewed-on: https://gerrit.libreoffice.org/78455
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit e867404fbe7e0ff0d6f2573292c19b3a178a412d)
Change-Id: I2a88b2f1df47be764058f4505561b22830d9d67a
Reviewed-on: https://gerrit.libreoffice.org/82102
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 1559220039f7..231386d479ec 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -294,7 +294,6 @@ bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItem { bool bOk = false; - if ( GetMedium() ) { OUString aFilterName; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 438812a2756b..deba40fc9f74 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2669,6 +2669,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString return false; } + const SfxBoolItem* pCopyStreamItem = rItemSet.GetItem<SfxBoolItem>(SID_COPY_STREAM_IF_POSSIBLE, false); if ( bSaveTo && pCopyStreamItem && pCopyStreamItem->GetValue() && !IsModified() ) { @@ -2832,6 +2833,12 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& return false; } + if (comphelper::LibreOfficeKit::isActive()) + { + // Before saving, commit in-flight changes. + TerminateEditing(); + } + // check if a "SaveTo" is wanted, no "SaveAs" const SfxBoolItem* pSaveToItem = pMergedParamsTmp->GetItem<SfxBoolItem>(SID_SAVETO, false); bool bCopyTo = GetCreateMode() == SfxObjectCreateMode::EMBEDDED || (pSaveToItem && pSaveToItem->GetValue()); |