[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sd/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 15 00:40:46 UTC 2019
sd/source/ui/view/drviews1.cxx | 26 +++++---------------------
1 file changed, 5 insertions(+), 21 deletions(-)
New commits:
commit 5db9926662a7a6dcbaa9a4605e535c42a8a1e493
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Nov 28 22:06:05 2018 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Mon Apr 15 02:39:58 2019 +0200
LOK: sd: use native SdPage to flag selection
The slide-sorter is actually still necessary to apply/change
the master slide of a given slide, so we must enable it.
Change-Id: I3f59f58be76ab1c63453b4f6288044572800a556
Change-Id: I7554ba4afd28d7ea4f3ed6ba375d9765a89ef21c
Reviewed-on: https://gerrit.libreoffice.org/69618
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 4002e032a58a..405804acff33 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -753,31 +753,15 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
*/
bool DrawViewShell::SelectPage(sal_uInt16 nPage, sal_uInt16 nSelect)
{
- slidesorter::SlideSorterViewShell* pSlideSorterViewShell
- = slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
- if (pSlideSorterViewShell != nullptr)
+ SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard);
+ if (pPage)
{
- slidesorter::controller::PageSelector& aPageSelector
- = pSlideSorterViewShell->GetSlideSorter().GetController().GetPageSelector();
if (nSelect == 0)
- {
- // Deselect.
- aPageSelector.DeselectPage(nPage);
-
- }
+ pPage->SetSelected(false); // Deselect.
else if (nSelect == 1)
- {
- // Select.
- aPageSelector.SelectPage(nPage);
- }
+ pPage->SetSelected(true); // Select.
else
- {
- // Toggle.
- if (aPageSelector.IsPageSelected(nPage))
- aPageSelector.DeselectPage(nPage);
- else
- aPageSelector.SelectPage(nPage);
- }
+ pPage->SetSelected(!pPage->IsSelected()); // Toggle.
return true;
}
More information about the Libreoffice-commits
mailing list