[Pkg-kde-extras] Bug#1117346: please support orcus 0.21
Rene Engelhard
rene at debian.org
Sun Oct 5 14:29:39 BST 2025
Source: labplot
Version: 2.12.0-1
Severity: wishlist
Tags: patch
Hi,
liborcus 0.21.0 is in NEW (since 2.5 weeks, for experimental for now, see below)
- available at https://people.debian.org/~rene/libreoffice/26.2/, though, too)
As usual, LibreOffice only supports (without patching) *one* version.
25.8 does 0.20.x but 26.2 to be released in February only 0.21.x :)
(Though this time this could probably be patched easier)
Thankfully looking at the changes this time it's fairly trivial, the API
change only affects LibreOffice:
from https://gitlab.com/orcus/orcus/-/releases:
--- snip ---
When importing an XML document via orcus_xml, import_factory's finalize() method was previously not called which violates the interface contract. This version fixes it.
added static method has_range(std::string_view stream) to both orcus_xml and orcus_json to detect whether a given XML and JSON document has at least one linkable range, respectively.
added a variant of orcus::detect() function that takes a document content and the format type to check against. This variant only checks whether the document is of the specified type, and returns the result as a boolean value.
The following functions now take a binary stream containing file content as std::string_view as opposed to the previous const char* and size_t pair:
orcus_ods::detect(std::string_view strm)
orcus_xlsx::detect(std::string_view strm)
orcus_gnumeric::detect(std::string_view strm)
orcus_xls_xml::detect(std::string_view strm)
orcus_parquet::detect(std::string_view strm)
orcus_json::detect(std::string_view strm)
orcus_xml::detect(std::string_view strm)
--- snip ---
And labplot doesn't use detect afaics:
rene at frodo:~/labplot-2.12.1/src$ grep -ri orcus
CMakeLists.txt:if(Orcus_FOUND)
CMakeLists.txt: target_link_libraries(labplotlib ${Orcus_LIBRARIES} ${Ixion_LIBRARY})
frontend/datasources/ImportFileWidget.cpp:#ifdef HAVE_ORCUS
frontend/datasources/ImportFileWidget.cpp:#ifdef HAVE_ORCUS
frontend/datasources/OdsOptionsWidget.cpp:#ifdef HAVE_ORCUS
frontend/AboutDialog.cpp:#ifdef HAVE_ORCUS
frontend/AboutDialog.cpp: version = QLatin1String(ORCUS_VERSION_STRING);
frontend/AboutDialog.cpp: components << (QStringList() << QLatin1String("ORCUS") << i18n("Import ODS (Open Document Spreadsheet) files") << version << QStringLiteral("https://orcus.readthedocs.io/en/stable/index.html"));
backend/datasources/filters/OdsFilter.cpp:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilter.cpp:#include <orcus/orcus_ods.hpp>
backend/datasources/filters/OdsFilter.cpp:#include <orcus/spreadsheet/factory.hpp>
backend/datasources/filters/OdsFilter.cpp:#include <orcus/spreadsheet/sheet.hpp>
backend/datasources/filters/OdsFilter.cpp:using namespace orcus;
backend/datasources/filters/OdsFilter.cpp:// * export data when Orcus support is stable
backend/datasources/filters/OdsFilter.cpp:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilter.cpp: orcus_ods loader(&factory);
backend/datasources/filters/OdsFilter.cpp: // TODO: "The export functionality of the Orcus library is highly experimental."
backend/datasources/filters/OdsFilter.cpp:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilter.cpp: orcus_ods loader(&factory);
backend/datasources/filters/OdsFilter.cpp:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilter.cpp:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilter.cpp: orcus_ods loader(&factory);
backend/datasources/filters/OdsFilterPrivate.h:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilterPrivate.h:#include <orcus/spreadsheet/document.hpp>
backend/datasources/filters/OdsFilterPrivate.h:#ifdef HAVE_ORCUS
backend/datasources/filters/OdsFilterPrivate.h: orcus::spreadsheet::range_size_t m_ss{1048576, 16384};
backend/datasources/filters/OdsFilterPrivate.h: orcus::spreadsheet::document m_document{m_ss};
backend/datasources/filters/AbstractFileFilter.cpp:#ifdef HAVE_ORCUS // before ASCII, because ODS is XML and XML is ASCII
rene at frodo:~/labplot-2.12.1/src$ cd backend/datasources/filters
rene at frodo:~/labplot-2.12.1/src/backend/datasources/filters$ grep -ri detect *
AbstractFileFilter.cpp:#ifdef HAVE_HDF5 // before NETCDF to treat NetCDF 4 files with .nc ending as HDF5 when fileInfo detects it (HDF4 not supported)
AsciiFilter.cpp: return i18n("No new line detected");
AsciiFilter.cpp: case Status::SequentialDeviceAutomaticSeparatorDetection:
AsciiFilter.cpp: case Status::HeaderDetectionNotAllowed:
AsciiFilter.cpp: case Status::SeparatorDetectionNotAllowed:
AsciiFilter.cpp: return i18n("Separator detection not allowed");
AsciiFilter.cpp:QString AsciiFilter::autoSeparatorDetectionString() {
AsciiFilter.cpp: return (QStringList() << autoSeparatorDetectionString() << QStringLiteral("TAB") << QStringLiteral("SPACE") << QStringLiteral(",") << QStringLiteral(";")
AsciiFilter.cpp: writer->writeAttribute(QStringLiteral("separatingCharacterDetection"), QString::number(p.automaticSeparatorDetection));
AsciiFilter.cpp: READ_INT_VALUE("separatingCharacterDetection", properties.automaticSeparatorDetection, bool);
AsciiFilter.cpp: if (!properties.automaticSeparatorDetection && properties.endColumn > 0
AsciiFilter.cpp: if (properties.automaticSeparatorDetection) {
AsciiFilter.cpp: * \param dateTimeFormat The datetime format will be updated if it is empty by the detected format
AsciiFilter.cpp: if (p.automaticSeparatorDetection)
AsciiFilter.cpp: return setLastError(Status::SeparatorDetectionNotAllowed);
AsciiFilter.cpp: return setLastError(Status::HeaderDetectionNotAllowed);
AsciiFilter.h: SequentialDeviceAutomaticSeparatorDetection,
AsciiFilter.h: HeaderDetectionNotAllowed,
AsciiFilter.h: SeparatorDetectionNotAllowed,
AsciiFilter.h: static QString autoSeparatorDetectionString();
AsciiFilter.h: bool automaticSeparatorDetection{true};
HDF5Filter.cpp: props << QLatin1String(": FLETCHER32"); /* Error DetecDiftion Code */
OdsFilter.cpp: case ixion::cell_t::numeric: // numeric values are always double (can't detect if integer)
$
So it's pretty straightforward to add (lib)orcus-0.21, orcus-parser-0.21 and
orcus-spreadsheet-model-0.21 where it's used.
(Interestingly https://github.com/KDE/labplot/commit/1201b2100d360d6247fadc1d958767637ac9b761
did update flatpak but nothing else did update the cmake files....
Probably it assumes an liborcus.pc/liborcus-spreadsheet-model.pc and it's siblings which we don't
provide as upstream dosn't - IMHO with good reason as we saw e.g. on the last
update - either.)
Diff attached.
Doing this in advance would help labplot just being bin-NMUable in
the forthcoming transition (whenever it will be, fist needs to get out
of NEW...) instead of needing a source upload.
Regards,
Rene
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orcus.debdiff
Type: text/x-diff
Size: 3155 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-kde-extras/attachments/20251005/6a93d16c/attachment.diff>
More information about the pkg-kde-extras
mailing list