Koha-clms/Koha/Util
Fridolin Somers 3f68db17b9 Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ffb40290f8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit c2531f6fef)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2019-03-19 23:12:48 +00:00
..
FrameworkPlugin.pm Bug 13437: Preliminary changes for marc21 plugins field 008 2015-06-10 12:51:26 -03:00
MARC.pm Bug 12629 - Software error when trying to merge records from different frameworks 2016-09-15 13:44:10 +00:00
Normalize.pm Bug 17302: [Follow-up] Make Normalize.pm undef-resistent 2016-09-25 14:04:54 +00:00
OpenDocument.pm Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation 2019-03-19 23:12:48 +00:00