sd/source/ui/func/fuoltext.cxx |   25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

New commits:
commit 8fc4eb1149e58ed5bcc4bb2b57807cdc92d93785
Author:     Sarper Akdemir <sarper.akde...@allotropia.de>
AuthorDate: Fri May 24 12:06:08 2024 +0200
Commit:     Sarper Akdemir <sarper.akde...@allotropia.de>
CommitDate: Fri May 24 15:18:29 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

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());
 }
 
 /**

Reply via email to