[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 20 16:25:49 UTC 2021
sw/source/core/crsr/pam.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit fe2e79391957e684719adb21561242af197845b3
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Jan 15 16:24:45 2021 +0100
Commit: Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Wed Jan 20 17:25:17 2021 +0100
sw_fieldmarkhide: allow editing all fieldmarks if ...
ForceImportWWFieldsAsGenericFields is set. Not sure what restrictions it
needs.
Change-Id: I8b8e61fb320d5c2b66d5ff332517759b53e68817
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109378
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
(cherry picked from commit f8da730bd66d5d6d3e49935573b3223c06baffbe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109518
Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 55775a358826..684b6e5eae72 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -23,6 +23,8 @@
#include <tools/gen.hxx>
#include <editeng/protitem.hxx>
+#include <officecfg/Office/Common.hxx>
+
#include <cntfrm.hxx>
#include <pagefrm.hxx>
#include <doc.hxx>
@@ -728,7 +730,9 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint());
const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark());
- if (!bRet)
+ if (!bRet &&
+ // allow editing all fields in generic mode
+ !officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext()))
{
bool bUnhandledMark = pA && pA->GetFieldname( ) == ODF_UNHANDLED;
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
More information about the Libreoffice-commits
mailing list