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.akdemir@allotropia.de>
Tested-by: Jenkins
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index 0068f77..6cebc1c 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());
}
/**