summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2021-06-25 11:52:03 +0200
committerLászló Németh <nemeth@numbertext.org>2021-06-29 19:16:47 +0200
commita46a847d4298806d4e91e4665c3c1907c09a17c7 (patch)
treec02afe12416d081dd93f8b30d7c592b8eab46cfc /sd/source/ui/func
parentbeaf6001c0d020f525bb99dae4a0f6cdd16b4c99 (diff)
tdf#142589 Impress UI: fix Start button of Custom Slide Shows
This button started the selected custom slide show only by changing the (already) selected custom slide show, and enabling the checkbox "Use custom slide show". Otherwise it started always the full show. Remove the redundant checkbox "Use custom slide show" of the dialog window "Custom Slide Shows" (Slide Show->Custom Slide Show...) to avoid inconsistent behavior of the Start button (which could start the full show instead of the selected custom slide show). Now Start button of the dialog starts the selected custom slide show only once, i.e. it doesn't modify the global slide show settings for all the next slide shows (that is already handled by Slide Show->Slide Show Settings->Range->"Custom slide show:" and Slide Show->Slide Show Settings->Range->"All slides"). Change-Id: I6e97a69c546870199d5a45d9a6ad102e30d820c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117876 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fucushow.cxx25
-rw-r--r--sd/source/ui/func/fusldlg.cxx1
2 files changed, 19 insertions, 7 deletions
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx
index a87076b8ed6f..8c63d0215776 100644
--- a/sd/source/ui/func/fucushow.cxx
+++ b/sd/source/ui/func/fucushow.cxx
@@ -55,21 +55,32 @@ void FuCustomShowDlg::DoExecute( SfxRequest& )
vcl::Window* pWin = mpViewShell->GetActiveWindow();
ScopedVclPtr<AbstractSdCustomShowDlg> pDlg( pFact->CreateSdCustomShowDlg(pWin ? pWin->GetFrameWeld() : nullptr, *mpDoc) );
sal_uInt16 nRet = pDlg->Execute();
- if( pDlg->IsModified() )
- {
- mpDoc->SetChanged();
- sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
- rSettings.mbCustomShow = pDlg->IsCustomShow();
- }
- pDlg.disposeAndClear();
+ mpDoc->SetChanged();
+ sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
if( nRet == RET_YES )
{
+ // If the custom show is not set by default
+ if (!rSettings.mbCustomShow)
+ {
+ rSettings.mbStartCustomShow = true;
+ rSettings.mbCustomShow = pDlg->IsCustomShow();
+ }
+
mpViewShell->SetStartShowWithDialog(true);
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
}
+ if (nRet == RET_OK)
+ {
+ if (!pDlg->IsCustomShow())
+ {
+ rSettings.mbCustomShow = false;
+ rSettings.mbAll = true;
+ }
+ }
+ pDlg.disposeAndClear();
}
} // end of namespace
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 484aa5f1f9b7..4fcc5fd9f5ce 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -141,6 +141,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
{
bValuesChanged = true;
rPresentationSettings.mbCustomShow = bValue;
+ rPresentationSettings.mbStartCustomShow = false;
}
bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_ENDLESS, SfxBoolItem );