Summary: | FILEOPEN DOCX SmartArt background shape has wrong size | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Regina Henschel <rb.henschel> |
Component: | Writer | Assignee: | Regina Henschel <rb.henschel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Armin.Le.Grand, librechris21 |
Priority: | medium | ||
Version: | 7.5.0.0 alpha0+ | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=143488 https://bugs.documentfoundation.org/show_bug.cgi?id=134898 https://bugs.documentfoundation.org/show_bug.cgi?id=86716 |
||
Whiteboard: | target:7.5.0 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 106547 | ||
Attachments: |
SmartArt with background
Screenshot comparing Word with LO Wrong width of elements in SmartArt |
Created attachment 181104 [details] Screenshot comparing Word with LO The wrong text direction is a different error and likely covered by bug 149809 and/or bug 149551. I can confirm this with Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: 61f5c991a97de8990badfed6ef840941b5aa8c7f CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb) Locale: pt-BR (pt_BR.UTF-8); UI: en-US Calc: threaded The green background is not visible after import. But it is visible if the file is opened with MSO Word. Created attachment 181208 [details]
Wrong width of elements in SmartArt
Open the attached document. It has a SmartArt and a screenshot of it. Notice that the circles are distorted to ellipses.
It seems an underlying problem is, that the group, which represents the SmartArt, does not get a size. And therefore it is not possible to assign the correct size to the background shape, e.g in AddShape() in oox.
I have put the example not into a new bug report, because I suspect, that it has the same reason. At least, if I add the size in GraphicImport(), the elements are circles as it should be. But I get other import problems, so I have no solution.
@Armin: This is the problem I told you about at the LibreOffice Conference. I have tried to set the size by setting the logicRect of the background shape around line#974 in writerfilter/source/dmapper/GraphicImport.cxx. That gives indeed a correct size of the background shape, but the size if the SmartArt shapes are still wrong. So this is likely the wrong place for a fix. For testing use a SmartArt with non default shape width or height in the SmartArt components. The shape mpShape in ShapeContextHandler::getDiagramShapeContext() needs the size as given in cx and cy in document.xml in the docx file markup. I'll try to transport that info from writerfilter to oox. Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e4515c1305e4b7bf6e7f105636e9cf6eb50b382d tdf#149840 Use actual outer size for SmartArt in Writer It will be available in 7.5.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. |
Created attachment 181103 [details] SmartArt with background Make sure that the option "SmartArt to LO shapes or reverse" is checked in "Microsoft Office" section in "Load/Save" in Tools/options. Open attached document. It has a SmartArt with green background. You will see now background. Reason is, that the background is imported with a 4x4 size. You can examine it with the Developer Tools.