Friday 28 November 2014

LibreOffice Coverity Defect Density 0.00

So today's statistics for the latest coverity run over LibreOffic:

LibreOffice:  5,973,881 lines of code in Selected Components and 0.00 defect density

Defect density is measured by the number of defects per 1,000 lines of code, identified by the Coverity platform
11,751 Total defects, 21 Outstanding, 331 Dismissed, 11,399 Fixed
That's the dashboard reported figure. There are 21 unresolved warnings at the moment which works out at a true defect density of 0.003515303, we're in rounding to 0 territory. I reckon 11 of the remaining are really false positives but I'd still like to figure out how to "wiggle" the code to get their data validity check detected correctly.

Friday 7 November 2014

LibreOffice Coverity Defect Density 0.02

Coverity Defect Density: LibreOffice vs Average

We run LibreOffice through Coverity approximately once a week. According to Coverity's overview dashboard our current status is:

LibreOffice: 7,271,857 line of code and 0.02 defect density

Open Source Defect Density By Project Size

Line of Code (LOC) Defect Density
Less than 100,0000.35
100,000 to 499,9990.5
500,000 to 1 million0.7
More than 1 million0.65
Note: Defect density is measured by the number of defects per 1,000 lines of code, identified by the Coverity platform. The numbers shown above are from our 2013 Coverity Scan Report, which analyzed 250 million lines of open source code.
The "lines of code" here is 7,271,857 vs 9,500,825 in older reports because I'm now building against system-libraries instead of building those in-tree in order to speed up the process. Those "external" libraries have always been marked as "ignore in analysis" in coverity so that change has no effect on the defect density of our own code.

If anyone knows how we could rework our code or otherwise automatically silence https://communities.coverity.com/thread/2993 that would be great. This false positive keeps cropping up in uses of uno::Sequence so they keep popping up.

We're now at that happy place where we are getting a very small and manageable number of actually new warnings in "really" modified code each run rather than getting the same old one again and again as general refactoring perturbs the code enough that they get newly detected.

Thursday 6 November 2014

Select and toggle off master elements directly via delete

Toggle off master elements directly via delete

To remove footer, header, date/time and sheetnumber master elements in LibreOffice the user has to toggle them off via view->master->master elements. Actually selecting the corresponding placeholder preview of the element in master view and pressing delete doesn't do anything.

In LibreOffice 4.4 this infuriating behavior is changed and LibreOffice will do the right thing and toggle off any selected master elements when you press delete

Tuesday 16 September 2014

Master Document Templates

Writer has long had Master Documents. A master document lets you manage large documents, such as a book with many chapters. One odt per chapter, bundled into a single document via a master odm

LibreOffice 4.4 introduces Master Document Templates. What that means is that these Master Document Templates can be added to the Template Manager and from there you can create a new Master Document (odm) based on a Master Document Template (otm). The new odm of course having the same initial content as the Template it is based upon.

Thanks to Máirín Duffy (of Red Hat, Inc.) for prompting this feature. Any failures in execution are mine however.

Saturday 13 September 2014

More Font Support

Playing around with some Mac OS X fonts under Linux I noticed that LibreOffice wasn't listing a lot of them despite fontconfig announcing their existence. A little digging and some very small tweaks means that we now have mac ttf fontname encoding support along with support for version 2 ttc fonts. This is more fixing some oversights (version 2 of ttc came into existence after the ttc support was added so there was a "only if version is 1" condition) than implementing anything particularly new, but now LibreOffice under Linux works with a lot more ttf/ttc/otf fonts than it did before.

Tuesday 9 September 2014

change image option in writer context menu

Change Image in Writer

Thanks to Jennifer Liebel, writer now has a change image option in its graphic context menu like Impress/Draw.

Wednesday 3 September 2014

aarch64 libreoffice


Thanks to Stephen Bergmann of Red Hat, Inc. LibreOffice is now ported to aarch64. No new ports for years, and then two 64bit ports landed within a week of aarch64 and ppc64le.

