Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1629
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/29/1629/1
fdo#57938 SwPaM::HasReadonlySel: commented text ranges are not read-only
(cherry picked from commit fd0da52d371ca13d66be3b04d89f9d9cf73baddd)
Change-Id: I8191ed6383c4c636be67b8d42654dbba0a5c8b6f
---
M sw/source/core/crsr/pam.cxx
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index baf62ad..6d7f07a 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -685,6 +685,7 @@
sw::mark::IMark* pA = NULL;
sw::mark::IMark* pB = NULL;
bool bUnhandledMark = false;
+ bool bCommentrangeMark = false;
if ( pDoc )
{
const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( );
@@ -693,7 +694,11 @@
sw::mark::IFieldmark* pFieldmark = pMarksAccess->getFieldmarkFor( *GetPoint() );
if ( pFieldmark )
+ {
bUnhandledMark = pFieldmark->GetFieldname( ) == ODF_UNHANDLED;
+ if (!bUnhandledMark)
+ bCommentrangeMark = pFieldmark->GetFieldname() == ODF_COMMENTRANGE;
+ }
}
if (!bRet)
@@ -701,7 +706,8 @@
// Unhandled fieldmarks case shouldn't be edited manually to avoid breaking anything
if ( ( pA == pB ) && bUnhandledMark )
bRet = sal_True;
- else
+ // Allow editing of commented ranges.
+ else if (!((pA == pB) && bCommentrangeMark))
{
// Form protection case
bool bAtStartA = pA != NULL && pA->GetMarkStart() == *GetPoint();
--
To view, visit https://gerrit.libreoffice.org/1629
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8191ed6383c4c636be67b8d42654dbba0a5c8b6f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna <vmiklos@suse.cz>
Context
- [PATCH] Change in core[libreoffice-4-0]: fdo#57938 SwPaM::HasReadonlySel: commented text ranges are n... · Miklos Vajna (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.