1: 2eval 'exec perl -wS $0 ${1+"$@"}' 3 if 0; 4 5#************************************************************************* 6# 7# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8# 9# Copyright 2000, 2010 Oracle and/or its affiliates. 10# 11# OpenOffice.org - a multi-platform office productivity suite 12# 13# This file is part of OpenOffice.org. 14# 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. 18# 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). 24# 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. 29# 30#************************************************************************* 31 32while (<>) { 33 34 if( /<prop/ ) { 35 $prop = $_; 36 next if( /Text/ || /Bubble/ ); 37 } 38 39 if( /<\/prop>/ ) { 40 next if( $prop =~ /Text/ || $prop =~ /Bubble/ ); 41 } 42 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; 58 } 59 60 print; 61}