Friday 22 August 2014

ppc64le libreoffice

LibreOffice is now ported to ppc64le. make passes, testtools passes and the resulting application is capable of headlessly converting documents to pdf. There's no reason to think it's any less capable of anything else as any other port but I don't actually have a ppc64le and transatlantic ssh tunnels aren't conducive to extensive UI testing.

The tricky bit of the port as always is the uno bridge, especially because the ABI was changed for little endian

https://bugs.openjdk.java.net/browse/JDK-8035647 is handy to get the links to the original elf v2 abi change commits to gcc/libffi

https://ghc.haskell.org/trac/ghc/ticket/8965 is handy to get a friendlier translation of the change where if gcc can see that the arguments to the function to be called will fit in registers then no argument save area is created which stumped me for a while

Friday 15 August 2014

dialog conversion status, 4 to go

http://magazine.uc.edu/issues/0509/rabbi.html

Converting LibreOffice dialogs to .ui format, 4 left

I should go on vacation more often. On my return I find that Palenik Mihály and Szymon Kłos, two of our GSOC2014 students, have now converted all but 4 of LibreOffice’s classic fixed widget size and position .src format elements to the GtkBuilder .ui format.

Here's the list of the last four. One (monster) whose conversion is in progress, one that should ideally be removed in favour of a duplicate dialog and two that have no known route to display them. Hacking the code temporarily to force those two to appear is probably no biggy.


Current conversion stats are:
820 .ui files currently exist
There are 3 unconverted dialogs
There are 1 unconverted tabpages
An estimated additional 4 .ui are required
We are 99% of the way through.

What's next, well *cough*, the above are all the dialogs and tabpages in the classic .src format. There are actually a host of ErrorBox, InfoBox and QueryBox that exist in the .src format as well.

These take just two pieces of information, a string to display and some bits that set what buttons to show, e.g. cancel, close, ok + cancel, etc. We want to remove them in favour of the Gtk-alike MessageDialog, but we don't want to actually convert them to .ui format, because they are so simple it makes more sense to just reduce them to strings like this sample commit demonstrates. This might even be possible to at least somewhat automate.

I've now updated count-todo-dialogs to display the count of those *Box elements that exist in src file format, but I'll elide the count of them until the last 4 true dialogs+tabpages are gone.

Friday 25 July 2014

Dialogs and Coverity, current numbers

Army massing

Converting LibreOffice dialogs to .ui format, 54 conversions remaining

We've now converted all but 54 of LibreOffice’s classic fixed widget size and position .src format elements to the GtkBuilder .ui format. This is due to the much appreciated efforts of Palenik Mihály and Szymon Kłos, two of our GSOC2014 students, who are tackling the last bunch of hard to find or hard to convert ones.

Current conversion stats are:
778 .ui files currently exist
There are 20 unconverted dialogs
There are 34 unconverted tabpages
An estimated additional 54 .ui are required
We are 93% of the way through.

Coverity Defect Density: LibreOffice vs Average

According to Coverity's overview dashboard our current status is:

LibreOffice: 9,425,526 line of code and 0.09 defect density

Open Source Defect Density By Project Size

Line of Code (LOC) Defect Density
Less than 100,0000.35
100,000 to 499,9990.5
500,000 to 1 million0.7
More than 1 million0.65
Note: Defect density is measured by the number of defects per 1,000 lines of code, identified by the Coverity platform. The numbers shown above are from our 2013 Coverity Scan Report, which analyzed 250 million lines of open source code.

Thursday 3 July 2014

LibreOffice Coverity Defect Density

Coverity Defect Density: LibreOffice vs Average

We run LibreOffice through Coverity approximately once a week. According to Coverity's overview dashboard our current status is:

LibreOffice: 9,500,825 line of code and 0.13 defect density

Open Source Defect Density By Project Size

