[Libreoffice-commits] core.git: config_host/config_features.h.in config_host.mk.in configure.ac
Vasily Melenchuk
vasily.melenchuk at cib.de
Wed Jun 15 13:55:07 UTC 2016
config_host.mk.in | 1 +
config_host/config_features.h.in | 8 ++++++++
configure.ac | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+)
New commits:
commit b6e7ddcc7e6eec4957c1c069d0c22eb1dbb3bb28
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
Date: Tue Jun 14 18:00:16 2016 +0300
Add MS binary format validator support
bffvalidator (Microsoft Office Binary File Format Validator) basic
support in configure for later usage in export tests. It should be
installed from
https://www.microsoft.com/en-us/download/details.aspx?id=26794
and enabled in configure with new switch
--with-bffvalidator=<optional path to validator>
Change-Id: I6faa08d3277f0328b3dfa310222a11d115e5aa15
Reviewed-on: https://gerrit.libreoffice.org/25870
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/config_host.mk.in b/config_host.mk.in
index ddd144e..620df66 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -430,6 +430,7 @@ export ODFGEN_CFLAGS=$(gb_SPACE)@ODFGEN_CFLAGS@
export ODFGEN_LIBS=$(gb_SPACE)@ODFGEN_LIBS@
export ODFVALIDATOR=@ODFVALIDATOR@
export OFFICEOTRON=@OFFICEOTRON@
+export BFFVALIDATOR=@BFFVALIDATOR@
export OOOP_FONTS_PACK=@OOOP_FONTS_PACK@
export OOOP_GALLERY_PACK=@OOOP_GALLERY_PACK@
export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@
diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 0a38979..108bfca 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -137,6 +137,14 @@
#define HAVE_EXPORT_VALIDATION 0
/*
+ * Whether to use export validation of binary formats (doc, xls, ppt)
+ *
+ * Requires installed Microsoft Office Binary File Format Validator
+ * https://www.microsoft.com/en-us/download/details.aspx?id=26794
+ */
+#define HAVE_BFFVALIDATOR 0
+
+/*
* Whether we have glTF support.
*/
#define HAVE_FEATURE_GLTF 0
diff --git a/configure.ac b/configure.ac
index 401a8ae..97794c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2031,6 +2031,14 @@ AC_ARG_WITH(export-validation,
See https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/export-validation]),
,)
+AC_ARG_WITH(bffvalidator,
+ AS_HELP_STRING([--with-bffvalidator=<absolute path to BFFValidator>],
+ [Enables export validation for Microsoft Binary formats (doc, xls, ppt).
+ Requires installed Microsoft Office Binary File Format Validator.
+ Note: export-validation (--with-export-validation) is required to be turned on.
+ See https://www.microsoft.com/en-us/download/details.aspx?id=26794]),
+,with_bffvalidator=no)
+
AC_ARG_WITH(junit,
AS_HELP_STRING([--with-junit=<absolute path to JUnit 4 jar>],
[Specifies the JUnit 4 jar file to use for JUnit-based tests.
@@ -2763,6 +2771,37 @@ if test "$with_export_validation" = yes; then
AC_MSG_ERROR([officeotron too old])
fi
AC_SUBST(OFFICEOTRON)
+
+else
+ AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([for Microsoft Binary File Format Validator])
+if test "$with_bffvalidator" != "no"; then
+ AC_DEFINE(HAVE_BFFVALIDATOR)
+
+ if test "$with_export_validation" != "yes"; then
+ AC_MSG_ERROR([Please enable export validation (-with-export-validation)!])
+ fi
+
+ if test "$with_bffvalidator" = "yes"; then
+ BFFVALIDATOR=`win_short_path_for_make "$PROGRAMFILES/Microsoft Office/BFFValidator/BFFValidator.exe"`
+ else
+ BFFVALIDATOR="$with_bffvalidator"
+ fi
+
+ if test "$build_os" = "cygwin"; then
+ if test -n "$BFFVALIDATOR" -a -e "`cygpath $BFFVALIDATOR`"; then
+ AC_MSG_RESULT($BFFVALIDATOR)
+ else
+ AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+ fi
+ elif test -n "$BFFVALIDATOR" -a -e "$BFFVALIDATOR"; then
+ AC_MSG_RESULT($BFFVALIDATOR)
+ else
+ AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+ fi
+ AC_SUBST(BFFVALIDATOR)
else
AC_MSG_RESULT([no])
fi
More information about the Libreoffice-commits
mailing list