Description: WP6 (2021) files with autobuilt "legal pleadings" vertical lines and line numbers in the left margin and single vertical line on the right margin generated by WordPerfect (tools>legal pleadings) do not appear when opening the .wpd file in LibreOffice. libwpd sees the "Watermark B" style object the graphic lines and line numbers are nested in as a "HeaderFooter group" and doesn't appear to see anything nested therein. This appears to match the hex of the wpd file, but the Corel SDK documents seem to indicate that the object should actually be Steps to Reproduce: 1. Find or create a WP6 (2021) .wpd from Corel WordPerfect which has standard legal pleadings styling 2. Open the document in LibreOffice Writer 3. Note all the legal pleading styling is missing Actual Results: Legal pleading style elements of the wpd file were missing in LibreOFfice Expected Results: Rendered the legal pleading style elements the same as WordPerfect does, using librevenge, libwpd, and libwpg. Libwpd is almost certainly the source of the problem. Reproducible: Always User Profile Reset: Yes Additional Info: Libwpd doesn't appear to support the sort of style object hierarchy/nesting which is actually possible in WordPerfect and WP6 (2021) files. The actual style elements to be displayed are nested 2 levels deep. First they are within a global style object denoted by 0xDD 0x0A (global style "on") and then within what should be a 0xDD 0x0A 0x2C (global style "on" system type 44 "Watermark B"), followed by the text content, graphics, and closing tags. However, the "Watermark B" actually appears to be a 0xD6 0x05 Header/Footer element type 5 "Watermark B" which doesn't have closing or opening components/markers for nesting of styles in the same way as the global style object.
WordPerfect is one of the leading softwares used by lawyers because of the legal pleadings style tool and how easy it is to use that tool. Many lawyers and law firms use WordPerfect and lack of full compatibility for WPD files in other other programs prevents them from changing to cheaper or more widely supported/integrated or open-source options. OpenOffice also has this issue due to its dependece on libwpd. I compiled libwpd 0.10.3 in debug mode to make my deeper observations. I am working on a project where a sharepoint based law office management system wants to preview WPD files in the browser. WPD2HTML was useful for this purpose but failed to translate the pleading style elements to HTML. Further digging revealed that LibreOffice and OpenOffice both have the same issue.
Created attachment 192065 [details] example wpd file containing legal pleadings style
Thanks for the file. Can you also take a screenshot from WordPerfect, so we have a reference for the correct result?
Created attachment 192077 [details] WordPerfect Writer 2021 Screenshot
(In reply to Buovjaga from comment #3) > Thanks for the file. Can you also take a screenshot from WordPerfect, so we > have a reference for the correct result? Added
Confirmed Arch Linux 64-bit, X11 Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 18e579761cb622e8ff7e67f319ef80c61b3bd588 CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 19 January 2024
Versions I used are libwpd 0.10.3 and librevenge 0.0.5, since no version field is available for Document Liberation Project.