diff options
-rw-r--r-- | filter/source/svg/svgexport.cxx | 10 | ||||
-rw-r--r-- | sd/CppunitTest_sd_filters_test.mk | 2 | ||||
-rw-r--r-- | sd/Module_sd.mk | 13 |
3 files changed, 9 insertions, 16 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 1d636117c782..24aa950666a1 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -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 ); diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk index b4de440d40b6..5b89b8f3206a 100644 --- a/sd/CppunitTest_sd_filters_test.mk +++ b/sd/CppunitTest_sd_filters_test.mk @@ -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 diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk index f015d0439c1e..edc6f25bef33 100644 --- a/sd/Module_sd.mk +++ b/sd/Module_sd.mk @@ -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: |