[Libreoffice-commits] .: 2 commits - sc/source
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Sat Aug 4 06:40:49 PDT 2012
sc/source/ui/app/inputwin.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 8e9f9afbe6eb9d676e678f208db48f30a6561af1
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 4 17:29:06 2012 +0400
calc input line: don't reset the scrollbar thumb on resize
Change-Id: I78d5bb455e8d175cf3813e24854a76407931a0e3
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f107349..65b1a0d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -976,9 +976,6 @@ void ScInputBarGroup::Resize()
aScrollBar.SetLineSize( aMultiTextWnd.GetTextHeight() );
aScrollBar.SetRange( Range( 0, aMultiTextWnd.GetEditEngTxtHeight() ) );
- if ( aMultiTextWnd.GetEditView() )
- aScrollBar.SetThumbPos( 0 );
-
aScrollBar.Resize();
aScrollBar.Show();
}
commit 5081ea1a076c61c01ae3837aa2396501860ae4e9
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 4 17:26:59 2012 +0400
calc input line: don't leave an empty area at the bottom if possible
Change-Id: Iaaf82ee6b79d091c349a501f3a09e760c295546f
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d819e0c..f107349 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -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 ) ) );
}
More information about the Libreoffice-commits
mailing list