Skip to content

Commit

Permalink
Merge pull request #578 from ComputerTinker/develop
Browse files Browse the repository at this point in the history
 #574 Incorrect Constant Names in \Style\Font.php
  • Loading branch information
troosan committed Nov 7, 2017
2 parents 610d91e + e929610 commit 64a6505
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/PhpWord/Reader/MsDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ private function readPrl($data, $pos, $cbNum)
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DASH;
break;
case 0x09:
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTHASH;
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTDASH;
break;
case 0x0A:
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTDOTDASH;
Expand All @@ -1713,7 +1713,7 @@ private function readPrl($data, $pos, $cbNum)
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DASHHEAVY;
break;
case 0x19:
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTHASHHEAVY;
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTDASHHEAVY;
break;
case 0x1A:
$oStylePrl->styleFont['underline'] = Style\Font::UNDERLINE_DOTDOTDASHHEAVY;
Expand Down
6 changes: 4 additions & 2 deletions src/PhpWord/Style/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ class Font extends AbstractStyle
const UNDERLINE_DASHLONG = 'dashLong';
const UNDERLINE_DASHLONGHEAVY = 'dashLongHeavy';
const UNDERLINE_DOUBLE = 'dbl';
const UNDERLINE_DOTHASH = 'dotDash';
const UNDERLINE_DOTHASHHEAVY = 'dotDashHeavy';
const UNDERLINE_DOTHASH = 'dotDash'; // Incorrect spelling, for backwards compatibility
const UNDERLINE_DOTHASHHEAVY = 'dotDashHeavy'; // Incorrect spelling, for backwards compatibility
const UNDERLINE_DOTDASH = 'dotDash'; // Correct spelling
const UNDERLINE_DOTDASHHEAVY = 'dotDashHeavy'; // Correct spelling
const UNDERLINE_DOTDOTDASH = 'dotDotDash';
const UNDERLINE_DOTDOTDASHHEAVY = 'dotDotDashHeavy';
const UNDERLINE_DOTTED = 'dotted';
Expand Down

0 comments on commit 64a6505

Please sign in to comment.