diff -uprN libreoffice-5.0.2.2_original/filter/source/graphicfilter/ieps/ieps.cxx libreoffice-5.0.2.2/filter/source/graphicfilter/ieps/ieps.cxx --- libreoffice-5.0.2.2_original/filter/source/graphicfilter/ieps/ieps.cxx 2015-09-17 07:33:12.000000000 -0600 +++ libreoffice-5.0.2.2/filter/source/graphicfilter/ieps/ieps.cxx 2015-09-24 08:52:26.535206220 -0600 @@ -726,9 +726,20 @@ GraphicImport( SvStream & rStream, Graph // if there is no preview -> try with gs to make one if( !bHasPreview ) { - bHasPreview = RenderAsEMF(pBuf, nBytesRead, aGraphic); - if (!bHasPreview) + // If Environment Variable LO_PREFER_GS_FOR_EPS is set try BMP( i.e. GS) first, then EMF. + // That restores the LO 4.1.6 and earlier EPS rendering method. + if (getenv( "LO_PREFER_GS_FOR_EPS" ) ) + { bHasPreview = RenderAsBMP(pBuf, nBytesRead, aGraphic); + if (!bHasPreview) + bHasPreview = RenderAsEMF(pBuf, nBytesRead, aGraphic); + } + else + { + bHasPreview = RenderAsEMF(pBuf, nBytesRead, aGraphic); + if (!bHasPreview) + bHasPreview = RenderAsBMP(pBuf, nBytesRead, aGraphic); + } } // if there is no preview -> make a red box