[Libreoffice] [PATCH] Added line numbers to the basic ide

Noel Power nopower at suse.com
Mon Nov 14 11:17:46 PST 2011


On 14/11/11 17:17, Noel Power wrote:
> ok, since let me try and help with this, I am trying to add the menu  
> and some supporting code to tie that in, when I have it done I hope 
> you can take the patch and look at dynamically displaying/undisplaying 
> the linenumbers. Perhaps as a start you could assume the ComplexEditor 
> will be constructed with no line numbers displayed ( e.g. the 
> linenumberwindow should not be shown ) You could add a method void 
> ComplexEditor::SetLineNumberDisplay( bool ) which would show/hide the 
> linenumber windows and do/call whatever resizing magic that needs to 
> happen. How does that sound?
>
> Noel
The attached patch adds the menu item, there is a new method 
BasicIDEShell::SourceLinesDisplayed() that you could use in the 
ComplexEditor constructor to decide if linenumbers are shown are not ( 
no need now to assume they are not shown ). There is also some handling 
code 'commented out' when the 'View | Display Source Line Numbers ' menu 
option is selected. That commented out code will call 
ModuleWindow::SetLineNumberDisplay( bool ) You need of course to create 
that method and tunnel the call to the 
ComplexEditor::SetLineNumberDisplay() method.... or something similar.

hth,

Noel

p.s. if you manage to get line number to toggle nicely probably there is 
no need to put this in the feature branch be we could just commit it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: menu.diff
Type: text/x-patch
Size: 6334 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111114/adbf06cc/attachment.bin>


More information about the LibreOffice mailing list