Bug 168747 - replace use of deprecated css::util::SortFieldType by css::table::TableSortFieldType
Summary: replace use of deprecated css::util::SortFieldType by css::table::TableSortFi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:26.8.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2025-10-08 14:06 UTC by Regina Henschel
Modified: 2026-01-20 00:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2025-10-08 14:06:26 UTC
The enum css::util::SortFieldType is deprecated in the API. The only use of it in core is in sc/source/filter/xml/xmlsorti.cxx. Because that is in module sc the deprecated enum can be replaced with enum css::table::TableSortFieldType. The values of the enums are the same.

In addition it appears in comments in sc/source/filter/xml/xmldrani.cxx. These comments contain "is not supported by StarOffice" and thus should be updated anyway.

I propose this as easy hack.
Comment 1 codemaestro 2025-10-19 10:55:40 UTC
Hey, I’ll take this one. Gonna update xmlsorti.cxx and clean up the old comments in xmldrani.cxx.
Comment 2 Regina Henschel 2026-01-14 15:17:43 UTC
(In reply to codemaestro from comment #1)
> Hey, I’ll take this one. Gonna update xmlsorti.cxx and clean up the old
> comments in xmldrani.cxx.

There is already ongoing work in https://gerrit.libreoffice.org/c/core/+/197059. Thus you should chose a different bug. Sorry, that I didn't notice it earlier.
Comment 3 Commit Notification 2026-01-15 12:43:12 UTC
shark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/51430baec561ffe904f01b1cc04583a09b2328d6

tdf#168747 replace deprecated css::util::SortFieldType enum

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Regina Henschel 2026-01-20 00:41:11 UTC
Comments in xmldrani.cxx should be updated to LibreOffice and the "deprecated" remark in the API Reference should be improved to tell, what has to be used instead of the deprecated util::SortField. But both problems can go into new bug reports. Thus I set this to fixed.