Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | OOo cannot correctly import ODF with modified default styles in non-English UI | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | Elie Roux <roux.elie> | ||||||
Component: | code | Assignee: | Oliver-Rainer Wittmann <orw> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | Major | ||||||||
Priority: | P3 | CC: | rb.henschel, roux.elie | ||||||
Version: | 3.3.0 or older (OOo) | ||||||||
Target Milestone: | 4.2.0 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Issue Type: | PATCH | Latest Confirmation in: | 4.1.0 | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
LO bug url: https://bugs.freedesktop.org/show_bug.cgi?id=40073 Just fixed the issue, patch here: https://gerrit.libreoffice.org/#/c/9683/ (In reply to Elie Roux from comment #1) > LO bug url: https://bugs.freedesktop.org/show_bug.cgi?id=40073 > > Just fixed the issue, patch here: https://gerrit.libreoffice.org/#/c/9683/ Unfortunately, this project cannot take patches from LO, so code flows from here to LO but not vice versa. Well, the patch is from me... or should I upload it here too so that you don't take it from LO directly? Thank you, Yes, please attach it here too. Doing this you guarantee, that you give it under Apache License. When you attach it, you will find a check box "patch" in the attachment form; please check it. And some lines down you will see a drop-down list "Flags". Select the question mark ? item. That will generate a mail to the developer list, so that your patch will be noticed and reviewed. Please be not disappointed, if you do not get an immediately review. It might be, that the patch does not apply nicely, because LO and AOO differ in some details in core, and your patch has to be adapted first. Created attachment 83534 [details]
patch to fix the bug (imported from LO, not tested)
Here is a patch I submitted to LO, so I hereby release it under a license compatible with AOOo.
Hi Elie, I see the problem with your attached document. But I do not think, that it is a pure problem of not finding the correct style. If I set the horizontal position to any other item, not to "From left", then the display is correct. Also other properties like background are correct. Only the property value "From left" is set wrongly. That's possible. In LO, the problem was clearly what I described, but maybe in AOOo, the problem lies somewhere else (though it would be surprising)... @Elie Roux: Thanks for the patch. I am taking over to review the issue and the provided patch. Comment on attachment 83534 [details]
patch to fix the bug (imported from LO, not tested)
patch looks good - I integrate it into trunk
I assume the same defect will happen to graphics. See method <SwGraphicProperties_Impl::AnyToItemSet(..)> which also do not 'translate' the name of the Style. (In reply to Oliver-Rainer Wittmann from comment #10) > I assume the same defect will happen to graphics. See method > <SwGraphicProperties_Impl::AnyToItemSet(..)> which also do not 'translate' > the name of the Style. I can confirm my own observation :( I will apply Elie's fix also to method <SwGraphicProperties_Impl::AnyToItemSet(..)> Thank you very much for your check! Can you paste here the link to the patch you'll apply for this new bug? Thanks (In reply to Oliver-Rainer Wittmann from comment #9) > Comment on attachment 83534 [details] > patch to fix the bug (imported from LO, not tested) > > patch looks good - I integrate it into trunk Some minor adjustments to the patch for AOO will be needed. (In reply to Elie Roux from comment #12) > Thank you very much for your check! Can you paste here the link to the patch > you'll apply for this new bug? > > Thanks No problem. I am planning to make two commits. One with your adjusted patch and one for the related issue with graphics. The second one will be the same as yours - just a different method. applied given patch with minor adjustments on trunk, rev. 1601654 (In reply to Oliver-Rainer Wittmann from comment #15) > applied given patch with minor adjustments on trunk, rev. 1601654 revision 1601654 "orw" committed SVN revision 1601656 into trunk: 125072: method <SwGraphicProperties_Impl::AnyToItemSet(..)> - map given style... fixed on trunk (In reply to Elie Roux from comment #12) > Thank you very much for your check! Can you paste here the link to the patch > you'll apply for this new bug? > > Thanks revision 1601656 contain the changes for the import of graphics. Thanx! For information, this was already done in Libreoffice (before I wrote my patch) |
Created attachment 83529 [details] simple document where the problem occurs Steps to reproduce: - with the attached document where the style Marginalia has been modified: - open it document in an Ensligh UI, it works - open it in a French UI, the frame is not placed correctly This issue is also present in latest LibreOffice. When the bug occurs: - the Marginalia style has the correct (modified) properties - the frame has the good style (Marginalia) - the frame has the same properties as if the Marginalia style wasn't modified, and the layout follows these properties correctly After debugging a little, when rendering the frame, the software looks for the style "Marginalia" (untranslated) and doesn't find it because the styles have already been translated. This bug is quite serious and prevents many valid ODF documents to be rendered correctly. The call to lcl_FindFrmFmt is made with the untranslated argument while it should be translated.