Kaydet (Commit) b6e7ddcc authored tarafından Vasily Melenchuk's avatar Vasily Melenchuk Kaydeden (comit) Thorsten Behrens

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/25870Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 67f2aee6
......@@ -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@
......
......@@ -136,6 +136,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.
*/
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment