implement underlineColor in Word2007, ODText, and HTML#2862
Open
ger82 wants to merge 3 commits intoPHPOffice:masterfrom
Open
implement underlineColor in Word2007, ODText, and HTML#2862ger82 wants to merge 3 commits intoPHPOffice:masterfrom
ger82 wants to merge 3 commits intoPHPOffice:masterfrom
Conversation
Progi1984
reviewed
Mar 4, 2026
Progi1984
reviewed
Mar 4, 2026
| * | ||
| * @return string | ||
| */ | ||
| public function getUnderlineColor() |
Member
There was a problem hiding this comment.
Suggested change
| public function getUnderlineColor() | |
| public function getUnderlineColor(): string |
Progi1984
reviewed
Mar 4, 2026
| * | ||
| * @return self | ||
| */ | ||
| public function setUnderlineColor(?string $value = null) |
Member
There was a problem hiding this comment.
Suggested change
| public function setUnderlineColor(?string $value = null) | |
| public function setUnderlineColor(string $value = ''): self |
Progi1984
reviewed
Mar 4, 2026
Comment on lines
+536
to
+539
| * | ||
| * @param string|null $value | ||
| * | ||
| * @return self |
Member
There was a problem hiding this comment.
Suggested change
| * | |
| * @param string|null $value | |
| * | |
| * @return self |
Progi1984
reviewed
Mar 4, 2026
Comment on lines
+526
to
+527
| * | ||
| * @return string |
Member
There was a problem hiding this comment.
Suggested change
| * | |
| * @return string |
Progi1984
reviewed
Mar 4, 2026
| */ | ||
| private $underline = self::UNDERLINE_NONE; | ||
|
|
||
| private $underlineColor; |
Member
There was a problem hiding this comment.
Suggested change
| private $underlineColor; | |
| /** | |
| * Underline color. | |
| * | |
| * @var string | |
| */ | |
| private $underlineColor = ''; |
Progi1984
reviewed
Mar 4, 2026
| $css['vertical-align'] .= $this->getValueIf($style->isSubScript(), 'sub'); | ||
| $css['text-decoration'] = ''; | ||
| $css['text-decoration'] .= $this->getValueIf($underline, 'underline '); | ||
| $css['text-decoration-color'] .= $this->getValueIf($underlineColor !== null, "#{$underlineColor}"); |
Member
There was a problem hiding this comment.
Suggested change
| $css['text-decoration-color'] .= $this->getValueIf($underlineColor !== null, "#{$underlineColor}"); | |
| $css['text-decoration-color'] .= $this->getValueIf($underlineColor !== '', '#' .$underlineColor); |
Progi1984
reviewed
Mar 4, 2026
| $xmlWriter->writeElementIf($style->getUnderline() != 'none', 'w:u', 'w:val', $style->getUnderline()); | ||
|
|
||
| // UnderlineColor | ||
| $xmlWriter->writeElementIf($style->getUnderlineColor() !== null, 'w:u', 'w:color', $style->getUnderlineColor()); |
Member
There was a problem hiding this comment.
Suggested change
| $xmlWriter->writeElementIf($style->getUnderlineColor() !== null, 'w:u', 'w:color', $style->getUnderlineColor()); | |
| $xmlWriter->writeElementIf($style->getUnderlineColor() !== '', 'w:u', 'w:color', $style->getUnderlineColor()); |
Progi1984
reviewed
Mar 4, 2026
| 'bold' => false, | ||
| 'italic' => false, | ||
| 'underline' => Font::UNDERLINE_NONE, | ||
| 'underlineColor' => null, |
Member
There was a problem hiding this comment.
Suggested change
| 'underlineColor' => null, | |
| 'underlineColor' => '', |
Author
|
@Progi1984 Hi, to check you feedback, should I use the Button "resolve conversation" if it's ok? I think your code changes are OK. I based my changes on the existing code, especially color and underline. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
implement underlineColor in Word2007, ODText, and HTML
Checklist: