summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/oox/ppt/slidetransition.hxx3
-rw-r--r--oox/source/core/fragmenthandler2.cxx1
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/ppt/slidetransition.cxx13
-rw-r--r--oox/source/ppt/slidetransitioncontext.cxx8
-rw-r--r--oox/source/token/namespaces-strict.txt4
-rw-r--r--oox/source/token/namespaces.hxx.tail1
-rw-r--r--oox/source/token/namespaces.txt4
-rw-r--r--oox/source/token/tokens.txt1
-rw-r--r--sd/qa/unit/export-tests.cxx3
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx40
11 files changed, 71 insertions, 9 deletions
diff --git a/include/oox/ppt/slidetransition.hxx b/include/oox/ppt/slidetransition.hxx
index b0e235189af3..4680320068c0 100644
--- a/include/oox/ppt/slidetransition.hxx
+++ b/include/oox/ppt/slidetransition.hxx
@@ -53,6 +53,9 @@ namespace oox { namespace ppt {
void setOoxTransitionType( ::sal_Int32 OoxType,
::sal_Int32 param1, ::sal_Int32 param2 );
+
+ void setPresetTransition(OUString sPresetTransition);
+
private:
::sal_Int16 mnTransitionType;
::sal_Int16 mnTransitionSubType;
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
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index f16e9e9547fc..7b078aad1899 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1415,6 +1415,9 @@ void SdExportTest::testExportTransitionsPPTX()
// INSIDE TURNING CUBE
CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 60, TransitionType::MISCSHAPEWIPE, TransitionSubType::CORNERSIN));
+ // FALL
+ CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 61, TransitionType::MISCSHAPEWIPE, TransitionSubType::LEFTTORIGHT));
+
// VORTEX
CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 70, TransitionType::MISCSHAPEWIPE, TransitionSubType::VERTICAL));
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 9d412f79a696..4d10949a3d8a 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -70,6 +70,7 @@
FSNS(XML_xmlns, XML_p), "http://schemas.openxmlformats.org/presentationml/2006/main", \
FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships", \
FSNS(XML_xmlns, XML_p14), "http://schemas.microsoft.com/office/powerpoint/2010/main", \
+ FSNS(XML_xmlns, XML_p15), "http://schemas.microsoft.com/office/powerpoint/2012/main", \
FSNS(XML_xmlns, XML_mc), "http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -521,16 +522,20 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
bool bOOXmlSpecificTransition = false;
sal_Int32 nTransition = 0;
- sal_Int32 nTransition14 = 0;
-
const char* pDirection = NULL;
const char* pDirection14 = NULL;
const char* pOrientation = NULL;
const char* pThruBlk = NULL;
const char* pSpokes = NULL;
char pSpokesTmp[2] = "0";
+
+ // p14
+ sal_Int32 nTransition14 = 0;
const char* pInverted = nullptr;
+ //p15
+ const char* pPresetTransition = nullptr;
+
if (!nPPTTransitionType)
{
switch(nTransitionType)
@@ -570,6 +575,11 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
nTransition14 = XML_ripple;
bOOXmlSpecificTransition = true;
break;
+ case animations::TransitionSubType::LEFTTORIGHT: // Fall
+ nTransition = XML_fade;
+ pPresetTransition = "fallOver";
+ bOOXmlSpecificTransition = true;
+ break;
case animations::TransitionSubType::CORNERSIN:
pInverted = "true";
case animations::TransitionSubType::CORNERSOUT:
@@ -615,20 +625,32 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
if( changeType == 1 && GETA( Duration ) )
mAny >>= advanceTiming;
- if (nTransition14)
+ if (nTransition14 || pPresetTransition)
{
+ const char* pRequiresNS = nTransition14 ? "p14" : "p15";
+
pFS->startElement(FSNS(XML_mc, XML_AlternateContent), FSEND);
- pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "p14", FSEND);
+ pFS->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, pRequiresNS, FSEND);
+
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
XML_advTm, advanceTiming != -1 ? I32S( advanceTiming*1000 ) : NULL,
FSEND );
- pFS->singleElementNS(XML_p14, nTransition14,
- XML_isInverted, pInverted,
- XML_dir, pDirection14,
- FSEND );
+ if (nTransition14)
+ {
+ pFS->singleElementNS(XML_p14, nTransition14,
+ XML_isInverted, pInverted,
+ XML_dir, pDirection14,
+ FSEND );
+ }
+ else if (pPresetTransition)
+ {
+ pFS->singleElementNS(XML_p15, XML_prstTrans,
+ XML_prst, pPresetTransition,
+ FSEND );
+ }
pFS->endElement(FSNS(XML_p, XML_transition));
@@ -745,7 +767,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
pFS->endElementNS(XML_p, XML_transition);
- if (nTransition14)
+ if (nTransition14 || pPresetTransition)
{
pFS->endElement(FSNS(XML_mc, XML_Fallback));
pFS->endElement(FSNS(XML_mc, XML_AlternateContent));