Created attachment 101798 [details] Test case Pictures in the attached document aren't rendered in the correct position. This is a regression in 4.3, it used to work in 4.2.
Created attachment 101799 [details] Side-by-side comparison (4.2 vs 4.3)
Confirm wrong position of pictures with 4.3.0.1 and 4.4.0.0 alpha 0 in 4.2, graphics are rendered as pictures, in 4.3 / 4.4 they are no more simple pictures, when image artistic effects applied when OOXML object source contains : ... <a:ext uri="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"> <a14:imgProps xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main"> <a14:imgLayer r:embed="rId7"> <a14:imgEffect> <a14:artisticGlowEdges/> </a14:imgEffect> </a14:imgLayer> </a14:imgProps> </a:ext> When saving as ODT, pictures with artistic effect is rendered with : <text:p text:style-name="P1"> <draw:frame text:anchor-type="paragraph" draw:z-index="1" draw:name="Picture 1" draw:style-name="gr1" draw:text-style-name="P3" svg:width="4.938cm" svg:height="5.677cm" svg:x="0cm" svg:y="0cm"> <draw:image xlink:href="Pictures/10000201000001AC000001EC6FDB73BD.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"> <text:p/> </draw:image> </draw:frame> </text:p> When no image artistic effect is applied, it is rendered correctly with : <text:p text:style-name="P2"> <draw:frame draw:style-name="fr1" draw:name="Picture 1" text:anchor-type="char" svg:x="2.164cm" svg:y="0.041cm" svg:width="4.937cm" svg:height="5.676cm" draw:z-index="0"> <draw:image xlink:href="Pictures/10000201000001AC000001ECCD78BB4D.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> </draw:frame> </text:p>
(In reply to comment #2) > Confirm wrong position of pictures with 4.3.0.1 and 4.4.0.0 alpha 0 > > in 4.2, graphics are rendered as pictures, > in 4.3 / 4.4 they are no more simple pictures, when image artistic effects > applied > You are right, this is the cause of the bug. This simple change works it around, although it breaks the preservation of artistic filters: diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index cf3da2a..933ae3f 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -655,8 +655,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) { // if the shape contains effects in the grab bag, we should not transform it // in a XTextContent so those effects can be preserved - if( aGrabBag[i].Name == "EffectProperties" || aGrabBag[i].Name == "3DEffectProperties" || - aGrabBag[i].Name == "ArtisticEffectProperties" ) + if( aGrabBag[i].Name == "EffectProperties" || aGrabBag[i].Name == "3DEffectProperties" ) bContainsEffects = true; }
It looks like the code in GraphicImport::lcl_attribute adjust the position of the objects calling GraphicImport_Impl::applyPosition and applyRelativePosition, which set the attributes HoriOrient, HoriOrientPosition, HoriOrientRelation, etc. These attributes can be applied to pictures but not to shapes, according to the api: Pictures: http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1TextGraphicObject.html Shapes: http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1drawing_1_1GraphicObjectShape.html
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=816542b2bdd23423625ad4c2f0e706d5558b8ba9 fdo#80555: Set position of GraphicObjectShape objects correctly The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "libreoffice-4-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1cacd685bf7c3230d3cdff964503adaedd025418&h=libreoffice-4-3 fdo#80555: Set position of GraphicObjectShape objects correctly It will be available in LibreOffice 4.3.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "libreoffice-4-3-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=627d1722892b2969373836c74c84f25995c4b112&h=libreoffice-4-3-0 fdo#80555: Set position of GraphicObjectShape objects correctly It will be available already in LibreOffice 4.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
verified Version: 5.5.0.0.alpha0+ Build ID: 066665644b398a882e6cded98af5bb060af41d76 TinderBox: Android-ARM@24-Bytemark-Hosting, Branch: Master, Time: 2017-06-01 00:30:43