diff options
Diffstat (limited to 'sw/source/core/crsr')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/pam.cxx | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 3486a74209cb..379af07d0035 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2888,7 +2888,7 @@ void SwCrsrShell::SetReadOnlyAvailable( sal_Bool bFlag ) } } -sal_Bool SwCrsrShell::HasReadonlySel() const +sal_Bool SwCrsrShell::HasReadonlySel(bool bAnnotationMode) const { sal_Bool bRet = sal_False; if( IsReadOnlyAvailable() || GetViewOptions()->IsFormView() ) @@ -2901,7 +2901,7 @@ sal_Bool SwCrsrShell::HasReadonlySel() const const SwPaM* pCrsr = pCurCrsr; do { - if( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView() ) ) + if( pCrsr->HasReadonlySel( GetViewOptions()->IsFormView(), bAnnotationMode ) ) bRet = sal_True; } while( !bRet && pCurCrsr != ( pCrsr = (SwPaM*)pCrsr->GetNext() )); } diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index e745e80d75d9..c36b5820c2d4 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -589,7 +589,7 @@ static const SwFrm* lcl_FindEditInReadonlyFrm( const SwFrm& rFrm ) } /// is in protected section or selection surrounds something protected -sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const +sal_Bool SwPaM::HasReadonlySel( bool bFormView, bool bAnnotationMode ) const { sal_Bool bRet = sal_False; Point aTmpPt; @@ -731,8 +731,8 @@ sal_Bool SwPaM::HasReadonlySel( bool bFormView ) const } // Don't allow inserting characters between the 'field mark end' and - // the 'comment anchor'. - if (!bRet) + // the 'comment anchor', unless the cursor is inside the annotation. + if (!bRet && !bAnnotationMode) { if (!pA && GetPoint() && GetPoint()->nNode.GetNode().IsTxtNode() && GetPoint()->nContent.GetIndex() > 0) { |