https://bugs.documentfoundation.org/show_bug.cgi?id=161019
Bug ID: 161019
Summary: Visual fidelity issues when exporting spreadsheets
with merged cells to PDF after changes to cell data
management
Product: LibreOffice
Version: 24.2.0.0 alpha0+
Hardware: All
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Printing and PDF export
Assignee: [email protected]
Reporter: [email protected]
Description:
After a recent commit (e27d4cc31e04be4c47b5085dfa2363ee45457e8a) that changed
the way cell data is managed using an item pool (using unorderd_set instead in
the latest source code), there appear to be issues with the rendering of
borders in merged cells. The visual appearance of the spreadsheet is
incorrectly altered when exporting to PDF, as demonstrated by the differences
between the "test_correct.pdf" and "test_wrong.pdf" files provided in the
attached Google Drive link:
https://drive.google.com/drive/folders/1Ko6gLg7fNzzCwjmTHoenB01SnyXG_5c9?usp=sharing.
Steps to Reproduce:
1. Download the test spreadsheet file "test.xlsx" from the following Google
Drive link:
https://drive.google.com/drive/folders/1Ko6gLg7fNzzCwjmTHoenB01SnyXG_5c9?usp=sharing
2. Check out the LibreOffice code from the repository at a commit before the
problematic changes were introduced, specifically before commit
e27d4cc31e04be4c47b5085dfa2363ee45457e8a.
3. Build and run LibreOffice from this pre-commit code.
4. Open the "test.xlsx" file in LibreOffice Calc and export it as a PDF. The
resulting PDF should look identical to the "test_correct.pdf" file provided in
the Google Drive link.
5. Now, check out the LibreOffice code at a commit after the problematic
changes were introduced, specifically after commit
e27d4cc31e04be4c47b5085dfa2363ee45457e8a.
6. Build and run LibreOffice from this post-commit code.
7. Open the same "test.xlsx" file in LibreOffice Calc and export it as a PDF.
The resulting PDF should now have visual differences compared to the
"test_correct.pdf" file. The exported PDF should look like "test_wrong.pdf"
file provided in the Google Drive link, where the border of merged cells is not
drawn correctly.
Actual Results:
The exported PDF is "test_wrong.pdf" file provided in the Google Drive link:
https://drive.google.com/drive/folders/1Ko6gLg7fNzzCwjmTHoenB01SnyXG_5c9?usp=sharing
Expected Results:
The exported PDF should be "test_correct.pdf" file provided in the Google Drive
link:
https://drive.google.com/drive/folders/1Ko6gLg7fNzzCwjmTHoenB01SnyXG_5c9?usp=sharing
Reproducible: Always
User Profile Reset: No
Additional Info:
During debugging, I focused on the lclSetMergedRange function, which appears to
correctly recognize the range of merged cells. The problem does not seem to lie
within this function.
However, I suspect that the root cause of the bug is related to the code
changes introduced to optimize memory usage. Specifically, the modifications
made to manage cell data using an item pool (using unorderd_set instead in the
latest source code), including the introduction of the PUTCELL macro and the
changes in how cell borders are stored and retrieved, are likely responsible
for the incorrect rendering of borders in merged cells.
Further investigation and debugging efforts will be focused on these memory
optimization changes to identify the precise cause of the issue and develop a
suitable fix.
--
You are receiving this mail because:
You are the assignee for the bug.