Summary: | No display of the account hierarchy for reports in the app and when printing | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | reports | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git (master) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/office/kmymoney/-/commit/581bf742bdccee226d7bd0f84f1797296ba70a23 | Version Fixed In: | 5.2 |
Sentry Crash Report: | |||
Attachments: |
test file
Screenshot from report exported as html (okay) Screenshot from report displayed in the app (not okay) |
Description
Ralf Habacker
2024-11-05 08:41:02 UTC
Created attachment 175537 [details]
Screenshot from report exported as html (okay)
Created attachment 175538 [details]
Screenshot from report displayed in the app (not okay)
The logic used to provide the account hierarchy in HTML files (see https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/views/reports/core/pivottable.cpp?ref_type=heads#L1879 and other places) no longer works in the display of reports in the application after switching to QTextBrowser. The css attribute “text-indent” is currently used, which according to the QTextDocument documentation is only supported at the beginning of a text (https://doc.qt.io/qt-5/richtext-html-subset.html) text-indent <length>px First line text indentation in pixels (In reply to Ralf Habacker from comment #3) > text-indent <length>px First line text indentation in pixels An investigation showed that this statement applies to the beginning of each paragraph, so that the basic use is given. The actual problem lies in the fact that the unsupported unit “em” is used in the source code for HTML generation for pivot tables (see https://invent.kde.org/office/kmymoney/-/blob/master/kmymoney/plugins/views/reports/core/pivottable.cpp?ref_type=heads#L1827) Git commit 37de9b0a4ac298c374708631b612106e10edc6a8 by Ralf Habacker. Committed on 05/11/2024 at 11:09. Pushed by habacker into branch 'master'. Fix the indentation when displaying reports in the application The mentioned commit corrected the html export of a report, but not the display of the report, because the HTML import of QTextDocument, which is used here, does not support the unit “em” for the css attribute “text-indent”. To fix this, the unit “px” is always used in the generated HTML text. Fixup for commit ffa7449ae M +3 -3 kmymoney/plugins/views/reports/core/pivottable.cpp https://invent.kde.org/office/kmymoney/-/commit/37de9b0a4ac298c374708631b612106e10edc6a8 Git commit 581bf742bdccee226d7bd0f84f1797296ba70a23 by Ralf Habacker. Committed on 05/11/2024 at 11:37. Pushed by habacker into branch 'master'. Fix display of reports printig and print preview After switching to the QTextBrowser class for printing and the print view of reports, too little space is output between the individual columns. This is corrected by defining a left margin in front of each column. Related: bug 492831 FIXED-IN:5.2 M +3 -3 kmymoney/misc/kmmtextbrowser.cpp https://invent.kde.org/office/kmymoney/-/commit/581bf742bdccee226d7bd0f84f1797296ba70a23 |