summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-01-15 16:24:45 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-01-18 10:53:50 +0100
commitf8da730bd66d5d6d3e49935573b3223c06baffbe (patch)
tree3a8a2c2fa1ba611c0e824c50613eb3d91ce61256 /sw
parent8283963be8f174a7fe56dd1c29290d00a2d76d22 (diff)
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@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/pam.cxx6
1 files changed, 5 insertions, 1 deletions
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