Line of Code (LOC) Defect Density
Less than 100,0000.35
100,000 to 499,9990.5
500,000 to 1 million0.7
More than 1 million0.65
Note: Defect density is measured by the number of defects per 1,000 lines of code, identified by the Coverity platform. The numbers shown above are from our 2013 Coverity Scan Report, which analyzed 250 million lines of open source code.

So any crashes you might experience in 4.3 are either a figment of your imagination or a sad commentary on the limitations of static code analysis.

Friday 27 June 2014

scrolling the sidebar with the scroll-wheel

The sidebar comes with a vertical scrollbar for when content doesn't fit in the available space. But the mouse pointer has to be right over the scrollbar to use your scroll wheel, it doesn't work to hover over the content of the sidebar and move the wheel there.

Which is annoying, but on trying to fix that I realized the snag with allowing the wheel-scroll over the sidebar. If you scroll the sidebar down and a widget contained in it ends up under the mouse pointer then if it is a widget which accepts the wheel-scroll it's very easy to accidentally make a change to the widget that has scrolled under the mouse pointer. Spin Buttons for example.

As an aside, this is the exact same problem that I have in glade where I scroll down the property pane with the scroll-wheel and accidentally end up over the "Ellipsize" listbox and inadvertently change it from None to Middle. So if you find labels in LibreOffice with "..." in the middle of them for no good reason, this is why.

Anyway, I still want to scroll the sidebar, but I don't want to end up with this conflicting target-location widget wheel-scroll conflict, so my solution is to continue to send the wheel-scroll events to the previous target so long as the position of the mouse pointer is at the same place as the last wheel event and the time between events is <= the default timeout for raising help tips, i.e. 1/2 a second.

Seems to work well for me, scrolling the sidebars "just works" on master (LibreOffice 4.4) with the scroll wheel without random changes to any scroll-wheel sensitive contents but you can still use the scroll-wheel to modify those widgets on moving to them or when the little timeout completes.

Wednesday 18 June 2014

dialog conversion status, 99 to go

 Converting LibreOffice dialogs to .ui format, 99 conversions remaining

We've now converted all but 99 of LibreOffice’s classic fixed widget size and position .src format elements to the GtkBuilder .ui format. This is due to the much appreciated efforts of Palenik Mihály and Szymon Kłos, two of our GSOC2014 students, who are tackling the last bunch of hard to find or hard to convert ones.


Current conversion stats are:
741 .ui files currently exist
There are 46 unconverted dialogs
There are 53 unconverted tabpages
An estimated additional 99 .ui are required
We are 88% of the way through.

Monday 12 May 2014

selected and unselected slides with mouse over

It will be possible in LibreOffice Impress 4.3 to distinguish between selected and unselected slides when the mouse over highlight activates.

I mean, in previous versions, slide 2 here is drawn the same, when the mouse is over it in the slide pane, regardless of whether it is selected or unselected

 While in 4.3 the two modes are drawn respectively as

There's also a little subtle gradient added in for good measure.

Thursday 8 May 2014

fit slide to window statusbar icon

LibreOffice 4.3 Impress now has a "Fit slide to window" icon in the statusbar alongside the zoom slider.
Additionally when you change zoom the slide now automatically centers itself. Hopefully the addition of the one-click to fit slide to window and the automatic centering on zoom-change will successfully address some of the complaining I've heard about the suffering that scrolling a slide causes.

Wednesday 23 April 2014

format all comments

As part of our series of trying to solve in-house needs LibreOffice 4.3 will have a "format all comments" feature to change the character properties of all comments in a document.

Wednesday 16 April 2014

Printing comments in margins

Because a fellow RedHat employee requested it on Friday, LibreOffice Writer 4.3 will be able to print comments in the margin effectively as they appear on screen, which should take care of the old fdo#36815 feature request. There is now an additional "place comments in margin" option in the print dialog (and writer print options). On screen the comments are placed outside the real page area, so to actually get them onto the paper when printing, the contents of the page needs to be scaled down by approximately 75% of its original size to make space to fit the comments in.

