Bug 156155 - Writer frame styles don't export draw:fill="none" to ODF
Summary: Writer frame styles don't export draw:fill="none" to ODF
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: odf target:24.2.0 target:7.6.0.0.beta...
Keywords:
Depends on:
Blocks: 156093
  Show dependency treegraph
 
Reported: 2023-07-04 10:48 UTC by Michael Stahl (allotropia)
Modified: 2024-02-20 09:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2023-07-04 10:48:13 UTC
The SwDoc::mpDfltFrameFormat contains some items that are set in SwDoc constructor:

    mpDfltFrameFormat->SetFormatAttr(XFillStyleItem(drawing::FillStyle_NONE));
    // prevent paragraph default margins being applied to everything
    mpDfltFrameFormat->SetFormatAttr(SvxULSpaceItem(RES_UL_SPACE));
    mpDfltFrameFormat->SetFormatAttr(SvxLRSpaceItem(RES_LR_SPACE));

now the margins shouldn't matter but the fill style causes a problem:

the pool default (which is exported to ODF as default style, family "graphic")
has a fill colour, while the Writer flys are by default transparent (that's
why the item is set in the mpDfltFrameFormat).

but the problem is, the XFillStyleItem from mpDfltFrameFormat is never exported to ODF.

so a ODF consumer may apply the fill colour from the default style to the Writer flys; this is what happens in bug 156093.
Comment 1 Commit Notification 2023-07-04 15:14:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9410a22cdbe7c977206456218c75683a305ef79e

tdf#156155 sw: export draw:fill to top-level ODF graphic styles

It will be available in 24.2.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.
Comment 2 Commit Notification 2023-07-04 18:01:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/0efacb9f484962d4b3be207ed3ebb8935779444c

tdf#156155 sw: export draw:fill to top-level ODF graphic styles

It will be available in 7.6.0.0.beta2.

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.
Comment 3 Michael Stahl (allotropia) 2023-07-05 12:06:07 UTC
fixed on master
Comment 4 Commit Notification 2023-07-08 20:38:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/bfc1eecc83a6b3b71fc7d5b5aa09389d682c611d

tdf#156155 sw: export draw:fill to top-level ODF graphic styles

It will be available in 7.5.6.

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.
Comment 5 Lucia Schroeder 2024-02-20 02:19:36 UTC Comment hidden (spam)
Comment 6 Michael Stahl (allotropia) 2024-02-20 09:56:50 UTC
close this to prevent spamming