Older blog entries for caolan (starting at number 183)

sgv, StarDraw 2.0 examples with text ?

I wonder if anyone has any sgv documents left around, not svg, but sgv, the StarDraw 2.0 format. Looking for .sgv documents that contain text, and ideally text outside of the ASCII range. A few umlaut’s would probably suffice.

Syndicated 2011-08-08 11:12:50 from Caolan McNamara

unused code, libreoffice style

The return of callcatcher derived lists of unused code list in LibreOffice. I tweaked callcatcher to understand the additional gcc command line options used by the new gbuild module so it can be dropped in as a gcc replacement in that environment.

There’s now a findunusedcode target in the top level Makefile and a cached list of easy to remove methods in the tree as unusedcode.easy. These are non-virtual C++ methods which are not called directly, nor have their address taken by any code in a stock debug level Linux build.

What distinguishes unusedcode.easy from not-easy is simply that the easy list is restricted to C++ name-mangled class-level symbols and so omits any non-mangled C-style symbols which might be dlsymed from some not easy to find entry point.

At a count of 5176 easy unused methods there’s enough there to be getting on with for the moment, and can revisit the C-style symbols with a whitelist of known dlsym names on completion of those.

Syndicated 2011-07-11 12:34:48 from Caolan McNamara

regression testing libreoffice filters

For regression testing LibreOffice filters I’ve now arranged things so that each import filter’s cppunit test comprises of three data dirs, a pass dir, a fail dir and an indeterminate dir. Files in pass must parse without error, those in fail are expected to fail, but fail gracefully by returning an error or throwing an exception, i.e. a crash is a fail on a “fail” test, while “can’t parse” is the expected pass state.

The pass/fail dirs are typically pre-filled in the tree with a small sample of tricky documents which get tested at every build time to ensure they remain working.

indeterminate dirs on the other hand are expected to be empty in the tree, and the cppunit tests don’t care if their contents can be parsed or not, only that they don’t crash. This is really convenient for searching for crashes in a large document collection (horde), given that its an order of magnitude faster than using the full application to load and layout the results.

So I/we can just take a large document horde of e.g. docs and throw them in sw/qa/core/data/ww8/indeterminate and run make -sr in sw and sit back and wait to see if anything in there is a crasher at the parser level. For extra goodness export VALGRIND=memcheck to run the whole lot under valgrind.

FWIW, today anyway

  1. All 3721 attachments of (alleged) mime-type application/msword in openoffice.org’s bugzilla pass without crash when placed into ww8/indeterminate. To be re-run under valgrind later
  2. And all (ok, only 128) attachments of (alleged) mime-type application/msword in freedesktop.org’s bugzilla pass under VALGRIND=memcheck when placed into indeterminate.

I’ve got doc, rtf, qpro, wmf, emf, hwp, lwp and sxw organized and pre-seeded with a sample handful files so far. Plenty more filters than that of course, but .doc is my current focus as the richest vein of available had-bugs-reported documents.

Syndicated 2011-07-11 11:58:27 from Caolan McNamara


I’ve been somewhat remiss, our new baby Naoise being held by his big sister.

Syndicated 2011-06-06 20:56:24 from Caolan McNamara

when cut and paste goes wrong

So, what’s wrong with this picture…

void AnimationNode::acquire( ) throw ()
void AnimationNode::release( ) throw ()

Don’t need to know anything about the code in question to have grave doubts about a “release” method that has the same body as its “acquire” method :-) .

This big old leak in presentation animation nodes is fixed now

Syndicated 2011-05-26 08:25:24 from Caolan McNamara

fixing annoying stuff 2

So Sébastien (Le Ray) strikes again. I like autocorrect, I know a lot hate it, but I generally like it, but it drives me insane when it does the wrong thing, e.g. you type http:// at the start of a sentence, and it autocorrects to Http://. So now it simply doesn’t autocorrect protocols when you type that :. http://, ftp://, etc. now stays as http://, ftp://

Syndicated 2011-02-21 21:36:44 from Caolan McNamara

order styles by natural sort

So, one of those little annoying things. Headings sorted awkwardly.

and now after Sébastien Le Ray’s mods:


Syndicated 2011-02-13 21:44:26 from Caolan McNamara

Small LibreOffice font dropdown list improvements

The current font drop down had a few small annoyances in it, it previews the font by rendering the font’s name in that font itself, but assumes that the same point size in any given font will have the same baseline and height as the default UI font, which leads to misplaced entries and cut-off text, e.g.

The other gripe is the positioning of the extra preview text used if the font is a symbol font or cannot render its own name, e.g.
the positioning of the symbols of OpenSymbol,

So, now (checked into 3.4) the preview is more carefully vertically centred and scaled to fit if necessary. e.g.

Additionally the extra preview text is right aligned (also checked in for 3.4). For extra cunning (to be checked in today) when the font is tuned for rendering a specific script e.g. Arabic or Telugu, then some sample glyphs from that script are shown as extra preview text, seeing as its not massively useful to get an Latin script preview of the fontname which the massive likelihood is that its not really intended for use for that script, effectively guaranteed in the case that it doesn’t even have sufficient glyphs in it to render its own name. In most cases the string for each script is hopefully that scripts major language’s translation/equivalent to “Alphabet” or some such.

Syndicated 2011-02-09 14:25:00 from Caolan McNamara

Samsung Wave S8500 with Samsung Bada OS

I’ve now received my 20th near identical spam mail about “I recently bought a Samsung Wave S8500 with Samsung Bada OS when will your software be available for it”. I beginning to feel a deep dislike of the device and its OS. A word to the wise, If this is a guerilla marketing attempt, then it’s going badly wrong.

Syndicated 2010-10-21 15:24:23 from Caolan McNamara

STL Performance comparison, gcc 4.5.1 vs STLPort 4.5

Taking Alan Ning STL performance comparison of VC9, VC10 and STLPort I converted it over for Linux (available here) and compared the built in STL of gcc 4.5.1 on x86_64 versus STLPort 4.5 both at -O2. Tests and test-descriptions below are lifted directly from Alan. Times are actually in milliseconds, not seconds, but I didn’t bother regenerating the graph legends.

Lower bars are better, hardware is an i7 with 6 gigs memory.

The test for vector involves three operations – insertion, iterator traversal, and copy.

Native STL consistently faster.

Native STL consistently faster.

The test for string involves three operations – string copy, substring search, and concatenation.

Native STL apparently worse with strings with approx more than 3200 characters.

Native STL typically slower.

The test for map involves insertion, search, and deletion.

Native STL typically worse with maps over 200 elements.

Native STL typically faster.

The test for Deque comes with a twist. The deque is implemented is as a priority queue through make_heap(), push_heap() and pop_heap(). Random items are inserted and removed from the queue upon each iteration.

Native STL faster.

Native STL faster.

In general the gcc STL looks comparatively good with the exception of large maps.

Syndicated 2010-10-12 10:14:09 from Caolan McNamara

174 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!