summaryrefslogtreecommitdiff
path: root/oox/source/ppt
diff options
context:
space:
mode:
authorTibor Nagy <nagy.tibor2@nisz.hu>2021-07-21 12:48:46 +0200
committerLászló Németh <nemeth@numbertext.org>2021-07-27 11:50:25 +0200
commitf8ddaaf0f5e1fb61e0d4404ea28757bc652ae4be (patch)
treeed882fedaf37b58d90569b0d7dee6fdc0c896731 /oox/source/ppt
parent543f50fb37648bf4eec5fe04ac76b260f36b02b0 (diff)
tdf#142915 PPTX import: support for presentation's timing attribute
See Slide Show->Slide Show Settings...->Change slides manually, which is disabled by default. Now <p:showPr useTimings="false"> is imported correctly, i.e. with enabled "Change slides manually". Note: it seems, com::sun::star::presentation::IsAutomatic UNO attribute has got a bad name and documentation: if it's value is TRUE, "Change slides manually" is enabled, and vice versa. Check with the following Basic code: ' show presentation-level automatic transition (IsAutomatic = False) print ThisComponent.getPresentation().IsAutomatic ' show slide-level automatic transition (Change = 1) Dim oDrawPages as Object, oDrawPage as Object oDrawPages = ThisComponent.getDrawPages() oDrawPage = oDrawPages.getByIndex(0) print oDrawPage.Change Change-Id: Ie4a687a29077cad89f11e77b856c28a1fe09376b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119321 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/ppt')
-rw-r--r--oox/source/ppt/presPropsfragmenthandler.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/oox/source/ppt/presPropsfragmenthandler.cxx b/oox/source/ppt/presPropsfragmenthandler.cxx
index ca466177e944..708f194853fb 100644
--- a/oox/source/ppt/presPropsfragmenthandler.cxx
+++ b/oox/source/ppt/presPropsfragmenthandler.cxx
@@ -41,6 +41,7 @@ void PresPropsFragmentHandler::finalizeImport()
css::uno::Reference<css::beans::XPropertySet> xPresentationProps(
xPresentationSupplier->getPresentation(), css::uno::UNO_QUERY_THROW);
xPresentationProps->setPropertyValue("IsEndless", css::uno::Any(m_bLoop));
+ xPresentationProps->setPropertyValue("IsAutomatic", css::uno::Any(!m_bTiming));
if (!m_sId.isEmpty())
{
@@ -73,6 +74,7 @@ core::ContextHandlerRef PresPropsFragmentHandler::onCreateContext(sal_Int32 aEle
return this;
case PPT_TOKEN(showPr):
m_bLoop = rAttribs.getBool(XML_loop, false);
+ m_bTiming = rAttribs.getBool(XML_useTimings, true);
return this;
case PPT_TOKEN(custShow):
m_sId = rAttribs.getString(XML_id).get();