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
15 LOG_FILE
="modified-$(date +%s).log"
19 LINE
=$
(grep -n "<property name=\"tooltip_markup\"" $1 |
$CUT_BIN -f 1 -d ':')
20 TEXT
=$
(grep "<property name=\"tooltip_markup\"" $1)
21 grep -v "<property name=\"tooltip_markup\"" $1 > temp
&& mv temp
$1
22 echo "removed $TEXT from $1 at line $LINE" >> $LOG_FILE
27 LINE
=$
(grep -n "<property name=\"tooltip_markup\"" $1 |
$CUT_BIN -f 1 -d ':')
28 $SED_BIN "s/tooltip_markup/tooltip_text/g" $i > temp
&& mv temp
$1
29 echo "renamed tooltip_markup from $1 at line $LINE" >> $LOG_FILE
34 TEXT
=`grep "<property name=\"tooltip_text\"" $1`
35 MARKUP
=`grep "<property name=\"tooltip_markup\"" $1`
37 if [[ $MARKUP ]] && [[ $TEXT ]]
39 removeTooltipMarkup
"$1"
41 if [[ $MARKUP ]] && [[ ! $TEXT ]]
43 changeTooltipMarkup
"$1"
51 checkTooltipMarkup
"$i"