Update ooo320-m1
[ooovba.git] / applied_patches / 0347-oox-pptx-import-fix-transition-auto-advance.diff
blob627839959a8072ea7b30f48cca7cdce105a971ca
1 diff -rup oox-orig/inc/oox/ppt/slidetransition.hxx oox/inc/oox/ppt/slidetransition.hxx
2 --- oox-orig/inc/oox/ppt/slidetransition.hxx 2009-10-05 17:12:59.000000000 +0200
3 +++ oox/inc/oox/ppt/slidetransition.hxx 2009-10-05 17:13:29.000000000 +0200
4 @@ -54,6 +54,8 @@ namespace oox { namespace ppt {
5 { mnFadeColor = nColor; }
6 void setMode( sal_Bool bMode )
7 { mbMode = bMode; }
8 + void setOoxAdvanceTime( sal_Int32 nAdvanceTime )
9 + { mnAdvanceTime = nAdvanceTime; }
11 static sal_Int16 ooxToOdpDirection( ::sal_Int32 nOoxType );
12 static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType );
13 @@ -71,6 +73,7 @@ namespace oox { namespace ppt {
14 ::sal_Int16 mnAnimationSpeed;
15 ::sal_Int32 mnFadeColor;
16 ::sal_Bool mbMode; /**< http://api.openoffice.org/docs/common/ref/com/sun/star/animations/XTransitionFilter.html Mode property */
17 + ::sal_Int32 mnAdvanceTime;
20 } }
21 diff -rup oox-orig/source/ppt/slidetransitioncontext.cxx oox/source/ppt/slidetransitioncontext.cxx
22 --- oox-orig/source/ppt/slidetransitioncontext.cxx 2009-10-05 17:13:00.000000000 +0200
23 +++ oox/source/ppt/slidetransitioncontext.cxx 2009-10-05 17:13:29.000000000 +0200
24 @@ -70,12 +70,9 @@ SlideTransitionContext::SlideTransitionC
25 attribs.getBool( XML_advClick, true );
27 // careful. if missing, no auto advance... 0 looks like a valid value
28 - // for auto advance
29 + // for auto advance
30 if(attribs.hasAttribute( XML_advTm ))
31 - {
32 - // TODO
33 - xAttribs->getOptionalValue( XML_advTm );
34 - }
35 + maTransition.setOoxAdvanceTime( attribs.getInteger( XML_advTm, -1 ) );
38 SlideTransitionContext::~SlideTransitionContext() throw()
39 diff -rup oox-orig/source/ppt/slidetransition.cxx oox/source/ppt/slidetransition.cxx
40 --- oox-orig/source/ppt/slidetransition.cxx 2009-10-05 17:13:00.000000000 +0200
41 +++ oox/source/ppt/slidetransition.cxx 2009-10-05 17:17:56.000000000 +0200
42 @@ -59,6 +59,7 @@ namespace oox { namespace ppt {
43 , mnAnimationSpeed( AnimationSpeed_FAST )
44 , mnFadeColor( 0 )
45 , mbMode( true )
46 + , mnAdvanceTime( -1 )
50 @@ -71,6 +72,7 @@ namespace oox { namespace ppt {
51 , mnAnimationSpeed( AnimationSpeed_FAST )
52 , mnFadeColor( 0 )
53 , mbMode( true )
54 + , mnAdvanceTime( -1 )
56 const transition *p = transition::find( sFilterName );
57 if( p )
58 @@ -91,6 +93,10 @@ namespace oox { namespace ppt {
59 aProps[ PROP_TransitionDirection ] <<= mbTransitionDirectionNormal;
60 aProps[ PROP_Speed ] <<= mnAnimationSpeed;
61 aProps[ PROP_TransitionFadeColor ] <<= mnFadeColor;
62 + if( mnAdvanceTime != -1 ) {
63 + aProps[ PROP_Duration ] <<= mnAdvanceTime/1000;
64 + aProps[ PROP_Change ] <<= static_cast<sal_Int32>(1);
65 + }
67 catch( Exception& )
69 @@ -141,8 +147,6 @@ namespace oox { namespace ppt {
75 sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType )
77 sal_Int16 nOdpDirection;
78 diff -rup oox-orig/source/token/properties.txt oox/source/token/properties.txt
79 --- oox-orig/source/token/properties.txt 2009-10-05 17:13:00.000000000 +0200
80 +++ oox/source/token/properties.txt 2009-10-05 17:16:55.000000000 +0200
81 @@ -37,6 +37,7 @@ CellProtection
82 CellStyle
83 CenterHorizontally
84 CenterVertically
85 +Change
86 CharCaseMap
87 CharColor
88 CharContoured
89 @@ -106,6 +107,7 @@ DiagonalTLBR
90 DisplayLabels
91 DrillDownOnDoubleClick
92 Dropdown
93 +Duration
94 EchoChar
95 Enabled
96 EndPosition