sw/source/core/text/EnhancedPDFExportHelper.cxx | 5 ++--- sw/source/uibase/uiview/view2.cxx | 2 +- sw/source/uibase/wrtsh/move.cxx | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-)
New commits: commit 07eb697003a02c96b81c09d825fcf7920551820e Author: Noel Grandin <[email protected]> AuthorDate: Wed Oct 1 14:12:39 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Oct 1 16:45:57 2025 +0200 tdf#133976 no need to update navigation history during export (2) Change-Id: Id181cbcfc7463b1bd02f633cb656b2a3d37c4163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191730 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 6e9281d93e56..de0ab1d26b69 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -2745,7 +2745,7 @@ bool SwView::JumpToSwMark( const SwMarkName& rMark ) // reset ViewStatus SetCursorAtTop( bSaveCT, bSaveCC ); - if(!m_pWrtShell->IsFrameSelected() && !m_pWrtShell->GetSelectedObjCount()) + if(!m_pWrtShell->IsFrameSelected() && !m_pWrtShell->GetSelectedObjCount() && !m_pWrtShell->IsViewLocked()) m_pWrtShell->ShowCursor(); if( !bHasShFocus ) diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index b721c34e2e67..fea79b1e994c 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -629,7 +629,7 @@ bool SwWrtShell::GotoMark( const ::sw::mark::MarkBase* const pMark, bool bSelect ShellMoveCursor aTmp( this, bSelect ); SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwCursorShell::GotoMark( pMark, true/*bStart*/ ); - if (bRet) + if (bRet && !IsViewLocked()) m_aNavigationMgr.addEntry(aPos); return bRet; } commit 4e0b29af4c9fda2f73f3b00b90cd35dbaba59dbe Author: Noel Grandin <[email protected]> AuthorDate: Wed Oct 1 07:57:15 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Wed Oct 1 16:45:47 2025 +0200 tdf#133976 no need to save/restore cursor position here we move it when we need to. Shaves 20% off the profile. Change-Id: I08552ece8b4307454bcfabdb378ae5b7b35561b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191729 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index f11700bc01d3..05dd9b38ea30 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -2762,8 +2762,6 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport(LanguageType const eLanguageDe continue; } - SwCursorSaveState aSaveState( *mrSh.GetCursor_() ); - // Select the footnote: mrSh.SwCursorShell::SetMark(); mrSh.SwCursorShell::Right( 1, SwCursorSkipMode::Chars ); @@ -2773,7 +2771,8 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport(LanguageType const eLanguageDe aTmp.insert( aTmp.begin(), mrSh.SwCursorShell::GetCursor_()->begin(), mrSh.SwCursorShell::GetCursor_()->end() ); OSL_ENSURE( !aTmp.empty(), "Enhanced pdf export - rectangles are missing" ); - mrSh.GetCursor_()->RestoreSavePos(); + // restore cursor position + mrSh.GetCursor_()->GetPoint()->Assign(rTNd, pTextFootnote->GetStart()); mrSh.SwCursorShell::ClearMark(); if (aTmp.empty())
