[Libreoffice] [GSOC][PATCH] Multiline inputbar

Noel Power nopower at novell.com
Fri Jun 24 07:23:51 PDT 2011

Hi Anurag
On 22/06/11 15:51, Anurag Jain wrote:
> Hi Noel,
> Resending the patch again along with the source files here.
as mentioned on Wed on iRC I pushed the patch to the feature branch. I 
had hoped to see the latest changes you made to correct the control size 
problem that I identified that was preventing your new control from 
being displayed before reviewing the patch further, I am not *that* 
familiar with libreoffice ui bits and pieces and was hoping to have 
something to run to test. Additionally on IRC it wasn't clear how you 
now were calcuating the the ScInputBarGroup width, I'd like to have seen 
the code for that

Anyway some comments on what is there so far, I think the 
ScInputBarGroup is taking shape, clearly it's very rough at this stage 
(  understandable since you had problems getting it to show ). One thing 
I would suggest here to
a) change the name of ScTextWindow to something like ScMultiLineTxtWin ( 
or any other suitable name )
b) restore the orig ScTextWindow class

I suggest this because it is intended when the gsoc code is initially 
integrated that it be configurable and for this reason it probably makes 
sense to preserve the original ScTextWindow class and distinguish it 
from your new implementation. This will make maintenance easier.
Then next thing to concentrate on is getting the multi-line textbox 
functionality to work and to make that behaviour switchable. I believe 
Kohei suggested adding a button to the ScInputBarGroup window. So, you 
need to be able to detect the button click and switch the state of the 
bIsMultiLine flag that you have already added ( presumably for this 
purpose ) please do a grep for PushButton & SetClickHdl in sc for sample 
code for handling the button.
When you get a button click you will need to resize your 
InputBarGroupbox window based on the new state of the bIsMultiLine flag 
and of course increase the height in multiples of the calculated height 
of a single line. e.g. in Multiline mode the ScInputGroupBox height 
should be some multiple of the calculated singleline height ( maybe 10 
as a default ? ) Of course the size of the ScMultiLineTxtWin (let's call 
it that for now but please rename it as you wish ) window needs to also 
be adjusted and everything resized. I would do this first before 
worrying about scrollbar behaviour.


More information about the LibreOffice mailing list