Created attachment 89599 [details]
When a document contains a flipped image, it is imported as non-flipped into LibreOffice. When you save the document back, the flip attribute is removed.
Steps to reproduce:
1. Open the attached file. LibO logo should be flipped right-to-left but it isn't.
2. Save the document back to docx. If you open it with Word the logo is not flipped any more.
CCing Bob Miller who reported this issue in first place in a comment at #70457.
Marked as new.
Successfully replicated using Jacobo's attachment and replication steps.
Build ID: adb759b304ff19dac3800d3fe007a863220e22ef
Platform: x86 Ubuntu
Object oox::drawingml::Shape contains the members mbFlipH and mbFlipV which contain the correct values of flip read from the document. At Shape::createAndInsert, these members are used to apply a transformation matrix to the shape but it seems not to work on GraphicObjectShape objects; on the other hand, CustomShape objects have two properties that control horizontal and vertical flipping and they are filled with the corresponding values later at Shape::createAndInsert. Flipping works properly for the latter kind of objects.
I can't find which are the properties of GraphicObjectShape that control flipping, maybe there aren't such properties and flipping is implemented applying a transformation to the bitmap directly...
Did you need more info from me as the initial reporter or is the needs info for someone else on the project?
(In reply to comment #4)
> Did you need more info from me as the initial reporter or is the needs info
> for someone else on the project?
I meant I needed some additional info from people with better knowledge about how flipped images are implemented; I will ping #libreoffice-dev for some help.
I was studying another bug and I found the cause of this one; at GraphicImport::createGraphicObject there are two ifs like:
// enable horizontal flip on graphic
if( m_pImpl->bVertFlip )
// enable vertical flip on graphic
Why is it not working? Because bHoriFlip and bVertFlip are never initialized. The values read from the document never arrive here.
Notice this is run later than Shape::createAndInsert; we should preserve the values of oox::drawingml::Shape.mbFlipH and mbFlipV until this point of the code.
** Please read this message in its entirety before responding **
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later): https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)
If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)
2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword
Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa
Thank you for your help!
-- The LibreOffice QA Team This NEW Message was generated on: 2015-07-18
Build ID: 0f4b3cb7d3d68906de316a64dcec281da2a641bd
Created attachment 121439 [details]
dmapper xml file generated from the testcase
I'm taking a look to the bug, it seems that the flipping attributes are not arriving to dmapper. The attached file has been generated launching LibreOffice with the order: ./instdir/program/soffice -env:DEBUG_WRITERFILTER=1
Flipping attributes must be defined with CT_Transform2D_flipH and CT_Transform2D_flipV and those values doesn't appear in the xml file
Still reproducible with:
Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default;
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05
Locale: nl-NL (nl_NL); Calc: CL
also found in:
Versie 188.8.131.52 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Setting Assignee back to default. Please assign it back to yourself if you're still working on this issue
This bug is not reproduced anymore on LibreOffice 184.108.40.206, ie image is flipped correctly when file is opened in LibreOffice, and after roundtrip in MS Office too.