sw/source/core/crsr/pam.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit fd0da52d371ca13d66be3b04d89f9d9cf73baddd Author: Miklos Vajna <vmik...@suse.cz> Date: Thu Jan 10 16:21:55 2013 +0100 fdo#57938 SwPaM::HasReadonlySel: commented text ranges are not read-only diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index e9b7802..8000052 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -686,6 +686,7 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const sw::mark::IMark* pA = NULL; sw::mark::IMark* pB = NULL; bool bUnhandledMark = false; + bool bCommentrangeMark = false; if ( pDoc ) { const IDocumentMarkAccess* pMarksAccess = pDoc->getIDocumentMarkAccess( ); @@ -694,7 +695,11 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const sw::mark::IFieldmark* pFieldmark = pMarksAccess->getFieldmarkFor( *GetPoint() ); if ( pFieldmark ) + { bUnhandledMark = pFieldmark->GetFieldname( ) == ODF_UNHANDLED; + if (!bUnhandledMark) + bCommentrangeMark = pFieldmark->GetFieldname() == ODF_COMMENTRANGE; + } } if (!bRet) @@ -702,7 +707,8 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const // 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits