[Libreoffice-commits] core.git: 3 commits - oox/source sd/qa sd/source

Tomaž Vajngerl tomaz.vajngerl at collabora.com
Mon Nov 9 02:01:27 PST 2015


 oox/source/ppt/slidetransition.cxx        |    8 ++++++++
 oox/source/ppt/slidetransitioncontext.cxx |    2 ++
 sd/qa/unit/data/AllTransitions.odp        |binary
 sd/qa/unit/export-tests.cxx               |   12 ++++++++++--
 sd/source/filter/eppt/pptx-epptooxml.cxx  |   24 ++++++++++++++++++++++++
 5 files changed, 44 insertions(+), 2 deletions(-)

New commits:
commit c24fbd8c8a4f00c4eeaa97528832afa67d4af1e7
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Mon Nov 9 10:59:32 2015 +0100

    pptx: import "Vortex" and "Ripple" transition + test
    
    Change-Id: I29d71e9c07c4964275c13772cdb6042624550acb

diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx
index 2c130dd..e623558 100644
--- a/oox/source/ppt/slidetransition.cxx
+++ b/oox/source/ppt/slidetransition.cxx
@@ -405,6 +405,14 @@ namespace oox { namespace ppt {
             else
                 mnTransitionSubType = TransitionSubType::CORNERSOUT;
             break;
+        case P14_TOKEN(vortex):
+            mnTransitionType = TransitionType::MISCSHAPEWIPE;
+            mnTransitionSubType = TransitionSubType::VERTICAL;
+            break;
+        case P14_TOKEN(ripple):
+            mnTransitionType = TransitionType::MISCSHAPEWIPE;
+            mnTransitionSubType = TransitionSubType::HORIZONTAL;
+            break;
         default:
             mnTransitionType = 0;
             break;
diff --git a/oox/source/ppt/slidetransitioncontext.cxx b/oox/source/ppt/slidetransitioncontext.cxx
index 78d7825..4a9c996 100644
--- a/oox/source/ppt/slidetransitioncontext.cxx
+++ b/oox/source/ppt/slidetransitioncontext.cxx
@@ -129,6 +129,8 @@ SlideTransitionContext::~SlideTransitionContext() throw()
     case PPT_TOKEN( plus ):
     case PPT_TOKEN( random ):
     case PPT_TOKEN( wedge ):
+    case P14_TOKEN( vortex ):
+    case P14_TOKEN( ripple ):
         // CT_Empty
         if (!mbHasTransition)
         {
diff --git a/sd/qa/unit/data/AllTransitions.odp b/sd/qa/unit/data/AllTransitions.odp
index fa2eced..35b7a49 100644
Binary files a/sd/qa/unit/data/AllTransitions.odp and b/sd/qa/unit/data/AllTransitions.odp differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index bba730a..f16e9e9 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -173,13 +173,15 @@ public:
     CPPUNIT_TEST(testBulletMarginAndIndentation);
     CPPUNIT_TEST(testParaMarginAndindentation);
     CPPUNIT_TEST(testTransparentBackground);
-    CPPUNIT_TEST(testExportTransitionsPPTX);
     CPPUNIT_TEST(testTdf91378);
 
 #if !defined WNT
     CPPUNIT_TEST(testBnc822341);
 #endif
     CPPUNIT_TEST(testTdf80224);
+
+    CPPUNIT_TEST(testExportTransitionsPPTX);
+
     CPPUNIT_TEST_SUITE_END();
 };
 
@@ -1413,8 +1415,14 @@ void SdExportTest::testExportTransitionsPPTX()
     // INSIDE TURNING CUBE
     CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 60, TransitionType::MISCSHAPEWIPE, TransitionSubType::CORNERSIN));
 
+    // VORTEX
+    CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 70, TransitionType::MISCSHAPEWIPE, TransitionSubType::VERTICAL));
+
+    // RIPPLE
+    CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 71, TransitionType::MISCSHAPEWIPE, TransitionSubType::HORIZONTAL));
+
     // NEWSFLASH
-    CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 71, TransitionType::ZOOM, TransitionSubType::ROTATEIN));
+    CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 72, TransitionType::ZOOM, TransitionSubType::ROTATEIN));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
commit 733846f20c43588478d01c448f622cc9854bc59e
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Mon Nov 9 10:51:06 2015 +0100

    pptx: export "Ripple" and "Vortex" transition
    
    Change-Id: I7e6683e8d4b461f193f64e2b1f077a5936008c1f

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 7862bc2..9d412f7 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -560,6 +560,16 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
                         pDirection14 = "r";
                         bOOXmlSpecificTransition = true;
                         break;
+                    case animations::TransitionSubType::VERTICAL: // Vortex
+                        nTransition = XML_fade;
+                        nTransition14 = XML_vortex;
+                        bOOXmlSpecificTransition = true;
+                        break;
+                    case animations::TransitionSubType::HORIZONTAL: // Ripple
+                        nTransition = XML_fade;
+                        nTransition14 = XML_ripple;
+                        bOOXmlSpecificTransition = true;
+                        break;
                     case animations::TransitionSubType::CORNERSIN:
                         pInverted = "true";
                     case animations::TransitionSubType::CORNERSOUT:
commit b3120fd7c408ef0d2f35c2b0a905f5db65eaa294
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.com>
Date:   Mon Nov 9 10:44:30 2015 +0100

    pptx: export "Turn around" and "Rochade" transition
    
    Change-Id: Id984b9bf3b67e3bb1d8287819c28c23a0b8a2a61

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 5071f3a..7862bc2 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -524,6 +524,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
     sal_Int32 nTransition14 = 0;
 
     const char* pDirection = NULL;
+    const char* pDirection14 = NULL;
     const char* pOrientation = NULL;
     const char* pThruBlk = NULL;
     const char* pSpokes = NULL;
@@ -547,6 +548,18 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
             {
                 switch(nTransitionSubtype)
                 {
+                    case animations::TransitionSubType::TOPTOBOTTOM: // Turn around
+                        nTransition = XML_fade;
+                        nTransition14 = XML_flip;
+                        pDirection14 = "l";
+                        bOOXmlSpecificTransition = true;
+                        break;
+                    case animations::TransitionSubType::BOTTOMRIGHT: // Rochade
+                        nTransition = XML_fade;
+                        nTransition14 = XML_switch;
+                        pDirection14 = "r";
+                        bOOXmlSpecificTransition = true;
+                        break;
                     case animations::TransitionSubType::CORNERSIN:
                         pInverted = "true";
                     case animations::TransitionSubType::CORNERSOUT:
@@ -604,6 +617,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
 
         pFS->singleElementNS(XML_p14, nTransition14,
                              XML_isInverted, pInverted,
+                             XML_dir, pDirection14,
                              FSEND );
 
         pFS->endElement(FSNS(XML_p, XML_transition));


More information about the Libreoffice-commits mailing list