summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-01-27 13:21:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-01-28 11:12:00 +0100
commit041ecabb7bf6ad15c2cdcf228cb9dc82b2d16837 (patch)
tree2d1d6509696a9d566a605595c1d500e4e9ff8259 /sw
parenta3eb01f1675d473580c3b1fa87072852f97b6daa (diff)
sw_fieldmarkhide: adjust SwPaM::HasReadonlySel() to the fact that...
... there is, in fact, an else branch. D'oh. (regression from f8da730bd66d5d6d3e49935573b3223c06baffbe) Change-Id: I378b0a78a4ccc9a0e7fa9a6bf2e1ecb456133bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110012 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit e65376ecd6e4356686927a5daeb845faf1fc4a42) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109985 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/pam.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 684b6e5eae72..fe3f41a9a76c 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -730,9 +730,11 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint());
const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark());
- if (!bRet &&
- // allow editing all fields in generic mode
- !officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext()))
+ if (officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get(comphelper::getProcessComponentContext()))
+ {
+ ; // allow editing all fields in generic mode
+ }
+ else if (!bRet)
{
bool bUnhandledMark = pA && pA->GetFieldname( ) == ODF_UNHANDLED;
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything