5 open ( PROPS
, $ARGV0 ) || die "can't open properties source file: $!";
12 $_ =~ /^[A-Z][a-zA-Z0-9]*$/ or die "invalid character in property '$_'";
18 open ( HXX
, ">$ARGV1" ) or die "can't open properties.hxx file: $!";
19 open ( WORDS
, ">$ARGV2" ) or die "can't open propertynames.inc file: $!";
21 print ( HXX
"#ifndef OOX_PROPERTIES_HXX\n" );
22 print ( HXX
"#define OOX_PROPERTIES_HXX\n\n" );
23 print ( HXX
"#include <sal/types.h>\n" );
24 print ( HXX
"namespace oox {\n\n" );
26 print ( WORDS
"static const sal_Char* propertywordlist[] = {\n" );
29 foreach( sort( keys( %props ) ) )
31 print ( HXX
"const sal_Int32 $props{$_} = $i;\n" );
32 print ( WORDS
" \"$_\",\n" );
36 print ( HXX
"const sal_Int32 PROP_COUNT = $i;\n" );
37 print ( HXX
"const sal_Int32 PROP_INVALID = -1;\n\n" );
38 print ( HXX
"} // namespace oox\n" );
39 print ( HXX
"#endif\n" );
41 print ( WORDS
" \"\"\n" );
42 print ( WORDS
"};\n" );