Here's the additional comment place option in the print dialog

Here's some sample pdf output

Friday 28 March 2014

700 conversion target reached


Pushed through the 700 widget conversion barrier this week. The FindDialogs wiki page has helped quite a bit. There remains quite a few blanks in there though, so help still needed to identify the route to launch those unknown dialogs and tabpages via the UI.

Of the newly identified ones I'm a little amused by RID_OFAPAGE_SMARTTAG_OPTIONS which (we think) can only be seen when a smart tags extension is installed. Is there a known working extension out there that enables this to be shown when installed ?

Trivia titbit: we have converted eight different passwords dialogs. And there remains one unconverted one whose route to being launched is currently unknown

Current conversion stats are:
706 .ui files currently exist
There are 67 unconverted dialogs
There are 68 unconverted tabpages
An estimated additional 135 .ui are required
We are 83% of the way through.

Wednesday 5 March 2014

FindingTheBlastedLastBunchOfDialogs

I'm finding it a fairly slow process to find the last 175 dialogs/tabpages in the LibreOffice UI. I have the full list of identifiers, and it's generally not a difficult process to find how to activate any individual dialog from the UI but in the aggregate it takes time and breaks the development flow if I have to stop/start to find the next one to convert.

So, you can help :-) This FindDialogs wiki page contains the list of identifiers and some hints as to how to find them in the source and in the help documentation. That's generally sufficient to determine what dialog they describe and how to launch it.

Filling out those remaining blank "how to activate" entries will speed up the conversion process.

Thursday 13 February 2014

dialog conversion status, 190 to go

  Converting LibreOffice dialogs to .ui format, 190- conversions remaining

We've now converted 77% of LibreOffice’s classic fixed widget size and position .src format elements to the GtkBuilder .ui format.

Using the guesstimate tool ./bin/count-todo-dialogs the current status is:

666 .ui files currently exist
There are 96 unconverted dialogs
There are 93 unconverted tabpages
An estimated additional 189 .ui are required
We are 77% of the way through.


What makes this mini-milestone interesting to me is that there are less that 200 to go now, and there are less than 100 of each of the two categories of elements remaining.

The latest of this latest bunch of conversions is the conversion of the pivot table dialog which has the side effect that the pivot table dialog now fits into a 768 pixel tall netbook screen when in expanded mode.

Wednesday 5 February 2014

FOSDEM2014

My FOSDEM2014 LibreOffice .ui format a11y notes for developers presentation is available now. Basic notes on the importance of setting mnemonics and how to migrate pre-existing accessibility relations out of explicit c++ code and into GtkBuilder a11y markup.

Wednesday 15 January 2014

Long Writer Paragraphs

Now that the huge work of removing and replacing UniString is complete and LibreOffice 4.2 has branched off. Now is a good time to remove the 16bit limits in Writer that continued to limit its paragraph length to 65535 chars. So I pushed today to master (4.3) the final set of changes to remove that limitation. Above is a screenshot showing the result. A writer document with a single paragraph containing > 100,000 characters.

This improves compatibility with MSWord which had no 64k limit on its paragraph length, which forced the importer to split over-long paragraphs into two or more. And this also addresses the long outstanding feature request to support long paragraphs in writer in order to support the custom in some locales (Brazil, others?) where there is apparently a requirement to record minutes of certain classes of meetings in a single paragraph.

Wednesday 8 January 2014

622 Conversions, 70% complete

http://en.wikipedia.org/wiki/Sisyphus

Converting LibreOffice dialogs to .ui format, 600+ conversions milestone

In the ongoing Sisyphean rework of LibreOffice dialogs and other UI things, we’ve now converted 70% of LibreOffice’s classic fixed widget size and position .src format elements to the GtkBuilder .ui format.

Using the guesstimate tool ./bin/count-todo-dialogs the current status is:

622 .ui files currently exist
There are 130 unconverted dialogs
There are 104 unconverted tabpages
An estimated additional 234 .ui are required