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)));
}
}
Context
- [Libreoffice] [GSOC][patch] Multiline inputbar · Anurag Jain
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.