U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » RichText,QTF,RTF... » Page break does not work in Style
Page break does not work in Style [message #57759] Thu, 09 December 2021 10:32 Go to previous message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi,

It seems that in RichText/TextStyle.cpp, the marked line below prevents Style Manager item 'Text flow > Break page before' from working. It gets reset here:
void RichText::SetStyle(const Uuid& id, const RichStyle& _style)
{
	Invalidate();
	RichStyle& s = style.GetAdd(id);
	s = _style;
	s.format.styleid = id;
	s.format.language = 0;
	s.format.newpage = false;        << THIS HERE IS THE ONE
	StyleChangeOp op;
	op.nid = op.id = id;
	Update(op);
}

This is the reason, I cannot introduce heading styles that start new chapters automatically on a new page in UWord.

If I comment out this line, there is just one issue: The heading starts on a new page even when this is the first line on the page, and this would obviously leave an unintentional blank page before before the heading in this case.

Best regards,

Tom
 
Read Message
Read Message
Read Message
Previous Topic: How do I set the pagesize (in points or mm) of RichEdit?
Next Topic: Skipping footer/header and page numbering...
Goto Forum:
  


Current Time: Mon Jun 15 12:29:09 GMT+2 2026

Total time taken to generate the page: 0.00560 seconds