diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-22 15:29:58 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-23 10:25:09 +0200 |
commit | 27892a5e12dada80226f778ab2bd14b1bdaab58a (patch) | |
tree | f0b91370794fc5b883bc79ceb28ecdc891b3d916 /sw/source/core/crsr/crsrsh.cxx | |
parent | 937c22f242d0c08b0980ce864530966378ada9a9 (diff) |
sw: enable Replace with Protect Bookmarks
The dialog calls Replace on the whole bookmark, and with commit
7974cea6c788e02d7c36573e2d10dcc51884f70e the bookmark is preserved, so
the HasReadonlySel() should not prevent this replace from happening.
Change-Id: I823b042c8327c6716b2ac1a8a86beffd887e6e4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138693
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/crsr/crsrsh.cxx')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 17718f8357b6..c37595430761 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2743,7 +2743,7 @@ bool SwCursorShell::IsOverReadOnlyPos( const Point& rPt ) const SwPaM aPam( *m_pCurrentCursor->GetPoint() ); GetLayout()->GetModelPositionForViewPoint( aPam.GetPoint(), aPt ); // form view - return aPam.HasReadonlySel( GetViewOptions()->IsFormView() ); + return aPam.HasReadonlySel(GetViewOptions()->IsFormView(), false); } /** Get the number of elements in the ring of cursors @@ -3356,7 +3356,7 @@ void SwCursorShell::SetReadOnlyAvailable( bool bFlag ) } } -bool SwCursorShell::HasReadonlySel() const +bool SwCursorShell::HasReadonlySel(bool const isReplace) const { if (GetViewOptions()->IsShowOutlineContentVisibilityButton()) { @@ -3393,13 +3393,13 @@ bool SwCursorShell::HasReadonlySel() const if ( m_pTableCursor != nullptr ) { bRet = m_pTableCursor->HasReadOnlyBoxSel() - || m_pTableCursor->HasReadonlySel( GetViewOptions()->IsFormView() ); + || m_pTableCursor->HasReadonlySel(GetViewOptions()->IsFormView(), isReplace); } else { for(const SwPaM& rCursor : m_pCurrentCursor->GetRingContainer()) { - if( rCursor.HasReadonlySel( GetViewOptions()->IsFormView() ) ) + if (rCursor.HasReadonlySel(GetViewOptions()->IsFormView(), isReplace)) { bRet = true; break; |