From bf059cd63fe01094b3eb469b2f4529820d692f32 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 23 Nov 2022 16:17:54 +0000 Subject: rename SetFocusedPageFromCurrentPage instead SetFocusedPageToCurrentPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit which is a bit misleading Change-Id: Ifd986c0bda8311453b17ed08d2aeab5b09665a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143185 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sd/source/ui/slidesorter/controller/SlsFocusManager.cxx | 2 +- sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx | 2 +- sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx index 59027f5a8177..fa821b625e6f 100644 --- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx @@ -159,7 +159,7 @@ void FocusManager::SetFocusedPage (sal_Int32 nPageIndex) mnPageIndex = nPageIndex; } -bool FocusManager::SetFocusedPageToCurrentPage() +bool FocusManager::SetFocusedPageFromCurrentPage() { return SetFocusedPage(mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()); } diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index 8fb0493a0b98..ba835c23b003 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -122,7 +122,7 @@ void SelectionObserver::EndObservation() aUpdateLock.Release(); FocusManager& rFocusManager = mrSlideSorter.GetController().GetFocusManager(); - bool bSuccess = rFocusManager.SetFocusedPageToCurrentPage(); + bool bSuccess = rFocusManager.SetFocusedPageFromCurrentPage(); // tdf#129346 nothing currently selected, select something, if possible // but (tdf#129346) only if setting focus to current page failed if (rSelector.GetPageCount() && rSelector.GetSelectedPageCount() == 0) diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx index 180b7143f7cb..6449a7fc83ec 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx @@ -124,7 +124,10 @@ public: */ void SetFocusedPage(sal_Int32 nPageIndex); - bool SetFocusedPageToCurrentPage(); + /** Set the focused page to the one that is the current slide of the + Slide Manager + */ + bool SetFocusedPageFromCurrentPage(); /** Return when the focus indicator is currently shown. A prerequisite is that the window managed by this focus manager has -- cgit