Fix #14588 - export all geometry objects as hex (ODS, ODT)

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2019-05-07 13:40:04 +02:00
parent 928febd9a3
commit b50a85bb04
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
2 changed files with 8 additions and 0 deletions

View File

@ -261,6 +261,10 @@ class ExportOds extends ExportPlugin
while ($row = $GLOBALS['dbi']->fetchRow($result)) {
$GLOBALS['ods_buffer'] .= '<table:table-row>';
for ($j = 0; $j < $fields_cnt; $j++) {
if ($fields_meta[$j]->type === 'geometry') {
// export GIS types as hex
$row[$j] = '0x' . bin2hex($row[$j]);
}
if (!isset($row[$j]) || is_null($row[$j])) {
$GLOBALS['ods_buffer']
.= '<table:table-cell office:value-type="string">'

View File

@ -301,6 +301,10 @@ class ExportOdt extends ExportPlugin
while ($row = $GLOBALS['dbi']->fetchRow($result)) {
$GLOBALS['odt_buffer'] .= '<table:table-row>';
for ($j = 0; $j < $fields_cnt; $j++) {
if ($fields_meta[$j]->type === 'geometry') {
// export GIS types as hex
$row[$j] = '0x' . bin2hex($row[$j]);
}
if (!isset($row[$j]) || is_null($row[$j])) {
$GLOBALS['odt_buffer']
.= '<table:table-cell office:value-type="string">'