[Libreoffice-commits] .: filter/source

Lubos Lunak llunak at kemper.freedesktop.org
Wed Feb 9 09:14:36 PST 2011


 filter/source/xsltfilter/LibXSLTTransformer.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6f1fb4112b6f2d1f324a5507f4407ab562fe2408
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Wed Feb 9 18:11:43 2011 +0100

    variable-size arrays is a gccism

diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index ebf730f..adf833b 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -34,6 +34,7 @@
 #include <cstring>
 #include <list>
 #include <map>
+#include <vector>
 #include <iostream>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -202,7 +203,7 @@ namespace XSLT
         OSL_ASSERT(m_transformer->getStyleSheetURL());
         ::std::map<const char*, OString>::iterator pit;
         ::std::map<const char*, OString> pmap = m_transformer->getParameters();
-        const char* params[pmap.size() * 2 + 1]; // build parameters
+        ::std::vector< const char* > params( pmap.size() * 2 + 1 ); // build parameters
         int paramIndex = 0;
         for (pit = pmap.begin(); pit != pmap.end(); pit++)
             {
@@ -220,7 +221,7 @@ namespace XSLT
         if (styleSheet)
             {
                 tcontext = xsltNewTransformContext(styleSheet, doc);
-                xsltQuoteUserParams(tcontext, params);
+                xsltQuoteUserParams(tcontext, &params[0]);
                 result = xsltApplyStylesheetUser(styleSheet, doc, 0, 0, 0,
                         tcontext);
             }


More information about the Libreoffice-commits mailing list