~ubuntu-branches/ubuntu/karmic/openoffice.org-l10n/karmic

« back to all changes in this revision

Viewing changes to ooo-build/patches/dev300/oox-pptx-import-fix-transition-auto-advance.diff

  • Committer: Bazaar Package Importer
  • Author(s): Chris Cheney
  • Date: 2009-05-26 18:00:00 UTC
  • Revision ID: james.westby@ubuntu.com-20090526180000-t5otxzhj1rru5ovt
Tags: 1:3.1.0-3ubuntu2
* Copy of the openoffice.org source.
  - debian/changelog: Change source name.
  - debian/control.in: Change source name.
  - debian/control: Regenerate control file.

* Correct path to splitgsi in convert2po.
* Disable gsi-export for Rosetta due to bug in localize.pl.
* Reenable building on sparc.
* Switch boost to 1.38.
* Resynchronise with ooo-build-3-1 (271b85e5ce6b601d75d0693b9c937d1eabd069dc).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-05-14 16:18:57.000000000 +0200
 
3
+++ oox/inc/oox/ppt/slidetransition.hxx 2009-05-14 16:31:11.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; }
 
10
 
 
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;
 
18
        };
 
19
 
 
20
 } }
 
21
diff -rup oox-orig/source/ppt/slidetransitioncontext.cxx oox/source/ppt/slidetransitioncontext.cxx
 
22
--- oox-orig/source/ppt/slidetransitioncontext.cxx      2009-05-14 16:18:58.000000000 +0200
 
23
+++ oox/source/ppt/slidetransitioncontext.cxx   2009-05-14 17:40:17.000000000 +0200
 
24
@@ -71,12 +71,9 @@ SlideTransitionContext::SlideTransitionC
 
25
        attribs.getBool( XML_advClick, true );
 
26
 
 
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 ) );
 
36
 }
 
37
 
 
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-05-14 16:18:58.000000000 +0200
 
41
+++ oox/source/ppt/slidetransition.cxx  2009-05-14 17:40:03.000000000 +0200
 
42
@@ -58,6 +58,7 @@ namespace oox { namespace ppt {
 
43
                , mnAnimationSpeed( AnimationSpeed_FAST )
 
44
                , mnFadeColor( 0 )
 
45
                , mbMode( true )
 
46
+               , mnAdvanceTime( -1 )
 
47
        {
 
48
 
 
49
        }
 
50
@@ -70,6 +71,7 @@ namespace oox { namespace ppt {
 
51
                , mnAnimationSpeed( AnimationSpeed_FAST )
 
52
                , mnFadeColor( 0 )
 
53
                , mbMode( true )
 
54
+               , mnAdvanceTime( -1 )
 
55
        {
 
56
                const transition *p = transition::find( sFilterName );
 
57
                if( p )
 
58
@@ -90,6 +92,10 @@ namespace oox { namespace ppt {
 
59
                        aProps[ CREATE_OUSTRING( "TransitionDirection" ) ] = Any( mbTransitionDirectionNormal );
 
60
                        aProps[ CREATE_OUSTRING( "Speed" ) ] = Any( mnAnimationSpeed );
 
61
                        aProps[ CREATE_OUSTRING( "TransitionFadeColor" ) ] = Any( mnFadeColor );
 
62
+                       if( mnAdvanceTime != -1 ) {
 
63
+                           aProps[ CREATE_OUSTRING( "Duration" ) ] = Any( mnAdvanceTime/1000 );
 
64
+                           aProps[ CREATE_OUSTRING( "Change" ) ] = Any( static_cast<sal_Int32>(1) );
 
65
+                       }
 
66
                }
 
67
                catch( Exception& )
 
68
                {
 
69
@@ -140,8 +146,6 @@ namespace oox { namespace ppt {
 
70
                }
 
71
        }
 
72
 
 
73
-
 
74
-
 
75
        sal_Int16 SlideTransition::ooxToOdpEightDirections( ::sal_Int32 nOoxType )
 
76
        {
 
77
     sal_Int16 nOdpDirection;