Hi Kohei,

Have a look into this. I've fixed the display problem with the j and g letters.

On Tue, Jun 7, 2011 at 12:57 AM, Kohei Yoshida <kyosh...@novell.com> wrote:
> Hi Anurag,
>
> On Tue, 2011-06-07 at 00:15 +0530, Anurag Jain wrote:
>> 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.
>
> We talked a bit in IRC but just to let the list know...
>
> This change looks great!  The text gets wrapped and the cursor moves to
> the next line as the line reaches the full width of the input bar.  And
> the up/down arrow keys shifts the cursor to the previous/next line as
> you would expect.  Good work! :-)

Thanks Kohei for the feedback and the motivation. ;)

>
> Now, a minor nit pick is that, the very lower portion of the text
> appears to be cut off.  For instance, when you type 'j', the lower
> portion of the letter is not displayed and it looks like 'i'.  Have you
> tried EditEngine::GetTextHeight() ?  That may give you a more
> appropriate height to use rather than hard-coding it to the 1/4 of the
> height of the input box.
>

Yeah this patch will fix the j and g thing.  Also I'll remove the hard
coding once you let me know about this patch.

> I've checked in this change to your feature branch, though I didn't
> check in those extra blank lines.
>
Yeah I'll take care of such things.
> Kohei
>
> --
> Kohei Yoshida, LibreOffice hacker, Calc
> <kyosh...@novell.com>
>
>

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..b77d7c4 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,4*aSize.Height()/22);
+        Point aPos2(aSize.Width()-5,18*aSize.Height()/22);
         // 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

Reply via email to