Skip to content

Commit

Permalink
make FontStyle basedOn paragraph if the paragraph is set on the font (#…
Browse files Browse the repository at this point in the history
…926)

* make FontStyle based on paragraph if it set
* replace tab with spaces
* basedOn not correctly set if FontStyle is based on other FontStyle
* Fix warnings
  • Loading branch information
troosan committed Sep 17, 2017
1 parent 2fc685b commit 8ce1a19
Show file tree
Hide file tree
Showing 35 changed files with 153 additions and 89 deletions.
16 changes: 8 additions & 8 deletions src/PhpWord/ComplexType/FootnoteProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ final class FootnoteProperties

/**
* Get the Footnote Positioning Location
*
*
* @return string
*/
public function getPos()
Expand All @@ -75,7 +75,7 @@ public function getPos()

/**
* Set the Footnote Positioning Location (pageBottom, beneathText, sectEnd, docEnd)
*
*
* @param string $pos
* @throws \InvalidArgumentException
* @return self
Expand All @@ -99,7 +99,7 @@ public function setPos($pos)

/**
* Get the Footnote Numbering Format
*
*
* @return string
*/
public function getNumFmt()
Expand All @@ -109,7 +109,7 @@ public function getNumFmt()

/**
* Set the Footnote Numbering Format
*
*
* @param string $numFmt One of NumberFormat
* @return self
*/
Expand All @@ -122,7 +122,7 @@ public function setNumFmt($numFmt)

/**
* Get the Footnote Numbering Format
*
*
* @return double
*/
public function getNumStart()
Expand All @@ -132,7 +132,7 @@ public function getNumStart()

/**
* Set the Footnote Numbering Format
*
*
* @param double $numStart
* @return self
*/
Expand All @@ -144,7 +144,7 @@ public function setNumStart($numStart)

/**
* Get the Footnote and Endnote Numbering Starting Value
*
*
* @return string
*/
public function getNumRestart()
Expand All @@ -154,7 +154,7 @@ public function getNumRestart()

/**
* Set the Footnote and Endnote Numbering Starting Value (continuous, eachSect, eachPage)
*
*
* @param string $numRestart
* @throws \InvalidArgumentException
* @return self
Expand Down
4 changes: 2 additions & 2 deletions src/PhpWord/ComplexType/ProofState.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ final class ProofState
/**
* Set the Spell Checking State (dirty or clean)
*
* @param string $spelling
* @param string $spelling
* @throws \InvalidArgumentException
* @return self
*/
Expand All @@ -78,7 +78,7 @@ public function getSpelling()
/**
* Set the Grammatical Checking State (dirty or clean)
*
* @param string $grammar
* @param string $grammar
* @throws \InvalidArgumentException
* @return self
*/
Expand Down
6 changes: 3 additions & 3 deletions src/PhpWord/Element/AbstractElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ abstract class AbstractElement

/**
* The start position for the linked comment
*
*
* @var Comment
*/
protected $commentRangeStart;

/**
* The end position for the linked comment
*
*
* @var Comment
*/
protected $commentRangeEnd;
Expand Down Expand Up @@ -291,7 +291,7 @@ public function getCommentRangeStart()

/**
* Set comment start
*
*
* @param Comment $value
*/
public function setCommentRangeStart(Comment $value)
Expand Down
12 changes: 6 additions & 6 deletions src/PhpWord/Element/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ class Comment extends TrackChange

/**
* The Element where this comment starts
*
*
* @var AbstractElement
*/
private $startElement;

/**
* The Element where this comment ends
*
*
* @var AbstractElement
*/
private $endElement;
Expand Down Expand Up @@ -76,7 +76,7 @@ public function getInitials()

/**
* Sets the element where this comment starts
*
*
* @param \PhpOffice\PhpWord\Element\AbstractElement $value
*/
public function setStartElement(AbstractElement $value)
Expand All @@ -89,7 +89,7 @@ public function setStartElement(AbstractElement $value)

/**
* Get the element where this comment starts
*
*
* @return \PhpOffice\PhpWord\Element\AbstractElement
*/
public function getStartElement()
Expand All @@ -99,7 +99,7 @@ public function getStartElement()

/**
* Sets the element where this comment ends
*
*
* @param \PhpOffice\PhpWord\Element\AbstractElement $value
*/
public function setEndElement(AbstractElement $value)
Expand All @@ -112,7 +112,7 @@ public function setEndElement(AbstractElement $value)

/**
* Get the element where this comment ends
*
*
* @return \PhpOffice\PhpWord\Element\AbstractElement
*/
public function getEndElement()
Expand Down
4 changes: 2 additions & 2 deletions src/PhpWord/Element/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ private function getArchiveImageSize($source)

/**
* get image size from string
*
*
* @param string $source
*
*
* @codeCoverageIgnore this method is just a replacement for getimagesizefromstring which exists only as of PHP 5.4
*/
private function getStringImageSize($source)
Expand Down
7 changes: 3 additions & 4 deletions src/PhpWord/Element/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Section extends AbstractContainer

/**
* The properties for the footnote of this section
*
*
* @var FootnoteProperties
*/
private $footnoteProperties;
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getFooters()

/**
* Get the footnote properties
*
*
* @return \PhpOffice\PhpWord\Element\FooterProperties
*/
public function getFootnotePropoperties()
Expand All @@ -158,7 +158,7 @@ public function getFootnotePropoperties()

/**
* Set the footnote properties
*
*
* @param FootnoteProperties $footnoteProperties
*/
public function setFootnoteProperties(FootnoteProperties $footnoteProperties = null)
Expand Down Expand Up @@ -219,7 +219,6 @@ private function addHeaderFooter($type = Header::AUTO, $header = true)
} else {
throw new \Exception('Invalid header/footer type.');
}

}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Escaper/AbstractEscaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @since 0.13.0
*
*
* @codeCoverageIgnore
*/
abstract class AbstractEscaper implements EscaperInterface
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Escaper/EscaperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @since 0.13.0
*
*
* @codeCoverageIgnore
*/
interface EscaperInterface
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Escaper/RegExp.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @since 0.13.0
*
*
* @codeCoverageIgnore
*/
class RegExp extends AbstractEscaper
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Escaper/Rtf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @since 0.13.0
*
*
* @codeCoverageIgnore
*/
class Rtf extends AbstractEscaper
Expand Down
2 changes: 1 addition & 1 deletion src/PhpWord/Escaper/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/**
* @since 0.13.0
*
*
* @codeCoverageIgnore
*/
class Xml extends AbstractEscaper
Expand Down
8 changes: 4 additions & 4 deletions src/PhpWord/Metadata/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function setEvenAndOddHeaders($evenAndOddHeaders)

/**
* Get the Visibility of Annotation Types
*
*
* @return \PhpOffice\PhpWord\ComplexType\TrackChangesView
*/
public function getRevisionView()
Expand All @@ -213,7 +213,7 @@ public function getRevisionView()

/**
* Set the Visibility of Annotation Types
*
*
* @param TrackChangesView $trackChangesView
*/
public function setRevisionView(TrackChangesView $trackChangesView = null)
Expand Down Expand Up @@ -293,7 +293,7 @@ public function setZoom($zoom)

/**
* Returns the Radix Point for Field Code Evaluation
*
*
* @return string
*/
public function getDecimalSymbol()
Expand All @@ -303,7 +303,7 @@ public function getDecimalSymbol()

/**
* sets the Radix Point for Field Code Evaluation
*
*
* @param string $decimalSymbol
*/
public function setDecimalSymbol($decimalSymbol)
Expand Down
Loading

0 comments on commit 8ce1a19

Please sign in to comment.