diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-09 13:32:32 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-09 13:36:20 +0100 |
commit | 18cd4b273f3781620ecb8dd68e6d616bba498992 (patch) | |
tree | 481297ff54232cdf90a23ca42df4c651c8ad0726 /oox | |
parent | Prevent += called on temporary O[U]String instances (diff) | |
download | core-18cd4b273f3781620ecb8dd68e6d616bba498992.tar.gz core-18cd4b273f3781620ecb8dd68e6d616bba498992.zip |
pptx: "fall" transition, which needed p15 namespace
Added p15 namespace which is present in MSO 2013+ documents. It
adds a "prstTrans" element with a string "prst" attribute which
is a name of the transition to be performed.
This was added to support "fall" transition which translates to
"fallOver" preset transition.
Change-Id: I429bb106a12c1b99cce756502508e917720daef3
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/fragmenthandler2.cxx | 1 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/slidetransition.cxx | 13 | ||||
-rw-r--r-- | oox/source/ppt/slidetransitioncontext.cxx | 8 | ||||
-rw-r--r-- | oox/source/token/namespaces-strict.txt | 4 | ||||
-rw-r--r-- | oox/source/token/namespaces.hxx.tail | 1 | ||||
-rw-r--r-- | oox/source/token/namespaces.txt | 4 | ||||
-rw-r--r-- | oox/source/token/tokens.txt | 1 |
8 files changed, 34 insertions, 0 deletions
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx index ba7b6ef92579..2057eb6b367d 100644 --- a/oox/source/core/fragmenthandler2.cxx +++ b/oox/source/core/fragmenthandler2.cxx @@ -72,6 +72,7 @@ bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeLis static std::vector<OUString> aSupportedNS = { "p14", + "p15", }; if (std::find(aSupportedNS.begin(), aSupportedNS.end(), aRequires) != aSupportedNS.end()) diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index d59b2b44bee8..fca049c0f87f 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -121,6 +121,7 @@ struct NamespaceIds: public rtl::StaticWithInit< "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main", "http://schemas.libreoffice.org/", "http://schemas.microsoft.com/office/powerpoint/2010/main" + "http://schemas.microsoft.com/office/powerpoint/2012/main" }; static const sal_Int32 namespaceIds[] = { @@ -150,6 +151,7 @@ struct NamespaceIds: public rtl::StaticWithInit< NMSP_xls14Lst, NMSP_loext, NMSP_p14, + NMSP_p15, }; Sequence< beans::Pair< OUString, sal_Int32 > > aRet(SAL_N_ELEMENTS(namespaceIds)); diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index e623558f1962..6681447b2eb2 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -419,6 +419,19 @@ namespace oox { namespace ppt { } } + void SlideTransition::setPresetTransition(OUString sPresetTransition) + { + if (sPresetTransition == "fallOver") + { + mnTransitionType = TransitionType::MISCSHAPEWIPE; + mnTransitionSubType = TransitionSubType::LEFTTORIGHT; + } + else + { + mnTransitionType = 0; + } + } + } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx index 4a9c996d695b..a5d5496fe025 100644 --- a/oox/source/ppt/slidetransitioncontext.cxx +++ b/oox/source/ppt/slidetransitioncontext.cxx @@ -152,6 +152,14 @@ SlideTransitionContext::~SlideTransitionContext() throw() maTransition.setOoxTransitionType(aElementToken, sal_Int32(rAttribs.getBool(XML_isInverted, false)), 0); } return this; + case P15_TOKEN(prstTrans): + if (!mbHasTransition) + { + mbHasTransition = true; + maTransition.setPresetTransition(rAttribs.getString(XML_prst, "")); + } + return this; + default: break; diff --git a/oox/source/token/namespaces-strict.txt b/oox/source/token/namespaces-strict.txt index 74efa82039d8..69eb3356efb8 100644 --- a/oox/source/token/namespaces-strict.txt +++ b/oox/source/token/namespaces-strict.txt @@ -80,6 +80,10 @@ w14 http://schemas.microsoft.com/office/word/2010/wordml a14 http://schemas.microsoft.com/office/drawingml/2010/main p14 http://schemas.microsoft.com/office/powerpoint/2010/main +# MSO 2012/2013 extensions --------------------------------------------------------- + +p15 http://schemas.microsoft.com/office/powerpoint/2012/main + # extlst namespaces # xls14Lst for features introduced by excel 2010 diff --git a/oox/source/token/namespaces.hxx.tail b/oox/source/token/namespaces.hxx.tail index 792228ccd32f..89f8c1c4d10b 100644 --- a/oox/source/token/namespaces.hxx.tail +++ b/oox/source/token/namespaces.hxx.tail @@ -41,6 +41,7 @@ inline sal_Int32 getNamespace( sal_Int32 nToken ) { return nToken & NMSP_MASK; } #define PC_TOKEN( token ) OOX_TOKEN( packageContentTypes, token ) #define PPT_TOKEN( token ) OOX_TOKEN( ppt, token ) #define P14_TOKEN( token ) OOX_TOKEN( p14, token ) +#define P15_TOKEN( token ) OOX_TOKEN( p15, token ) #define PR_TOKEN( token ) OOX_TOKEN( packageRel, token ) #define R_TOKEN( token ) OOX_TOKEN( officeRel, token ) #define VML_TOKEN( token ) OOX_TOKEN( vml, token ) diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt index b309dc6ca40f..792057256e81 100644 --- a/oox/source/token/namespaces.txt +++ b/oox/source/token/namespaces.txt @@ -80,6 +80,10 @@ w14 http://schemas.microsoft.com/office/word/2010/wordml a14 http://schemas.microsoft.com/office/drawing/2010/main p14 http://schemas.microsoft.com/office/powerpoint/2010/main +# MSO 2012/2013 extensions --------------------------------------------------------- + +p15 http://schemas.microsoft.com/office/powerpoint/2012/main + # extlst namespaces # xls14Lst for features introduced by excel 2010 diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index e44830d34b01..b113c84ee209 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -3798,6 +3798,7 @@ overwriteClear owners p p14 +p15 pBdr pLen pPos |