CreateStyle.inc 105 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643
  1. <?php
  2. /**
  3. * Create styles
  4. *
  5. *
  6. * @category Phpdocx
  7. * @package elements
  8. * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
  9. * (http://www.2mdc.com)
  10. * @license LGPL
  11. * @version 2.1
  12. * @link http://www.phpdocx.com
  13. * @since File available since Release 1.0
  14. */
  15. include_once dirname(__FILE__) . '/CreateElement.inc';
  16. /**
  17. * Create styles
  18. *
  19. *
  20. * @category Phpdocx
  21. * @package elements
  22. * @copyright Copyright (c) 2009-2011 Narcea Producciones Multimedia S.L.
  23. * (http://www.2mdc.com)
  24. * @license http://www.phpdocx.com/wp-content/themes/lightword/pro_license.php
  25. * @version 2.1
  26. * @link http://www.phpdocx.com
  27. * @since Class available since Release 1.0
  28. */
  29. class CreateStyle extends CreateElement
  30. {
  31. /**
  32. * @access protected
  33. * @var string
  34. */
  35. protected $_xml;
  36. /**
  37. * @access private
  38. * @var CreateStyle
  39. * @static
  40. */
  41. private static $_instance = NULL;
  42. /**
  43. * Construct
  44. *
  45. * @access public
  46. */
  47. public function __construct()
  48. {
  49. }
  50. /**
  51. * Destruct
  52. *
  53. * @access public
  54. */
  55. public function __destruct()
  56. {
  57. }
  58. /**
  59. *
  60. * @access public
  61. * @return string
  62. */
  63. public function __toString()
  64. {
  65. return $this->_xml;
  66. }
  67. /**
  68. *
  69. * @access public
  70. * @return CreateStyle
  71. * @static
  72. */
  73. public static function getInstance()
  74. {
  75. if (self::$_instance == NULL) {
  76. self::$_instance = new CreateStyle();
  77. }
  78. return self::$_instance;
  79. }
  80. /**
  81. * Add style
  82. *
  83. * @access public
  84. * @param array $args[0]
  85. */
  86. public function addStyle()
  87. {
  88. $args = func_get_args();
  89. if (!empty($args[0][0]['type']) && !empty($args[0][0]['styleId'])) {
  90. $this->generateSTYLE(
  91. $args[0][0]['type'], $args[0][0]['styleId'],
  92. $args[0][0]['default'], $args[0][0]['customStyle']
  93. );
  94. }
  95. if (!empty($args[0][0]['name'])) {
  96. $this->generateNAME($args[0][0]['name']);
  97. }
  98. if (!empty($args[0][0]['basedOn'])) {
  99. $this->generateBASEDON($args[0][0]['basedOn']);
  100. }
  101. if (!empty($args[0][0]['next'])) {
  102. $this->generateNEXT($args[0][0]['next']);
  103. }
  104. if (!empty($args[0][0]['link'])) {
  105. $this->generateLINK($args[0][0]['link']);
  106. }
  107. if ($args[0][0]['autoRedefine'] == 1) {
  108. $this->generateAUTOREDEFINE();
  109. }
  110. if (!empty($args[0][0]['uiPriority'])) {
  111. $this->generateUIPRIORITY($args[0][0]['uiPriority']);
  112. }
  113. if ($args[0][0]['semiHidden'] == 1) {
  114. $this->generateSEMIHIDDEN();
  115. }
  116. if ($args[0][0]['unhideWhenUsed'] == 1) {
  117. $this->generateUNHIDEWHENUSED();
  118. }
  119. if ($args[0][0]['qFormat'] == 1) {
  120. $this->generateQFORMAT();
  121. }
  122. if (!empty($args[0][0]['rsid'])) {
  123. $this->generateRSID($args[0][0]['rsid']);
  124. }
  125. if ($args[0][0]['keepNext'] == 1 ||
  126. !empty($args[0][0]['keepLines']) ||
  127. (isset($args[0][0]['spacing_before']) ||
  128. isset($args[0][0]['spacing_after']) ||
  129. isset($args[0][0]['spacing_line']) ||
  130. isset($args[0][0]['spacing_lineRule'])) ||
  131. !empty($args[0][0]['outlineLvl']) ||
  132. $args[0][0]['contextualSpacing'] == 1 ||
  133. isset($args[0][0]['ilvl']) ||
  134. isset($args[0][0]['ind_left'])) {
  135. $this->generatePPR();
  136. if ($args[0][0]['keepNext'] == 1)
  137. $this->generateKEEPNEXT();
  138. if (!empty($args[0][0]['keepLines'])) {
  139. $this->generateKEEPLINES($args[0][0]['keepLines']);
  140. }
  141. if (isset($args[0][0]['pBdr_bottom_val']) &&
  142. isset($args[0][0]['pBdr_bottom_sz']) &&
  143. isset($args[0][0]['pBdr_bottom_space']) &&
  144. isset($args[0][0]['pBdr_bottom_color']) &&
  145. isset($args[0][0]['pBdr_bottom_themeColor'])) {
  146. $this->generatePBDR();
  147. $this->generatePBDR_BOTTOM(
  148. $args[0][0]['pBdr_bottom_val'],
  149. $args[0][0]['pBdr_bottom_sz'],
  150. $args[0][0]['pBdr_bottom_space'],
  151. $args[0][0]['pBdr_bottom_color'],
  152. $args[0][0]['pBdr_bottom_themeColor']
  153. );
  154. }
  155. if (!empty($args[0][0]['tab_center']) || $args[0][0]['tab_right']) {
  156. $this->generateTABS();
  157. if (!empty($args[0][0]['tab_center'])) {
  158. $this->generateTABCENTER($args[0][0]['tab_center']);
  159. }
  160. if (!empty($args[0][0]['tab_right'])) {
  161. $this->generateTABRIGHT($args[0][0]['tab_right']);
  162. }
  163. }
  164. if (isset($args[0][0]['spacing_before']) ||
  165. isset($args[0][0]['spacing_after']) ||
  166. isset($args[0][0]['spacing_line']) ||
  167. isset($args[0][0]['spacing_lineRule'])) {
  168. $this->generateSPACING(
  169. $args[0][0]['spacing_before'],
  170. $args[0][0]['spacing_after'],
  171. $args[0][0]['spacing_line'],
  172. $args[0][0]['spacing_lineRule']
  173. );
  174. }
  175. if (isset($args[0][0]['ind_left'])) {
  176. $this->generateIND($args[0][0]['ind_left']);
  177. }
  178. if ($args[0][0]['contextualSpacing'] == 1) {
  179. $this->generateCONTEXTUALSPACING();
  180. }
  181. if (isset($args[0][0]['outlineLvl'])) {
  182. $this->generateOUTLINELVL($args[0][0]['outlineLvl']);
  183. }
  184. if (isset($args[0][0]['ilvl'])) {
  185. $this->generateNUMPR();
  186. $this->generateILVL($args[0][0]['ilvl']);
  187. }
  188. }
  189. if ((!empty($args[0][0]['rFonts_asciiTheme']) &&
  190. !empty($args[0][0]['rFonts_eastAsiaTheme']) &&
  191. !empty($args[0][0]['rFonts_hAnsiTheme']) &&
  192. !empty($args[0][0]['rFonts_cstheme'])) ||
  193. $args[0][0]['b'] == 1 ||
  194. $args[0][0]['bCs'] == 1 ||
  195. $args[0][0]['i'] == 1 ||
  196. $args[0][0]['iCs'] == 1 ||
  197. $args[0][0]['u'] == 1 ||
  198. !empty($args[0][0]['color_val']) ||
  199. !empty($args[0][0]['sz']) ||
  200. !empty($args[0][0]['szCs']) ||
  201. !empty($args[0][0]['kern']) ||
  202. !empty($args[0][0]['rPr_spacing']) ||
  203. !empty($args[0][0]['u']) ||
  204. !empty($args[0][0]['vertAlign'])) {
  205. $this->generateRPR();
  206. if (!empty($args[0][0]['rFonts_asciiTheme']) &&
  207. !empty($args[0][0]['rFonts_eastAsiaTheme']) &&
  208. !empty($args[0][0]['rFonts_hAnsiTheme']) &&
  209. !empty($args[0][0]['rFonts_cstheme']))
  210. $this->generateRFONTS(
  211. $args[0][0]['rFonts_asciiTheme'],
  212. $args[0][0]['rFonts_eastAsiaTheme'],
  213. $args[0][0]['rFonts_hAnsiTheme'],
  214. $args[0][0]['rFonts_cstheme']
  215. );
  216. if (!empty($args[0][0]['rFonts_ascii']) &&
  217. !empty($args[0][0]['rFonts_hAnsi']) &&
  218. !empty($args[0][0]['rFonts_cs'])) {
  219. $this->generateRFONTS2(
  220. $args[0][0]['rFonts_ascii'],
  221. $args[0][0]['rFonts_hAnsi'],
  222. $args[0][0]['rFonts_cs']
  223. );
  224. }
  225. if (isset($args[0][0]['b']) && $args[0][0]['b'] == 1) {
  226. $this->generateB();
  227. }
  228. if (isset($args[0][0]['bCs']) && $args[0][0]['bCs'] == 1) {
  229. $this->generateBCS();
  230. }
  231. if (isset($args[0][0]['i'])) {
  232. $this->generateI($args[0][0]['i']);
  233. }
  234. if (isset($args[0][0]['iCs'])) {
  235. $this->generateICS($args[0][0]['iCs']);
  236. }
  237. if (isset($args[0][0]['u']) && $args[0][0]['u'] == 1) {
  238. $this->generateU();
  239. }
  240. if (!empty($args[0][0]['color_val'])) {
  241. $this->generateCOLOR(
  242. $args[0][0]['color_val'],
  243. $args[0][0]['color_themeColor'],
  244. $args[0][0]['color_themeShade']
  245. );
  246. }
  247. if (!empty($args[0][0]['u'])) {
  248. $this->generateU($args[0][0]['u']);
  249. }
  250. if (!empty($args[0][0]['rPr_spacing'])) {
  251. $this->generateRPR_SPACING($args[0][0]['rPr_spacing']);
  252. }
  253. if (!empty($args[0][0]['kern'])) {
  254. $this->generateKERN($args[0][0]['kern']);
  255. }
  256. if (!empty($args[0][0]['sz'])) {
  257. $this->generateSZ($args[0][0]['sz']);
  258. }
  259. if (!empty($args[0][0]['szCs'])) {
  260. $this->generateSZCS($args[0][0]['szCs']);
  261. }
  262. if (!empty($args[0][0]['vertAlign'])) {
  263. $this->generateVERTALIGN($args[0][0]['vertAlign']);
  264. }
  265. }
  266. if ((isset($args[0][0]['top_w']) &&
  267. isset($args[0][0]['top_type'])) ||
  268. (isset($args[0][0]['left_w']) &&
  269. isset($args[0][0]['left_type'])) ||
  270. (isset($args[0][0]['bottom_w']) &&
  271. isset($args[0][0]['bottom_type'])) ||
  272. (isset($args[0][0]['right_w']) &&
  273. isset($args[0][0]['right_type'])) ||
  274. (isset($args[0][0]['tblInd_w']) &&
  275. isset($args[0][0]['tblInd_type'])) &&
  276. (isset($args[0][0]['tblborder_top_val'])) ||
  277. (isset($args[0][0]['tblborder_left_val'])) ||
  278. (isset($args[0][0]['tblborder_bottom_val'])) ||
  279. (isset($args[0][0]['tblborder_right_val'])) ||
  280. (isset($args[0][0]['tblborder_insideH_val'])) ||
  281. (isset($args[0][0]['tblborder_insideV_val']))) {
  282. $this->generateTBLPR();
  283. if (isset($args[0][0]['tbl_style_row'])) {
  284. $this->generateTBLSTYLEROWBANDSIZE(
  285. $args[0][0]['tbl_style_row']
  286. );
  287. }
  288. if (isset($args[0][0]['tbl_style_col'])) {
  289. $this->generateTBLSTYLECOLBANDSIZE(
  290. $args[0][0]['tbl_style_col']
  291. );
  292. }
  293. if (isset($args[0][0]['tblInd_w']) &&
  294. isset($args[0][0]['tblInd_type'])) {
  295. $this->generateTBLIND(
  296. $args[0][0]['tblInd_w'],
  297. $args[0][0]['tblInd_type']
  298. );
  299. }
  300. if ((isset($args[0][0]['tblborder_top_val'])) ||
  301. (isset($args[0][0]['tblborder_left_val'])) ||
  302. (isset($args[0][0]['tblborder_bottom_val'])) ||
  303. (isset($args[0][0]['tblborder_right_val'])) ||
  304. (isset($args[0][0]['tblborder_insideH_val'])) ||
  305. (isset($args[0][0]['tblborder_insideV_val']))) {
  306. $this->generateTBLBORDERS();
  307. if (isset($args[0][0]['tblborder_top_val'])) {
  308. $this->generateTBLBORDERS_TOP(
  309. $args[0][0]['tblborder_top_val'],
  310. $args[0][0]['tblborder_top_sz'],
  311. $args[0][0]['tblborder_top_space'],
  312. $args[0][0]['tblborder_top_color'],
  313. $args[0][0]['tblborder_top_themeColor'],
  314. $args[0][0]['tblborder_insideV_themeTint']
  315. );
  316. }
  317. if (isset($args[0][0]['tblborder_left_val'])) {
  318. $this->generateTBLBORDERS_LEFT(
  319. $args[0][0]['tblborder_left_val'],
  320. $args[0][0]['tblborder_left_sz'],
  321. $args[0][0]['tblborder_left_space'],
  322. $args[0][0]['tblborder_left_color'],
  323. $args[0][0]['tblborder_left_themeColor'],
  324. $args[0][0]['tblborder_insideV_themeTint']
  325. );
  326. }
  327. if (isset($args[0][0]['tblborder_bottom_val'])) {
  328. $this->generateTBLBORDERS_BOTTOM(
  329. $args[0][0]['tblborder_bottom_val'],
  330. $args[0][0]['tblborder_bottom_sz'],
  331. $args[0][0]['tblborder_bottom_space'],
  332. $args[0][0]['tblborder_bottom_color'],
  333. $args[0][0]['tblborder_bottom_themeColor'],
  334. $args[0][0]['tblborder_insideV_themeTint']
  335. );
  336. }
  337. if (isset($args[0][0]['tblborder_right_val'])) {
  338. $this->generateTBLBORDERS_RIGHT(
  339. $args[0][0]['tblborder_right_val'],
  340. $args[0][0]['tblborder_right_sz'],
  341. $args[0][0]['tblborder_right_space'],
  342. $args[0][0]['tblborder_right_color'],
  343. $args[0][0]['tblborder_right_themeColor'],
  344. $args[0][0]['tblborder_insideV_themeTint']
  345. );
  346. }
  347. if (isset($args[0][0]['tblborder_insideH_val'])) {
  348. $this->generateTBLBORDERS_INSIDEH(
  349. $args[0][0]['tblborder_insideH_val'],
  350. $args[0][0]['tblborder_insideH_sz'],
  351. $args[0][0]['tblborder_insideH_space'],
  352. $args[0][0]['tblborder_insideH_color'],
  353. $args[0][0]['tblborder_insideH_themeColor'],
  354. $args[0][0]['tblborder_insideV_themeTint']
  355. );
  356. }
  357. if (isset($args[0][0]['tblborder_insideV_val'])) {
  358. $this->generateTBLBORDERS_INSIDEV(
  359. $args[0][0]['tblborder_insideV_val'],
  360. $args[0][0]['tblborder_insideV_sz'],
  361. $args[0][0]['tblborder_insideV_space'],
  362. $args[0][0]['tblborder_insideV_color'],
  363. $args[0][0]['tblborder_insideV_themeColor'],
  364. $args[0][0]['tblborder_insideV_themeTint']
  365. );
  366. }
  367. }
  368. if ((isset($args[0][0]['top_w']) &&
  369. isset($args[0][0]['top_type'])) ||
  370. (isset($args[0][0]['left_w']) &&
  371. isset($args[0][0]['left_type'])) ||
  372. (isset($args[0][0]['bottom_w']) &&
  373. isset($args[0][0]['bottom_type'])) ||
  374. (isset($args[0][0]['right_w']) &&
  375. isset($args[0][0]['right_type']))) {
  376. $this->generateTBLCELLMAR();
  377. if (isset($args[0][0]['top_w']) &&
  378. isset($args[0][0]['top_type'])) {
  379. $this->generateTOP(
  380. $args[0][0]['top_w'],
  381. $args[0][0]['top_type']
  382. );
  383. }
  384. if (isset($args[0][0]['left_w']) &&
  385. isset($args[0][0]['left_type'])) {
  386. $this->generateLEFT(
  387. $args[0][0]['left_w'],
  388. $args[0][0]['left_type']
  389. );
  390. }
  391. if (isset($args[0][0]['bottom_w']) &&
  392. isset($args[0][0]['bottom_type'])) {
  393. $this->generateBOTTOM(
  394. $args[0][0]['bottom_w'],
  395. $args[0][0]['bottom_type']
  396. );
  397. }
  398. if (isset($args[0][0]['right_w']) &&
  399. isset($args[0][0]['right_type'])) {
  400. $this->generateRIGHT(
  401. $args[0][0]['right_w'],
  402. $args[0][0]['right_type']
  403. );
  404. }
  405. }
  406. }
  407. if (isset($args[0][0]['shd_val']) &&
  408. isset($args[0][0]['shd_color']) &&
  409. isset($args[0][0]['shd_fill']) &&
  410. isset($args[0][0]['shd_themeFill'])) {
  411. $this->generateTCPR();
  412. $this->generateSHD(
  413. $args[0][0]['shd_val'],
  414. $args[0][0]['shd_color'],
  415. $args[0][0]['shd_fill'],
  416. $args[0][0]['shd_themeFill'],
  417. $args[0][0]['shd_themeFillTint']
  418. );
  419. }
  420. if (count($args[0]) > 1) {
  421. for ($i = 1; $i < count($args[0]); $i++) {
  422. $this->addStyleTabla($args[0][$i]);
  423. }
  424. }
  425. $this->cleanTemplate();
  426. }
  427. /**
  428. * Create style
  429. *
  430. * @access public
  431. * @param string $lang
  432. */
  433. public function createStyle($lang = 'en-US')
  434. {
  435. $this->_xml .= '<w:docDefaults><w:rPrDefault><w:rPr>' .
  436. '<w:rFonts w:asciiTheme="minorHAnsi" w:eastAsiaTh' .
  437. 'eme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cst' .
  438. 'heme="minorBidi"/><w:sz w:val="22"/><w:szCs w:val="22"/>' .
  439. '<w:lang w:val="' . $lang . '" w:eastAsia="' . $lang .
  440. '" w:bidi="ar-SA"/></w:rPr></w:rPrDefault><w:pPrDefault>' .
  441. '<w:pPr><w:spacing w:after="200" w:line="276" w:lineRule' .
  442. '="auto"/></w:pPr></w:pPrDefault></w:docDefaults>' .
  443. '<w:latentStyles w:defLockedState="0" w:defUIPriority="99" ' .
  444. 'w:defSemiHidden="1" w:defUnhideWhenUsed="1" w:defQFormat' .
  445. '="0" w:count="267">' .
  446. '<w:lsdException w:name="Normal" w:semiHidden="0" w:uiPriorit' .
  447. 'y="0" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:n' .
  448. 'ame="heading 1" w:semiHidden="0" w:uiPriority="9" w:unhideWhen' .
  449. 'Used="0" w:qFormat="1"/><w:lsdException w:name="heading 2" w:u' .
  450. 'iPriority="9" w:qFormat="1"/><w:lsdException w:name="heading ' .
  451. '3" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="h' .
  452. 'eading 4" w:uiPriority="9" w:qFormat="1"/><w:lsdException ' .
  453. 'w:name="heading 5" w:uiPriority="9" w:qFormat="1"/><w:lsd' .
  454. 'Exception w:name="heading 6" w:uiPriority="9" w:qFormat=' .
  455. '"1"/><w:lsdException w:name="heading 7" w:uiPriority="9" ' .
  456. 'w:qFormat="1"/><w:lsdException w:name="heading 8" w:uiPriority' .
  457. '="9" w:qFormat="1"/><w:lsdException w:name="heading 9" w:uiPr' .
  458. 'iority="9" w:qFormat="1"/><w:lsdException w:name="toc 1" ' .
  459. 'w:uiPriority="39"/><w:lsdException w:name="toc 2" w:ui' .
  460. 'Priority="39"/><w:lsdException w:name="toc 3" w:ui' .
  461. 'Priority="39"/><w:lsdException w:name="toc 4" w:uiPr' .
  462. 'iority="39"/><w:lsdException w:name="toc 5" w:uiPrior' .
  463. 'ity="39"/><w:lsdException w:name="toc 6" w:uiPriority="39"/>' .
  464. '<w:lsdException w:name="toc 7" w:uiPriority="39"/>' .
  465. '<w:lsdException w:name="toc 8" w:uiPriority="39"/>' .
  466. '<w:lsdException w:name="toc 9" w:uiPriority="39"/>' .
  467. '<w:lsdException w:name="caption" w:uiPriority="35" ' .
  468. 'w:qFormat="1"/><w:lsdException w:name="Title" w:sem' .
  469. 'iHidden="0" w:uiPriority="10" w:unhideWhenUsed="0" w:qFo' .
  470. 'rmat="1"/><w:lsdException w:name="Default Paragraph Font" w:ui' .
  471. 'Priority="1"/><w:lsdException w:name="Subtitle" w:semiHidd' .
  472. 'en="0" w:uiPriority="11" w:unhideWhenUsed="0" w:qForm' .
  473. 'at="1"/><w:lsdException w:name="Strong" w:semiHidden="0" w:uiP' .
  474. 'riority="22" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExc' .
  475. 'eption w:name="Emphasis" w:semiHidden="0" w:uiPriority="20" w:u' .
  476. 'nhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Ta' .
  477. 'ble Grid" w:semiHidden="0" w:uiPriority="59" w:unhideWhenUs' .
  478. 'ed="0"/><w:lsdException w:name="Placeholder Text" w:unhide' .
  479. 'WhenUsed="0"/><w:lsdException w:name="No Spacing" w:semiHi' .
  480. 'dden="0" w:uiPriority="1" w:unhideWhenUsed="0" w:qForm' .
  481. 'at="1"/><w:lsdException w:name="Light Shading" w:semiHi' .
  482. 'dden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsd' .
  483. 'Exception w:name="Light List" w:semiHidden="0" w:uiPrior' .
  484. 'ity="61" w:unhideWhenUsed="0"/><w:lsdException w:name' .
  485. '="Light Grid" w:semiHidden="0" w:uiPriority="62" w:unhid' .
  486. 'eWhenUsed="0"/><w:lsdException w:name="Medium Shading 1" w:semi' .
  487. 'Hidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdEx' .
  488. 'ception w:name="Medium Shading 2" w:semiHidden="0" w:uiPri' .
  489. 'ority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Me' .
  490. 'dium List 1" w:semiHidden="0" w:uiPriority="65" w:unhideWhe' .
  491. 'nUsed="0"/><w:lsdException w:name="Medium List 2" w:semiHid' .
  492. 'den="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdExcep' .
  493. 'tion w:name="Medium Grid 1" w:semiHidden="0" w:uiPriorit' .
  494. 'y="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Mediu' .
  495. 'm Grid 2" w:semiHidden="0" w:uiPriority="68" w:unhideWhe' .
  496. 'nUsed="0"/><w:lsdException w:name="Medium Grid 3" w:semi' .
  497. 'Hidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsd' .
  498. 'Exception w:name="Dark List" w:semiHidden="0" w:uiPrio' .
  499. 'rity="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colo' .
  500. 'rful Shading" w:semiHidden="0" w:uiPriority="71" w:unh' .
  501. 'ideWhenUsed="0"/><w:lsdException w:name="Colorful List" w:sem' .
  502. 'iHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdEx' .
  503. 'ception w:name="Colorful Grid" w:semiHidden="0" w:uiPrio' .
  504. 'rity="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Lig' .
  505. 'ht Shading Accent 1" w:semiHidden="0" w:uiPriority="60" w:un' .
  506. 'hideWhenUsed="0"/><w:lsdException w:name="Light List Acce' .
  507. 'nt 1" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUs' .
  508. 'ed="0"/><w:lsdException w:name="Light Grid Accent 1" w:sem' .
  509. 'iHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/>' .
  510. '<w:lsdException w:name="Medium Shading 1 Accent 1" w' .
  511. ':semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="' .
  512. '0"/><w:lsdException w:name="Medium Shading 2 Accent' .
  513. ' 1" w:semiHidden="0" w:uiPriority="64" w:unhideWhen' .
  514. 'Used="0"/><w:lsdException w:name="Medium List 1 Acc' .
  515. 'ent 1" w:semiHidden="0" w:uiPriority="65" w:unhideW' .
  516. 'henUsed="0"/><w:lsdException w:name="Revision" w:un' .
  517. 'hideWhenUsed="0"/><w:lsdException w:name="List Para' .
  518. 'graph" w:semiHidden="0" w:uiPriority="34" w:unhideW' .
  519. 'henUsed="0" w:qFormat="1"/><w:lsdException w:name=' .
  520. '"Quote" w:semiHidden="0" w:uiPriority="29" w:unhi' .
  521. 'deWhenUsed="0" w:qFormat="1"/><w:lsdException w:n' .
  522. 'ame="Intense Quote" w:semiHidden="0" w:uiPriority' .
  523. '="30" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdE' .
  524. 'xception w:name="Medium List 2 Accent 1" w:semiHi' .
  525. 'dden="0" w:uiPriority="66" w:unhideWhenUsed="0"/' .
  526. '><w:lsdException w:name="Medium Grid 1 Accent 1"' .
  527. ' w:semiHidden="0" w:uiPriority="67" w:unhideWhenU' .
  528. 'sed="0"/><w:lsdException w:name="Medium Grid 2 A' .
  529. 'ccent 1" w:semiHidden="0" w:uiPriority="68" w:un' .
  530. 'hideWhenUsed="0"/><w:lsdException w:name="Medium' .
  531. ' Grid 3 Accent 1" w:semiHidden="0" w:uiPriority=' .
  532. '"69" w:unhideWhenUsed="0"/><w:lsdException w:nam' .
  533. 'e="Dark List Accent 1" w:semiHidden="0" w:uiPri' .
  534. 'ority="70" w:unhideWhenUsed="0"/><w:lsdExceptio' .
  535. 'n w:name="Colorful Shading Accent 1" w:semiHidd' .
  536. 'en="0" w:uiPriority="71" w:unhideWhenUsed="0"/' .
  537. '><w:lsdException w:name="Colorful List Accent 1" w:' .
  538. 'semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:l' .
  539. 'sdException w:name="Colorful Grid Accent 1" w:semiHidden="' .
  540. '0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException' .
  541. ' w:name="Light Shading Accent 2" w:semiHidden="0" w:uiPrio' .
  542. 'rity="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Lig' .
  543. 'ht List Accent 2" w:semiHidden="0" w:uiPriority="61" w:unhi' .
  544. 'deWhenUsed="0"/><w:lsdException w:name="Light Grid Accen' .
  545. 't 2" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"' .
  546. '/><w:lsdException w:name="Medium Shading 1 Accent 2" w:semiH' .
  547. 'idden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdExce' .
  548. 'ption w:name="Medium Shading 2 Accent 2" w:semiHidden="0" w:' .
  549. 'uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name=' .
  550. '"Medium List 1 Accent 2" w:semiHidden="0" w:uiPriority="65"' .
  551. ' w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 ' .
  552. 'Accent 2" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed=' .
  553. '"0"/><w:lsdException w:name="Medium Grid 1 Accent 2" w:semiH' .
  554. 'idden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdExcept' .
  555. 'ion w:name="Medium Grid 2 Accent 2" w:semiHidden="0" w:uiPriori' .
  556. 'ty="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medi' .
  557. 'um Grid 3 Accent 2" w:semiHidden="0" w:uiPriority="69" w:unh' .
  558. 'ideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 2' .
  559. '" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/' .
  560. '><w:lsdException w:name="Colorful Shading Accent 2" w:semi' .
  561. 'Hidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdE' .
  562. 'xception w:name="Colorful List Accent 2" w:semiHidden="0" ' .
  563. 'w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:' .
  564. 'name="Colorful Grid Accent 2" w:semiHidden="0" w:uiPriorit' .
  565. 'y="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Ligh' .
  566. 't Shading Accent 3" w:semiHidden="0" w:uiPriority="60" w:' .
  567. 'unhideWhenUsed="0"/><w:lsdException w:name="Light List Acc' .
  568. 'ent 3" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed' .
  569. '="0"/><w:lsdException w:name="Light Grid Accent 3" w:semiH' .
  570. 'idden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdEx' .
  571. 'ception w:name="Medium Shading 1 Accent 3" w:semiHidden="0' .
  572. '" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException ' .
  573. 'w:name="Medium Shading 2 Accent 3" w:semiHidden="0" w:uiP' .
  574. 'riority="64" w:unhideWhenUsed="0"/><w:lsdException w:name' .
  575. '="Medium List 1 Accent 3" w:semiHidden="0" w:uiPriority' .
  576. '="65" w:unhideWhenUsed="0"/><w:lsdException w:nam' .
  577. 'e="Medium List 2 Accent 3" w:semiHidden="0" w:uiPr' .
  578. 'iority="66" w:unhideWhenUsed="0"/><w:lsdException ' .
  579. 'w:name="Medium Grid 1 Accent 3" w:semiHidden="0" w' .
  580. ':uiPriority="67" w:unhideWhenUsed="0"/><w:lsdExcep' .
  581. 'tion w:name="Medium Grid 2 Accent 3" w:semiHidden="0" w:uiPr' .
  582. 'iority="68" w:unhideWhenUsed="0"/><w:lsdException w:name=' .
  583. '"Medium Grid 3 Accent 3" w:semiHidden="0" w:uiPriority="' .
  584. '69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark L' .
  585. 'ist Accent 3" w:semiHidden="0" w:uiPriority="70" w:unhid' .
  586. 'eWhenUsed="0"/><w:lsdException w:name="Colorful Shading ' .
  587. 'Accent 3" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUse' .
  588. 'd="0"/><w:lsdException w:name="Colorful List Accent 3" w:sem' .
  589. 'iHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdEx' .
  590. 'ception w:name="Colorful Grid Accent 3" w:semiHidden="0" w:ui' .
  591. 'Priority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="' .
  592. 'Light Shading Accent 4" w:semiHidden="0" w:uiPriority="60" w:' .
  593. 'unhideWhenUsed="0"/><w:lsdException w:name="Light List Accen' .
  594. 't 4" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"' .
  595. '/><w:lsdException w:name="Light Grid Accent 4" w:semiHidden=' .
  596. '"0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException ' .
  597. 'w:name="Medium Shading 1 Accent 4" w:semiHidden="0" w:uiPrio' .
  598. 'rity="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Mediu' .
  599. 'm Shading 2 Accent 4" w:semiHidden="0" w:uiPriority="64" w:' .
  600. 'unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 A' .
  601. 'ccent 4" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUse' .
  602. 'd="0"/><w:lsdException w:name="Medium List 2 Accent 4" w:se' .
  603. 'miHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:ls' .
  604. 'dException w:name="Medium Grid 1 Accent 4" w:semiHidden="0" ' .
  605. 'w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:nam' .
  606. 'e="Medium Grid 2 Accent 4" w:semiHidden="0" w:uiPriority="68"' .
  607. ' w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 A' .
  608. 'ccent 4" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="' .
  609. '0"/><w:lsdException w:name="Dark List Accent 4" w:semiHidden="' .
  610. '0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:n' .
  611. 'ame="Colorful Shading Accent 4" w:semiHidden="0" w:uiPriority=' .
  612. '"71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful ' .
  613. 'List Accent 4" w:semiHidden="0" w:uiPriority="72" w:unhideWhe' .
  614. 'nUsed="0"/><w:lsdException w:name="Colorful Grid Accent 4" w' .
  615. ':semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:ls' .
  616. 'dException w:name="Light Shading Accent 5" w:semiHidden="0" w:' .
  617. 'uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="' .
  618. 'Light List Accent 5" w:semiHidden="0" w:uiPriority="61" w:unh' .
  619. 'ideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 5"' .
  620. ' w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w' .
  621. ':lsdException w:name="Medium Shading 1 Accent 5" w:semiHidden' .
  622. '="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException' .
  623. ' w:name="Medium Shading 2 Accent 5" w:semiHidden="0" w:uiPrio' .
  624. 'rity="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium' .
  625. ' List 1 Accent 5" w:semiHidden="0" w:uiPriority="65" w:unhideWh' .
  626. 'enUsed="0"/><w:lsdException w:name="Medium List 2 Accent 5" w:' .
  627. 'semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdE' .
  628. 'xception w:name="Medium Grid 1 Accent 5" w:semiHidden="0" w:ui' .
  629. 'Priority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="M' .
  630. 'edium Grid 2 Accent 5" w:semiHidden="0" w:uiPriority="68" w:u' .
  631. 'nhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Acce' .
  632. 'nt 5" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"' .
  633. '/><w:lsdException w:name="Dark List Accent 5" w:semiHidden="' .
  634. '0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w' .
  635. ':name="Colorful Shading Accent 5" w:semiHidden="0" w:uiPriori' .
  636. 'ty="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorf' .
  637. 'ul List Accent 5" w:semiHidden="0" w:uiPriority="72" w:unhid' .
  638. 'eWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 5' .
  639. '" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w' .
  640. ':lsdException w:name="Light Shading Accent 6" w:semiHidden="0' .
  641. '" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:' .
  642. 'name="Light List Accent 6" w:semiHidden="0" w:uiPriority="61' .
  643. '" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid A' .
  644. 'ccent 6" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed' .
  645. '="0"/><w:lsdException w:name="Medium Shading 1 Accent 6" w:s' .
  646. 'emiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsd' .
  647. 'Exception w:name="Medium Shading 2 Accent 6" w:semiHidden="' .
  648. '0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException ' .
  649. 'w:name="Medium List 1 Accent 6" w:semiHidden="0" w:uiPriority="' .
  650. '65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List ' .
  651. '2 Accent 6" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUs' .
  652. 'ed="0"/><w:lsdException w:name="Medium Grid 1 Accent 6" w:sem' .
  653. 'iHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdExc' .
  654. 'eption w:name="Medium Grid 2 Accent 6" w:semiHidden="0" w:uiP' .
  655. 'riority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="M' .
  656. 'edium Grid 3 Accent 6" w:semiHidden="0" w:uiPriority="69" w:' .
  657. 'unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent' .
  658. ' 6" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"' .
  659. '/><w:lsdException w:name="Colorful Shading Accent 6" w:semi' .
  660. 'Hidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdEx' .
  661. 'ception w:name="Colorful List Accent 6" w:semiHidden="0" w:ui' .
  662. 'Priority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="C' .
  663. 'olorful Grid Accent 6" w:semiHidden="0" w:uiPriority="73" w:un' .
  664. 'hideWhenUsed="0"/><w:lsdException w:name="Subtle Emphasis" w:' .
  665. 'semiHidden="0" w:uiPriority="19" w:unhideWhenUsed="0" w:qFormat' .
  666. '="1"/><w:lsdException w:name="Intense Emphasis" w:semiHidden="' .
  667. '0" w:uiPriority="21" w:unhideWhenUsed="0" w:qFormat="1"/><w:l' .
  668. 'sdException w:name="Subtle Reference" w:semiHidden="0" w:uiPr' .
  669. 'iority="31" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdExcept' .
  670. 'ion w:name="Intense Reference" w:semiHidden="0" w:uiPrior' .
  671. 'ity="32" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException' .
  672. ' w:name="Book Title" w:semiHidden="0" w:uiPriority="33" w:un' .
  673. 'hideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Bib' .
  674. 'liography" w:uiPriority="37"/><w:lsdException w:name="TOC Hea' .
  675. 'ding" w:uiPriority="39" w:qFormat="1"/></w:latentStyles>';
  676. $parameters = array('type' => 'paragraph',
  677. 'default' => '1', 'styleId' => 'Normal',
  678. 'name' => 'Normal',
  679. 'qFormat' => 1, 'rsid' => '000415ED');
  680. $this->addStyle(array($parameters));
  681. $parameters = array('type' => 'paragraph',
  682. 'styleId' => 'Ttulo1',
  683. 'name' => 'heading 1',
  684. 'basedOn' => 'Normal',
  685. 'next' => 'Normal',
  686. 'link' => 'Ttulo1Car',
  687. 'uiPriority' => '9', 'qFormat' => 1,
  688. 'rsid' => '00CF3BFC',
  689. 'keepNext' => 1, 'keepLines' => 1, 'spacing_before' => '480',
  690. 'spacing_after' => '0', 'outlineLvl' => '0',
  691. 'rFonts_asciiTheme' => 'majorHAnsi',
  692. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  693. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  694. 'rFonts_cstheme' => 'majorBidi',
  695. 'b' => 1, 'bCs' => 1, 'color_val' => '365F91',
  696. 'color_themeColor' => 'accent1',
  697. 'color_themeShade' => 'BF',
  698. 'sz' => 28, 'szCs' => 28);
  699. $this->addStyle(array($parameters));
  700. $parameters = array('type' => 'paragraph',
  701. 'styleId' => 'Ttulo2',
  702. 'name' => 'heading 2',
  703. 'basedOn' => 'Normal',
  704. 'next' => 'Normal',
  705. 'link' => 'Ttulo2Car',
  706. 'uiPriority' => '9', 'unhideWhenUsed' => 1, 'qFormat' => 1,
  707. 'rsid' => '005235DC',
  708. 'keepNext' => 1, 'keepLines' => 1, 'spacing_before' => '200',
  709. 'spacing_after' => '0', 'outlineLvl' => '1',
  710. 'rFonts_asciiTheme' => 'majorHAnsi',
  711. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  712. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  713. 'rFonts_cstheme' => 'majorBidi',
  714. 'b' => 1, 'bCs' => 1, 'color_val' => '200290',
  715. 'sz' => 32, 'szCs' => 26);
  716. $this->addStyle(array($parameters));
  717. $parameters = array('type' => 'paragraph',
  718. 'styleId' => 'Ttulo3',
  719. 'name' => 'heading 3',
  720. 'basedOn' => 'Normal',
  721. 'next' => 'Normal',
  722. 'link' => 'Ttulo3Car',
  723. 'uiPriority' => '9', 'unhideWhenUsed' => 1, 'qFormat' => 1,
  724. 'rsid' => '005235DC',
  725. 'keepNext' => 1, 'keepLines' => 1, 'spacing_before' => '200',
  726. 'spacing_after' => '0', 'outlineLvl' => '2',
  727. 'rFonts_asciiTheme' => 'majorHAnsi',
  728. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  729. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  730. 'rFonts_cstheme' => 'majorBidi',
  731. 'b' => 1, 'bCs' => 1, 'color_val' => '000000',
  732. 'color_themeColor' => 'text1',
  733. 'sz' => 28);
  734. $this->addStyle(array($parameters));
  735. $parameters = array('type' => 'paragraph',
  736. 'styleId' => 'Ttulo4',
  737. 'name' => 'heading 4',
  738. 'basedOn' => 'Normal',
  739. 'next' => 'Normal',
  740. 'link' => 'Ttulo4Car',
  741. 'uiPriority' => '9', 'unhideWhenUsed' => 1, 'qFormat' => 1,
  742. 'rsid' => '007D6ADC',
  743. 'keepNext' => 1, 'keepLines' => 1, 'spacing_before' => '200',
  744. 'spacing_after' => '0', 'outlineLvl' => '3',
  745. 'rFonts_asciiTheme' => 'majorHAnsi',
  746. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  747. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  748. 'rFonts_cstheme' => 'majorBidi',
  749. 'b' => 1, 'bCs' => 1, 'i' => 1, 'iCs' => 1, 'color_val' => '4F81BD',
  750. 'color_themeColor' => 'accent1');
  751. $this->addStyle(array($parameters));
  752. $parameters = array('type' => 'character',
  753. 'default' => '1', 'styleId' => 'Fuentedeprrafopredeter',
  754. 'name' => 'Default Paragraph Font',
  755. 'uiPriority' => '1', 'unhideWhenUsed' => 1,
  756. 'semiHidden' => 1);
  757. $this->addStyle(array($parameters));
  758. $parameters = array('type' => 'table',
  759. 'default' => '1', 'styleId' => 'Tablanormal',
  760. 'name' => 'Normal Table',
  761. 'uiPriority' => '99',
  762. 'semiHidden' => 1, 'unhideWhenUsed' => 1, 'qFormat' => 1,
  763. 'tblInd_w' => '0', 'tblInd_type' => 'dxa',
  764. 'top_w' => '0', 'top_type' => 'dxa',
  765. 'left_w' => '108',
  766. 'left_type' => 'dxa',
  767. 'bottom_w' => '0', 'bottom_type' => 'dxa',
  768. 'right_w' => '108',
  769. 'right_type' => 'dxa');
  770. $this->addStyle(array($parameters));
  771. $parameters = array('type' => 'numbering',
  772. 'default' => '1', 'styleId' => 'Sinlista',
  773. 'name' => 'No List',
  774. 'uiPriority' => '99',
  775. 'semiHidden' => 1, 'unhideWhenUsed' => 1);
  776. $this->addStyle(array($parameters));
  777. // falla x el acento!!!
  778. $parameters = array('type' => 'character',
  779. 'customStyle' => '1', 'styleId' => 'Ttulo1Car',
  780. 'name' => 'Titulo 1 Car',
  781. 'basedOn' => 'Fuentedeprrafopredeter',
  782. 'link' => 'Ttulo1',
  783. 'uiPriority' => '9',
  784. 'rsid' => '005235DC',
  785. 'rFonts_asciiTheme' => 'majorHAnsi',
  786. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  787. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  788. 'rFonts_cstheme' => 'majorBidi',
  789. 'b' => 1, 'bCs' => 1,
  790. 'color_val' => '365F91',
  791. 'color_themeColor' => 'accent1',
  792. 'color_themeShade' => 'BF',
  793. 'sz' => '28',
  794. 'szCs' => '28');
  795. $this->addStyle(array($parameters));
  796. $parameters = array('type' => 'character',
  797. 'customStyle' => '1', 'styleId' => 'Ttulo2Car',
  798. 'name' => 'Titulo 2 Car',
  799. 'basedOn' => 'Fuentedeprrafopredeter',
  800. 'link' => 'Ttulo2',
  801. 'uiPriority' => '9',
  802. 'rsid' => '00CF3BFC',
  803. 'rFonts_asciiTheme' => 'majorHAnsi',
  804. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  805. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  806. 'rFonts_cstheme' => 'majorBidi',
  807. 'b' => 1, 'bCs' => 1,
  808. 'color_val' => '200290',
  809. 'sz' => 32, 'szCs' => 26);
  810. $this->addStyle(array($parameters));
  811. $parameters = array('type' => 'character',
  812. 'customStyle' => '1', 'styleId' => 'Ttulo3Car',
  813. 'name' => 'Titulo 3 Car',
  814. 'basedOn' => 'Fuentedeprrafopredeter',
  815. 'link' => 'Ttulo3',
  816. 'uiPriority' => '9',
  817. 'rsid' => '005235DC',
  818. 'rFonts_asciiTheme' => 'majorHAnsi',
  819. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  820. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  821. 'rFonts_cstheme' => 'majorBidi',
  822. 'b' => 1, 'bCs' => 1,
  823. 'color_val' => '000000',
  824. 'color_themeColor' => 'text1',
  825. 'sz' => 28);
  826. $this->addStyle(array($parameters));
  827. $parameters = array('type' => 'paragraph',
  828. 'styleId' => 'Ttulo',
  829. 'name' => 'Title',
  830. 'basedOn' => 'Normal',
  831. 'next' => 'Normal',
  832. 'link' => 'TtuloCar',
  833. 'uiPriority' => '10',
  834. 'qFormat' => 1,
  835. 'rsid' => '00CF3BFC',
  836. 'pBdr_bottom_val' => 'single',
  837. 'pBdr_bottom_sz' => 8, 'pBdr_bottom_space' => 4,
  838. 'pBdr_bottom_color' => '4F81BD',
  839. 'pBdr_bottom_themeColor' => 'accent1',
  840. 'spacing_after' => '300',
  841. 'spacing_line' => '240',
  842. 'spacing_lineRule' => 'auto',
  843. 'contextualSpacing' => 1, 'rFonts_asciiTheme' => 'majorHAnsi',
  844. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  845. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  846. 'rFonts_cstheme' => 'majorBidi',
  847. 'color_val' => '17365D',
  848. 'color_themeColor' => 'text2',
  849. 'color_themeShade' => 'BF',
  850. 'rPr_spacing' => '5', 'kern' => '28',
  851. 'sz' => 52, 'szCs' => 52);
  852. $this->addStyle(array($parameters));
  853. $parameters = array('type' => 'character',
  854. 'customStyle' => '1', 'styleId' => 'TtuloCar',
  855. 'name' => 'Titulo Car',
  856. 'basedOn' => 'Fuentedeprrafopredeter',
  857. 'link' => 'Ttulo',
  858. 'uiPriority' => '10',
  859. 'rsid' => '00CF3BFC',
  860. 'rFonts_asciiTheme' => 'majorHAnsi',
  861. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  862. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  863. 'rFonts_cstheme' => 'majorBidi',
  864. 'color_val' => '17365D',
  865. 'color_themeColor' => 'text2',
  866. 'color_themeShade' => 'BF',
  867. 'rPr_spacing' => '5', 'kern' => '28',
  868. 'sz' => 52, 'szCs' => 52);
  869. $this->addStyle(array($parameters));
  870. $parameters = array('type' => 'paragraph',
  871. 'styleId' => 'Subttulo',
  872. 'name' => 'Subtitle',
  873. 'basedOn' => 'Normal',
  874. 'next' => 'Normal',
  875. 'link' => 'SubttuloCar',
  876. 'uiPriority' => '11',
  877. 'qFormat' => 1,
  878. 'rsid' => '00CF3BFC',
  879. 'rFonts_asciiTheme' => 'majorHAnsi',
  880. 'ilvl' => '1', 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  881. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  882. 'rFonts_cstheme' => 'majorBidi',
  883. 'i' => 1, 'iCs' => 1, 'color_val' => '4F81BD',
  884. 'color_themeColor' => 'accent1',
  885. 'rPr_spacing' => '15',
  886. 'sz' => 24, 'szCs' => 24);
  887. $this->addStyle(array($parameters));
  888. $parameters = array('type' => 'paragraph',
  889. 'styleId' => 'Sinespaciado',
  890. 'name' => 'No Spacing',
  891. 'uiPriority' => '1', 'qFormat' => 1, 'rsid' => '007D6ADC',
  892. 'spacing_after' => '0',
  893. 'spacing_line' => '240',
  894. 'spacing_lineRule' => 'auto');
  895. $this->addStyle(array($parameters));
  896. $parameters = array('type' => 'character',
  897. 'customStyle' => '1', 'styleId' => 'Ttulo4Car',
  898. 'name' => 'Titulo 4 Car',
  899. 'basedOn' => 'Fuentedeprrafopredeter',
  900. 'link' => 'Ttulo4',
  901. 'uiPriority' => '9',
  902. 'rsid' => '007D6ADC',
  903. 'rFonts_asciiTheme' => 'majorHAnsi',
  904. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  905. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  906. 'rFonts_cstheme' => 'majorBidi',
  907. 'b' => 1, 'bCs' => 1,
  908. 'i' => 1, 'iCs' => 1, 'color_val' => '4F81BD',
  909. 'color_themeColor' => 'accent1');
  910. $this->addStyle(array($parameters));
  911. $parameters = array('type' => 'character',
  912. 'styleId' => 'Hipervnculo',
  913. 'name' => 'Hyperlink',
  914. 'basedOn' => 'Fuentedeprrafopredeter',
  915. 'uiPriority' => '99',
  916. 'unhideWhenUsed' => 1,
  917. 'rsid' => '00EF1859',
  918. 'color_val' => '0000FF',
  919. 'color_themeColor' => 'hyperlink',
  920. 'u' => 'single');
  921. $this->addStyle(array($parameters));
  922. $parameters = array('type' => 'paragraph',
  923. 'styleId' => 'Prrafodelista',
  924. 'name' => 'List Paragraph',
  925. 'basedOn' => 'Normal',
  926. 'uiPriority' => '34',
  927. 'qFormat' => 1, 'rsid' => '007D6ADC',
  928. 'ind_left' => 720, 'contextualSpacing' => 1);
  929. $this->addStyle(array($parameters));
  930. $parameters = array('type' => 'table',
  931. 'styleId' => 'Tablaconcuadrcula',
  932. 'name' => 'Table Grid',
  933. 'basedOn' => 'Tablanormal',
  934. 'uiPriority' => '59',
  935. 'rsid' => '007D6ADC',
  936. 'spacing_after' => '0',
  937. 'spacing_line' => '240',
  938. 'spacing_lineRule' => 'auto',
  939. 'tblInd_w' => '0', 'tblInd_type' => 'dxa',
  940. 'top_w' => '0', 'top_type' => 'dxa',
  941. 'left_w' => '108',
  942. 'left_type' => 'dxa',
  943. 'bottom_w' => '0', 'bottom_type' => 'dxa',
  944. 'right_w' => '108',
  945. 'tblborder_top_val' => 'single',
  946. 'tblborder_top_sz' => 4,
  947. 'tblborder_top_space' => '0',
  948. 'tblborder_top_color' => '000000',
  949. 'tblborder_top_themeColor' => 'text1',
  950. 'tblborder_left_val' => 'single',
  951. 'tblborder_left_sz' => 4, 'tblborder_left_space' => '0',
  952. 'tblborder_left_color' => '000000',
  953. 'tblborder_left_themeColor' => 'text1',
  954. 'tblborder_bottom_val' => 'single',
  955. 'tblborder_bottom_sz' => 4, 'tblborder_bottom_space' => '0',
  956. 'tblborder_bottom_color' => '000000',
  957. 'tblborder_bottom_themeColor' => 'text1',
  958. 'tblborder_right_val' => 'single',
  959. 'tblborder_right_sz' => 4, 'tblborder_right_space' => '0',
  960. 'tblborder_right_color' => '000000',
  961. 'tblborder_right_themeColor' => 'text1',
  962. 'tblborder_insideH_val' => 'single',
  963. 'tblborder_insideH_sz' => 4, 'tblborder_insideH_space' => '0',
  964. 'tblborder_insideH_color' => '000000',
  965. 'tblborder_insideH_themeColor' => 'text1',
  966. 'tblborder_insideV_val' => 'single',
  967. 'tblborder_insideV_sz' => 4, 'tblborder_insideV_space' => '0',
  968. 'tblborder_insideV_color' => '000000',
  969. 'tblborder_insideV_themeColor' => 'text1');
  970. $this->addStyle(array($parameters));
  971. $parameters = array('type' => 'paragraph',
  972. 'styleId' => 'Textodeglobo',
  973. 'name' => 'Balloon Text',
  974. 'basedOn' => 'Normal',
  975. 'link' => 'TextodegloboCar',
  976. 'uiPriority' => '99',
  977. 'semiHidden' => 1,
  978. 'unhideWhenUsed' => 1, 'rsid' => '007D6ADC',
  979. 'spacing_after' => '0', 'spacing_line' => '240',
  980. 'spacing_lineRule' => 'auto',
  981. 'sz' => 16, 'szCs' => 16, 'rFonts_ascii' => 'Tahoma',
  982. 'rFonts_hAnsi' => 'Tahoma',
  983. 'rFonts_cs' => 'Tahoma');
  984. $this->addStyle(array($parameters));
  985. $parameters = array('type' => 'character',
  986. 'customStyle' => '1', 'styleId' => 'TextodegloboCar',
  987. 'name' => 'Texto de globo Car',
  988. 'basedOn' => 'Fuentedeprrafopredeter',
  989. 'link' => 'Textodeglobo',
  990. 'uiPriority' => '99',
  991. 'semiHidden' => 1, 'rsid' => '007D6ADC',
  992. 'sz' => 16, 'szCs' => 16, 'rFonts_ascii' => 'Tahoma',
  993. 'rFonts_hAnsi' => 'Tahoma',
  994. 'rFonts_cs' => 'Tahoma');
  995. $this->addStyle(array($parameters));
  996. $parameters = array('type' => 'paragraph',
  997. 'styleId' => 'Encabezado',
  998. 'name' => 'header',
  999. 'basedOn' => 'Normal',
  1000. 'link' => 'EncabezadoCar',
  1001. 'uiPriority' => '99',
  1002. 'unhideWhenUsed' => 1,
  1003. 'rsid' => '007D6ADC',
  1004. 'spacing_after' => '0', 'spacing_line' => '240',
  1005. 'spacing_lineRule' => 'auto',
  1006. 'tab_center' => 4252, 'tab_right' => 8504);
  1007. $this->addStyle(array($parameters));
  1008. $parameters = array('type' => 'character',
  1009. 'customStyle' => '1', 'styleId' => 'EncabezadoCar',
  1010. 'name' => 'Encabezado Car',
  1011. 'basedOn' => 'Fuentedeprrafopredeter',
  1012. 'link' => 'Encabezado',
  1013. 'uiPriority' => '99',
  1014. 'rsid' => '007D6ADC');
  1015. $this->addStyle(array($parameters));
  1016. $parameters = array('type' => 'paragraph',
  1017. 'styleId' => 'Piedepgina',
  1018. 'name' => 'footer',
  1019. 'basedOn' => 'Normal',
  1020. 'link' => 'PiedepginaCar',
  1021. 'uiPriority' => '99',
  1022. 'unhideWhenUsed' => 1,
  1023. 'rsid' => '007D6ADC',
  1024. 'spacing_after' => '0', 'spacing_line' => '240',
  1025. 'spacing_lineRule' => 'auto',
  1026. 'tab_center' => 4252, 'tab_right' => 8504);
  1027. $this->addStyle(array($parameters));
  1028. $parameters = array('type' => 'character',
  1029. 'customStyle' => '1', 'styleId' => 'PiedepginaCar',
  1030. 'name' => 'Pie de pagina Car',
  1031. 'basedOn' => 'Fuentedeprrafopredeter',
  1032. 'link' => 'Piedepgina',
  1033. 'uiPriority' => '99',
  1034. 'rsid' => '007D6ADC');
  1035. $this->addStyle(array($parameters));
  1036. $parameters = array('type' => 'paragraph',
  1037. 'styleId' => 'TDC1',
  1038. 'name' => 'toc 1',
  1039. 'basedOn' => 'Normal',
  1040. 'next' => 'Normal',
  1041. 'autoRedefine' => 1, 'uiPriority' => '39',
  1042. 'unhideWhenUsed' => 1,
  1043. 'rsid' => '00EF1859',
  1044. 'spacing_after' => '100');
  1045. $this->addStyle(array($parameters));
  1046. $parameters = array('type' => 'numbering',
  1047. 'customStyle' => '1', 'styleId' => 'Sinlista',
  1048. 'name' => 'No List',
  1049. 'uiPriority' => '99',
  1050. 'semiHidden' => 1, 'unhideWhenUsed' => 1);
  1051. $this->addStyle(array($parameters));
  1052. $parameters = array('type' => 'paragraph',
  1053. 'styleId' => 'TDC2',
  1054. 'name' => 'toc 2',
  1055. 'basedOn' => 'Normal',
  1056. 'next' => 'Normal',
  1057. 'autoRedefine' => 1, 'uiPriority' => '39',
  1058. 'semiHidden' => 1,
  1059. 'unhideWhenUsed' => 1, 'rsid' => '005F706C',
  1060. 'spacing_after' => '100',
  1061. 'ind_left' => 220, 'b' => 1, 'sz' => 24);
  1062. $this->addStyle(array($parameters));
  1063. $parameters = array('type' => 'paragraph',
  1064. 'styleId' => 'TDC3',
  1065. 'name' => 'toc 3',
  1066. 'basedOn' => 'Normal',
  1067. 'next' => 'Normal',
  1068. 'autoRedefine' => 1, 'uiPriority' => '39',
  1069. 'unhideWhenUsed' => 1, 'rsid' => '00EF1859',
  1070. 'spacing_after' => '100',
  1071. 'ind_left' => 440);
  1072. $this->addStyle(array($parameters));
  1073. $parameters = array('type' => 'table',
  1074. 'styleId' => 'Cuadrculamedia3-nfasis1',
  1075. 'name' => 'Medium Grid 3 Accent 1',
  1076. 'basedOn' => 'Tablanormal',
  1077. 'uiPriority' => '69',
  1078. 'rsid' => '00387AE9',
  1079. 'spacing_after' => '0', 'spacing_line' => '240',
  1080. 'spacing_lineRule' => 'auto',
  1081. 'tblInd_w' => '0', 'tblInd_type' => 'dxa',
  1082. 'top_w' => '0', 'top_type' => 'dxa',
  1083. 'left_w' => '108',
  1084. 'left_type' => 'dxa',
  1085. 'bottom_w' => '0', 'bottom_type' => 'dxa',
  1086. 'right_w' => '108',
  1087. 'right_type' => 'dxa',
  1088. 'tbl_style_row' => 1, 'tbl_style_col' => 1,
  1089. 'tblborder_top_val' => 'single',
  1090. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1091. 'tblborder_top_color' => 'FFFFFF',
  1092. 'tblborder_top_themeColor' => 'background1',
  1093. 'tblborder_left_val' => 'single',
  1094. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1095. 'tblborder_left_color' => 'FFFFFF',
  1096. 'tblborder_left_themeColor' => 'background1',
  1097. 'tblborder_bottom_val' => 'single',
  1098. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1099. 'tblborder_bottom_color' => 'FFFFFF',
  1100. 'tblborder_bottom_themeColor' => 'background1',
  1101. 'tblborder_right_val' => 'single',
  1102. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1103. 'tblborder_right_color' => 'FFFFFF',
  1104. 'tblborder_right_themeColor' => 'background1',
  1105. 'tblborder_insideH_val' => 'single',
  1106. 'tblborder_insideH_sz' => 6, 'tblborder_insideH_space' => '0',
  1107. 'tblborder_insideH_color' => 'FFFFFF',
  1108. 'tblborder_insideH_themeColor' => 'background1',
  1109. 'tblborder_insideV_val' => 'single',
  1110. 'tblborder_insideV_sz' => 6, 'tblborder_insideV_space' => '0',
  1111. 'tblborder_insideV_color' => 'FFFFFF',
  1112. 'tblborder_insideV_themeColor' => 'background1',
  1113. 'shd_val' => 'clear',
  1114. 'shd_color' => 'auto',
  1115. 'shd_fill' => 'D3DFEE',
  1116. 'shd_themeFill' => 'accent1',
  1117. 'shd_themeFillTint' => '3F');
  1118. $styleTableA = array('type' => 'firstRow',
  1119. 'b' => 1, 'b' => 1, 'bCs' => 1, 'i' => '0', 'iCs' => '0',
  1120. 'color_val' => 'FFFFFF',
  1121. 'color_themeColor' => 'background1',
  1122. 'tblPr' => 1,
  1123. 'tblborder_top_val' => 'single',
  1124. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1125. 'tblborder_top_color' => 'FFFFFF',
  1126. 'tblborder_top_themeColor' => 'background1',
  1127. 'tblborder_left_val' => 'single',
  1128. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1129. 'tblborder_left_color' => 'FFFFFF',
  1130. 'tblborder_left_themeColor' => 'background1',
  1131. 'tblborder_bottom_val' => 'single',
  1132. 'tblborder_bottom_sz' => 24, 'tblborder_bottom_space' => '0',
  1133. 'tblborder_bottom_color' => 'FFFFFF',
  1134. 'tblborder_bottom_themeColor' => 'background1',
  1135. 'tblborder_right_val' => 'single',
  1136. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1137. 'tblborder_right_color' => 'FFFFFF',
  1138. 'tblborder_right_themeColor' => 'background1',
  1139. 'tblborder_insideH_val' => 'nil',
  1140. 'tblborder_insideV_val' => 'single',
  1141. 'tblborder_insideV_sz' => 8, 'tblborder_insideV_space' => '0',
  1142. 'tblborder_insideV_color' => 'FFFFFF',
  1143. 'tblborder_insideV_themeColor' => 'background1',
  1144. 'shd_val' => 'clear',
  1145. 'shd_color' => 'auto',
  1146. 'shd_fill' => '4F81BD',
  1147. 'shd_themeFill' => 'accent1');
  1148. $styleTableB = array('type' => 'lastRow',
  1149. 'b' => 1, 'bCs' => 1, 'i' => '0', 'iCs' => '0',
  1150. 'color_val' => 'FFFFFF',
  1151. 'color_themeColor' => 'background1',
  1152. 'tblPr' => 1,
  1153. 'tblborder_top_val' => 'single',
  1154. 'tblborder_top_sz' => 24, 'tblborder_top_space' => '0',
  1155. 'tblborder_top_color' => 'FFFFFF',
  1156. 'tblborder_top_themeColor' => 'background1',
  1157. 'tblborder_left_val' => 'single',
  1158. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1159. 'tblborder_left_color' => 'FFFFFF',
  1160. 'tblborder_left_themeColor' => 'background1',
  1161. 'tblborder_bottom_val' => 'single',
  1162. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1163. 'tblborder_bottom_color' => 'FFFFFF',
  1164. 'tblborder_bottom_themeColor' => 'background1',
  1165. 'tblborder_right_val' => 'single',
  1166. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1167. 'tblborder_right_color' => 'FFFFFF',
  1168. 'tblborder_right_themeColor' => 'background1',
  1169. 'tblborder_insideH_val' => 'nil',
  1170. 'tblborder_insideV_val' => 'single',
  1171. 'tblborder_insideV_sz' => 8, 'tblborder_insideV_space' => '0',
  1172. 'tblborder_insideV_color' => 'FFFFFF',
  1173. 'tblborder_insideV_themeColor' => 'background1',
  1174. 'shd_val' => 'clear',
  1175. 'shd_color' => 'auto',
  1176. 'shd_fill' => '4F81BD',
  1177. 'shd_themeFill' => 'accent1');
  1178. $styleTableC = array('type' => 'firstCol',
  1179. 'b' => 1, 'bCs' => 1, 'i' => '0', 'iCs' => '0',
  1180. 'color_val' => 'FFFFFF',
  1181. 'color_themeColor' => 'background1',
  1182. 'tblPr' => 1,
  1183. 'tblborder_left_val' => 'single',
  1184. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1185. 'tblborder_left_color' => 'FFFFFF',
  1186. 'tblborder_left_themeColor' => 'background1',
  1187. 'tblborder_right_val' => 'single',
  1188. 'tblborder_right_sz' => 24, 'tblborder_right_space' => '0',
  1189. 'tblborder_right_color' => 'FFFFFF',
  1190. 'tblborder_right_themeColor' => 'background1',
  1191. 'tblborder_insideH_val' => 'nil',
  1192. 'tblborder_insideV_val' => 'nil',
  1193. 'shd_val' => 'clear',
  1194. 'shd_color' => 'auto',
  1195. 'shd_fill' => '4F81BD',
  1196. 'shd_themeFill' => 'accent1');
  1197. $styleTableD = array('type' => 'lastCol',
  1198. 'b' => 1, 'bCs' => 1, 'i' => '0', 'iCs' => '0',
  1199. 'color_val' => 'FFFFFF',
  1200. 'color_themeColor' => 'background1',
  1201. 'tblPr' => 1,
  1202. 'tblborder_top_val' => 'nil',
  1203. 'tblborder_left_val' => 'single',
  1204. 'tblborder_left_sz' => 24, 'tblborder_left_space' => '0',
  1205. 'tblborder_left_color' => 'FFFFFF',
  1206. 'tblborder_left_themeColor' => 'background1',
  1207. 'tblborder_bottom_val' => 'nil',
  1208. 'tblborder_right_val' => 'nil',
  1209. 'tblborder_insideH_val' => 'nil',
  1210. 'tblborder_insideV_val' => 'nil',
  1211. 'shd_val' => 'clear',
  1212. 'shd_color' => 'auto',
  1213. 'shd_fill' => '4F81BD',
  1214. 'shd_themeFill' => 'accent1');
  1215. $styleTableE = array('type' => 'band1Vert',
  1216. 'tblPr' => 1,
  1217. 'tblborder_top_val' => 'single',
  1218. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1219. 'tblborder_top_color' => 'FFFFFF',
  1220. 'tblborder_top_themeColor' => 'background1',
  1221. 'tblborder_left_val' => 'single',
  1222. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1223. 'tblborder_left_color' => 'FFFFFF',
  1224. 'tblborder_left_themeColor' => 'background1',
  1225. 'tblborder_bottom_val' => 'single',
  1226. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1227. 'tblborder_bottom_color' => 'FFFFFF',
  1228. 'tblborder_bottom_themeColor' => 'background1',
  1229. 'tblborder_right_val' => 'single',
  1230. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1231. 'tblborder_right_color' => 'FFFFFF',
  1232. 'tblborder_right_themeColor' => 'background1',
  1233. 'tblborder_insideH_val' => 'nil',
  1234. 'tblborder_insideV_val' => 'nil',
  1235. 'shd_val' => 'clear',
  1236. 'shd_color' => 'auto',
  1237. 'shd_fill' => 'A7BFDE',
  1238. 'shd_themeFill' => 'accent1',
  1239. 'shd_themeFillTint' => '7F');
  1240. $styleTableF = array('type' => 'band1Horz',
  1241. 'tblPr' => 1,
  1242. 'tblborder_top_val' => 'single',
  1243. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1244. 'tblborder_top_color' => 'FFFFFF',
  1245. 'tblborder_top_themeColor' => 'background1',
  1246. 'tblborder_left_val' => 'single',
  1247. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1248. 'tblborder_left_color' => 'FFFFFF',
  1249. 'tblborder_left_themeColor' => 'background1',
  1250. 'tblborder_bottom_val' => 'single',
  1251. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1252. 'tblborder_bottom_color' => 'FFFFFF',
  1253. 'tblborder_bottom_themeColor' => 'background1',
  1254. 'tblborder_right_val' => 'single',
  1255. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1256. 'tblborder_right_color' => 'FFFFFF',
  1257. 'tblborder_right_themeColor' => 'background1',
  1258. 'tblborder_insideH_val' => 'single',
  1259. 'tblborder_insideH_sz' => 8, 'tblborder_insideH_space' => '0',
  1260. 'tblborder_insideH_color' => 'FFFFFF',
  1261. 'tblborder_insideH_themeColor' => 'background1',
  1262. 'tblborder_insideV_val' => 'single',
  1263. 'tblborder_insideV_sz' => 8, 'tblborder_insideV_space' => '0',
  1264. 'tblborder_insideV_color' => 'FFFFFF',
  1265. 'tblborder_insideV_themeColor' => 'background1',
  1266. 'shd_val' => 'clear',
  1267. 'shd_color' => 'auto',
  1268. 'shd_fill' => 'A7BFDE',
  1269. 'shd_themeFill' => 'accent1',
  1270. 'shd_themeFillTint' => '7F');
  1271. $this->addStyle(
  1272. array($parameters,
  1273. $styleTableA, $styleTableB,
  1274. $styleTableC, $styleTableD,
  1275. $styleTableE, $styleTableF)
  1276. );
  1277. $parameters = array('type' => 'character',
  1278. 'styleId' => 'nfasis',
  1279. 'name' => 'Emphasis',
  1280. 'basedOn' => 'Fuentedeprrafopredeter',
  1281. 'uiPriority' => '20',
  1282. 'qFormat' => 1, 'rsid' => '005235DC',
  1283. 'i' => 1, 'iCs' => 1);
  1284. $this->addStyle(array($parameters));
  1285. $parameters = array('type' => 'table',
  1286. 'styleId' => 'Sombreadomedio1',
  1287. 'name' => 'Medium Shading 1',
  1288. 'basedOn' => 'Tablanormal',
  1289. 'uiPriority' => '63',
  1290. 'rsid' => '00E559CE',
  1291. 'spacing_after' => '0', 'spacing_line' => '240',
  1292. 'spacing_lineRule' => 'auto',
  1293. 'tblInd_w' => '0', 'tblInd_type' => 'dxa',
  1294. 'top_w' => '0', 'top_type' => 'dxa',
  1295. 'left_w' => '108',
  1296. 'left_type' => 'dxa',
  1297. 'bottom_w' => '0', 'bottom_type' => 'dxa',
  1298. 'right_w' => '108',
  1299. 'right_type' => 'dxa',
  1300. 'tbl_style_row' => 1, 'tbl_style_col' => 1,
  1301. 'tblborder_top_val' => 'single',
  1302. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1303. 'tblborder_top_color' => '404040',
  1304. 'tblborder_top_themeColor' => 'text1',
  1305. 'tblborder_insideV_themeTint' => 'BF',
  1306. 'tblborder_left_val' => 'single',
  1307. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1308. 'tblborder_left_color' => '404040',
  1309. 'tblborder_left_themeColor' => 'text1',
  1310. 'tblborder_insideV_themeTint' => 'BF',
  1311. 'tblborder_bottom_val' => 'single',
  1312. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1313. 'tblborder_bottom_color' => '404040',
  1314. 'tblborder_bottom_themeColor' => 'text1',
  1315. 'tblborder_insideV_themeTint' => 'BF',
  1316. 'tblborder_right_val' => 'single',
  1317. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1318. 'tblborder_right_color' => '404040',
  1319. 'tblborder_right_themeColor' => 'text1',
  1320. 'tblborder_insideV_themeTint' => 'BF',
  1321. 'tblborder_insideH_val' => 'single',
  1322. 'tblborder_insideH_sz' => 8, 'tblborder_insideH_space' => '0',
  1323. 'tblborder_insideH_color' => '404040',
  1324. 'tblborder_insideH_themeColor' => 'text1',
  1325. 'tblborder_insideV_themeTint' => 'BF');
  1326. $styleTableA = array('type' => 'firstRow',
  1327. 'spacing_before' => '0', 'spacing_after' => '0',
  1328. 'spacing_line' => '240',
  1329. 'spacing_lineRule' => 'auto',
  1330. 'b' => 1, 'b' => 1, 'bCs' => 1, 'color_val' => 'FFFFFF',
  1331. 'color_themeColor' => 'background1',
  1332. 'tblPr' => 1,
  1333. 'tblborder_top_val' => 'single',
  1334. 'tblborder_top_sz' => 8, 'tblborder_top_space' => '0',
  1335. 'tblborder_top_color' => '404040',
  1336. 'tblborder_top_themeColor' => 'text1',
  1337. 'tblborder_insideV_themeTint' => 'BF',
  1338. 'tblborder_left_val' => 'single',
  1339. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1340. 'tblborder_left_color' => '404040',
  1341. 'tblborder_left_themeColor' => 'text1',
  1342. 'tblborder_insideV_themeTint' => 'BF',
  1343. 'tblborder_bottom_val' => 'single',
  1344. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1345. 'tblborder_bottom_color' => '404040',
  1346. 'tblborder_bottom_themeColor' => 'text1',
  1347. 'tblborder_insideV_themeTint' => 'BF',
  1348. 'tblborder_right_val' => 'single',
  1349. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1350. 'tblborder_right_color' => '404040',
  1351. 'tblborder_right_themeColor' => 'text1',
  1352. 'tblborder_insideV_themeTint' => 'BF',
  1353. 'tblborder_insideH_val' => 'nil',
  1354. 'tblborder_insideV_val' => 'nil',
  1355. 'shd_val' => 'clear',
  1356. 'shd_color' => 'auto',
  1357. 'shd_fill' => '000000',
  1358. 'shd_themeFill' => 'text1');
  1359. $styleTableB = array('type' => 'firstRow',
  1360. 'spacing_before' => '0', 'spacing_after' => '0',
  1361. 'spacing_line' => '240',
  1362. 'spacing_lineRule' => 'auto',
  1363. 'b' => 1, 'b' => 1, 'bCs' => 1, 'tblPr' => 1,
  1364. 'tblborder_top_val' => 'double',
  1365. 'tblborder_top_sz' => 6, 'tblborder_top_space' => '0',
  1366. 'tblborder_top_color' => '404040',
  1367. 'tblborder_top_themeColor' => 'text1',
  1368. 'tblborder_insideV_themeTint' => 'BF',
  1369. 'tblborder_left_val' => 'single',
  1370. 'tblborder_left_sz' => 8, 'tblborder_left_space' => '0',
  1371. 'tblborder_left_color' => '404040',
  1372. 'tblborder_left_themeColor' => 'text1',
  1373. 'tblborder_insideV_themeTint' => 'BF',
  1374. 'tblborder_bottom_val' => 'single',
  1375. 'tblborder_bottom_sz' => 8, 'tblborder_bottom_space' => '0',
  1376. 'tblborder_bottom_color' => '404040',
  1377. 'tblborder_bottom_themeColor' => 'text1',
  1378. 'tblborder_insideV_themeTint' => 'BF',
  1379. 'tblborder_right_val' => 'single',
  1380. 'tblborder_right_sz' => 8, 'tblborder_right_space' => '0',
  1381. 'tblborder_right_color' => '404040',
  1382. 'tblborder_right_themeColor' => 'text1',
  1383. 'tblborder_insideV_themeTint' => 'BF',
  1384. 'tblborder_insideH_val' => 'nil',
  1385. 'tblborder_insideV_val' => 'nil');
  1386. $styleTableC = array('type' => 'firstCol',
  1387. 'b' => 1, 'bCs' => 1);
  1388. $styleTableD = array('type' => 'lastCol',
  1389. 'b' => 1, 'bCs' => 1);
  1390. $styleTableE = array('type' => 'band1Vert',
  1391. 'tblPr' => 1, 'shd_val' => 'clear',
  1392. 'shd_color' => 'auto',
  1393. 'shd_fill' => 'C0C0C0',
  1394. 'shd_themeFill' => 'text1',
  1395. 'shd_themeFillTint' => '3F');
  1396. $styleTableF = array('type' => 'band1Horz',
  1397. 'tblPr' => 1, 'tblborder_insideH_val' => 'nil',
  1398. 'tblborder_insideV_val' => 'nil',
  1399. 'shd_val' => 'clear',
  1400. 'shd_color' => 'auto',
  1401. 'shd_fill' => 'C0C0C0',
  1402. 'shd_themeFill' => 'text1',
  1403. 'shd_themeFillTint' => '3F');
  1404. $styleTableG = array('type' => 'band1Horz',
  1405. 'tblPr' => 1, 'tblborder_insideH_val' => 'nil',
  1406. 'tblborder_insideV_val' => 'nil');
  1407. $this->addStyle(
  1408. array($parameters,
  1409. $styleTableA, $styleTableB,
  1410. $styleTableC, $styleTableD,
  1411. $styleTableE, $styleTableF,
  1412. $styleTableG)
  1413. );
  1414. $parameters = array('type' => 'paragraph',
  1415. 'styleId' => 'Ttulo4',
  1416. 'name' => 'heading 4',
  1417. 'basedOn' => 'Normal',
  1418. 'next' => 'Normal',
  1419. 'link' => 'Ttulo4Car',
  1420. 'uiPriority' => '9',
  1421. 'unhideWhenUsed' => 1, 'qFormat' => 1, 'rsid' => '00C967D7',
  1422. 'keepNext' => 1, 'keepLines' => 1, 'spacing_after' => '0',
  1423. 'spacing_before' => '200',
  1424. 'outlineLvl' => 3, 'rFonts_asciiTheme' => 'majorHAnsi',
  1425. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  1426. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  1427. 'rFonts_cstheme' => 'majorBidi',
  1428. 'b' => 1, 'bCs' => 1, 'i' => 1, 'iCs' => 1,
  1429. 'color_val' => '244061',
  1430. 'color_themeColor' => 'accent1',
  1431. 'color_themeShade' => '80');
  1432. $this->addStyle(array($parameters));
  1433. $parameters = array('type' => 'character',
  1434. 'customStyle' => '1', 'styleId' => 'Ttulo4Car',
  1435. 'name' => 'Titulo 4 Car',
  1436. 'basedOn' => 'Fuentedeprrafopredeter',
  1437. 'link' => 'Ttulo4',
  1438. 'uiPriority' => '9', 'rsid' => '00C967D7',
  1439. 'rFonts_asciiTheme' => 'majorHAnsi',
  1440. 'rFonts_eastAsiaTheme' => 'majorEastAsia',
  1441. 'rFonts_hAnsiTheme' => 'majorHAnsi',
  1442. 'rFonts_cstheme' => 'majorBidi',
  1443. 'b' => 1, 'bCs' => 1, 'i' => 1, 'iCs' => 1,
  1444. 'color_val' => '244061',
  1445. 'color_themeColor' => 'accent1',
  1446. 'color_themeShade' => '80',
  1447. 'sz' => '24');
  1448. $this->addStyle(array($parameters));
  1449. $parameters = array('type' => 'paragraph',
  1450. 'styleId' => 'Textonotaalfinal',
  1451. 'name' => 'endnote text',
  1452. 'basedOn' => 'Normal',
  1453. 'link' => 'TextonotaalfinalCar',
  1454. 'semiHidden' => 1,
  1455. 'uiPriority' => '99',
  1456. 'unhideWhenUsed' => 1, 'rsid' => '00684540',
  1457. 'spacing_after' => '0', 'spacing_line' => '240',
  1458. 'spacing_lineRule' => 'auto',
  1459. 'sz' => '20',
  1460. 'szCs' => '20');
  1461. $this->addStyle(array($parameters));
  1462. $parameters = array('type' => 'character',
  1463. 'customStyle' => '1', 'styleId' => 'TextonotaalfinalCar',
  1464. 'name' => 'Texto nota al final Car',
  1465. 'basedOn' => 'Fuentedeprrafopredeter',
  1466. 'link' => 'Textonotaalfinal',
  1467. 'semiHidden' => 1, 'uiPriority' => '99',
  1468. 'rsid' => '00684540',
  1469. 'sz' => '20',
  1470. 'szCs' => '20');
  1471. $this->addStyle(array($parameters));
  1472. $parameters = array('type' => 'character',
  1473. 'styleId' => 'Refdenotaalfinal',
  1474. 'name' => 'endnote reference',
  1475. 'basedOn' => 'Fuentedeprrafopredeter',
  1476. 'semiHidden' => 1,
  1477. 'uiPriority' => '99',
  1478. 'unhideWhenUsed' => 1, 'rsid' => '00684540',
  1479. 'vertAlign' => 'superscript');
  1480. $this->addStyle(array($parameters));
  1481. }
  1482. /**
  1483. * Add table style
  1484. *
  1485. * @access public
  1486. * @param array $param
  1487. */
  1488. public function addStyleTabla($param)
  1489. {
  1490. $objStyle = CreateStyleTable::getInstance();
  1491. $objStyle->addStyleTable($param);
  1492. $this->_xml = str_replace(
  1493. '__GENERATESTYLE__',
  1494. (string) $objStyle,
  1495. $this->_xml
  1496. );
  1497. }
  1498. /**
  1499. * Generate w:style
  1500. *
  1501. * @param string $type
  1502. * @param string $styleId
  1503. * @param string $default
  1504. * @param string $customStyle
  1505. */
  1506. protected function generateSTYLE($type, $styleId, $default = '',
  1507. $customStyle = '')
  1508. {
  1509. $this->_xml .= '<' . CreateElement::NAMESPACEWORD .
  1510. ':style ' . CreateElement::NAMESPACEWORD .
  1511. ':type="' . $type . '"';
  1512. if ($default != '')
  1513. $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
  1514. ':default="' . $default . '"';
  1515. $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
  1516. ':styleId="' . $styleId . '"';
  1517. if ($customStyle != '')
  1518. $this->_xml .= ' ' . CreateElement::NAMESPACEWORD .
  1519. ':customStyle="' . $customStyle . '"';
  1520. $this->_xml .= '>__GENERATESTYLE__</' .
  1521. CreateElement::NAMESPACEWORD . ':style>';
  1522. }
  1523. /**
  1524. * Generate w:name
  1525. *
  1526. * @access protected
  1527. * @param string $val
  1528. */
  1529. protected function generateNAME($val)
  1530. {
  1531. $xml = '<' . CreateElement::NAMESPACEWORD .
  1532. ':name ' . CreateElement::NAMESPACEWORD . ':val="' . $val .
  1533. '"></' . CreateElement::NAMESPACEWORD . ':name>__GENERATESTYLE__';
  1534. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1535. }
  1536. /**
  1537. * Generate w:basedon
  1538. *
  1539. * @access protected
  1540. * @param string $val
  1541. */
  1542. protected function generateBASEDON($val)
  1543. {
  1544. $xml = '<' . CreateElement::NAMESPACEWORD .
  1545. ':basedOn ' . CreateElement::NAMESPACEWORD . ':val="' . $val .
  1546. '"></' . CreateElement::NAMESPACEWORD .
  1547. ':basedOn>__GENERATESTYLE__';
  1548. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1549. }
  1550. /**
  1551. * Generate w:next
  1552. *
  1553. * @access protected
  1554. * @param string $val
  1555. */
  1556. protected function generateNEXT($val)
  1557. {
  1558. $xml = '<' . CreateElement::NAMESPACEWORD .
  1559. ':next ' . CreateElement::NAMESPACEWORD .
  1560. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1561. ':next>__GENERATESTYLE__';
  1562. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1563. }
  1564. /**
  1565. * Generate w:link
  1566. *
  1567. * @access protected
  1568. * @param string $val
  1569. */
  1570. protected function generateLINK($val)
  1571. {
  1572. $xml = '<' . CreateElement::NAMESPACEWORD .
  1573. ':link ' . CreateElement::NAMESPACEWORD .
  1574. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1575. ':link>__GENERATESTYLE__';
  1576. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1577. }
  1578. /**
  1579. * Generate w:uipriority
  1580. *
  1581. * @access protected
  1582. * @param string $val
  1583. */
  1584. protected function generateUIPRIORITY($val)
  1585. {
  1586. $xml = '<' . CreateElement::NAMESPACEWORD .
  1587. ':uiPriority ' . CreateElement::NAMESPACEWORD .
  1588. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1589. ':uiPriority>__GENERATESTYLE__';
  1590. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1591. }
  1592. /**
  1593. * Generate w:unhidewhenused
  1594. *
  1595. * @access protected
  1596. */
  1597. protected function generateUNHIDEWHENUSED()
  1598. {
  1599. $xml = '<' . CreateElement::NAMESPACEWORD .
  1600. ':unhideWhenUsed></' . CreateElement::NAMESPACEWORD .
  1601. ':unhideWhenUsed>__GENERATESTYLE__';
  1602. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1603. }
  1604. /**
  1605. * Generate w:autoredefine
  1606. *
  1607. * @access protected
  1608. */
  1609. protected function generateAUTOREDEFINE()
  1610. {
  1611. $xml = '<' . CreateElement::NAMESPACEWORD .
  1612. ':autoRedefine></' . CreateElement::NAMESPACEWORD .
  1613. ':autoRedefine>__GENERATESTYLE__';
  1614. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1615. }
  1616. /**
  1617. * Generate w:qformat
  1618. *
  1619. * @access protected
  1620. */
  1621. protected function generateQFORMAT()
  1622. {
  1623. $xml = '<' . CreateElement::NAMESPACEWORD .
  1624. ':qFormat></' . CreateElement::NAMESPACEWORD .
  1625. ':qFormat>__GENERATESTYLE__';
  1626. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1627. }
  1628. /**
  1629. * Generate w:rsid
  1630. *
  1631. * @access protected
  1632. * @param string $val
  1633. */
  1634. protected function generateRSID($val)
  1635. {
  1636. $xml = '<' . CreateElement::NAMESPACEWORD .
  1637. ':rsid ' . CreateElement::NAMESPACEWORD .
  1638. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1639. ':rsid>__GENERATESTYLE__';
  1640. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1641. }
  1642. /**
  1643. * Generate w:semihidden
  1644. *
  1645. * @access protected
  1646. */
  1647. protected function generateSEMIHIDDEN()
  1648. {
  1649. $xml = '<' . CreateElement::NAMESPACEWORD .
  1650. ':semiHidden></' . CreateElement::NAMESPACEWORD .
  1651. ':semiHidden>__GENERATESTYLE__';
  1652. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1653. }
  1654. /**
  1655. * Generate w:ppr
  1656. *
  1657. * @access protected
  1658. */
  1659. protected function generatePPR()
  1660. {
  1661. $xml = '<' . CreateElement::NAMESPACEWORD .
  1662. ':pPr>__GENERATEPPR__</' . CreateElement::NAMESPACEWORD .
  1663. ':pPr>__GENERATESTYLE__';
  1664. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1665. }
  1666. /**
  1667. * Generate w:keepnext
  1668. *
  1669. * @access protected
  1670. */
  1671. protected function generateKEEPNEXT()
  1672. {
  1673. $xml = '<' . CreateElement::NAMESPACEWORD .
  1674. ':keepNext></' . CreateElement::NAMESPACEWORD .
  1675. ':keepNext>__GENERATEPPR__';
  1676. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1677. }
  1678. /**
  1679. * Generate w:tabs
  1680. *
  1681. * @access protected
  1682. */
  1683. protected function generateTABS()
  1684. {
  1685. $xml = '<' . CreateElement::NAMESPACEWORD .
  1686. ':tabs>__GENERATETABS__</' . CreateElement::NAMESPACEWORD .
  1687. ':tabs>__GENERATEPPR__';
  1688. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1689. }
  1690. /**
  1691. * Generate w:tabcenter
  1692. *
  1693. * @access protected
  1694. * @param string $pos
  1695. */
  1696. protected function generateTABCENTER($pos)
  1697. {
  1698. $xml = '<' . CreateElement::NAMESPACEWORD .
  1699. ':tab ' . CreateElement::NAMESPACEWORD .
  1700. ':val="center" ' . CreateElement::NAMESPACEWORD .
  1701. ':pos="' . $pos . '"></' . CreateElement::NAMESPACEWORD .
  1702. ':tab>__GENERATETABS__';
  1703. $this->_xml = str_replace('__GENERATETABS__', $xml, $this->_xml);
  1704. }
  1705. /**
  1706. * Generate w:tabright
  1707. *
  1708. * @access protected
  1709. * @param string $pos
  1710. */
  1711. protected function generateTABRIGHT($pos)
  1712. {
  1713. $xml = '<' . CreateElement::NAMESPACEWORD .
  1714. ':tab ' . CreateElement::NAMESPACEWORD .
  1715. ':val="right" ' . CreateElement::NAMESPACEWORD .
  1716. ':pos="' . $pos . '"></' . CreateElement::NAMESPACEWORD .
  1717. ':tab>__GENERATETABS__';
  1718. $this->_xml = str_replace('__GENERATETABS__', $xml, $this->_xml);
  1719. }
  1720. /**
  1721. * Generate w:numpr
  1722. *
  1723. * @access protected
  1724. */
  1725. protected function generateNUMPR()
  1726. {
  1727. $xml = '<' . CreateElement::NAMESPACEWORD .
  1728. ':numPr>__GENERATENUMPR__</' . CreateElement::NAMESPACEWORD .
  1729. ':numPr>__GENERATEPPR__';
  1730. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1731. }
  1732. /**
  1733. * Generate w:ilvl
  1734. *
  1735. * @access protected
  1736. * @param string $val
  1737. */
  1738. protected function generateILVL($val)
  1739. {
  1740. $xml = '<' . CreateElement::NAMESPACEWORD .
  1741. ':ilvl ' . CreateElement::NAMESPACEWORD .
  1742. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1743. ':ilvl>__GENERATENUMPR__';
  1744. $this->_xml = str_replace('__GENERATENUMPR__', $xml, $this->_xml);
  1745. }
  1746. /**
  1747. * Generate w:keeplines
  1748. *
  1749. * @access protected
  1750. */
  1751. protected function generateKEEPLINES()
  1752. {
  1753. $xml = '<' . CreateElement::NAMESPACEWORD .
  1754. ':keepLines></' . CreateElement::NAMESPACEWORD .
  1755. ':keepLines>__GENERATEPPR__';
  1756. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1757. }
  1758. /**
  1759. * Generate w:pbdr
  1760. *
  1761. * @access protected
  1762. */
  1763. protected function generatePBDR()
  1764. {
  1765. $xml = '<' . CreateElement::NAMESPACEWORD .
  1766. ':pBdr>__GENERATEPBDR__</' . CreateElement::NAMESPACEWORD .
  1767. ':pBdr>__GENERATEPPR__';
  1768. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1769. }
  1770. /**
  1771. * Generate w:pbdr
  1772. *
  1773. * @param string $val
  1774. * @param string $sz
  1775. * @param string $space
  1776. * @param string $color
  1777. * @param string $themeColor
  1778. */
  1779. protected function generatePBDR_BOTTOM($val, $sz, $space, $color,
  1780. $themeColor)
  1781. {
  1782. $xml = '<' . CreateElement::NAMESPACEWORD .
  1783. ':pBdr ' . CreateElement::NAMESPACEWORD .
  1784. ':val="' . $val . '" ' . CreateElement::NAMESPACEWORD .
  1785. ':sz="' . $sz . '" ' . CreateElement::NAMESPACEWORD .
  1786. ':space="' . $space . '" ' . CreateElement::NAMESPACEWORD .
  1787. ':color="' . $color . '" ' . CreateElement::NAMESPACEWORD .
  1788. ':themeColor="' . $themeColor .
  1789. '"></' . CreateElement::NAMESPACEWORD . ':pBdr>__GENERATEPBDR__';
  1790. $this->_xml = str_replace('__GENERATEPBDR__', $xml, $this->_xml);
  1791. }
  1792. /**
  1793. * Generate w:spacing
  1794. *
  1795. * @param string $before
  1796. * @param string $after
  1797. * @param string $line
  1798. * @param string $lineRule
  1799. */
  1800. protected function generateSPACING($before, $after, $line, $lineRule)
  1801. {
  1802. $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':spacing';
  1803. if ($before != '') {
  1804. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1805. ':before="' . $before . '"';
  1806. }
  1807. if ($after != '') {
  1808. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1809. ':after="' . $after . '"';
  1810. }
  1811. if ($line != '') {
  1812. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1813. ':line="' . $line . '"';
  1814. }
  1815. if ($lineRule != '') {
  1816. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1817. ':lineRule="' . $lineRule . '"';
  1818. }
  1819. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  1820. ':spacing>__GENERATEPPR__';
  1821. $this->_xml = str_replace('__GENERATEPPR__', $xmlAux, $this->_xml);
  1822. }
  1823. /**
  1824. * Generate w:spacing
  1825. *
  1826. * @access protected
  1827. * @param string $val
  1828. */
  1829. protected function generateRPR_SPACING($val)
  1830. {
  1831. $xml = '<' . CreateElement::NAMESPACEWORD .
  1832. ':spacing ' . CreateElement::NAMESPACEWORD .
  1833. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1834. ':spacing>__GENERATERPR__';
  1835. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  1836. }
  1837. /**
  1838. * Generate w:kern
  1839. *
  1840. * @access protected
  1841. * @param string $val
  1842. */
  1843. protected function generateKERN($val)
  1844. {
  1845. $xml = '<' . CreateElement::NAMESPACEWORD .
  1846. ':kern ' . CreateElement::NAMESPACEWORD .
  1847. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1848. ':kern>__GENERATERPR__';
  1849. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  1850. }
  1851. /**
  1852. * Generate w:contextualspacing
  1853. *
  1854. * @access protected
  1855. */
  1856. protected function generateCONTEXTUALSPACING()
  1857. {
  1858. $xml = '<' . CreateElement::NAMESPACEWORD .
  1859. ':contextualSpacing></' . CreateElement::NAMESPACEWORD .
  1860. ':contextualSpacing>__GENERATEPPR__';
  1861. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1862. }
  1863. /**
  1864. * Generate w:outlinelvl
  1865. *
  1866. * @access protected
  1867. * @param string $val
  1868. */
  1869. protected function generateOUTLINELVL($val)
  1870. {
  1871. $xml = '<' . CreateElement::NAMESPACEWORD .
  1872. ':outlineLvl ' . CreateElement::NAMESPACEWORD .
  1873. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1874. ':outlineLvl>__GENERATEPPR__';
  1875. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1876. }
  1877. /**
  1878. * Generate w:ind
  1879. *
  1880. * @access protected
  1881. * @param string $left
  1882. */
  1883. protected function generateIND($left)
  1884. {
  1885. $xml = '<' . CreateElement::NAMESPACEWORD .
  1886. ':ind ' . CreateElement::NAMESPACEWORD .
  1887. ':left="' . $left . '"></' . CreateElement::NAMESPACEWORD .
  1888. ':ind>__GENERATEPPR__';
  1889. $this->_xml = str_replace('__GENERATEPPR__', $xml, $this->_xml);
  1890. }
  1891. /**
  1892. * Generate w:tcpr
  1893. *
  1894. * @access protected
  1895. */
  1896. protected function generateTCPR()
  1897. {
  1898. $xml = '<' . CreateElement::NAMESPACEWORD .
  1899. ':tcPr>__GENERATETCPR__</' . CreateElement::NAMESPACEWORD .
  1900. ':tcPr>__GENERATESTYLE__';
  1901. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1902. }
  1903. /**
  1904. * Generate w:shd
  1905. *
  1906. * @access protected
  1907. * @param string $val
  1908. * @param string $color
  1909. * @param string $fill
  1910. * @param string $themeFill
  1911. * @param string $themeFillTint
  1912. */
  1913. protected function generateSHD($val, $color='', $fill='', $themeFill='',
  1914. $themeFillTint='')
  1915. {
  1916. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  1917. ':shd ' . CreateElement::NAMESPACEWORD .
  1918. ':val="' . $val . '"';
  1919. if ($color != '') {
  1920. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1921. ':color="' . $color . '"';
  1922. }
  1923. if ($fill != '') {
  1924. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1925. ':fill="' . $fill . '"';
  1926. }
  1927. if ($themeFill != '') {
  1928. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1929. ':themeFill="' . $themeFill . '"';
  1930. }
  1931. if ($themeFillTint != '') {
  1932. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  1933. ':themeFillTint="' . $themeFillTint . '"';
  1934. }
  1935. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  1936. ':shd>__GENERATETCPR__';
  1937. $this->_xml = str_replace('__GENERATETCPR__', $xmlAux, $this->_xml);
  1938. }
  1939. /**
  1940. * Generate w:tblpr
  1941. *
  1942. * @access protected
  1943. */
  1944. protected function generateTBLPR()
  1945. {
  1946. $xml = '<' . CreateElement::NAMESPACEWORD .
  1947. ':tblPr>__GENERATETBLPR__</' . CreateElement::NAMESPACEWORD .
  1948. ':tblPr>__GENERATESTYLE__';
  1949. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  1950. }
  1951. /**
  1952. * Generate w:tblind
  1953. *
  1954. * @param string $w
  1955. * @param string $type
  1956. */
  1957. protected function generateTBLIND($w, $type)
  1958. {
  1959. $xml = '<' . CreateElement::NAMESPACEWORD .
  1960. ':tblInd ' . CreateElement::NAMESPACEWORD . ':w="' . $w .
  1961. '" ' . CreateElement::NAMESPACEWORD . ':type="' . $type .
  1962. '"></' . CreateElement::NAMESPACEWORD .
  1963. ':tblInd>__GENERATETBLPR__';
  1964. $this->_xml = str_replace('__GENERATETBLPR__', $xml, $this->_xml);
  1965. }
  1966. /**
  1967. * Generate w:tblstylerowbandsize
  1968. *
  1969. * @param string $val
  1970. */
  1971. protected function generateTBLSTYLEROWBANDSIZE($val)
  1972. {
  1973. $xml = '<' . CreateElement::NAMESPACEWORD .
  1974. ':tblStyleRowBandSize ' . CreateElement::NAMESPACEWORD .
  1975. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1976. ':tblStyleRowBandSize>__GENERATETBLPR__';
  1977. $this->_xml = str_replace('__GENERATETBLPR__', $xml, $this->_xml);
  1978. }
  1979. /**
  1980. * Generate w:tblstylecolbandsize
  1981. *
  1982. * @param string $val
  1983. */
  1984. protected function generateTBLSTYLECOLBANDSIZE($val)
  1985. {
  1986. $xml = '<' . CreateElement::NAMESPACEWORD .
  1987. ':tblStyleColBandSize ' . CreateElement::NAMESPACEWORD .
  1988. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  1989. ':tblStyleColBandSize>__GENERATETBLPR__';
  1990. $this->_xml = str_replace('__GENERATETBLPR__', $xml, $this->_xml);
  1991. }
  1992. /**
  1993. * Generate w:tblborders
  1994. */
  1995. protected function generateTBLBORDERS()
  1996. {
  1997. $xml = '<' . CreateElement::NAMESPACEWORD .
  1998. ':tblBorders>__GENERATETBLBORDERS__</' .
  1999. CreateElement::NAMESPACEWORD .
  2000. ':tblBorders>__GENERATETBLPR__';
  2001. $this->_xml = str_replace('__GENERATETBLPR__', $xml, $this->_xml);
  2002. }
  2003. /**
  2004. * Generate w:top
  2005. *
  2006. * @param string $val
  2007. * @param string $sz
  2008. * @param string $space
  2009. * @param string $color
  2010. * @param string $themeColor
  2011. * @param string $themeTint
  2012. */
  2013. protected function generateTBLBORDERS_TOP($val, $sz = '', $space = '',
  2014. $color = '', $themeColor = '',
  2015. $themeTint ='')
  2016. {
  2017. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2018. ':top ' . CreateElement::NAMESPACEWORD .
  2019. ':val="' . $val . '"';
  2020. if ($sz != '') {
  2021. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2022. ':sz="' . $sz . '"';
  2023. }
  2024. if ($space != '') {
  2025. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2026. ':space="' . $space . '"';
  2027. }
  2028. if ($color != '') {
  2029. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2030. ':color="' . $color . '"';
  2031. }
  2032. if ($themeColor != '') {
  2033. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2034. ':themeColor="' . $themeColor . '"';
  2035. }
  2036. if ($themeTint != '') {
  2037. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2038. ':themeTint="' . $themeTint . '"';
  2039. }
  2040. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2041. ':top>__GENERATETBLBORDERS__';
  2042. $this->_xml = str_replace(
  2043. '__GENERATETBLBORDERS__',
  2044. $xmlAux,
  2045. $this->_xml
  2046. );
  2047. }
  2048. /**
  2049. * Generate w:left
  2050. *
  2051. * @param string $val
  2052. * @param string $sz
  2053. * @param string $space
  2054. * @param string $color
  2055. * @param string $themeColor
  2056. * @param string $themeTint
  2057. */
  2058. protected function generateTBLBORDERS_LEFT($val, $sz = '', $space = '',
  2059. $color = '', $themeColor = '',
  2060. $themeTint = '')
  2061. {
  2062. $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':left ' .
  2063. CreateElement::NAMESPACEWORD .
  2064. ':val="' . $val . '"';
  2065. if ($sz != '') {
  2066. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2067. ':sz="' . $sz . '"';
  2068. }
  2069. if ($space != '') {
  2070. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2071. ':space="' . $space . '"';
  2072. }
  2073. if ($color != '') {
  2074. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2075. ':color="' . $color . '"';
  2076. }
  2077. if ($themeColor != '') {
  2078. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2079. ':themeColor="' . $themeColor . '"';
  2080. }
  2081. if ($themeTint != '') {
  2082. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2083. ':themeTint="' . $themeTint . '"';
  2084. }
  2085. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2086. ':left>__GENERATETBLBORDERS__';
  2087. $this->_xml = str_replace(
  2088. '__GENERATETBLBORDERS__',
  2089. $xmlAux,
  2090. $this->_xml
  2091. );
  2092. }
  2093. /**
  2094. * Generate w:bottom
  2095. *
  2096. * @param string $val
  2097. * @param string $sz
  2098. * @param string $space
  2099. * @param string $color
  2100. * @param string $themeColor
  2101. * @param string $themeTint
  2102. */
  2103. protected function generateTBLBORDERS_BOTTOM($val, $sz = '', $space = '',
  2104. $color = '', $themeColor = '',
  2105. $themeTint = '')
  2106. {
  2107. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2108. ':bottom ' . CreateElement::NAMESPACEWORD .
  2109. ':val="' . $val . '"';
  2110. if ($sz != '') {
  2111. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2112. ':sz="' . $sz . '"';
  2113. }
  2114. if ($space != '') {
  2115. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2116. ':space="' . $space . '"';
  2117. }
  2118. if ($color != '') {
  2119. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2120. ':color="' . $color . '"';
  2121. }
  2122. if ($themeColor != '') {
  2123. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2124. ':themeColor="' . $themeColor . '"';
  2125. }
  2126. if ($themeTint != '') {
  2127. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2128. ':themeTint="' . $themeTint . '"';
  2129. }
  2130. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2131. ':bottom>__GENERATETBLBORDERS__';
  2132. $this->_xml = str_replace(
  2133. '__GENERATETBLBORDERS__',
  2134. $xmlAux,
  2135. $this->_xml
  2136. );
  2137. }
  2138. /**
  2139. * Generate w:right
  2140. *
  2141. * @param string $val
  2142. * @param string $sz
  2143. * @param string $space
  2144. * @param string $color
  2145. * @param string $themeColor
  2146. * @param string $themeTint
  2147. */
  2148. protected function generateTBLBORDERS_RIGHT($val, $sz='', $space='',
  2149. $color='', $themeColor='',
  2150. $themeTint='')
  2151. {
  2152. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2153. ':right ' . CreateElement::NAMESPACEWORD .
  2154. ':val="' . $val . '"';
  2155. if ($sz != '') {
  2156. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2157. ':sz="' . $sz . '"';
  2158. }
  2159. if ($space != '') {
  2160. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2161. ':space="' . $space . '"';
  2162. }
  2163. if ($color != '') {
  2164. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2165. ':color="' . $color . '"';
  2166. }
  2167. if ($themeColor != '') {
  2168. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2169. ':themeColor="' . $themeColor . '"';
  2170. }
  2171. if ($themeTint != '') {
  2172. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2173. ':themeTint="' . $themeTint . '"';
  2174. }
  2175. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2176. ':right>__GENERATETBLBORDERS__';
  2177. $this->_xml = str_replace(
  2178. '__GENERATETBLBORDERS__', $xmlAux, $this->_xml
  2179. );
  2180. }
  2181. /**
  2182. * Generate w:insideh
  2183. *
  2184. * @param string $val
  2185. * @param string $sz
  2186. * @param string $space
  2187. * @param string $color
  2188. * @param string $themeColor
  2189. * @param string $themeTint
  2190. */
  2191. protected function generateTBLBORDERS_INSIDEH($val, $sz='', $space='',
  2192. $color='', $themeColor='',
  2193. $themeTint='')
  2194. {
  2195. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2196. ':insideH ' . CreateElement::NAMESPACEWORD . ':val="' . $val . '"';
  2197. if ($sz != '') {
  2198. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2199. ':sz="' . $sz . '"';
  2200. }
  2201. if ($space != '') {
  2202. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2203. ':space="' . $space . '"';
  2204. }
  2205. if ($color != '') {
  2206. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2207. ':color="' . $color . '"';
  2208. }
  2209. if ($themeColor != '') {
  2210. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2211. ':themeColor="' . $themeColor . '"';
  2212. }
  2213. if ($themeTint != '') {
  2214. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2215. ':themeTint="' . $themeTint . '"';
  2216. }
  2217. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2218. ':insideH>__GENERATETBLBORDERS__';
  2219. $this->_xml = str_replace(
  2220. '__GENERATETBLBORDERS__',
  2221. $xmlAux,
  2222. $this->_xml
  2223. );
  2224. }
  2225. /**
  2226. * Generate w:insidev
  2227. *
  2228. * @param string $val
  2229. * @param string $sz
  2230. * @param string $space
  2231. * @param string $color
  2232. * @param string $themeColor
  2233. * @param string $themeTint
  2234. */
  2235. protected function generateTBLBORDERS_INSIDEV($val, $sz='', $space='',
  2236. $color='', $themeColor='',
  2237. $themeTint='')
  2238. {
  2239. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2240. ':insideV ' . CreateElement::NAMESPACEWORD . ':val="' . $val . '"';
  2241. if ($sz != '') {
  2242. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2243. ':sz="' . $sz . '"';
  2244. }
  2245. if ($space != '') {
  2246. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2247. ':space="' . $space . '"';
  2248. }
  2249. if ($color != '') {
  2250. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2251. ':color="' . $color . '"';
  2252. }
  2253. if ($themeColor != '') {
  2254. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2255. ':themeColor="' . $themeColor . '"';
  2256. }
  2257. if ($themeTint != '') {
  2258. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2259. ':themeTint="' . $themeTint . '"';
  2260. }
  2261. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2262. ':insideV>__GENERATETBLBORDERS__';
  2263. $this->_xml = str_replace(
  2264. '__GENERATETBLBORDERS__',
  2265. $xmlAux,
  2266. $this->_xml
  2267. );
  2268. }
  2269. /**
  2270. * Generate w:tblcellmar
  2271. */
  2272. protected function generateTBLCELLMAR()
  2273. {
  2274. $xml = '<' . CreateElement::NAMESPACEWORD .
  2275. ':tblCellMar>__GENERATETBLCELLMAR__</' .
  2276. CreateElement::NAMESPACEWORD .
  2277. ':tblCellMar>__GENERATETBLPR__';
  2278. $this->_xml = str_replace('__GENERATETBLPR__', $xml, $this->_xml);
  2279. }
  2280. /**
  2281. * Generate w:top
  2282. *
  2283. * @access protected
  2284. * @param string $w
  2285. * @param string $type
  2286. */
  2287. protected function generateTOP($w, $type)
  2288. {
  2289. $xml = '<' . CreateElement::NAMESPACEWORD .
  2290. ':top ' . CreateElement::NAMESPACEWORD . ':w="' . $w .
  2291. '" ' . CreateElement::NAMESPACEWORD . ':type="' . $type .
  2292. '"></' . CreateElement::NAMESPACEWORD .
  2293. ':top>__GENERATETBLCELLMAR__';
  2294. $this->_xml = str_replace('__GENERATETBLCELLMAR__', $xml, $this->_xml);
  2295. }
  2296. /**
  2297. * Generate w:left
  2298. *
  2299. * @access protected
  2300. * @param string $w
  2301. * @param string $type
  2302. */
  2303. protected function generateLEFT($w, $type)
  2304. {
  2305. $xml = '<' . CreateElement::NAMESPACEWORD .
  2306. ':left ' . CreateElement::NAMESPACEWORD .
  2307. ':w="' . $w . '" ' . CreateElement::NAMESPACEWORD .
  2308. ':type="' . $type . '"></' . CreateElement::NAMESPACEWORD .
  2309. ':left>__GENERATETBLCELLMAR__';
  2310. $this->_xml = str_replace('__GENERATETBLCELLMAR__', $xml, $this->_xml);
  2311. }
  2312. /**
  2313. * Generate w:bottom
  2314. *
  2315. * @access protected
  2316. * @param string $w
  2317. * @param string $type
  2318. */
  2319. protected function generateBOTTOM($w, $type)
  2320. {
  2321. $xml = '<' . CreateElement::NAMESPACEWORD .
  2322. ':bottom ' . CreateElement::NAMESPACEWORD .
  2323. ':w="' . $w . '" ' . CreateElement::NAMESPACEWORD .
  2324. ':type="' . $type . '"></' . CreateElement::NAMESPACEWORD .
  2325. ':bottom>__GENERATETBLCELLMAR__';
  2326. $this->_xml = str_replace('__GENERATETBLCELLMAR__', $xml, $this->_xml);
  2327. }
  2328. /**
  2329. * Generate w:right
  2330. *
  2331. * @access protected
  2332. * @param string $w
  2333. * @param string $type
  2334. */
  2335. protected function generateRIGHT($w, $type)
  2336. {
  2337. $xml = '<' . CreateElement::NAMESPACEWORD .
  2338. ':right ' . CreateElement::NAMESPACEWORD .
  2339. ':w="' . $w . '" ' . CreateElement::NAMESPACEWORD .
  2340. ':type="' . $type . '"></' . CreateElement::NAMESPACEWORD .
  2341. ':right>__GENERATETBLCELLMAR__';
  2342. $this->_xml = str_replace('__GENERATETBLCELLMAR__', $xml, $this->_xml);
  2343. }
  2344. /**
  2345. * Generate w:rpr
  2346. */
  2347. protected function generateRPR()
  2348. {
  2349. $xml = '<' . CreateElement::NAMESPACEWORD .
  2350. ':rPr>__GENERATERPR__</' . CreateElement::NAMESPACEWORD .
  2351. ':rPr>__GENERATESTYLE__';
  2352. $this->_xml = str_replace('__GENERATESTYLE__', $xml, $this->_xml);
  2353. }
  2354. /**
  2355. * Generate w:rfonts
  2356. *
  2357. * @access protected
  2358. * @param string $asciiTheme
  2359. * @param string $eastAsiaTheme
  2360. * @param string $hAnsiTheme
  2361. * @param string $cstheme
  2362. */
  2363. protected function generateRFONTS($asciiTheme, $eastAsiaTheme, $hAnsiTheme,
  2364. $cstheme)
  2365. {
  2366. $xml = '<' . CreateElement::NAMESPACEWORD .
  2367. ':rFonts ' . CreateElement::NAMESPACEWORD .
  2368. ':asciiTheme="' . $asciiTheme . '" ' .
  2369. CreateElement::NAMESPACEWORD .
  2370. ':eastAsiaTheme="' . $eastAsiaTheme .
  2371. '" ' . CreateElement::NAMESPACEWORD .
  2372. ':hAnsiTheme="' . $hAnsiTheme .
  2373. '" ' . CreateElement::NAMESPACEWORD .
  2374. ':cstheme="' . $cstheme .
  2375. '"></' . CreateElement::NAMESPACEWORD .
  2376. ':rFonts>__GENERATERPR__';
  2377. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2378. }
  2379. /**
  2380. * Generate w:rfonts
  2381. *
  2382. * @access protected
  2383. * @param string $ascii
  2384. * @param string $hAnsi
  2385. * @param string $cs
  2386. */
  2387. protected function generateRFONTS2($ascii, $hAnsi, $cs)
  2388. {
  2389. $xml = '<' . CreateElement::NAMESPACEWORD .
  2390. ':rFonts ' . CreateElement::NAMESPACEWORD .
  2391. ':ascii="' . $ascii . '" ' . CreateElement::NAMESPACEWORD .
  2392. ':hAnsi="' . $hAnsi . '" ' . CreateElement::NAMESPACEWORD .
  2393. ':cs="' . $cs . '"></' . CreateElement::NAMESPACEWORD .
  2394. ':rFonts>__GENERATERPR__';
  2395. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2396. }
  2397. /**
  2398. * Generate w:b
  2399. *
  2400. * @access protected
  2401. */
  2402. protected function generateB()
  2403. {
  2404. $xml = '<' . CreateElement::NAMESPACEWORD .
  2405. ':b></' . CreateElement::NAMESPACEWORD .
  2406. ':b>__GENERATERPR__';
  2407. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2408. }
  2409. /**
  2410. * Generate w:bcs
  2411. *
  2412. * @access protected
  2413. */
  2414. protected function generateBCS()
  2415. {
  2416. $xml = '<' . CreateElement::NAMESPACEWORD .
  2417. ':bCs></' . CreateElement::NAMESPACEWORD .
  2418. ':bCs>__GENERATERPR__';
  2419. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2420. }
  2421. /**
  2422. * Generate w:i
  2423. *
  2424. * @access protected
  2425. * @param string $val
  2426. */
  2427. protected function generateI($val='')
  2428. {
  2429. $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':i';
  2430. if ($val != 1 || $val != '') {
  2431. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2432. ':val="' . $val . '"';
  2433. }
  2434. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2435. ':i>__GENERATERPR__';
  2436. $this->_xml = str_replace('__GENERATERPR__', $xmlAux, $this->_xml);
  2437. }
  2438. /**
  2439. * Generate w:ics
  2440. *
  2441. * @access protected
  2442. * @param string $val
  2443. */
  2444. protected function generateICS($val = '')
  2445. {
  2446. $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':iCs';
  2447. if ($val != 1 || $val != '') {
  2448. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2449. ':val="' . $val . '"';
  2450. }
  2451. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2452. ':iCs>__GENERATERPR__';
  2453. $this->_xml = str_replace('__GENERATERPR__', $xmlAux, $this->_xml);
  2454. }
  2455. /**
  2456. * Generate w:u
  2457. *
  2458. * @access protected
  2459. * @param string $val
  2460. */
  2461. protected function generateU($val = '')
  2462. {
  2463. $xmlAux = '<' . CreateElement::NAMESPACEWORD . ':u';
  2464. if ($val != '' && $val != 1) {
  2465. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2466. ':val="' . $val . '"';
  2467. }
  2468. $xmlAux .= '></' . CreateElement::NAMESPACEWORD . ':u>__GENERATERPR__';
  2469. $this->_xml = str_replace('__GENERATERPR__', $xmlAux, $this->_xml);
  2470. }
  2471. /**
  2472. * Generate w:color
  2473. *
  2474. * @access protected
  2475. * @param string $val
  2476. * @param string $themeColor
  2477. * @param string $themeShade
  2478. */
  2479. protected function generateCOLOR($val, $themeColor='', $themeShade = '')
  2480. {
  2481. $xmlAux = '<' . CreateElement::NAMESPACEWORD .
  2482. ':color ' . CreateElement::NAMESPACEWORD .
  2483. ':val="' . $val . '"';
  2484. if ($themeColor != '') {
  2485. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2486. ':themeColor="' . $themeColor . '"';
  2487. }
  2488. if ($themeShade != '') {
  2489. $xmlAux .= ' ' . CreateElement::NAMESPACEWORD .
  2490. ':themeShade="' . $themeShade . '"';
  2491. }
  2492. $xmlAux .= '></' . CreateElement::NAMESPACEWORD .
  2493. ':color>__GENERATERPR__';
  2494. $this->_xml = str_replace('__GENERATERPR__', $xmlAux, $this->_xml);
  2495. }
  2496. /**
  2497. * Generate w:sz
  2498. *
  2499. * @access protected
  2500. * @param string $val
  2501. */
  2502. protected function generateSZ($val)
  2503. {
  2504. $xml = '<' . CreateElement::NAMESPACEWORD .
  2505. ':sz ' . CreateElement::NAMESPACEWORD .
  2506. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  2507. ':sz>__GENERATERPR__';
  2508. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2509. }
  2510. /**
  2511. * Generate w:szcs
  2512. *
  2513. * @access protected
  2514. * @param string $val
  2515. */
  2516. protected function generateSZCS($val)
  2517. {
  2518. $xml = '<' . CreateElement::NAMESPACEWORD .
  2519. ':szCs ' . CreateElement::NAMESPACEWORD .
  2520. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  2521. ':szCs>__GENERATERPR__';
  2522. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2523. }
  2524. /**
  2525. * Generate w:vertAlign
  2526. *
  2527. * @access protected
  2528. * @param string $val
  2529. */
  2530. protected function generateVERTALIGN($val = 'superscript')
  2531. {
  2532. $xml = '<' . CreateElement::NAMESPACEWORD .
  2533. ':vertAlign ' . CreateElement::NAMESPACEWORD .
  2534. ':val="' . $val . '"></' . CreateElement::NAMESPACEWORD .
  2535. ':vertAlign>__GENERATERPR__';
  2536. $this->_xml = str_replace('__GENERATERPR__', $xml, $this->_xml);
  2537. }
  2538. }