https://bugs.kde.org/show_bug.cgi?id=460315
Thomas Fischer <fisc...@unix-ag.uni-kl.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|658106cd9a5cb50320ab557f881 |https://invent.kde.org/offi |a17c16da1b4a2 |ce/kbibtex/commit/eb510bdfd | |c46afaa520a9aa71c640c881ea6 | |eaba --- Comment #7 from Thomas Fischer <fisc...@unix-ag.uni-kl.de> --- Git commit eb510bdfdc46afaa520a9aa71c640c881ea6eaba by Thomas Fischer. Committed on 16/10/2022 at 12:27. Pushed by thomasfischer into branch 'master'. BibTeX file property: sort by identifier A new property can be set for BibTeX files: whether elements (foremost entries and macros) should be sorted by their identifier or key, respectively. This patch includes the following aspects to implement this feature: - when importing a BibTeX file, the Statistics struct counts how often two consecutive entries/macros in an imported file have identifiers/ keys in sorted order and how often not. Depending on the result, the SortedByIdentifier flag is set true or false. - when exporting a BibTeX file and the SortedByIdentifier flag is set, the File list will be copied and then sorted by identifier and key, respectively before writing to disk. - The file settings docklet and the properties dialog at "Save As" operations allow to set the SortedByIdentifier flag. - Sorting is implemented as a static function in class File, in case it will be used in other cases like other exporters in the future. - In KBibTeXDataTest, a new test ('sortFileByIdentifier') has been added to test the sorting functionality. Unsetting the SortedByIdentifier flag has no immediate consequence, there is no shuffling made. M +53 -1 src/config/preferences.cpp M +13 -1 src/config/preferences.h M +7 -0 src/config/preferences.json M +5 -0 src/data/element.cpp M +2 -0 src/data/element.h M +41 -0 src/data/file.cpp M +8 -0 src/data/file.h M +9 -0 src/gui/widgets/filesettingswidget.cpp M +1 -0 src/gui/widgets/filesettingswidget.h M +18 -5 src/io/fileexporterbibtex.cpp M +19 -3 src/io/fileimporterbibtex.cpp M +105 -0 src/test/kbibtexdatatest.cpp https://invent.kde.org/office/kbibtex/commit/eb510bdfdc46afaa520a9aa71c640c881ea6eaba -- You are receiving this mail because: You are watching all bug changes.