Bug 90130 - ODF import: Frame area / background color not loaded
Summary: ODF import: Frame area / background color not loaded
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.1.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: odf target:5.0.0 target:4.4.3
Keywords: bibisected, bisected, regression
: 87369 89730 90479 90819 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-20 16:49 UTC by Andrea M.
Modified: 2015-12-17 08:49 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
a related example (8.93 KB, application/vnd.oasis.opendocument.text)
2015-04-14 09:11 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea M. 2015-03-20 16:49:18 UTC
In Writer insert a text in a frame, change the area color of the frame in black and the character color of this text in white. Then save and close the file or LibreOffice. Reopen the file and you will get a frame with white area color and text in white (you'll see nothing because area and text have the same color).
The saved file don't store the color attribute of the frame area.
Bug found in Linux LibreOffice 4.4.1 x86 and x86-64.
Comment 1 Andrea M. 2015-03-20 16:53:54 UTC
I use LibreOffice 4.4.1, italian version.
Comment 2 A (Andy) 2015-03-21 08:37:03 UTC
For me not reproducible with LO 4.4.1.2. Win 8.1.  Maybe a Linux only issue.
Note: I supposed, because you did not mention it, that you saved it as an odt-file?

But when I tested it I experienced another bug for me.  If I save it as a docx-file, close and reopen it, then I have only a white and a black frame.  
@Andrea: Do you have the same?  I would open another bug report for this too.
Comment 3 A (Andy) 2015-03-21 08:58:53 UTC
@Andrea: Maybe I have to correct my comment.

With drawing a frame did you mean the rectangle drawing shape or INSERT -> FRAME?  Because with the last I could reproduce it and in this case it was a misunderstanding from my side.
Comment 4 Andrea M. 2015-03-22 00:14:35 UTC
INSERT -> FRAME

Another strange thing is that the frame area color is ok saving the text as docx file.
Then, if you reopen the docx file and save it as odt file, the new file odt is ok.
This could be a temporary workaround for overcoming the problem
Comment 5 A (Andy) 2015-03-22 07:31:19 UTC
@Andrea: Thanks for your fast reply.


Reproducible with LO 4.4.1.2, Win 8.1

Steps Done:
1. Open WRITER
2. Go to INSERT -> FRAME and press OK to insert a frame
3. Go to the AREA section under PROPERTIES in the Sidebar and select FILL = Colour and as colour select Black
4. Click with the mouse outside the frame into the document to deselect the frame (now it has no longer the green squares for selection)
5. Click with the mouse inside the frame (inside the inner frame of the frame), now you have the blinking cursor to insert a text
6. Write a word and press CTRL + A to select it
7. Change the font colour to white in the CHARACTER section under PROPERTIES
8. Go to FILE -> SAVE AS and save the file as an odt file
9. After you have saved it, close it and reopen it

Result: You have only a white frame.
-> Problem: The font colour of the text is saved but not the area colour of the frame.  This problem only happens if you save it as an odt file (with rtf, doc, docx the area colour is saved).
Comment 6 Matthew Francis 2015-04-09 03:25:06 UTC
*** Bug 90479 has been marked as a duplicate of this bug. ***
Comment 7 Matthew Francis 2015-04-09 03:45:54 UTC
This seems more a file open problem than file save - adjusted title

After the below commit, the frame background colour isn't loaded.
Adding Cc: to caolanm@redhat.com; Could you possibly take a look at this? Thanks

(seems also somehow related to bug 86578, but this specific issue is more recent)


    commit 5aa360cae0383f270c12708e7e94179a7fde6711
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Mon Sep 29 16:25:27 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Mon Sep 29 16:31:32 2014 +0100
    
        Resolves: fdo#80468 and fdo#81223 image/frame backgrounds wrong
    
        writer has code to fill in missing new properties from the old properties
        if they exist. But xmloff is stripping them out before they get there.
    
        Don't strip them out, and add in a missing check for one of the
        archaic bg colors and add a regression test for fdo#81223
    
        Change-Id: I9a541a9bee0a01c90f2c33383f1144ecd8b0bfff
Comment 9 Caolán McNamara 2015-04-14 09:11:43 UTC
Created attachment 114778 [details]
a related example

The transparency of this gradient also goes missing
Comment 11 Michael Stahl (allotropia) 2015-04-14 15:54:57 UTC
*** Bug 89730 has been marked as a duplicate of this bug. ***
Comment 12 Michael Stahl (allotropia) 2015-04-14 15:57:10 UTC
*** Bug 87369 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2015-04-14 19:27:56 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c17754f824987b26b3aa2f126b383f117b2e63e&h=libreoffice-4-4

Resolves: tdf#90130 don't clobber new solid-color on seeing old transparency

It will be available in 4.4.3.

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.
Comment 14 Rico Tzschichholz 2015-04-15 16:40:09 UTC
Just compiled and tested and I can confirm the problem is gone.
Thank you very much for fixing this bug! :-)
Comment 15 Paddy Landau 2015-04-15 19:33:02 UTC
A new related bug has been introduced: see bug #90640.
Comment 16 Commit Notification 2015-04-16 21:09:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=11730ab931e67e26efd8a7f46dff17c2b8a97e2c

Resolves: tdf#90130 don't clobber new solid-color on seeing old transparency

It will be available in 5.0.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.
Comment 17 Paddy Landau 2015-04-21 14:58:10 UTC
This appears to be fixed in the latest master 5.0.0.0.alpha1+.

Thank you.
Comment 18 A (Andy) 2015-04-25 07:46:44 UTC
*** Bug 90819 has been marked as a duplicate of this bug. ***
Comment 19 Robinson Tryon (qubit) 2015-12-17 08:49:40 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]