[Libreoffice-commits] .: Branch 'feature/calc-multiline-input' - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jun 6 12:13:32 PDT 2011
sc/source/ui/app/inputwin.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 34c374a69dcce7fe669dedec7eaa36b6c2db4ca5
Author: Anurag Jain <anuragjainfzd at gmail.com>
Date: Mon Jun 6 15:12:36 2011 -0400
Display one line at a time in single-line mode.
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index db934bd..fdbd33d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -787,7 +787,9 @@ void ScTextWnd::Paint( const Rectangle& rRec )
InitEditEngine(SfxObjectShell::Current());
if (pEditView)
+ {
pEditView->Paint(rRec);
+ }
}
void ScTextWnd::Resize()
@@ -795,11 +797,15 @@ void ScTextWnd::Resize()
if (pEditView)
{
Size aSize = GetOutputSizePixel();
- Point aPos(0, 0);
+ int count = pEditEngine->GetLineCount(0);
+ printf("%d %d\n", aSize.Height() , count);
+ //Point aPos(0,(count-1)*aSize.Height());
+ Point aPos(TEXT_STARTPOS,aSize.Height()/4);
+ Point aPos2(aSize.Width()-5,3*aSize.Height()/4);
// TODO : When in single line mode, set the height to the height of a
// single line, and set the position so that the text look centered.
pEditView->SetOutputArea(
- PixelToLogic(Rectangle(aPos, aSize)));
+ PixelToLogic(Rectangle(aPos, aPos2)));
}
}
More information about the Libreoffice-commits
mailing list