21#include "presentation.h"
29using namespace Libppt;
34 Presentation* presentation;
36 GroupObject* rootObject;
42Slide::Slide( Presentation* pr )
46 d->rootObject = new GroupObject;
61 d->rootObject = new GroupObject;
69void Slide::setTitle( const UString& t )
75 for( int i=0; i<t. length(); i++ )
76 if( t[i] != UChar(11) )
83GroupObject *Slide::rootObject()
88void Slide::setRootObject( GroupObject* root )
94TextObject* recursiveSearch( GroupObject* group, unsigned placeId )
97 for( unsigned i=0; i<group->objectCount(); i++ )
99 Object* object = group->object(i);
100 if( object->isText() )
102 TextObject* textObject = static_cast<TextObject* >(object);
104 if( textObject->id() == (int)placeId )
107 if( object->isGroup() )
108 return recursiveSearch( static_cast<GroupObject* >( object), placeId );
115TextObject* Slide::textObject( unsigned placeId )
117 return recursiveSearch( d->rootObject, placeId );
120double Slide::pageWidth() const
125void Slide::setPageWidth( double pageWidth )
127 d->pageWidth = pageWidth;
130double Slide::pageHeight() const
132 return d->pageHeight;
135void Slide::setPageHeight( double pageHeight )
137 d->pageHeight = pageHeight;
static UString null Static instance of a null string.
|