[Libreoffice-commits] .: Branch 'libreoffice-3-4' - filter/source
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Apr 27 11:20:55 PDT 2011
filter/source/graphicfilter/eps/eps.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 5a4b0e22838539b86b1f496eb88d260f20443371
Author: Radek Doulik <rodo at novell.com>
Date: Wed Apr 27 20:15:39 2011 +0200
goodies-eps-filter-unix.diff: generate correct EPS on UNIX (bnc#200053)
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 018719f..b2d2ccc 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -295,7 +295,11 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi
// default values for the dialog options
mnLevel = 2;
mbGrayScale = sal_False;
+#ifdef UNX // don't compress by default on unix as ghostscript is unable to read LZW compressed eps
+ mbCompression = sal_False;
+#else
mbCompression = sal_True;
+#endif
mnTextMode = 0; // default0 : export glyph outlines
// try to get the dialog selection
@@ -312,12 +316,20 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi
String aVersionStr( RTL_CONSTASCII_USTRINGPARAM( "Version" ) );
String aColorStr( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) );
String aComprStr( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) );
+#ifdef UNX // don't put binary tiff preview ahead of postscript code by default on unix as ghostscript is unable to read it
+ mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 0 );
+#else
mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 1 );
+#endif
mnLevel = pFilterConfigItem->ReadInt32( aVersionStr, 2 );
if ( mnLevel != 1 )
mnLevel = 2;
mbGrayScale = pFilterConfigItem->ReadInt32( aColorStr, 1 ) == 2;
- mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 1 ) == 1;
+#ifdef UNX // don't compress by default on unix as ghostscript is unable to read LZW compressed eps
+ mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 0 ) != 0;
+#else
+ mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 1 ) == 1;
+#endif
String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) );
mnTextMode = pFilterConfigItem->ReadInt32( sTextMode, 0 );
if ( mnTextMode > 2 )
More information about the Libreoffice-commits
mailing list