Kaydet (Commit) 5081ea1a authored tarafından Ivan Timofeev's avatar Ivan Timofeev

calc input line: don't leave an empty area at the bottom if possible

Change-Id: Iaaf82ee6b79d091c349a501f3a09e760c295546f
üst 769e2b59
......@@ -1197,8 +1197,16 @@ void ScMultiTextWnd::Resize()
if(pEditView)
{
Size aOutputSize = GetOutputSizePixel();
Rectangle aOutputArea = PixelToLogic( Rectangle( Point(), aOutputSize ));
pEditView->SetOutputArea( aOutputArea );
// Don't leave an empty area at the bottom if we can move the text down.
long nMaxVisAreaTop = pEditEngine->GetTextHeight() - aOutputArea.GetHeight();
if (pEditView->GetVisArea().Top() > nMaxVisAreaTop)
{
pEditView->Scroll(0, pEditView->GetVisArea().Top() - nMaxVisAreaTop);
}
pEditView->SetOutputArea( PixelToLogic( Rectangle( Point(), aOutputSize ) ) );
pEditEngine->SetPaperSize( PixelToLogic( Size( aOutputSize.Width(), 10000 ) ) );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment