Reviewing merge request #1642: Add number prefix and suffix to QTextListFormat

This patch implements suffix and prefix strings for the numbering in ordered lists. Now you can have lists like

a) item one

b) item two

instead of

a. item one

b. item two

This property is supported by ODF with the num-suffix and num-prefix attributes. HTML import/export is implemented by using Qt CSS property extensions.

Commits that would be merged:

Version 4
  • Version 1
  • Version 2
  • Version 3
  • Version 4
  • 6fc62c4
  • dbc9180
  • Implemented suffix and prefix strings for the numbering in ordered lists as supported by ODF. Works also with HTML import/export by using Qt CSS properties extensions.

Showing 6fc62c4-dbc9180

Comments

Only c348460 should be part of the merge request. This is the only commit I've selected. I don’t know why 36304a7 has become part of the request, is there a bug in Gitorious?

+             QString styleString = "margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;";

maybe styleString should be QLatin1String

or rather using QString::fromLatin1()

+                 numberPrefix.replace('\'', "\\27"); // FIXME: There's a problem in the CSS parser the prevents this from being correctly restored

What is the problem in CSS Parser?

Hi!

What is the problem in CSS Parser?

Please see the comment in tst_QTextList::autoNumberingPrefixAndSuffixHtmlExportImport()


// FIXME: Would like to test “‘” but there’s a problem
// in the css parser (Scanner::preprocess
// is called before the values are being parsed),
// so the quoting does not work.


Btw. This Gitorious thing is getting better all the time!

Best regards

Nils

+             html += QLatin1String("\"");

this quote is too much. the ending quote is aready added in the next line.

I tried the patch, but the test fails.

FAIL!  : tst_QTextList::autoNumberingPrefixAndSuffixHtmlExportImport() 'importCursor.currentList()->itemNumber(importCursor.block()) == 27' returned FALSE. ()
   Loc: [/home/ogoffart/qtdev/src/qt-master/tests/auto/qtextlist/tst_qtextlist.cpp(199)]

It appears the itemNumber is 26, for some reason, maybe related to the quote too much. Or maybe there is another bug in master. Can you investigate?

The \since 4.7 can now be changed to \since 4.8

The double quote caused the test to fail. I've fixed that and the \since 4.8 issue in version 3.

→ State changed from New to Reviewing

→ State changed from Reviewing to Revise and resubmit

Hi,

This merge request is ready to be committed, but unfortunately it has conflicts against the current state of Qt/master. Could you please rebase it and resolve the conflicts? Let me know when this is done, and I’ll merge it.

Hi,

version 4 is now based on master.

Nils

→ State changed from Revise and resubmit to Reviewing

→ State changed from Reviewing to Merged

Add a new comment:

Login or create an account to post a comment

How to apply this merge request to your repository