Bug #1052
RichEdit::Print() fails when RichEdit is Floating()
Status: | New | Start date: | 05/05/2015 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Miroslav Fidler | % Done: | 0% | |
Category: | RichEdit | Spent time: | - | |
Target version: | - |
Description
When printing RichEdit(), if Floating() is set, print is shifted to the middle of the page.
How to test:
- Open UWord and add editor.Floating(1); in UWord constructor
- Writ something and press Print
Reason:
RichEdit::Print() calls UPP::Print() with pagesz. Unfortunately when calling Floating(), RichEdit::Layout() does a SetPage() with cy = INT_MAX , so RichEdit::Print() shifts the printing.
Quick and dirty solution:
Set return UPP::Print(text, Size(3968, 6074)/*pagesz*/, cursorc.page); in RichEdit::Print()