diff options
author | Michael Stahl <mst@apache.org> | 2011-09-17 21:42:12 +0000 |
---|---|---|
committer | Michael Stahl <mst@apache.org> | 2011-09-17 21:42:12 +0000 |
commit | 6816436a2fb9da9e49b0507967f725c53af54d05 (patch) | |
tree | aae4611acd2843ce080296635eb9fb4e1ba92562 /sd | |
parent | 0a01a4642dd5e8c5ba149f8109de49de3f2be1e4 (diff) |
slidesorter1: #i114107# Temporarily reset StartWithActualPaget to make startWithArguments use FirstPage property.
# HG changeset patch
# User Andre Fischer<andre.f.fischer@oracle.com>
# Date 1283353420 -7200
# Node ID 770385ae0c265c62134bf57eeca8283f7fe80b48
# Parent 2ebd15d9e8a637b5c563f1ae49768668412e2baa
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsButtonBar.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx index f338a998c56f..dee80e5ed5d8 100644 --- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx +++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx @@ -43,6 +43,8 @@ #include "controller/SlsAnimationFunction.hxx" #include "app.hrc" #include "drawdoc.hxx" +#include "sddll.hxx" +#include "optsitem.hxx" #include <svx/svxids.hrc> #include <sfx2/dispatch.hxx> #include <vcl/bmpacc.hxx> @@ -1452,7 +1454,18 @@ void StartShowButton::ProcessClick (const model::SharedPageDescriptor& rpDescrip aProperties[0].Name = ::rtl::OUString::createFromAscii("FirstPage"); const ::rtl::OUString sName (rpDescriptor->GetPage()->GetName()); aProperties[0].Value = Any(sName); + + // We have to temporarily change the options value + // StartWithActualPage to make the slide show use the + // specified first page. + const DocumentType eType (mrSlideSorter.GetModel().GetDocument()->GetDocumentType()); + const BOOL bSavedState (SD_MOD()->GetSdOptions(eType)->IsStartWithActualPage()); + SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(FALSE); + xPresentation->startWithArguments(aProperties); + + // Restore previous StartWithActualPage value. + SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(bSavedState); } } |