Hello Kohei, In this patch I've removed the hard coded values for the height
Thanks and regards. -- Anurag Jain Final yr B.Tech CSE SASTRA University Thanjavur(T.N.)-613402
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index db934bd..130ea63 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -795,11 +795,16 @@ void ScTextWnd::Resize() if (pEditView) { Size aSize = GetOutputSizePixel(); - Point aPos(0, 0); + 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(0,(count-1)*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, aSize))); + PixelToLogic(Rectangle(aPos, aPos2))); } }
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice