[Libreoffice-commits] core.git: bin/find-unused-defines.sh include/svx

Noel Grandin noel at peralex.com
Sun Aug 2 23:21:03 PDT 2015


 bin/find-unused-defines.sh |   10 +++++++---
 include/svx/flagsdef.hxx   |    2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit baba1d14766282bd2c592bffd79ed69f9078cfe1
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 3 08:18:46 2015 +0200

    tdf#93068 - UI: Crash when Character dialogue opened
    
    Change-Id: I92a9e6f27ef649c9d7501df55287c95c4d796156

diff --git a/bin/find-unused-defines.sh b/bin/find-unused-defines.sh
index bd03cdc..6f31ec4 100755
--- a/bin/find-unused-defines.sh
+++ b/bin/find-unused-defines.sh
@@ -16,11 +16,15 @@
 #   (6) use awk to to check if only one match for a given constant was found
 #   (7) if so, generate a sed command to remove the #define
 #
-git grep -hP '^#define\s+\w+.*\\' -- "[!e][!x][!t]*" \
-  | sed -r 's/#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
+( git grep -hP '^\w*#define\s+\w+.*\\' -- "[!e][!x][!t]*" \
+  && \
+  git grep -hP '^\w*#define\s+\w+\s*$' -- "[!e][!x][!t]*" ) \
+  | grep -v '_idl' \
+  | grep -vE '^INCLUDED_' \
+  | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
   | sort \
   | uniq \
-  | xargs -Ixxx sh -c \
+  | xargs -Ixxx -n 1 -P 8 sh -c \
     "git grep -w 'xxx' | awk -f bin/find-unused-defines.awk -v p1=xxx && echo \"xxx\" 1>&2"
 
 
diff --git a/include/svx/flagsdef.hxx b/include/svx/flagsdef.hxx
index d6fca53..ac2aceb 100644
--- a/include/svx/flagsdef.hxx
+++ b/include/svx/flagsdef.hxx
@@ -47,7 +47,7 @@ enum class SvxBackgroundTabFlags
 };
 namespace o3tl
 {
-    template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x0f> {};
+    template<> struct typed_flags<SvxBackgroundTabFlags> : is_typed_flags<SvxBackgroundTabFlags, 0x19> {};
 }
 
 // flags for SvxBorderTabPage


More information about the Libreoffice-commits mailing list