123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929 |
- <?php
- /**
- * Create tag elements
- *
- * @category Phpdocx
- * @package elements
- * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
- * (http://www.2mdc.com)
- * @license LGPL
- * @version 1.0
- * @link http://www.phpdocx.com
- * @since File available since Release 1.0
- */
- /**
- * Main class, create tag elements
- *
- * @category Phpdocx
- * @package elements
- * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
- * (http://www.2mdc.com)
- * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
- * @version 1.0
- * @link http://www.phpdocx.com
- * @since Class available since Release 1.0
- */
- class CreateElement
- {
- const MATHNAMESPACEWORD = 'm';
- const NAMESPACEWORD = 'w';
- /**
- *
- * @var string
- * @access protected
- */
- protected $_xml;
- /**
- * Construct
- *
- * @access public
- */
- public function __construct()
- {
- }
- /**
- * Destruct
- *
- * @access public
- */
- public function __destruct()
- {
-
- }
- /**
- *
- * @access public
- * @return string
- */
- public function __toString()
- {
- }
- /**
- * Generate w:p
- *
- * @access protected
- */
- protected function generateP()
- {
- $this->_xml = '<' . CreateElement::NAMESPACEWORD .
- ':p>__GENERATEP__</' . CreateElement::NAMESPACEWORD .
- ':p>';
- }
- /**
- * Generate w:ppr
- *
- * @access protected
- */
- protected function generatePPR()
- {
- $xml = '<' . CreateElement::NAMESPACEWORD . ':pPr>__GENERATEPPR__</' .
- CreateElement::NAMESPACEWORD . ':pPr>__GENERATER__';
- $this->_xml = str_replace('__GENERATEP__', $xml, $this->_xml);
- }
- /**
- * Generate w:t
- *
- * @param string $dat
- * @access protected
- */
- protected function generateT($dat)
- {
- $xml = '<' . CreateElement::NAMESPACEWORD . ':t xml:space="preserve">' .
- $dat . '</' . CreateElement::NAMESPACEWORD . ':t>';
- $this->_xml = str_replace('__GENERATER__', $xml, $this->_xml);
- }
- /**
- * Generate w:rpr
- *
- * @access protected
- */
- protected function generateRPR()
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':rPr>__GENERATERPR__</' . CreateElement::NAMESPACEWORD .
- ':rPr>__GENERATER__';
- $this->_xml = str_replace('__GENERATER__', $xml, $this->_xml);
- }
- /**
- * Generate w:jc
- *
- * @param string $val
- * @access protected
- */
- protected function generateJC($val = '')
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':jc ' . CreateElement::NAMESPACEWORD . ':val="' . $val .
- '"></' . CreateElement::NAMESPACEWORD . ':jc>';
- $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:b
- *
- * @access protected
- * @param string $val
- */
- protected function generateB($strVal = 'single')
- {
- $element = '<' . CreateElement::NAMESPACEWORD . ':b ' .
- CreateElement::NAMESPACEWORD . ':val="' . $strVal . '"></' .
- CreateElement::NAMESPACEWORD . ':b>__GENERATERPR__';
- $this->_xml = str_replace('__GENERATERPR__', $element, $this->_xml);
- }
- /**
- * Generate w:bcs
- *
- * @access protected
- */
- protected function generateBCS()
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':bCs></' . CreateElement::NAMESPACEWORD .
- ':bCs>__GENERATERPR__';
- $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:noproof
- *
- * @access protected
- */
- protected function generateNOPROOF()
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':noProof></' . CreateElement::NAMESPACEWORD .
- ':noProof>__GENERATEPPR__';
- $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:r
- *
- * @access protected
- */
- protected function generateR()
- {
- if (!empty($this->_xml)) {
- if (preg_match("/__GENERATEP__/", $this->_xml)) {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':r>__GENERATER__</' . CreateElement::NAMESPACEWORD .
- ':r>';
- $this->_xml = str_replace('__GENERATEP__', $xml, $this->_xml);
- } elseif (preg_match("/__GENERATER__/", $this->_xml)) {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':r>__GENERATER__</' . CreateElement::NAMESPACEWORD .
- ':r>';
- $this->_xml = str_replace('__GENERATER__', $xml, $this->_xml);
- }
- } else {
- $this->_xml = '<' . CreateElement::NAMESPACEWORD .
- ':r>__GENERATER__</' . CreateElement::NAMESPACEWORD .
- ':r>__GENERATER__';
- }
- }
- /**
- * Generate w:drawing
- *
- * @access protected
- */
- protected function generateDRAWING()
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':drawing>__GENERATEDRAWING__</' .
- CreateElement::NAMESPACEWORD .
- ':drawing>';
- $this->_xml = str_replace('__GENERATER__', $xml, $this->_xml);
- }
- /**
- * Generate w:inline
- *
- * @param string $distT
- * @param string $distB
- * @param string $distL
- * @param string $distR
- * @access protected
- */
- protected function generateINLINE($distT = '0', $distB ='0',
- $distL = '0', $distR ='0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':inline distT="' . $distT . '" distB="' . $distB .
- '" distL="' . $distL . '" distR="' . $distR .
- '">__GENERATEINLINE__</' . CreateImage::NAMESPACEWORD .
- ':inline>';
- $this->_xml = str_replace('__GENERATEDRAWING__', $xml, $this->_xml);
- }
- /**
- * Generate w:anchor
- *
- * @param string $behindDoc
- * @param string $distT
- * @param string $distB
- * @param string $distL
- * @param string $distR
- * @param int $simplePos
- * @param string $relativeHeight
- * @param string $locked
- * @param string $layoutInCell
- * @param string $allowOverlap
- * @access protected
- */
- protected function generateANCHOR($behindDoc = 0, $distT = '0',
- $distB = '0', $distL = '114300',
- $distR = '114300', $simplePos = 0,
- $relativeHeight = '251658240',
- $locked = 0, $layoutInCell = 1,
- $allowOverlap = 1)
- {
- $xml = '<' . CreateImage::NAMESPACEWORD . ':anchor distT="' . $distT .
- '" distB="' . $distB . '" distL="' . $distL .
- '" distR="' . $distR . '" simplePos="' . $simplePos .
- '" relativeHeight="' . $relativeHeight .
- '" behindDoc="' . $behindDoc .
- '" locked="' . $locked .
- '" layoutInCell="' . $layoutInCell .
- '" allowOverlap="' . $allowOverlap .
- '">__GENERATEINLINE__</' . CreateImage::NAMESPACEWORD .
- ':anchor>';
- $this->_xml = str_replace('__GENERATEDRAWING__', $xml, $this->_xml);
- }
- /**
- * Generate w:simplepos
- *
- * @param string $x
- * @param string $y
- * @access protected
- */
- protected function generateSIMPLEPOS($x = '0', $y = '0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':simplePos x="' . $x . '" y="' . $y .
- '"></' . CreateImage::NAMESPACEWORD .
- ':simplePos>__GENERATEINLINE__';
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:positionh
- *
- * @param string $relativeFrom
- * @access protected
- */
- protected function generatePOSITIONH($relativeFrom = 'column')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':positionH relativeFrom="' . $relativeFrom .
- '">__GENERATEPOSITION__</' . CreateImage::NAMESPACEWORD .
- ':positionH>__GENERATEINLINE__';
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:positionv
- *
- * @param string $relativeFrom
- * @access protected
- */
- protected function generatePOSITIONV($relativeFrom = 'paragraph')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':positionV relativeFrom="' . $relativeFrom .
- '">__GENERATEPOSITION__</' . CreateImage::NAMESPACEWORD .
- ':positionV>__GENERATEINLINE__';
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:posoffset
- *
- * @param int $num
- * @access protected
- */
- protected function generatePOSOFFSET($num)
- {
- $xml = '<' . CreateImage::NAMESPACEWORD . ':posOffset>' . $num .
- '</' . CreateImage::NAMESPACEWORD . ':posOffset>';
-
- $this->_xml = str_replace('__GENERATEPOSITION__', $xml, $this->_xml);
- }
- /**
- * Generate w:extent
- *
- * @param string $cx
- * @param string $cy
- * @access protected
- */
- protected function generateEXTENT($cx = '2986543', $cy = '2239906')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD . ':extent cx="' . $cx .
- '" cy="' . $cy . '"></' . CreateImage::NAMESPACEWORD .
- ':extent>__GENERATEINLINE__';
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:effectextent
- *
- * @param string $l
- * @param string $t
- * @param string $r
- * @param string $b
- * @access protected
- */
- protected function generateEFFECTEXTENT($l = "19050", $t = "0",
- $r = "4307", $b = "0")
- {
- $xml = '<' . CreateImage::NAMESPACEWORD . ':effectExtent l="' . $l .
- '" t="' . $t . '" r="' . $r . '" b="' . $b .
- '"></' . CreateImage::NAMESPACEWORD .
- ':effectExtent>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:wrapsquare
- *
- * @param string $wrapText
- * @access protected
- */
- protected function generateWRAPSQUARE($wrapText = "bothSides")
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':wrapSquare wrapText="' . $wrapText .
- '"></' . CreateImage::NAMESPACEWORD .
- ':wrapSquare>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:wrapnone
- *
- * @access protected
- */
- protected function generateWRAPNONE()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':wrapNone></' . CreateImage::NAMESPACEWORD .
- ':wrapNone>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:wraptopandbottom
- *
- * @access protected
- */
- protected function generateWRAPTOPANDBOTTOM()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':wrapTopAndBottom></' . CreateImage::NAMESPACEWORD .
- ':wrapTopAndBottom>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:wrapthrough
- *
- * @param string $wrapText
- * @access protected
- */
- protected function generateWRAPTHROUGH($wrapText = 'bothSides')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':wrapThrough wrapText="' . $wrapText .
- '">__GENERATEWRAPTHROUGH__</' . CreateImage::NAMESPACEWORD .
- ':wrapThrough>__GENERATEINLINE__';
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:wrappolygon
- *
- * @param string $edited
- * @access protected
- */
- protected function generateWRAPPOLYGON($edited = '0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':wrapPolygon edited="' . $edited .
- '">__GENERATEWRAPPOLYGON__</' . CreateImage::NAMESPACEWORD .
- ':wrapPolygon>';
-
- $this->_xml = str_replace('__GENERATEWRAPTHROUGH__', $xml, $this->_xml);
- }
- /**
- * Generate w:start
- *
- * @param string $x
- * @param string $y
- * @access protected
- */
- protected function generateSTART($x = '-198', $y = '0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':start x="' . $x . '" y="' . $y .
- '"></' . CreateImage::NAMESPACEWORD .
- ':start>__GENERATEWRAPPOLYGON__';
-
- $this->_xml = str_replace('__GENERATEWRAPPOLYGON__', $xml, $this->_xml);
- }
- /**
- * Generate w:lineto
- *
- * @param string $x
- * @param string $y
- * @access protected
- */
- protected function generateLINETO($x = '-198', $y = '21342')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':lineTo x="' . $x . '" y="' . $y .
- '"></' . CreateImage::NAMESPACEWORD .
- ':lineTo>__GENERATEWRAPPOLYGON__';
-
- $this->_xml = str_replace('__GENERATEWRAPPOLYGON__', $xml, $this->_xml);
- }
- /**
- * Generate w:docpr
- *
- * @param string $id
- * @param string $name
- * @access protected
- */
- protected function generateDOCPR($id = "1", $name = "0 Imagen")
- {
- $xml = '<' . CreateImage::NAMESPACEWORD . ':docPr id="' . $id .
- '" name="' . $name . '" descr="' . $this->getName() .
- '"></' . CreateImage::NAMESPACEWORD .
- ':docPr>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:cnvgraphicframepr
- *
- * @access protected
- */
- protected function generateCNVGRAPHICFRAMEPR()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD .
- ':cNvGraphicFramePr>__GENERATECNVGRAPHICFRAMEPR__</' .
- CreateImage::NAMESPACEWORD .
- ':cNvGraphicFramePr>__GENERATEINLINE__';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:graphicpframelocks
- *
- * @param string $noChangeAspect
- * @access protected
- */
- protected function generateGRAPHICPRAMELOCKS($noChangeAspect = '')
- {
- $xmlAux = '<' . CreateImage::NAMESPACEWORD1 .
- ':graphicFrameLocks xmlns:a="' .
- 'http://schemas.openxmlformats.org/drawingml/2006/main"';
- if ($noChangeAspect != '')
- $xmlAux .= ' noChangeAspect="' . $noChangeAspect . '"';
- $xmlAux .= '></' . CreateImage::NAMESPACEWORD1 . ':graphicFrameLocks>';
- $this->_xml = str_replace(
- '__GENERATECNVGRAPHICFRAMEPR__', $xmlAux, $this->_xml
- );
- }
- /**
- * Generate w:graphic
- *
- * @param string $xmlns
- * @access protected
- */
- protected function generateGRAPHIC(
- $xmlns = 'http://schemas.openxmlformats.org/drawingml/2006/main')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':graphic xmlns:a="' . $xmlns .
- '">__GENERATEGRAPHIC__</' . CreateImage::NAMESPACEWORD1 .
- ':graphic>';
-
- $this->_xml = str_replace('__GENERATEINLINE__', $xml, $this->_xml);
- }
- /**
- * Generate w:graphicdata
- *
- * @param string $uri
- * @access protected
- */
- protected function generateGRAPHICDATA(
- $uri = 'http://schemas.openxmlformats.org/drawingml/2006/picture')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':graphicData uri="' . $uri .
- '">__GENERATEGRAPHICDATA__</' . CreateImage::NAMESPACEWORD1 .
- ':graphicData>';
- $this->_xml = str_replace('__GENERATEGRAPHIC__', $xml, $this->_xml);
- }
- /**
- * Generate w:pic
- *
- * @param string $pic
- * @access protected
- */
- protected function generatePIC(
- $pic = 'http://schemas.openxmlformats.org/drawingml/2006/picture')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':pic xmlns:pic="' . $pic .
- '">__GENERATEPIC__</' . CreateImage::NAMESPACEWORD2 .
- ':pic>';
- $this->_xml = str_replace('__GENERATEGRAPHICDATA__', $xml, $this->_xml);
- }
- /**
- * Generate w:nvpicpr
- *
- * @access protected
- */
- protected function generateNVPICPR()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':nvPicPr>__GENERATENVPICPR__</' . CreateImage::NAMESPACEWORD2 .
- ':nvPicPr>__GENERATEPIC__';
- $this->_xml = str_replace('__GENERATEPIC__', $xml, $this->_xml);
- }
- /**
- * Generate w:cnvpr
- *
- * @param string $id
- * @access protected
- */
- protected function generateCNVPR($id = '0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':cNvPr id="' . $id . '" name="' . $this->getName() .
- '"></' . CreateImage::NAMESPACEWORD2 .
- ':cNvPr>__GENERATENVPICPR__';
- $this->_xml = str_replace('__GENERATENVPICPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:cnvpicpr
- *
- * @access protected
- */
- protected function generateCNVPICPR()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':cNvPicPr></' . CreateImage::NAMESPACEWORD2 .
- ':cNvPicPr>__GENERATENVPICPR__';
- $this->_xml = str_replace('__GENERATENVPICPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:blipfill
- *
- * @access protected
- */
- protected function generateBLIPFILL()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':blipFill>__GENERATEBLIPFILL__</' .
- CreateImage::NAMESPACEWORD2 . ':blipFill>__GENERATEPIC__';
- $this->_xml = str_replace('__GENERATEPIC__', $xml, $this->_xml);
- }
- /**
- * Generate w:blip
- *
- * @param string $cstate
- * @access protected
- */
- protected function generateBLIP($cstate = 'print')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':blip r:embed="rId' . $this->getRId() .
- '" cstate="' . $cstate .
- '"></' . CreateImage::NAMESPACEWORD1 .
- ':blip>__GENERATEBLIPFILL__';
-
- $this->_xml = str_replace('__GENERATEBLIPFILL__', $xml, $this->_xml);
- }
- /**
- * Generate w:stretch
- *
- * @access protected
- */
- protected function generateSTRETCH()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':stretch>__GENERATESTRETCH__</' . CreateImage::NAMESPACEWORD1 .
- ':stretch>__GENERATEBLIPFILL__';
- $this->_xml = str_replace('__GENERATEBLIPFILL__', $xml, $this->_xml);
- }
- /**
- * Generate w:fillrect
- *
- * @access protected
- */
- protected function generateFILLRECT()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':fillRect></' . CreateImage::NAMESPACEWORD1 .
- ':fillRect>';
- $this->_xml = str_replace('__GENERATESTRETCH__', $xml, $this->_xml);
- }
- /**
- * Generate w:sppr
- *
- * @access protected
- */
- protected function generateSPPR()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD2 .
- ':spPr>__GENERATESPPR__</' . CreateImage::NAMESPACEWORD2 .
- ':spPr>';
-
- $this->_xml = str_replace('__GENERATEPIC__', $xml, $this->_xml);
- }
- /**
- * Generate w:xfrm
- *
- * @access protected
- */
- protected function generateXFRM()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':xfrm>__GENERATEXFRM__</' . CreateImage::NAMESPACEWORD1 .
- ':xfrm>__GENERATESPPR__';
- $this->_xml = str_replace('__GENERATESPPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:off
- *
- * @param string $x
- * @param string $y
- * @access protected
- */
- protected function generateOFF($x = '0', $y = '0')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':off x="' . $x . '" y="' . $y .
- '"></' . CreateImage::NAMESPACEWORD1 .
- ':off>__GENERATEXFRM__';
- $this->_xml = str_replace('__GENERATEXFRM__', $xml, $this->_xml);
- }
- /**
- * Generate w:ext
- *
- * @param string $cx
- * @param string $cy
- * @access protected
- */
- protected function generateEXT($cx = '2997226', $cy = '2247918')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':ext cx="' . $cx . '" cy="' . $cy .
- '"></' . CreateImage::NAMESPACEWORD1 .
- ':ext>__GENERATEXFRM__';
-
- $this->_xml = str_replace('__GENERATEXFRM__', $xml, $this->_xml);
- }
- /**
- * Generate w:prstgeom
- *
- * @param string $prst
- * @access protected
- */
- protected function generatePRSTGEOM($prst = 'rect')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':prstGeom prst="' . $prst .
- '">__GENERATEPRSTGEOM__</' . CreateImage::NAMESPACEWORD1 .
- ':prstGeom>__GENERATESPPR__';
- $this->_xml = str_replace('__GENERATESPPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:avlst
- *
- * @access protected
- */
- protected function generateAVLST()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':avLst></' . CreateImage::NAMESPACEWORD1 .
- ':avLst>__GENERATEPRSTGEOM__';
- $this->_xml = str_replace('__GENERATEPRSTGEOM__', $xml, $this->_xml);
- }
- /**
- * Generate w:ln
- *
- * @param string $w
- * @access protected
- */
- protected function generateLN($w = '12700')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':ln w="' . $w . '">__GENERATELN__</' .
- CreateImage::NAMESPACEWORD1 .
- ':ln>__GENERATESPPR__';
- $this->_xml = str_replace('__GENERATESPPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:solidfill
- *
- * @access protected
- */
- protected function generateSOLIDFILL()
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 .
- ':solidFill>__GENERATESOLIDFILL__</' .
- CreateImage::NAMESPACEWORD1 .
- ':solidFill>__GENERATELN__';
- $this->_xml = str_replace('__GENERATELN__', $xml, $this->_xml);
- }
- /**
- * Generate w:schemeclr
- *
- * @param string $val
- * @access protected
- */
- protected function generateSCHEMECLR($val = 'tx1')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 . ':schemeClr val="' . $val .
- '"></' . CreateImage::NAMESPACEWORD1 . ':schemeClr>';
-
- $this->_xml = str_replace('__GENERATESOLIDFILL__', $xml, $this->_xml);
- }
- /**
- * Generate w:prstdash
- *
- * @param string $val
- * @access protected
- */
- protected function generatePRSTDASH($val = 'sysDash')
- {
- $xml = '<' . CreateImage::NAMESPACEWORD1 . ':prstDash val="' . $val .
- '"></' . CreateImage::NAMESPACEWORD1 .
- ':prstDash>__GENERATELN__';
-
- $this->_xml = str_replace('__GENERATELN__', $xml, $this->_xml);
- }
- /**
- * Delete pending tags
- *
- * @access protected
- */
- protected function cleanTemplate()
- {
- $this->_xml = preg_replace('/__[A-Z]+__/', '', $this->_xml);
- }
- /**
- * Delete first w:rpr
- *
- * @access protected
- */
- protected function cleanTemplateFirstRPR()
- {
- $this->_xml = preg_replace('/__GENERATERPR__/', '', $this->_xml, 1);
- }
- /**
- * Generate w:r
- *
- * @access protected
- */
- protected function generateQUITAR()
- {
- $this->_xml = '<' . CreateElement::NAMESPACEWORD .
- ':r>__GENERATER__</' . CreateElement::NAMESPACEWORD .
- ':r>';
- }
- /**
- * Generate w:pstyle
- *
- * @param string $val
- * @access protected
- */
- protected function generatePSTYLE($val = 'Textonotaalfinal')
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':pStyle ' . CreateElement::NAMESPACEWORD .
- ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
- ':pStyle>';
- $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:rstyle
- *
- * @param string $val
- * @access protected
- */
- protected function generateRSTYLE($val = 'Refdenotaalfinal')
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':rStyle ' . CreateElement::NAMESPACEWORD .
- ':val="' . $val .
- '"></' . CreateElement::NAMESPACEWORD .
- ':rStyle>';
-
- $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
- }
- /**
- * Generate w:rfonts
- *
- * @param string $font
- * @access protected
- */
- protected function generateRFONTS($font)
- {
- $xml = '<' . CreateElement::NAMESPACEWORD .
- ':rFonts ' . CreateElement::NAMESPACEWORD .
- ':ascii="' . $font . '" ' . CreateElement::NAMESPACEWORD .
- ':hAnsi="' . $font . '" ' . CreateElement::NAMESPACEWORD .
- ':cs="' . $font . '"></' . CreateElement::NAMESPACEWORD .
- ':rFonts>__GENERATERPR__';
-
- $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
- }
- }
|