Re-indent with spaces TOC Depth filter

Travis said spaces, not tab. Meh.
This commit is contained in:
Louis 2014-03-31 17:07:58 +02:00
parent 88be3c962e
commit b7fd623121
2 changed files with 48 additions and 48 deletions

View File

@ -67,19 +67,19 @@ class TOC
*/ */
private static $_bookmarkId = 0; private static $_bookmarkId = 0;
/** /**
* Min title depth to show * Min title depth to show
* *
* @var int * @var int
*/ */
private $_minDepth = 1; private $_minDepth = 1;
/** /**
* Max title depth to show * Max title depth to show
* *
* @var int * @var int
*/ */
private $_maxDepth = 9; private $_maxDepth = 9;
/** /**
* Create a new Table-of-Contents Element * Create a new Table-of-Contents Element
@ -114,9 +114,9 @@ class TOC
self::$_styleFont = $styleFont; self::$_styleFont = $styleFont;
} }
} }
$this->_minDepth = $minDepth; $this->_minDepth = $minDepth;
$this->_maxDepth = $maxDepth; $this->_maxDepth = $maxDepth;
} }
/** /**
@ -150,17 +150,17 @@ class TOC
public function getTitles() public function getTitles()
{ {
$titles = self::$_titles; $titles = self::$_titles;
foreach ($titles as $i=>$title) { foreach ($titles as $i => $title) {
if ($this->_minDepth > $title['depth']) { if ($this->_minDepth > $title['depth']) {
unset($titles[$i]); unset($titles[$i]);
} }
if (($this->_maxDepth != 0) && ($this->_maxDepth < $title['depth'])) { if (($this->_maxDepth != 0) && ($this->_maxDepth < $title['depth'])) {
unset($titles[$i]); unset($titles[$i]);
} }
} }
$titles = array_merge(array(), $titles); $titles = array_merge(array(), $titles);
return $titles; return $titles;
} }
/** /**
@ -182,22 +182,22 @@ class TOC
{ {
return self::$_styleFont; return self::$_styleFont;
} }
/** /**
* Get Max Depth * Get Max Depth
* *
* @return int Max depth of titles * @return int Max depth of titles
*/ */
public function getMaxDepth() { public function getMaxDepth() {
return $this->_maxDepth; return $this->_maxDepth;
} }
/** /**
* Get Min Depth * Get Min Depth
* *
* @return int Min depth of titles * @return int Min depth of titles
*/ */
public function getMinDepth() { public function getMinDepth() {
return $this->_minDepth; return $this->_minDepth;
} }
} }

View File

@ -428,9 +428,9 @@ class Document extends Base
$fIndent = $styleTOC->getIndent(); $fIndent = $styleTOC->getIndent();
$tabLeader = $styleTOC->getTabLeader(); $tabLeader = $styleTOC->getTabLeader();
$tabPos = $styleTOC->getTabPos(); $tabPos = $styleTOC->getTabPos();
$maxDepth = $toc->getMaxDepth(); $maxDepth = $toc->getMaxDepth();
$minDepth = $toc->getMinDepth(); $minDepth = $toc->getMinDepth();
$isObject = ($styleFont instanceof Font) ? true : false; $isObject = ($styleFont instanceof Font) ? true : false;