From b0f81249a139856cb21ac8de83ae5e5209f6e2d6 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 15 Apr 2014 14:44:57 +0200 Subject: 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 --- oox/source/drawingml/customshapes/README | 5 ----- oox/source/drawingml/customshapes/generatePresetsCXX.pl | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'oox') 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: # -- cgit