Kaydet (Commit) efc28fae authored tarafından Thorsten Behrens's avatar Thorsten Behrens

Disable svg font embedding for sd filters test, enable again.

üst e5e0aae1
......@@ -27,8 +27,6 @@
************************************************************************/
#define ITEMID_FIELD 0
#include "svgwriter.hxx"
#include "svgfontexport.hxx"
#include "svgfilter.hxx"
......@@ -37,6 +35,7 @@
#include <com/sun/star/util/MeasureUnit.hpp>
#include <rtl/bootstrap.hxx>
#include <svtools/miscopt.hxx>
#include <svx/unopage.hxx>
#include <svx/unoshape.hxx>
......@@ -488,9 +487,14 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
// font embedding
const char* pSVGDisableFontEmbedding = getenv( "SVG_DISABLE_FONT_EMBEDDING" );
rtl::OUString aEmbedFontEnv(
RTL_CONSTASCII_USTRINGPARAM("${SVG_DISABLE_FONT_EMBEDDING}"));
rtl::Bootstrap::expandMacros(aEmbedFontEnv);
const bool bEmbedFonts=pSVGDisableFontEmbedding ? false : (
aEmbedFontEnv.getLength() ? false : true);
maFilterData[ 1 ].Name = B2UCONST( SVG_PROP_EMBEDFONTS );
maFilterData[ 1 ].Value <<= (sal_Bool) ( pSVGDisableFontEmbedding ? sal_False : sal_True );
maFilterData[ 1 ].Value <<= (sal_Bool) (bEmbedFonts);
// Native decoration
maFilterData[ 2 ].Name = B2UCONST( SVG_PROP_NATIVEDECORATION );
......
......@@ -123,7 +123,7 @@ $(eval $(call gb_CppunitTest_add_old_components,sd_filters_test,\
$(eval $(call gb_CppunitTest_set_args,sd_filters_test,\
--headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
"-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool)" \
"-env:CONFIGURATION_LAYERS=xcsxcu:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) -env:SVG_DISABLE_FONT_EMBEDDING=YEAH module:$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry/spool)" \
))
# .../spool is required for the (somewhat strange) filter configuration
......
......@@ -52,18 +52,7 @@ endif
$(eval $(call gb_Module_add_subsequentcheck_targets,sd,\
JunitTest_sd_unoapi \
CppunitTest_sd_regression_test \
))
#TODO: Disabled for now, needs work by Thorsten Behrens to get "don't embed font
# config" taken into account, otherwise leads to failures like
# regression-test.cxx:84:Assertion
# Test name: SdFiltersTest::test
# assertion failed
# - Expression: false
# - Mismatch between reference file and exported file in line 60.
# Expected: <font-face font-family="StarSymbol embedded" units-per-em="2048"
# font-weight="normal" font-style="normal" ascent="1693" descent="318"/>
# Found : <font-face font-family="StarSymbol embedded" units-per-em="2048"
# font-weight="normal" font-style="normal" ascent="1640" descent="397"/>
# CppunitTest_sd_regression_test \
# vim: set noet sw=4 ts=4:
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