Revert "Slideshow: Add 'Oval' Shape Transition variant"

The patch caused problems with the export filter tests, to check that you need to add --with-export-validation to your autopen.input 

see https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/export-validation for more info on how to set it up

This reverts commit 248c5ea771255b54e64394458a321ccf829bbd02.

Change-Id: Ib3b8fa7bf80630feeca1f24dfb1ceb5a945d7162
Reviewed-on: https://gerrit.libreoffice.org/26114
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
jan iversen 2016-06-09 15:23:06 +00:00
parent d6a6f587a8
commit 4bcb4774a3
14 changed files with 11 additions and 127 deletions

View File

@ -50,11 +50,6 @@
<value xml:lang="en-US">Circle</value>
</prop>
</node>
<node oor:name="ooo-entrance-oval" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Oval Vertical</value>
</prop>
</node>
<node oor:name="ooo-entrance-fly-in-slow" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Fly in Slow</value>
@ -1733,16 +1728,6 @@
<value xml:lang="en-US">Circle</value>
</prop>
</node>
<node oor:name="oval-horizontal" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Oval Horizontal</value>
</prop>
</node>
<node oor:name="oval-vertical" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Oval Vertical</value>
</prop>
</node>
<node oor:name="diamond" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Diamond</value>
@ -2066,22 +2051,6 @@
<value>circle</value>
</prop>
</node>
<node oor:name="shape-oval-horizontal" oor:op="replace">
<prop oor:name="Set" oor:type="xs:string">
<value>shape</value>
</prop>
<prop oor:name="Variant" oor:type="xs:string">
<value>oval-horizontal</value>
</prop>
</node>
<node oor:name="shape-oval-vertical" oor:op="replace">
<prop oor:name="Set" oor:type="xs:string">
<value>shape</value>
</prop>
<prop oor:name="Variant" oor:type="xs:string">
<value>oval-vertical</value>
</prop>
</node>
<node oor:name="shape-diamond" oor:op="replace">
<prop oor:name="Set" oor:type="xs:string">
<value>shape</value>
@ -2414,7 +2383,7 @@
<value xml:lang="en-US">Basic</value>
</prop>
<prop oor:name="Effects" oor:type="oor:string-list">
<value oor:separator=";">ooo-entrance-appear;ooo-entrance-fly-in;ooo-entrance-venetian-blinds;ooo-entrance-box;ooo-entrance-checkerboard;ooo-entrance-circle;ooo-entrance-oval;ooo-entrance-fly-in-slow;ooo-entrance-diamond;ooo-entrance-dissolve-in;ooo-entrance-flash-once;ooo-entrance-peek-in;ooo-entrance-plus;ooo-entrance-random-bars;ooo-entrance-split;ooo-entrance-diagonal-squares;ooo-entrance-wedge;ooo-entrance-wheel;ooo-entrance-wipe;ooo-entrance-random</value>
<value oor:separator=";">ooo-entrance-appear;ooo-entrance-fly-in;ooo-entrance-venetian-blinds;ooo-entrance-box;ooo-entrance-checkerboard;ooo-entrance-circle;ooo-entrance-fly-in-slow;ooo-entrance-diamond;ooo-entrance-dissolve-in;ooo-entrance-flash-once;ooo-entrance-peek-in;ooo-entrance-plus;ooo-entrance-random-bars;ooo-entrance-split;ooo-entrance-diagonal-squares;ooo-entrance-wedge;ooo-entrance-wheel;ooo-entrance-wipe;ooo-entrance-random</value>
</prop>
</node>
<node oor:name="special" oor:op="replace">

View File

