writerfilter/qa/ooxml/watch-generated-code.sh | 47 ++++++++++++++++++++++++++ writerfilter/source/ooxml/factoryimpl_ns.py | 8 +--- 2 files changed, 49 insertions(+), 6 deletions(-)
New commits: commit 29813244afafa1721feb63dfeb055594053ce3f7 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Jul 28 18:12:00 2014 +0200 writerfilter: unneeded whitespace tweak Change-Id: Ib25ae32be6132a9209eaa81db18b0659b73d5b82 diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py b/writerfilter/source/ooxml/factoryimpl_ns.py index 4dc8ff0..38ffa51 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.py +++ b/writerfilter/source/ooxml/factoryimpl_ns.py @@ -420,12 +420,8 @@ def factoryAction(nsNode, action): switchblock1.append(" case %s:" % idForDefine(nsNode, resourceNode)) for actionNode in [i for i in getChildrenByName(resourceNode, "action") if i.getAttribute("name") == action]: switchblock1.extend(factoryChooseAction(actionNode)) - if action == "characters": - switchblock1.append(" break;") - switchblock1.append("") - else: - switchblock1[-1] += " break;" - switchblock1.append("") + switchblock1.append(" break;") + switchblock1.append("") switchblock2 = [] if action == "characters": commit 17969321130f293adfed6f9350faaa8e59e4aa8f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Jul 28 18:09:56 2014 +0200 writerfilter: add script to detect generated code changes Change-Id: I340ef55dc9a09bd196469ed51848b22ba986de8c diff --git a/writerfilter/qa/ooxml/watch-generated-code.sh b/writerfilter/qa/ooxml/watch-generated-code.sh new file mode 100755 index 0000000..86acaf7 --- /dev/null +++ b/writerfilter/qa/ooxml/watch-generated-code.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +if [ ! -e bin/get_config_variables ]; then + cd ../../.. +fi + +. bin/get_config_variables SRCDIR + +if [ "$PWD" != "$SRCDIR" ]; then + echo "error: not in the expected SRCDIR" + exit 1 +fi + +cd writerfilter +echo 'include Makefile' > watch.mk +echo 'watch:' >> watch.mk +echo $'\techo $(writerfilter_ALL)' >> watch.mk +mydir=workdir/CustomTarget/writerfilter +writerfilter_ALL=$(make -sr -f watch.mk watch|sed "s|$SRCDIR/$mydir/||g") +rm watch.mk +cd - >/dev/null + +case $1 in +reference) + rm -rf $mydir-reference + mkdir -p $mydir-reference/source/ooxml + for i in $writerfilter_ALL + do + cp $mydir/$i $mydir-reference/$i + done + ;; +compare) + for i in $writerfilter_ALL + do + diff -u $mydir-reference/$i $mydir/$i + done + ;; +*) + echo "usage: $0 [ reference | compare ]" + echo + echo "$0 first saves a reference output of all generated files by writerfilter, then" + echo "allows comparing against it. This helps seeing the effect of changes made on" + echo "the code generator scripts." + ;; +esac + +# vi:set shiftwidth=4 expandtab: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits