summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/customshapes/README
blob: 0d4fab9bf6ffe87fddeb86b9f6306aa881bc32fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

# The Perl code here is used to generate the custom shape presets
# source code.

# This file is both a README and also, if run as a shell script, does what
# it describes.

# We want to exit on errors...

set -o errexit

# To re-generate the code, you need to be on Linux (I think).
# It is not necessary to do a make test-install, just run from instdir.
# oox needs to be build with dbglevel=2 so that DEBUG is defined.

make oox.clean && make oox dbglevel=2

# This reads the
# oox/source/drawingml/customshapes/presetShapeDefinitions.xml file.
# It will produce the file
# oox/source/drawingml/customshapes/pptx/cshape-all.ppx and a whole
# bunch of other files that aren't needed further.

(cd oox/source/drawingml/customshapes && ./generatePresetsPPTXs.pl)


# Then load it and store the debugging output.
# We need only the SAL_INFO output with tag "oox.csdata", plus stderr
# for PropertyMap::dumpData() output.

SAL_LOG='+INFO.oox.csdata-WARN' instdir/program/soffice --headless --convert-to odp --outdir oox/source/drawingml/customshapes/ oox/source/drawingml/customshapes/pptx/cshape-all.pptx > oox/source/drawingml/customshapes/custom-shapes.log 2>&1


# Now run a script that reads the above log file and generates the
# oox-drawingml-cs-presets data:

(cd oox/source/drawingml/customshapes && ./generatePresetsData.pl)


echo
echo "To see what has been done, run git diff --patience oox/source/drawingml"
echo