[Libreoffice-bugs] [Bug 135464] New: ODF export: text:anchor-type="page" + style:horizontal-rel="paragraph" etc. invalid combinations

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Aug 5 13:13:58 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=135464

            Bug ID: 135464
           Summary: ODF export: text:anchor-type="page" +
                    style:horizontal-rel="paragraph" etc. invalid
                    combinations
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: michael.stahl at cib.de
                CC: rb.henschel at t-online.de, vmiklos at collabora.com

Writer can produce documents with combinations of anchor-type and
horizontal-rel that are invalid according to ODF 1.3, 20.298
style:horizontal-pos.

for "page" anchor, "paragraph", "paragraph-content", "paragraph-end-margin",
"paragraph-start-margin", "char" are invalid.

to create such a document:
1. insert a shape (or image/frame/ole, 2 different implementations of it)
2. use context menu "Anchor->To Page"

now the Properties dialog will show Page (because the actual value "Paragraph
area" isn't valid) but when you save the file it actually writes "paragraph".

it looks like if the anchor is FLY_AT_PAGE, the anchor frame is always going to
be SwPageFrame, and there is only one difference in the layout code that i can
find where things are different between the horizontal-rel values:

flylay.cxx: CalcClipRect() has this:

            if( rH.GetHoriOrient() != text::HoriOrientation::NONE &&
                rH.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
            {
                aRectFnSet.SetLeft( rRect, aRectFnSet.GetPrtLeft(*pClip) );
                aRectFnSet.SetRight(rRect, aRectFnSet.GetPrtRight(*pClip));
            }

but no corresponding case for PAGE_PRINT_AREA.

so i hope we might be able to easily fix this on ODF import for 3 of the 4
invalid cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200805/57a495ce/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list