Koha-clms/Koha/Util
Fridolin Somers ffb40290f8 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>
2019-03-15 12:02:46 +00:00
..
FrameworkPlugin.pm
…
MARC.pm Bug 19349: (QA follow-up) Cosmetic changes 2018-11-08 20:53:28 +00:00
Navigation.pm Bug 21299: (QA follow-up) Rename module and subroutine 2018-11-07 21:52:17 +00:00
Normalize.pm
…
OpenDocument.pm Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation 2019-03-15 12:02:46 +00:00
StockRotation.pm Bug 11897: Stockrotation 2018-10-09 15:46:05 +00:00
SystemPreferences.pm Bug 15494: (follow-up) Move yaml syspref code to its own sub in SySpref object 2018-11-07 21:39:39 +00:00