This code is auto copied from the foocanvas module by the gnumeric/tools/import-foocanvas script. DO NOT MAKE LOCAL MODIFICATIONS. All patches should be sent upstream.