switch ($borderWidth) {
case StyleConstants::THIN:
$borderWidth = 'thin';break;
case StyleConstants::THICK:
$borderWidth = 'thick';break;
case StyleConstants::MEDIUM:
$borderWidth = 'medium';break;
default:
if (!isLengthValue($borderWidth, true)) {
throw new StyleException('Invalid border-width value');
}
}
but StyleConstants::MEDIUM is not finally recognized nor ApacheOffice 2.4 (from BackTrack 4 ) nor LibreOffice 5 ( from current OpenSuse 42.3 ).
I consult opendoc fileformat documentation about this and found really "medium" thickness here missing ( only as interleave between two-line border )
So I replace code with
case StyleConstants::THIN:
$borderWidth = '0.01cm';break;
case StyleConstants::THICK:
$borderWidth = '0.07cm';break;
case StyleConstants::MEDIUM:
$borderWidth = '0.03cm';break;
to workaround and also realize thickness can be defined not only StyleConstants::xxx but also in length unit.
Hi Milan
Last edit: Milan Uhrák 2017-12-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, now I was trying create table and found some problems.
Documentation says to setting border you can call
$cellStyle1->setBorder('#00ff00');
But source code allow also define thickness, side, and line style.
and next about width of line :
but StyleConstants::MEDIUM is not finally recognized nor ApacheOffice 2.4 (from BackTrack 4 ) nor LibreOffice 5 ( from current OpenSuse 42.3 ).
I consult opendoc fileformat documentation about this and found really "medium" thickness here missing ( only as interleave between two-line border )
So I replace code with
case StyleConstants::THIN:
$borderWidth = '0.01cm';break;
case StyleConstants::THICK:
$borderWidth = '0.07cm';break;
case StyleConstants::MEDIUM:
$borderWidth = '0.03cm';break;
Last edit: Milan Uhrák 2017-12-14