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

--- Comment #5 from Kevin Suo <suokunl...@126.com> ---
I did some debugging.

In function SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet), currently
when calculating the page height (net of the header, footer, top space, bottom
space etc) (strictly speaking it is the height of the text area, should not be
named "page size"), it used the following code:
    sal_Int32 nValue1 = rSize.GetSize().Height() - nDistanceUL -
            rBox.GetDistance(SvxBoxItemLine::TOP) -
                                rBox.GetDistance(SvxBoxItemLine::BOTTOM);

When I change this to:
    sal_Int32 nValue1 = rSize.GetSize().Height() - nDistanceUL -
            rBox.GetDistance(SvxBoxItemLine::TOP) -
                                rBox.GetDistance(SvxBoxItemLine::BOTTOM) - 425;

(i.e. deducting the calculated text area height by 425 twips), then if I set
the page grid to 22 lines then there would be 22 lines perfectly shown on the
page.

As a result, I guess the problem may be that when calculating the text area
height it did not take into account the spaces between the lines, as when you
enlarge the page you will see that there are spaces between each lines. The
exact additional spaces to be deducted should be the height of each space
multiplied by the lines to be displayed on the page.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to