diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-05-25 18:27:23 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-25 23:47:21 +0200 |
commit | aa7772a80bca16df21b24c3632fce8244d6055bf (patch) | |
tree | 865bdf4b26d488f35c017d273e5aff11441a800d | |
parent | 6b54253d4ff0c550a116fee87629ab5c32123af5 (diff) |
filter: generate that with the python script, not BOOST_PP
Change-Id: I9ab4cf721dd135aaae021fa05b8b6df54389a9b7
-rwxr-xr-x | filter/source/svg/js2hxx.py | 4 | ||||
-rw-r--r-- | filter/source/svg/svgexport.cxx | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/filter/source/svg/js2hxx.py b/filter/source/svg/js2hxx.py index 5d6ddd516ba5..1c7676218c68 100755 --- a/filter/source/svg/js2hxx.py +++ b/filter/source/svg/js2hxx.py @@ -127,6 +127,10 @@ for line in valid_lines: out_lines.append( ']]>";' ) out_lines.append( '' ) +out_lines.append('static const char * g_SVGScripts[N_SVGSCRIPT_FRAGMENTS] = {') +for j in range(0, fragment+1): + out_lines.append(" %s%d," % (VARIABLE_NAME, j)) +out_lines.append('};') outfile = open( outfile_name, 'w' ) if( not os.path.isfile( outfile_name ) ): diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index acc091276c13..96cb1fb5d7d3 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -49,7 +49,6 @@ #include <xmloff/xmltoken.hxx> #include <xmloff/animationexport.hxx> -#include <boost/preprocessor/repetition/repeat.hpp> #include <memory> using namespace ::com::sun::star::graphic; @@ -1347,10 +1346,6 @@ void SVGFilter::implExportTextEmbeddedBitmaps() } } - -#define SVGFILTER_EXPORT_SVGSCRIPT( z, n, aFragment ) \ - xExtDocHandler->unknown( aFragment ## n ); - void SVGFilter::implGenerateScript() { mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "type", "text/ecmascript" ); @@ -1361,7 +1356,10 @@ void SVGFilter::implGenerateScript() if( xExtDocHandler.is() ) { - BOOST_PP_REPEAT( N_SVGSCRIPT_FRAGMENTS, SVGFILTER_EXPORT_SVGSCRIPT, aSVGScript ) + for (size_t i = 0; i < N_SVGSCRIPT_FRAGMENTS; ++i) + { + xExtDocHandler->unknown(OUString::createFromAscii(g_SVGScripts[i])); + } } } } |