Download it now!
Bug 92722 - Fileopen: RTF Qualifiers on field SEQ not translated.
Summary: Fileopen: RTF Qualifiers on field SEQ not translated.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.5.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: interoperability
Keywords: filter:rtf
Depends on:
Blocks: RTF
  Show dependency treegraph
Reported: 2015-07-14 07:49 UTC by Richard Wordingham
Modified: 2018-07-19 02:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Wordingham 2015-07-14 07:49:01 UTC
The /h and /r0 qualifiers on the Word SEQ field are being ignored.  /h hides the field code result and /r0 resets the sequence to zero.

The RTF content:

{\fonttbl{\f0\fswiss Arial}{\f1\fmodern Courier New}}
{\s0\f0\qj\fs24\sa120 Normal;}
{\s1\f1\ql\fs18\sa0\lang1024 Fixed;}
{\s5\f0\gj\fi-1077\li1077\b1\keep\keepn\tx1080\fs24\sa120\sb120 Heading 2;}
{\s2\f0\gj\fi-1077\li1077\b1\keep\keepn\tx1080\fs24\sa120\sb120 Heading 3;}
{\s3\f0\gj\fi-1077\li1077\i1\keep\keepn\tx1080\fs24\sa120\sb120 Heading 4;}
{\s4\f1\ql\fs11\sa0\lang1024 Fixed Long;}
{\s6\f0\qj\fs11\sa60 Micro;}
{\field{\*\fldinst { SEQ lev1\\c\\* MERGEFORMAT}}{\*\fldrslt {1}}}
.{\field{\*\fldinst { SEQ lev3\\h\\r0\\* MERGEFORMAT}}{\*\fldrslt {}}}
{\field{\*\fldinst { SEQ lev2\\* MERGEFORMAT}}{\*\fldrslt {1}}}
Module int_set\par}

renders as 

0.11	Module int_set

in plain text, not bold text.  (Being plain, not bold, might be a separate bug.)

The second digit should not appear, and if it did, it should be '0'.

The file appears to import correctly into Windows 2007 and 2010, and StarOffice 7.0.  It may also have displayed properly in OpenOffice 3.3 and 3.4, but my notes from 2012 are unclear.

The RTF is generated by my own program, so a small change to the RTF would be an acceptable solution.
Comment 1 Richard Wordingham 2015-07-14 22:37:33 UTC
The version the problem was most recently observed in was the Ubuntu build of Version

This appears not to be solely a bug in the RTF filter.  The apparent translation is of 

{\field{\*\fldinst { SEQ lev3\\h\\r0\\* MERGEFORMAT}}{\*\fldrslt {}}}


<text:sequence text:ref-name="reflev30" text:name="lev3" text:formula="ooow:lev3+1" style:num-format="1">1</text:sequence>

The correct translation would be to:

<text:sequence text:ref-name="reflev30" text:name="lev3" text:formula="ooow:0" style:num-format="">1</text:sequence>

Note the empty string as the value of the num-format attribute in accordance with Section 19.500 of the V1.2 ODF specification.  However, if this is entered manually, LibreOffice spontaneously replaces the empty string by "1".  On loading an RTF file, I have also seen the unwanted digit appear after the surrounding text had already been rendered.  Omitting the num-format attribute has the same problem.  It may be that the main bug is that LibreOffice does not support Section 19.500 of the ODF specification.  Note, however, that the formula attribute is not being calculated correctly.

A work around to the ignoring of the SEQ field's /r qualifier is to put the value to be reset to in the fldrslt destination.  This offers a possible work around - make the resetting field codes into tiny white text.
Comment 2 Aron Budea 2016-12-16 23:06:44 UTC
Let's confirm this, based on the different look in Writer and Wordpad.
Not only it displays as mentioned in the description, font is also wrong (and font selector displays 0 instead of Arial).

Tested with LO 5.3beta2 / Windows 7.
Comment 3 QA Administrators 2018-07-19 02:42:28 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat:

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team