[Libreoffice-bugs] [Bug 133000] FILEOPEN DOCX Indent of numbered paragraphs based on custom style lost

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu May 14 10:22:20 UTC 2020


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

Justin L <jluth at mail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vasily.melenchuk at cib.de

--- Comment #5 from Justin L <jluth at mail.com> ---
Adding Vasily to CC, since he has recently done lots of work here, and should
at least be aware of other work happening in numbering.

I'm am guessing that RES_PARATR_NUMRULES is being swallowed up because the
paragraph style specifies the same list - so the direct formatting is lost.
[Turn off numbering style in CustomStyle paragraph style - the sublevels (which
had direct list formatting) are no longer numbered, but the first level (which
inherited from the style) are still numbered. Go figure.]

There is something funny about the way that the numbering is applied, because
if you simply remove and re-add WWNum1 to CustomStyle numbering, then it looks
fine.

The problem does NOT seem to be with direct formatting of indenting, because
changing the indenting of CustomStyle affects the indenting of the sublevels -
indicating that they are inheriting. So for some reason, the paragraph style
overrides the numbering formatting, even though Writer supposedly prioritizes
the list-style over the para-style. [probably because the list-style itself is
not actually applied, just one specific numbering?]

This "hack" fixes the problem for this specific document.
    if( !IsStyleSheetImport() )
    {
        uno::Any aRules = uno::makeAny( pList->GetNumberingRules( ) );
        rContext->Insert( PROP_NUMBERING_RULES, aRules );
+       rContext->Insert( PROP_NUMBERING_STYLE_NAME, pList->GetStyleName());

-- 
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/20200514/4e160237/attachment.htm>


More information about the Libreoffice-bugs mailing list