libraries/tbs/plugins/tbs_plugin_opentbs.php
function TbsPicGetDim_Drawings($Txt, $Pos, $dim_inner) {

		if ($dim_inner===false) return false;
		if (strpos($this->TBS->OtbsCurrFile, 'xl/drawings/')!==0) return false;

		$cx = $dim_inner['wv'];
		$cy = $dim_inner['hv'];

		$loc = clsTbsXmlLoc::FindStartTag($Txt, 'xdr:twoCellAnchor', $Pos, false);
		if ($loc===false) return false;
		$loc = clsTbsXmlLoc::FindStartTag($Txt, 'xdr:to', $loc->PosBeg, true);
		if ($loc===false) return false;
		$p = $loc->PosBeg;

		$res = array();

		$loc = clsTbsXmlLoc::FindElement($Txt, 'xdr:colOff', $p, true);
		if ($loc===false) return false;
		$res['wb'] = $loc->GetInnerStart();
		$res['wl'] = $loc->GetInnerLen();
		$res['wu'] = '';
		$res['wv'] = $cx;
		$res['wt'] = $loc->GetInnerSrc();
		$res['wo'] = intval($res['wt']) - $cx;

		$loc = clsTbsXmlLoc::FindElement($Txt, 'xdr:rowOff', $p, true);
		if ($loc===false) return false;
		$res['hb'] = $loc->GetInnerStart();
		$res['hl'] = $loc->GetInnerLen();
		$res['hu'] = '';
		$res['hv'] = $cy;
		$res['ht'] = $loc->GetInnerSrc();
		$res['ho'] = intval($res['ht']) - $cy;

		$res['r'] = ($res['hv']==0) ? 0.0 : $res['wv']/$res['hv']; // ratio W/H;
		$res['dec'] = 0;
		$res['cpt'] = 12700;

		return $res;

	}
function TbsPicGetDim_Drawings($Txt, $Pos, $dim_inner) {

		if ($dim_inner===false) return false;
		if (strpos($this->TBS->OtbsCurrFile, 'xl/drawings/')!==0) return false;

		$cx = $dim_inner['wv'];
		$cy = $dim_inner['hv'];

		$loc = clsTbsXmlLoc::FindStartTag($Txt, 'xdr:twoCellAnchor', $Pos, false);
		if ($loc===false) return false;
		$loc = clsTbsXmlLoc::FindStartTag($Txt, 'xdr:to', $loc->PosBeg, true);
		if ($loc===false) return false;
		$p = $loc->PosBeg;

		$res = array();

		$loc = clsTbsXmlLoc::FindElement($Txt, 'xdr:colOff', $p, true);
		if ($loc===false) return false;
		$res['wb'] = $loc->GetInnerStart();
		$res['wl'] = $loc->GetInnerLen();
		$res['wu'] = '';
		$res['wv'] = $cx;
		$res['wt'] = $loc->GetInnerSrc();
		$res['wo'] = intval($res['wt']) - $cx;

		$loc = clsTbsXmlLoc::FindElement($Txt, 'xdr:rowOff', $p, true);
		if ($loc===false) return false;
		$res['hb'] = $loc->GetInnerStart();
		$res['hl'] = $loc->GetInnerLen();
		$res['hu'] = '';
		$res['hv'] = $cy;
		$res['ht'] = $loc->GetInnerSrc();
		$res['ho'] = intval($res['ht']) - $cy;

		$res['r'] = ($res['hv']==0) ? 0.0 : $res['wv']/$res['hv']; // ratio W/H;
		$res['dec'] = 0;
		$res['cpt'] = 12700;

		return $res;

	}
function TbsPicGetDim_Drawings ( $ Txt , $ Pos , $ dim_inner ) { if ( $ dim_inner === false ) return false ; if ( strpos ( $ this -> TBS -> OtbsCurrFile , 'xl/drawings/' ) !== 0 ) return false ; $ cx = $ dim_inner [ 'wv' ] ; $ cy = $ dim_inner [ 'hv' ] ; $ loc = clsTbsXmlLoc :: FindStartTag ( $ Txt , 'xdr:twoCellAnchor' , $ Pos , false ) ; if ( $ loc === false ) return false ; $ loc = clsTbsXmlLoc :: FindStartTag ( $ Txt , 'xdr:to' , $ loc -> PosBeg , true ) ; if ( $ loc === false ) return false ; $ p = $ loc -> PosBeg ; $ res = array ( ) ; $ loc = clsTbsXmlLoc :: FindElement ( $ Txt , 'xdr:colOff' , $ p , true ) ; if ( $ loc === false ) return false ; $ res [ 'wb' ] = $ loc -> GetInnerStart ( ) ; $ res [ 'wl' ] = $ loc -> GetInnerLen ( ) ; $ res [ 'wu' ] = '' ; $ res [ 'wv' ] = $ cx ; $ res [ 'wt' ] = $ loc -> GetInnerSrc ( ) ; $ res [ 'wo' ] = intval ( $ res [ 'wt' ] ) - $ cx ; $ loc = clsTbsXmlLoc :: FindElement ( $ Txt , 'xdr:rowOff' , $ p , true ) ; if ( $ loc === false ) return false ; $ res [ 'hb' ] = $ loc -> GetInnerStart ( ) ; $ res [ 'hl' ] = $ loc -> GetInnerLen ( ) ; $ res [ 'hu' ] = '' ; $ res [ 'hv' ] = $ cy ; $ res [ 'ht' ] = $ loc -> GetInnerSrc ( ) ; $ res [ 'ho' ] = intval ( $ res [ 'ht' ] ) - $ cy ; $ res [ 'r' ] = ( $ res [ 'hv' ] == 0 ) ? 0.0 : $ res [ 'wv' ] / $ res [ 'hv' ] ; // ratio W/H; $ res [ 'dec' ] = 0 ; $ res [ 'cpt' ] = 12700 ; return $ res ; }
Get Dim in a OpenXML Drawing (pictures in an XLSX)
Get Dim in a OpenXML Drawing ( pictures in an XLSX )