static function FindElementHavingAtt(&$Txt, $Att, $PosBeg, $Forward = true)
 {
     $XmlLoc = clsTbsXmlLoc::FindStartTagHavingAtt($Txt, $Att, $PosBeg, $Forward);
     if ($XmlLoc === false) {
         return false;
     }
     $XmlLoc->FindEndTag();
     return $XmlLoc;
 }
示例#2
0
 public function OpenDoc_ChartClear(&$chart)
 {
     $chart['to_clear'] = false;
     // Delete the file in the archive
     $this->FileReplace($chart['img_href'], false);
     // Delete the element in the main file
     $main = $this->Ext_GetMainIdx();
     $Txt = $this->TbsStoreGet($main, 'OpenDoc_ChartClear');
     $Txt = str_replace($chart['img_src'], '', $Txt);
     $this->TbsStorePut($main, $Txt);
     // Delete the element in the Manifest file
     $manifest = $this->FileGetIdx('META-INF/manifest.xml');
     if ($manifest !== false) {
         $Txt = $this->TbsStoreGet($manifest, 'OpenDoc_ChartClear');
         $el = clsTbsXmlLoc::FindStartTagHavingAtt($Txt, 'manifest:full-path="' . $chart['img_href'] . "'", 0);
         if ($el) {
             $el->ReplaceSrc('');
             $this->TbsStorePut($manifest, $Txt);
         }
     }
 }