[Libreoffice-commits] core.git: sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 27 13:08:22 UTC 2021


 sw/source/core/crsr/pam.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit e65376ecd6e4356686927a5daeb845faf1fc4a42
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Wed Jan 27 13:21:35 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Wed Jan 27 14:07:24 2021 +0100

    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 at allotropia.de>

diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 6b7fa9242bfa..88622208be36 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -731,9 +731,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


More information about the Libreoffice-commits mailing list