diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-15 14:44:57 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-15 14:50:55 +0200 |
commit | b0f81249a139856cb21ac8de83ae5e5209f6e2d6 (patch) | |
tree | 54b9173431494dd0363ed220d1510ea7543cd601 /oox | |
parent | 4d3192661e386df577846e890ae634a1c15c7fa5 (diff) |
oox: sort drawingml custom shape preset output
So running the script multiple times give stable output. Also adatpt the
script to write SAL_OVERRIDE, so running the script doesn't effectively
revert those addotations.
Change-Id: Iedcef3af15534d024b6b4173b60c42d852dfdbaa
Diffstat (limited to 'oox')
-rwxr-xr-x | oox/source/drawingml/customshapes/README | 5 | ||||
-rwxr-xr-x | oox/source/drawingml/customshapes/generatePresetsCXX.pl | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/oox/source/drawingml/customshapes/README b/oox/source/drawingml/customshapes/README index fe1156e1a196..23765205dd60 100755 --- a/oox/source/drawingml/customshapes/README +++ b/oox/source/drawingml/customshapes/README @@ -51,9 +51,4 @@ mv oox/source/drawingml/customshapes/customshapepresets*.cxx oox/source/drawingm echo echo "To see what has been done, run git diff --patience oox/source/drawingml" echo -echo "The generatePresetsCXX.pl doesn't sort the classes by name (it uses just" -echo "the keys function on a hash which returns the keys in an unspecified" -echo "order), so there will almost always be some random re-ordering of" -echo "classes, sigh." -echo diff --git a/oox/source/drawingml/customshapes/generatePresetsCXX.pl b/oox/source/drawingml/customshapes/generatePresetsCXX.pl index e3e331617b28..7ff58b3d47a4 100755 --- a/oox/source/drawingml/customshapes/generatePresetsCXX.pl +++ b/oox/source/drawingml/customshapes/generatePresetsCXX.pl @@ -121,12 +121,12 @@ sub generateSource startSource (++$count); my @classes = (); - foreach $shape (keys %$sources) + foreach $shape (sort(keys %$sources)) { push @classes, $shape; print OUT "class ShapeC".$shape." : public CustomShapeProvider\n"; print OUT "{\n"; - print OUT " virtual PropertyMap getProperties()\n"; + print OUT " virtual PropertyMap getProperties() SAL_OVERRIDE\n"; print OUT " {\n"; print OUT " PropertyMap aPropertyMap;\n\n"; print OUT @{$sources->{$shape}}; @@ -169,3 +169,5 @@ EOS } generateSource (loadSourceCode ()); + +# vim:set ft=perl shiftwidth=4 softtabstop=4 expandtab: # |