[PATCH] Change in core[libreoffice-4-0]: fdo#57938 SwPaM::HasReadonlySel allow editing before comment...

Miklos Vajna (via Code Review) gerrit at gerrit.libreoffice.org
Mon Jan 14 07:51:43 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1673

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/73/1673/1

fdo#57938 SwPaM::HasReadonlySel allow editing before commented text ranges

(cherry picked from commit 50b6dc0099ff61050b82a2e37e70d643151e7ce7)

Change-Id: I229602e7783c76e7fc57b78a408f90c1f6a8cda5
---
M sw/source/core/crsr/pam.cxx
1 file changed, 8 insertions(+), 1 deletion(-)



diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 6d7f07a..e122212 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -699,6 +699,13 @@
             if (!bUnhandledMark)
                 bCommentrangeMark = pFieldmark->GetFieldname() == ODF_COMMENTRANGE;
         }
+        // Allow editing selection right before a commented range.
+        if (!bCommentrangeMark && GetMark())
+        {
+            pFieldmark = pMarksAccess->getFieldmarkFor(*GetMark());
+            if (pFieldmark)
+                bCommentrangeMark = pFieldmark->GetFieldname() == ODF_COMMENTRANGE;
+        }
     }
 
     if (!bRet)
@@ -707,7 +714,7 @@
         if ( ( pA == pB ) && bUnhandledMark )
             bRet = sal_True;
         // Allow editing of commented ranges.
-        else if (!((pA == pB) && bCommentrangeMark))
+        else if (!bCommentrangeMark)
         {
             // Form protection case
             bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();

-- 
To view, visit https://gerrit.libreoffice.org/1673
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I229602e7783c76e7fc57b78a408f90c1f6a8cda5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna <vmiklos at suse.cz>



More information about the LibreOffice mailing list