merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / update / check / transform.pl
blobe925d10a501b729039a3a2799e1c9ca9e5967cc2
2 eval 'exec perl -wS $0 ${1+"$@"}'
3 if 0;
5 #*************************************************************************
7 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 #
9 # Copyright 2008 by Sun Microsystems, Inc.
11 # OpenOffice.org - a multi-platform office productivity suite
13 # $RCSfile: transform.pl,v $
15 # $Revision: 1.3 $
17 # This file is part of OpenOffice.org.
19 # OpenOffice.org is free software: you can redistribute it and/or modify
20 # it under the terms of the GNU Lesser General Public License version 3
21 # only, as published by the Free Software Foundation.
23 # OpenOffice.org is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 # GNU Lesser General Public License version 3 for more details
27 # (a copy is included in the LICENSE file that accompanied this code).
29 # You should have received a copy of the GNU Lesser General Public License
30 # version 3 along with OpenOffice.org. If not, see
31 # <http://www.openoffice.org/license.html>
32 # for a copy of the LGPLv3 License.
34 #*************************************************************************
36 while (<>) {
38 if( /<prop/ ) {
39 $prop = $_;
40 next if( /Text/ || /Bubble/ );
43 if( /<\/prop>/ ) {
44 next if( $prop =~ /Text/ || $prop =~ /Bubble/ );
47 if( /xml:lang/ ) {
48 $lang = $_;
49 $lang =~ s/.*xml:lang=\"//;
50 $lang =~ s/\".*//;
51 chomp $lang;
52 $line = $prop;
53 $line =~ s/\" oor:type/_$lang\" oor:type/;
54 print $line;
55 $line = $_;
56 $line =~ s/ xml:lang=\".*\"//;
57 print $line;
58 $line = $prop;
59 $line =~ s/<prop.*/<\/prop>/;
60 print $line;
61 next;
64 print;