Hello Kohei,
I was able to figure out how to make the text appear properly in the
inputbar when in single line mode. I'm sending my patch over here.
Please have a look into it and let me know about further improvements
that can be done.
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..044fcb7 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -787,19 +787,29 @@ void ScTextWnd::Paint( const Rectangle& rRec )
InitEditEngine(SfxObjectShell::Current());
if (pEditView)
+ {
+
pEditView->Paint(rRec);
+
+ }
}
+
+
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)));
}
}
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice