https://bugs.freedesktop.org/show_bug.cgi?id=73590

          Priority: medium
            Bug ID: 73590
          Assignee: [email protected]
           Summary: FORMATTING: (possible ODF viol.) Imported para style
                    can not override only margin-top or -bottom with zero
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: [email protected]
          Hardware: Other
        Whiteboard: BSA
            Status: UNCONFIRMED
           Version: 4.2.0.2 rc
         Component: Writer
           Product: LibreOffice

Created attachment 92018
  --> https://bugs.freedesktop.org/attachment.cgi?id=92018&action=edit
Demo showing paragraphs which don't respect margin-top in default style

This bug reports a problem where LO seems to mis-interpret certain ODF
constructs which it itself does not generate; but the result is wrong behavior
when importing .odt files created by other apps which use them.

I have only limited understanding of the ODF specification, so please accept my
apologies if this is not really a bug...

If the default paragraph style specifies non-zero values for both fo:margin-top
or fo:margin-bottom, and a regular style overrides just one of them with zero,
then the other property in the default style is ignored or forced to zero.

That is, if a regular style (whether 'common' or 'automatic') specifies
*either* fo:margin-top or -bottom with a zero value, but not both, then the
other one is forced to zero and all spacing between paragraphs disappears.

(Note: The "reverse" situation works correctly, where the default style
specifies zero values and the overriding style overrides only one of them with
a non-zero value).

Attached is a demo file.  Inside it is the following

  styles.xml contains

    <style:default-style style:family="paragraph">
      <style:paragraph-properties fo:margin-bottom="1cm" fo:margin-top="1cm"/>
    </style:default-style>

    <style:style style:class="text" style:family="paragraph"
style:name="MyStyle">
      <style:paragraph-properties fo:margin-bottom="0cm"/>
    </style:style>

  content.xml contains

  <text:p text:style-name="MyStyle">This is paragraph #1</text:p>
  <text:p text:style-name="MyStyle">This is paragraph #2</text:p>
  <text:p text:style-name="MyStyle">This is paragraph #3</text:p>
  <text:p text:style-name="MyStyle">This is paragraph #4</text:p>
  <text:p text:style-name="MyStyle">This is paragraph #5</text:p>

Actual result:
  All paragraphs displayed with zero space between

Expected result:
  1cm space above each paragraph (from margin-top=1cm in the default style)

Operating System: Ubuntu
Version: 4.2.0.2 rc

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to