[Libreoffice-bugs] [Bug 33713] FORMATTING, FILEOPEN: Spacing above and below paragraph (.lwp)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 14 15:04:40 UTC 2020


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

David Tardon <dtardon at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dtardon at redhat.com
           Keywords|                            |difficultyMedium, easyHack,
                   |                            |skillCpp

--- Comment #16 from David Tardon <dtardon at redhat.com> ---
This shouldn't be hard to do. The relevant information is already parsed, it
just isn't used...

Some high-level info about LWP import code: The code resides in lotuswordpro.
Parsing is two-step, with ODF as an intermediate format, i.e., the parser reads
a LWP document, produces an (internal) ODF document, which is then imported.
The parser itself is in lotuswordpro/source/filter. In general, each concept of
the file format is represented by a separate class, with names starting with
Lwp. ODF export is in lotuswordpro/source/filter/xfilter. In general, there is
a class for each ODF element, but there are some that just group together a
bunch of related arguments (e.g., XFMargins). Class names start with XF or IXF.
The construction of the ODF is done in ToXml() functions.

Now to the task at hand: LwpParaStyle::ApplySpacing() needs to handle
LwpSpacingCommonOverride::SPACING_DYNAMIC (and possibly also SPACING_LEADING)
for abovepara and belowpara. Then the additional info that the margin size is
relative (percentual) needs to be passed through XFParaStyle::SetMargins() down
to XFMargins (Maybe change the SetMargins() arguments to std::variant? That
would also remove the need for a special value meaning "not set".). Finally,
XFMargins::ToXml needs to emit values with a proper unit: either "cm" (the only
possibility now) or "%".

-- 
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/20200614/178bc154/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list