@ -371,17 +371,6 @@ namespace oox { namespace ppt {
mnTransitionType = TransitionType::ELLIPSEWIPE;
mnTransitionSubType = TransitionSubType::CIRCLE;
break;
case PPT_TOKEN( oval ):
mnTransitionType = TransitionType::ELLIPSEWIPE;
if( ooxToOdpDirection( param1 ) == TransitionSubType::VERTICAL )
{
mnTransitionSubType = TransitionSubType::VERTICAL;
}
else
{
mnTransitionSubType = TransitionSubType::HORIZONTAL;
}
break;
case PPT_TOKEN( diamond ):
mnTransitionType = TransitionType::IRISWIPE;
mnTransitionSubType = TransitionSubType::DIAMOND;

View File

@ -125,13 +125,6 @@ SlideTransitionContext::~SlideTransitionContext() throw()
}
return this;
case PPT_TOKEN( circle ):
case PPT_TOKEN( oval ) :
if (!mbHasTransition)
{
mbHasTransition = true;
maTransition.setOoxTransitionType( aElementToken, rAttribs.getToken( XML_dir, XML_vert), 0);
}
return this;
case PPT_TOKEN( diamond ):
case PPT_TOKEN( dissolve ):
case PPT_TOKEN( newsflash ):

Binary file not shown.

View File

@ -1502,9 +1502,6 @@ void SdExportTest::testExportTransitionsPPTX()
// NEWSFLASH
CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 74, TransitionType::ZOOM, TransitionSubType::ROTATEIN));
//OVAL VERTICAL
CPPUNIT_ASSERT(checkTransitionOnPage(xDoc, 76, TransitionType::ELLIPSEWIPE, TransitionSubType::VERTICAL));
xDocShRef->DoClose();
}

View File

