diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-15 17:25:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-15 18:08:16 +0200 |
commit | a55e2d2a27ac2e2ed7ee439079914d8086610309 (patch) | |
tree | 9ff76f69a90f0d7d8ed71a6d75ea66c7b1b131bb /oox | |
parent | b1017281562a0b6e35fb17bc2af5585411a0dacd (diff) |
oox: tabs to spaces in generatePresetsCXX.pl
Change-Id: Icc8edbc9d49c4f48dbe9521627dbf5d4e602ffda
Diffstat (limited to 'oox')
-rwxr-xr-x | oox/source/drawingml/customshapes/generatePresetsCXX.pl | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/oox/source/drawingml/customshapes/generatePresetsCXX.pl b/oox/source/drawingml/customshapes/generatePresetsCXX.pl index 7ff58b3d47a4..2ce96f58d8b3 100755 --- a/oox/source/drawingml/customshapes/generatePresetsCXX.pl +++ b/oox/source/drawingml/customshapes/generatePresetsCXX.pl @@ -9,59 +9,59 @@ sub loadSourceCode() { - open (IN, "<custom-shapes.log"); - - my %sources; - - while (<IN>) - { - if (/==cscode== /) - { - if (/shape name: '/) - { - chop; - s/.*shape name: '([^']+)'.*/$1/; - $name = $_; - } - else - { - if (/==cscode== begin/) - { - $inside = true; - @code = (); - } - else - { - if (/==cscode== end/) - { - s/^ <\/([^>]+)>/$1/; - undef $inside; - $sources{$name} = [ @code ]; - #print "added ", $name, "\n"; - } - } - } - } - else - { - if ($inside) - { - push @code, $_; - } - } - } - - close (IN); - - return \%sources; + open (IN, "<custom-shapes.log"); + + my %sources; + + while (<IN>) + { + if (/==cscode== /) + { + if (/shape name: '/) + { + chop; + s/.*shape name: '([^']+)'.*/$1/; + $name = $_; + } + else + { + if (/==cscode== begin/) + { + $inside = true; + @code = (); + } + else + { + if (/==cscode== end/) + { + s/^ <\/([^>]+)>/$1/; + undef $inside; + $sources{$name} = [ @code ]; + #print "added ", $name, "\n"; + } + } + } + } + else + { + if ($inside) + { + push @code, $_; + } + } + } + + close (IN); + + return \%sources; } sub startSource { - my $count = shift; + my $count = shift; - open (OUT, ">customshapepresets" . $count . ".cxx"); - print OUT << "EOS" + open (OUT, ">customshapepresets" . $count . ".cxx"); + print OUT << "EOS" // This file was generated by: $0 @@ -123,17 +123,17 @@ sub generateSource my @classes = (); foreach $shape (sort(keys %$sources)) { - push @classes, $shape; - print OUT "class ShapeC".$shape." : public CustomShapeProvider\n"; - print OUT "{\n"; + push @classes, $shape; + print OUT "class ShapeC".$shape." : public CustomShapeProvider\n"; + print OUT "{\n"; print OUT " virtual PropertyMap getProperties() SAL_OVERRIDE\n"; - print OUT " {\n"; - print OUT " PropertyMap aPropertyMap;\n\n"; - print OUT @{$sources->{$shape}}; - print OUT " aPropertyMap.setProperty( PROP_Type, OUString(\"ooxml-", $shape, "\"));\n\n"; - print OUT " return aPropertyMap;\n"; - print OUT " }\n"; - print OUT "};\n"; + print OUT " {\n"; + print OUT " PropertyMap aPropertyMap;\n\n"; + print OUT @{$sources->{$shape}}; + print OUT " aPropertyMap.setProperty( PROP_Type, OUString(\"ooxml-", $shape, "\"));\n\n"; + print OUT " return aPropertyMap;\n"; + print OUT " }\n"; + print OUT "};\n"; print OUT "\n"; print OUT "// This is a generated source file. DO NOT EDIT.\n"; print OUT "\n"; @@ -143,10 +143,10 @@ sub generateSource if ($shCount >= 35) { $shCount = 0; - endSource ($count, \@classes); - close OUT; - startSource (++$count); - @classes = (); + endSource ($count, \@classes); + close OUT; + startSource (++$count); + @classes = (); } } |