3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # Run the script in the core directory to remove all tooltip_markup
11 # properties from the .ui files
13 LOG_FILE
="modified-$(date +%s).log"
17 LINE
=$
(grep -n "<property name=\"tooltip_markup\"" $1 | cut
-f 1 -d ':')
18 TEXT
=$
(grep "<property name=\"tooltip_markup\"" $1)
19 grep -v "<property name=\"tooltip_markup\"" $1 > temp
&& mv temp
$1
20 echo "removed $TEXT from $1 at line $LINE" >> $LOG_FILE
25 LINE
=$
(grep -n "<property name=\"tooltip_markup\"" $1 | cut
-f 1 -d ':')
26 sed "s/tooltip_markup/tooltip_text/g" $i > temp
&& mv temp
$1
27 echo "renamed tooltip_markup from $1 at line $LINE" >> $LOG_FILE
32 TEXT
=`grep "<property name=\"tooltip_text\"" $1`
33 MARKUP
=`grep "<property name=\"tooltip_markup\"" $1`
35 if [[ $MARKUP ]] && [[ $TEXT ]]
37 removeTooltipMarkup
"$1"
39 if [[ $MARKUP ]] && [[ ! $TEXT ]]
41 changeTooltipMarkup
"$1"
49 checkTooltipMarkup
"$i"