summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/shell
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-18 12:10:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-18 12:54:38 +0100
commitdb00223e6d3132eac9603e5dabd20cd03f599cb3 (patch)
tree34dc35e6ef167a0a9f25470fefc6a6e766825fae /sd/source/ui/slidesorter/shell
parentbb3671180eb7327be9ac178e0d8341322f63d72a (diff)
Related: tdf#99523 select only the desired slides
when selecting the same slides in the document as are selected in the slide pane, don't forget to unselect any slides already selected in the document. impress is nuts in carrying around two selection mechanisms. Change-Id: I97d744c1c57b68dc312a17a5cd5290e1b6ccf083
Diffstat (limited to 'sd/source/ui/slidesorter/shell')
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index dbc53f2bc260..24fab760d082 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -718,6 +718,7 @@ void SlideSorterViewShell::ExecMovePageFirst (SfxRequest& /*rReq*/)
// SdDrawDocument MovePages is based on SdPage IsSelected, so
// transfer the SlideSorter selection to SdPages (*it)
+ GetDoc()->UnselectAllPages();
std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() );
for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) {
GetDoc()->SetSelected(*it, true);
@@ -769,6 +770,7 @@ void SlideSorterViewShell::ExecMovePageUp (SfxRequest& /*rReq*/)
sal_uInt16 pageNo;
// SdDrawDocument MovePages is based on SdPage IsSelected, so
// transfer the SlideSorter selection to SdPages (*it)
+ GetDoc()->UnselectAllPages();
std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() );
for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) {
// Check page number
@@ -803,6 +805,7 @@ void SlideSorterViewShell::ExecMovePageDown (SfxRequest& /*rReq*/)
sal_uInt16 pageNo;
// SdDrawDocument MovePages is based on SdPage IsSelected, so
// transfer the SlideSorter selection to SdPages (*it)
+ GetDoc()->UnselectAllPages();
std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() );
for (auto it = pSelection->begin(); it != pSelection->end() ; ++it )
{
@@ -837,6 +840,7 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/)
// SdDrawDocument MovePages is based on SdPage IsSelected, so
// transfer the SlideSorter selection to SdPages (*it)
+ GetDoc()->UnselectAllPages();
std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() );
for (auto it = pSelection->begin(); it != pSelection->end() ; ++it ) {
GetDoc()->SetSelected(*it, true);
@@ -866,6 +870,7 @@ void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
sal_uInt16 pageNo;
// SdDrawDocument MovePages is based on SdPage IsSelected, so
// transfer the SlideSorter selection to SdPages (*it)
+ GetDoc()->UnselectAllPages();
std::shared_ptr<SlideSorterViewShell::PageSelection> pSelection ( GetPageSelection() );
for (auto it = pSelection->begin(); it != pSelection->end() ; ++it )
{