[Libreoffice] oox/source/drawingml/customshapepresets.cxx - generated code ...

Michael Meeks michael.meeks at suse.com
Thu Oct 6 06:57:37 PDT 2011

Hi Radek,

	First: I love the feature - this should improve interop. really nicely,
and great to have it in-place :-)

On Thu, 2011-10-06 at 15:12 +0200, Radek Doulík wrote:
> Sorry, should be fixed now. (the .mk file, not the gbuild)

	in general though, I'm not that happy to see >4Mb of generated .cxx
(that apparently builds a similar size of .o) checked into git :-)
-particularly- because I think we can do rather better if we tweak the
generation perl script.

	The problem with 'just tweak it then' is that each time we check in
another different 4Mb of auto-generated code we bloat our git repo. I
appreciate it's harder to gbuild the intermediate.

	it seems it might be nicer to build tables that we interpret with code
at run-time; rather than building code that embodies the data,

            Any aAny ((sal_Int32) 25000);
            aAdjSequence [0].Value = aAny;
            Any aAny ((sal_Int32) 48123);
            aAdjSequence [3].Value = aAny;

	is much smaller as an C array of values, and similarly the sequence

        Sequence< OUString > aStringSequence (61);
        aStringSequence[0] = CREATE_OUSTRING ("min(width,height)");
        aStringSequence[1] = CREATE_OUSTRING ("50000*height/?0 ");
        aStringSequence[2] = CREATE_OUSTRING ("if(0-$1 ,0,if(?1 -$1 ,
$1 ,?1 ))");

	I'd like to think the compiler would evaporate all of this down to
something tiny ;-) but reading the generated assembler I'm not so
convinced ;-)

	Of course, that would trade-off size for speed of initialization -
particularly if we can avoid init'ing all the custom shape presets onto
the heap before using only a subset of them (?).

	How hard would it be to make the auto-generation part of the build, and
to remove the generated cxx ?

	Anyhow - don't let that put a damper on the achievement, the end user
result really looks rather sexy :-) [ any chance you could add this at:
http://wiki.documentfoundation.org/ReleaseNotes/3.5 with before/ after
screenshots ].

	Thanks !


michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list