sd/source/ui/func/fuoltext.cxx | 25 +------------------------ sd/source/ui/view/NotesPanelViewShell.cxx | 3 +-- 2 files changed, 2 insertions(+), 26 deletions(-)
New commits: commit 4655057fd8fdfe55855bd84daf30d4079012cefa Author: Sarper Akdemir <sarper.akde...@allotropia.de> AuthorDate: Fri May 24 12:06:08 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Tue May 28 13:45:40 2024 +0200 related tdf#33603: sd: outlineview: update current page on moving cursor The "early rejection test" removed here is a historical artifact when UpdateForKeyPress was created. in the current state it checked if pOutlineViewShell->GetActualPage() was different from itself. In the OutlineViewShell::UpdatePreview, there's an additional check if we have actually moved to a new page, so we can just safely remove this. Also fixes Notes Pane not properly updating on Outline View Mode Change-Id: Ic9de2e7302e76260809f90360533f0bfe6e05d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168017 Reviewed-by: Sarper Akdemir <sarper.akde...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 8fc4eb1149e58ed5bcc4bb2b57807cdc92d93785) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168062 Tested-by: allotropia jenkins <jenk...@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx index 0068f77d4053..6cebc1c55cb4 100644 --- a/sd/source/ui/func/fuoltext.cxx +++ b/sd/source/ui/func/fuoltext.cxx @@ -85,30 +85,7 @@ const sal_uInt16 SidArray[] = { void FuOutlineText::UpdateForKeyPress (const KeyEvent& rEvent) { FuSimpleOutlinerText::UpdateForKeyPress(rEvent); - - bool bUpdatePreview = true; - switch (rEvent.GetKeyCode().GetCode()) - { - // When just the cursor has been moved the preview only changes when - // it moved to entries of another page. To prevent unnecessary - // updates we check this here. This is an early rejection test, so - // missing a key is not a problem. - case KEY_UP: - case KEY_DOWN: - case KEY_LEFT: - case KEY_RIGHT: - case KEY_HOME: - case KEY_END: - case KEY_PAGEUP: - case KEY_PAGEDOWN: - { - SdPage* pCurrentPage = pOutlineViewShell->GetActualPage(); - bUpdatePreview = (pCurrentPage != pOutlineViewShell->GetActualPage()); - } - break; - } - if (bUpdatePreview) - pOutlineViewShell->UpdatePreview (pOutlineViewShell->GetActualPage()); + pOutlineViewShell->UpdatePreview(pOutlineViewShell->GetActualPage()); } /** commit f12701c1642029e614a50f6deabd9ce714b1716b Author: Sarper Akdemir <sarper.akde...@allotropia.de> AuthorDate: Fri May 24 10:41:08 2024 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Tue May 28 13:45:32 2024 +0200 tdf#33603: sd: notes pane: properly handle movement keys Makes it so that notes pane handles some previously incorrectly handled keys itself. e.g. PageUp & PageDown Change-Id: I19f73fa2782900a752889544dcc79fc180ee52d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168008 Reviewed-by: Sarper Akdemir <sarper.akde...@allotropia.de> Tested-by: Jenkins (cherry picked from commit dc208a0de04b29a53fe8384043f1fc925761a912) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168061 Tested-by: allotropia jenkins <jenk...@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx b/sd/source/ui/view/NotesPanelViewShell.cxx index 7bc46a5464b6..74698092dd2d 100644 --- a/sd/source/ui/view/NotesPanelViewShell.cxx +++ b/sd/source/ui/view/NotesPanelViewShell.cxx @@ -1419,7 +1419,7 @@ bool NotesPanelViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) { bool bReturn = false; - if (pWin == nullptr && HasCurrentFunction()) + if (HasCurrentFunction()) { bReturn = GetCurrentFunction()->KeyInput(rKEvt); } @@ -1438,7 +1438,6 @@ bool NotesPanelViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) Invalidate(SID_STYLE_WATERCAN); Invalidate(SID_STYLE_FAMILY5); - vcl::KeyCode aKeyGroup(rKEvt.GetKeyCode().GetGroup()); return bReturn; }