@ -798,16 +798,7 @@ sal_Int8 PPTWriterBase::GetTransition( sal_Int16 nTransitionType, sal_Int16 nTra
break;
case TransitionType::ELLIPSEWIPE :
{
switch( nTransitionSubtype ) {
case TransitionSubType::VERTICAL:
nPPTTransitionType = PPT_TRANSITION_TYPE_OVAL_VERTICAL;
break;
case TransitionSubType::HORIZONTAL:
nPPTTransitionType = PPT_TRANSITION_TYPE_OVAL_HORIZONTAL;
break;
default:
nPPTTransitionType = PPT_TRANSITION_TYPE_CIRCLE;
}
nPPTTransitionType = PPT_TRANSITION_TYPE_CIRCLE;
}
break;
case TransitionType::FOURBOXWIPE :

View File

@ -696,12 +696,6 @@ void PowerPointExport::WriteTransition( const FSHelperPtr& pFS )
case PPT_TRANSITION_TYPE_CIRCLE:
nTransition = XML_circle;
break;
case PPT_TRANSITION_TYPE_OVAL_VERTICAL:
nTransition = XML_oval;
break;
case PPT_TRANSITION_TYPE_OVAL_HORIZONTAL:
nTransition = XML_oval;
break;
case PPT_TRANSITION_TYPE_COMB:
nTransition = XML_comb;
pDirection = (nDirection == 1) ? "vert" : "horz";

View File

@ -60,8 +60,6 @@ namespace ppt
#define PPT_TRANSITION_TYPE_SMOOTHFADE 23 // Alpha Fade in MS-PPT Specs
#define PPT_TRANSITION_TYPE_WHEEL 26
#define PPT_TRANSITION_TYPE_CIRCLE 27
#define PPT_TRANSITION_TYPE_OVAL_HORIZONTAL 28
#define PPT_TRANSITION_TYPE_OVAL_VERTICAL 29
// atoms
#define DFF_msofbtAnimEvent 0xf125

View File

@ -1720,18 +1720,6 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
pPage->setTransitionSubtype( animations::TransitionSubType::CIRCLE );
}
break;
case PPT_TRANSITION_TYPE_OVAL_VERTICAL :
{
pPage->setTransitionType( animations::TransitionType::ELLIPSEWIPE );
pPage->setTransitionSubtype( animations::TransitionSubType::VERTICAL );
}
break;
case PPT_TRANSITION_TYPE_OVAL_HORIZONTAL :
{
pPage->setTransitionType( animations::TransitionType::ELLIPSEWIPE );
pPage->setTransitionSubtype( animations::TransitionSubType::HORIZONTAL );
}
break;
case PPT_TRANSITION_TYPE_WEDGE :
{
pPage->setTransitionType( animations::TransitionType::FANWIPE );

View File

@ -91,22 +91,6 @@
</anim:par>
<anim:par smil:begin="indefinite" smil:fill="hold">
<anim:par smil:begin="0" smil:fill="hold">
<anim:par pres:preset-property="Direction" smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-entrance-oval" pres:preset-sub-type="in">
<anim:set smil:begin="0" smil:dur="0.001" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:transitionFilter smil:dur="2" smil:type="ellipseWipe" smil:subtype="vertical" smil:direction="reverse"/>
</anim:par>
</anim:par>
</anim:par>
<anim:par smil:begin="indefinite" smil:fill="hold">
<anim:par smil:begin="0" smil:fill="hold">
<anim:par pres:preset-property="Direction" smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-entrance-oval" pres:preset-sub-type="out">
<anim:set smil:begin="0" smil:dur="0.001" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:transitionFilter smil:dur="2" smil:type="ellipseWipe" smil:subtype="vertical"/>
</anim:par>
</anim:par>
</anim:par>
<anim:par smil:begin="indefinite" smil:fill="hold">
<anim:par smil:begin="0" smil:fill="hold">
<anim:par pres:preset-property="Direction" smil:begin="0" smil:fill="hold" pres:node-type="on-click" pres:preset-class="entrance" pres:preset-id="ooo-entrance-fly-in-slow" pres:preset-sub-type="from-bottom">
<anim:set smil:begin="0" smil:dur="0.001" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
<anim:animate smil:dur="5" smil:fill="hold" smil:attributeName="x" smil:values="x;x" smil:keyTimes="0;1"/>

View File

@ -107,12 +107,6 @@
<anim:par pres:preset-id="shape-circle">
<anim:transitionFilter smil:type="ellipseWipe" smil:subtype="circle"/>
</anim:par>
<anim:par pres:preset-id="shape-oval-horizontal">
<anim:transitionFilter smil:type="ellipseWipe" smil:subtype="horizontal"/>
</anim:par>
<anim:par pres:preset-id="shape-oval-vertical">
<anim:transitionFilter smil:type="ellipseWipe" smil:subtype="vertical"/>
</anim:par>
<!-- <anim:par pres:preset-id="circle-in"> -->
<!-- <anim:transitionFilter smil:type="ellipseWipe" smil:subtype="circle" smil:direction="reverse"/> -->
<!-- </anim:par> -->

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <com/sun/star/animations/TransitionSubType.hpp>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include "ellipsewipe.hxx"
@ -29,23 +29,12 @@ namespace internal {
::basegfx::B2DPolyPolygon EllipseWipe::operator () ( double t )
{
::basegfx::B2DPoint rCenter(0.5,0.5);
double fRadius = ::basegfx::pruneScaleValue( t * M_SQRT2 / 2.0 );
if( mnSubType == com::sun::star::animations::TransitionSubType::VERTICAL )
{
//oval :
::basegfx::B2DPolygon poly (
::basegfx::tools::createPolygonFromEllipse( rCenter, fRadius*2, fRadius ) ); //Horizontal Ellipse is rotated by 90 degress
return ::basegfx::B2DPolyPolygon( poly );
}
else
{
// circle:
::basegfx::B2DPolygon poly(
::basegfx::tools::createPolygonFromCircle( rCenter, fRadius ) );
return ::basegfx::B2DPolyPolygon( poly );
}
// currently only circle:
::basegfx::B2DPolygon poly(
::basegfx::tools::createPolygonFromCircle(
::basegfx::B2DPoint( 0.5, 0.5 ),
::basegfx::pruneScaleValue( t * M_SQRT2 / 2.0 ) ) );
return ::basegfx::B2DPolyPolygon( poly );
}
}

View File

@ -30,10 +30,8 @@ namespace internal {
class EllipseWipe : public ParametricPolyPolygon
{
public:
explicit EllipseWipe( sal_Int32 nSubType ): mnSubType( nSubType ) {}
explicit EllipseWipe( sal_Int32 /*nTransitionSubType xxx todo */ ) {}
virtual ::basegfx::B2DPolyPolygon operator () ( double x ) override;
private:
sal_Int32 mnSubType;
};
}

View File

@ -699,7 +699,7 @@ static const TransitionInfo lcl_transitionInfo[] =
1.0, // no scaling
TransitionInfo::REVERSEMETHOD_SUBTRACT_AND_INVERT,
true, // 'out' by parameter sweep inversion
true // scale isotrophically to target size
false // scale isotrophically to target size
},