#! /bin/bash # # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Usage: update_pch.sh [precompiled_xxx.hxx] root=`dirname $0` root=`cd $root/.. && pwd` if test -z "$1"; then headers=`ls $root/*/inc/pch/precompiled_*.hxx` else headers="$1" fi for x in $headers; do header=$x echo updating `echo $header | sed -e s%$root/%%` module=`readlink -f $header | sed -e s%$root/%% -e s%/.*%%` name=`echo $header | sed -e s/.*precompiled_// -e s/\.hxx//` makefile="Library_$name.mk" tmpfile=`mktemp` cat "$root/$module/$makefile" | sed 's#\\$##' | \ ( inobjects= ifstack=0 while read line ; do if test "$line" = "))" ; then inobjects= elif echo $line | grep -q -e add_exception_objects -e add_cxxobject -e add_cxxobjects ; then inobjects=1 if test $ifstack -ne 0 ; then echo Sources in a conditional, ignoring for now. >&2 fi elif echo $line | grep -q ^if ; then ifstack=$((ifstack + 1)) elif echo $line | grep -q ^endif ; then ifstack=$((ifstack - 1)) elif test -n "$inobjects" -a $ifstack -eq 0; then file=$line if echo $line | grep -q ", "; then true # $if() probably, or something similar elif ! test -f "$root/$file".cxx ; then echo No file $file in $module/$makefile >&2 else function list_file_includes() ( ifdepth=0 # filter out only preprocessor lines, get the first and second "words" after the #, # also replace " with @ (would cause trouble when doing echo of the line) cat "$1" | grep -E '^\s*#' | sed 's/^\s*#/#/' | sed 's/^\(#\w*\s+\w*\)\s+.*/\1/' | sed 's/"/@/g' | \ while read line; do # skip everything surrounded by any #if if echo "$line" | grep -q "#if" ; then ifdepth=$((ifdepth + 1)) lastif="$line" elif echo "$line" | grep -q "#endif" ; then ifdepth=$((ifdepth - 1)) lastif="#if" elif echo "$line" | grep -q "#include"; then if test $ifdepth -eq 0; then echo $line | sed 's/@/"/g' else echo "#include in $lastif : $line" | sed 's/@/"/g' >&2 fi fi done ) list_file_includes "$root/$file".cxx | sed 's/\(#include [<@][^>@]*[>@]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile fi fi done ) cat >$header <>$header <]$' -e '\.hpp[">]$' -e '\.hdl[">]$' -e '\.hxx[">]$' -e '^[^\.]*>$' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include "gperffasttoken.hxx"' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include ' | \ grep -v -F -e '#include "jerror.h"' | \ grep -v -F -e '#include "jpeglib.h"' ) # " in #include "foo" breaks echo down below, so " -> @ cat $tmpfile | LC_ALL=C sort -u | filter_ignore | sed 's/"/@/g' | \ ( while read line; do file=`echo $line | sed 's/.*[<"@]\([^>"@]*\)[>"@].*/\1/'` if ! local_file "$file"; then echo $line | sed 's/@/"/g' >>$header fi done ) cat >>$header <distro/lhm/libreoffice-7-3+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-03-11new loplugin:trivialdestructorNoel Grandin
look for potentially trivial destructors that can then be elided Change-Id: I435c251bd4291b5864c20d68f88676faac7c43fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131318 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in s*Vincent LE GARREC
sc, scaddins, sccomp, scripting Change-Id: Ia99fec9e238033821cb784810edd4762c09bd5db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112049 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2019-02-23loplugin:unusedfields in scNoel Grandin
Change-Id: I5e9842970821d0ae61e06e3ad35c9f571b43632c Reviewed-on: https://gerrit.libreoffice.org/68224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-17tdf#42949 Fix IWYU warnings in sc/inc/[pq]*Gabor Kelemen
Found with bin/find-unneeded-includes Removal proposals are dealt with here, and a bit of fallout management. Change-Id: If2d73998c3d3d9fea50420688818cd7fe0f0a27c Reviewed-on: https://gerrit.libreoffice.org/54463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-01-15loplugin:unusedmethods unused return value in scNoel Grandin
Change-Id: I3ccc98d2e042120093e2e8508518681588692393
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
2014-02-14sal_Bool->boolNoel Grandin
Change-Id: Ia411584e133b80eb72676acef6f004bf87898141
2013-11-04Fix for Calc page scaling - see #i54993#Eilidh McAdam
If a print range's manual breaks forced it over more pages than specified by the sheet scale settings, the zoom calculation wasn't able to converge on a zoom level, so it bottomed out at ZOOM_MIN. This issue only appears if the Calc/Print/Page/ForceBreaks option is selected and simply ensures the minimum number of pages is at least the number required by the breaks in the sheet. Change-Id: Iba36e850081718b1aa43e5c3db3c883530885853 Reviewed-on: https://gerrit.libreoffice.org/6532 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-08-31fdo#62475 removed pointless commentsJelle van der Waa
Change-Id: Ifc9837e9f6e3c6a84e9f01c192f10271b184fb6d Reviewed-on: https://gerrit.libreoffice.org/5720 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>