[Libreoffice-commits] .: Branch 'feature/calc-multiline-input' - 2 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jun 6 20:18:02 PDT 2011
sc/source/ui/app/inputwin.cxx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 21f851bd32d7f7a8a7e89aa9694b1ade7526a75c
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Jun 6 23:17:36 2011 -0400
Removing a TODO comment. This is done.
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index b669360..0fed037 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -802,8 +802,6 @@ void ScTextWnd::Resize()
printf("here %d %d %d\n", nDiff , bSize.Height(), aSize.Height());
Point aPos(TEXT_STARTPOS,nDiff*aSize.Height()/aSize.Height());
Point aPos2(aSize.Width()-5,(aSize.Height()-nDiff)*aSize.Height()/aSize.Height());
- // 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, aPos2)));
}
commit 7449f162745e9940a1d54726feb481a3f75a1446
Author: Anurag Jain <anuragjainfzd at gmail.com>
Date: Mon Jun 6 23:13:37 2011 -0400
Set the correct height based on the actual text height from edit engine.
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index fdbd33d..b669360 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -797,11 +797,11 @@ void ScTextWnd::Resize()
if (pEditView)
{
Size aSize = GetOutputSizePixel();
- 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);
+ Size bSize = LogicToPixel(Size(0,pEditEngine->GetLineHeight(0,0)));
+ int nDiff=(aSize.Height()-bSize.Height())/2;
+ printf("here %d %d %d\n", nDiff , bSize.Height(), aSize.Height());
+ Point aPos(TEXT_STARTPOS,nDiff*aSize.Height()/aSize.Height());
+ Point aPos2(aSize.Width()-5,(aSize.Height()-nDiff)*aSize.Height()/aSize.Height());
// 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(
More information about the Libreoffice-commits
mailing list