summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnurag Jain <anuragjainfzd@gmail.com>2011-06-06 15:12:36 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-06-06 15:12:36 -0400
commit34c374a69dcce7fe669dedec7eaa36b6c2db4ca5 (patch)
treed831c03ec336eac0f8717d4834fe1ad7269171e3
parent17114c1d598f4127e99bb771b120dabee2649a3b (diff)
Display one line at a time in single-line mode.
-rw-r--r--sc/source/ui/app/inputwin.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index db934bd61..fdbd33d2a 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)));
}
}