[Libreoffice-commits] core.git: sw/source
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 18 09:54:25 UTC 2021
sw/source/core/crsr/pam.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit f8da730bd66d5d6d3e49935573b3223c06baffbe
Author: Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Jan 15 16:24:45 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Jan 18 10:53:50 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>
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 6d7e8e388046..6b7fa9242bfa 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>
@@ -729,7 +731,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