From 4c88a30abd33d81ea228815312c50abac26505d3 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Tue, 25 Sep 2012 12:41:25 +0100 Subject: [PATCH] Feature: Allow call to font setUnderline() for underline format to specify a simple boolean for UNDERLINE_NONE or UNDERLINE_SINGLE --- Classes/PHPExcel/Style/Font.php | 3 +++ changelog.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/Classes/PHPExcel/Style/Font.php b/Classes/PHPExcel/Style/Font.php index becc69f4..095f06fb 100644 --- a/Classes/PHPExcel/Style/Font.php +++ b/Classes/PHPExcel/Style/Font.php @@ -504,6 +504,9 @@ class PHPExcel_Style_Font implements PHPExcel_IComparable * @return PHPExcel_Style_Font */ public function setUnderline($pValue = PHPExcel_Style_Font::UNDERLINE_NONE) { + if (is_bool($pValue)) { + $pValue = ($pValue) ? PHPExcel_Style_Font::UNDERLINE_SINGLE : PHPExcel_Style_Font::UNDERLINE_NONE; + } if ($pValue == '') { $pValue = PHPExcel_Style_Font::UNDERLINE_NONE; } diff --git a/changelog.txt b/changelog.txt index e15b7c3c..1c4733dc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -86,6 +86,7 @@ Fixed in develop branch: The new setExcelCompatibility(TRUE) option for the CSV Writer will generate files with this formatting for easy import into Excel2007 and below. - Feature: (MBaker) Language implementations for Turkish (tr) - Feature: (MBaker) Added fraction tests to advanced value binder +- Feature: (MBaker) Allow call to font setUnderline() for underline format to specify a simple boolean for UNDERLINE_NONE or UNDERLINE_SINGLE - General: (alexgann) Add Currency detection to the Advanced Value Binder - General: (MBaker) Work item 18404 - setCellValueExplicitByColumnAndRow() do not return PHPExcel_Worksheet - General: (MBaker) Work item 18324 - Reader factory doesn't read anymore XLTX and XLT files