Created attachment 169011 [details] Screenshot of the original document side by side in Excel and Calc after changing the row height This is another followup to bug #103050 When this document is opened the left pointing arrow shapes anchoring is incorrect: originally it’s “Move but don’t size with cells’ but it becomes “To cell (resize with cell)” in Calc. This causes the shape to resize if the anchor rows height grows, unlike in Excel. Steps to reproduce: 1. Open attachment #127853 [details] in Excel and Calc 2. In both programs go to the cell A4 and enable Wrap text property of the cell 3. Write a few words into cell A4 Actual results: In Excel the row height of row 4 grows, but the shapes size does not change. In Calc the row height of row 4 grows and the shapes size grows with it. Expected results: Shape size does not grow in Calc either. This could be achieved if the anchor type is changed to “To cell” manually. LibreOffice details: Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 2081eac430ac69619149e44b453a2d7dda41fc83 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: CL Also in Version: 6.1.0.3 Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1 CPU threads: 4; OS: Windows 6.3; UI render: default; Locale: en-US (hu_HU); Calc: CL In version: Version: 6.0.0.3 Build ID: 64a0f66915f38c6217de274f0aa8e15618924765 CPU threads: 4; OS: Windows 6.3; UI render: default; Locale: en-US (hu_HU); Calc: CL There was no “To cell (resize with cell)” option for shapes, only “To cell” which also resized the shape on row height change. Additional Information: Bibisected using bibisect-win32-6.1to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=acf0bad4e2b8c3c43aaaee8312c8a61d3552fcc2 author Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2018-02-09 12:52:52 +0100 committer Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> 2018-03-06 15:45:28 +0100 tdf#114552 Add a third anchor type for calc graphics
Created attachment 170004 [details] Proposed patch The error is likely in ShapeAnchor::importAnchor() It seems in the first two cases the assignment to meEditAs is missing. That is later used in getEditAs(), which is called in #328 to set bResizeWithCell of the object. I think, the error is unrelated to the rotation. In case of ShapeAnchor::ANCHOR_ABSOLUTE, #324 to #331 is skipped. Shall I nevertheless add the assignment to meEditAs in that case too? I don't know whether other places exist, that evaluate meEditAs. I can test it with the mentioned file, which has xdr:oneCellAnchor for the second case. But I have no test file for the first case. How are those files created in Excel? When I try to create an example file, I always get xdr:twoCellAnchor. Or do you have a file for case XDR_TOKEN( absoluteAnchor ) which I can use for testing?
Created attachment 170006 [details] example with absoluteAnchor The change is needed for the first case, otherwise the default from ctor is used. The attachment is a manually changed file to use absoluteAnchor.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b2848591ca529004fcfef9bd0f3650750b3735d7 tdf#139763 set anchor type in meEditAs in all cases It will be available in 7.2.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.
Regina Henschel committed a patch related to this issue. It has been pushed to "libreoffice-7-1": https://git.libreoffice.org/core/commit/6c86b57a746ab8941ae1c4b0dd1a10c381395eed tdf#139763 set anchor type in meEditAs in all cases It will be available in 7.1.2. 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.
Verified in: Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community Build ID: aa9cb8e14749e7fb7a83b55a2bb095501f731a18 CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded