|
From: <nma...@us...> - 2006-03-20 08:36:33
|
Revision: 31 Author: nmarkgraf Date: 2006-03-20 00:36:20 -0800 (Mon, 20 Mar 2006) ViewCVS: http://svn.sourceforge.net/opendocumentphp/?rev=31&view=rev Log Message: ----------- Minor bugfixes: - Still OpenDocumentPackage is not working, but OpenDocumentSingle is on a good way. - Fixed a lot of tiny bugs, mostly typos. Modified Paths: -------------- poc/src/OpenDocumentSingle.php poc/src/OpenDocumentSingleTest.php poc/src/content/Content.php poc/src/content/Scripts.php poc/src/styles/FontFaceDeclaration.php poc/src/styles/Style.php Modified: poc/src/OpenDocumentSingle.php =================================================================== --- poc/src/OpenDocumentSingle.php 2006-03-20 08:05:41 UTC (rev 30) +++ poc/src/OpenDocumentSingle.php 2006-03-20 08:36:20 UTC (rev 31) @@ -135,7 +135,7 @@ $this->root->appendChild( $this->DocumentObjects[ "masterstyles" ]->get() ); $this->root->appendChild( $this->DocumentObjects[ "body" ]->get() ); - $this->dom->appendChild( $this->root ); +// $this->dom->appendChild( $this->root ); $this->isCommited = true; } Modified: poc/src/OpenDocumentSingleTest.php =================================================================== --- poc/src/OpenDocumentSingleTest.php 2006-03-20 08:05:41 UTC (rev 30) +++ poc/src/OpenDocumentSingleTest.php 2006-03-20 08:36:20 UTC (rev 31) @@ -27,7 +27,8 @@ $ODT = new OpenDocumentSingle(); $this->assertNotNull( $ODT, "Error constructing OpenDocumentManifest without a given mimetype." ); - + + /* Initialize Meta data: */ $meta = $ODT->getMeta(); $meta->addDublinCore( "title", "Test" ); $meta->addDublinCore( "creator", "Testo Tester" ); @@ -36,29 +37,24 @@ $meta->addGenerator( ); $meta->addInitialCreator( "Testo Tester" ); $meta->addCreationDate(); - - $content = $ODT->getContent(); - - $content->addNoScript(); - - $content->addFontFace( "Test", "Tahoma" ); - - $content->addNoAutomaticStyles(); - - $text = $content->getBody()->getText(); - - $text->addNoForms(); - - $text->addToText( $text->getTextHeading( "Heading", "The first step" ) ); - $text->addToText( $text->getTextParagraph( "Paragraph", "This is a little test!" ) ); - - $style = $ODT->getStyle(); + /* Initialize Font Face Declarations: */ $styleAttr = array(); $styleAttr[ "font-family" ] ="Tahoma"; - $style->getFontFaceDecl()->addFontFace( "Test", $styleAttr ); + + $fontfacedelc = $ODT->getFontFaceDeclaration(); + $fontfacedelc->addFontFace( "Test", $styleAttr ); unset( $styleAttr ); - + + /* Add text to Body: */ + $text = $ODT->getBody()->getText(); + + $text->addToText( $text->getTextHeading( "Heading", "The first step" ) ); + $text->addToText( $text->getTextParagraph( "Paragraph", "This is a little test!" ) ); + + /* Initialize Styles: */ + $style = $ODT->getStyle(); + // Set default style $style->addDefaultStyle( "paragraph" ); Modified: poc/src/content/Content.php =================================================================== --- poc/src/content/Content.php 2006-03-20 08:05:41 UTC (rev 30) +++ poc/src/content/Content.php 2006-03-20 08:36:20 UTC (rev 31) @@ -13,7 +13,7 @@ * @since 0.4.4 */ -require_once( "content/Script.php" ); +require_once( "content/Scripts.php" ); require_once( "styles/FontFaceDeclaration.php" ); require_once( "styles/AutomaticStyles.php" ); require_once( "content/Body.php" ); Modified: poc/src/content/Scripts.php =================================================================== --- poc/src/content/Scripts.php 2006-03-20 08:05:41 UTC (rev 30) +++ poc/src/content/Scripts.php 2006-03-20 08:36:20 UTC (rev 31) @@ -1,101 +1,105 @@ -\xFF\xFE< |