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