[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - filter/source

Petr Mladek pmladek at kemper.freedesktop.org
Fri Jan 7 12:03:00 PST 2011


 filter/source/graphicfilter/itga/itga.cxx |   30 ++++++++++++++++++++++++++++++
 filter/source/pdf/pdfexport.cxx           |    6 +-----
 2 files changed, 31 insertions(+), 5 deletions(-)

New commits:
commit ab4df2adfa27f4dcb35e61795123eee32de602fb
Author: Christian Lippka ORACLE <christian.lippka at oracle.com>
Date:   Mon Jan 3 18:04:13 2011 +0100

    impress208: #164349# small TGAReader improvement

diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index c991d18..d989f9d 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -339,6 +339,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -361,6 +364,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -388,6 +394,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -408,6 +417,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -441,6 +453,9 @@ BOOL TGAReader::ImplReadBody()
                                         nXCount = 0;
                                         nY += nYAdd;
                                         nYCount++;
+
+                                        if( nYCount >= mpFileHeader->nImageHeight )
+                                            return false; // invalid picture
                                     }
                                 }
                             }
@@ -458,6 +473,9 @@ BOOL TGAReader::ImplReadBody()
                                         nXCount = 0;
                                         nY += nYAdd;
                                         nYCount++;
+
+                                        if( nYCount >= mpFileHeader->nImageHeight )
+                                            return false; // invalid picture
                                     }
                                 }
                             }
@@ -484,6 +502,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -501,6 +522,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -529,6 +553,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
@@ -549,6 +576,9 @@ BOOL TGAReader::ImplReadBody()
                                     nXCount = 0;
                                     nY += nYAdd;
                                     nYCount++;
+
+                                    if( nYCount >= mpFileHeader->nImageHeight )
+                                        return false; // invalid picture
                                 }
                             }
                         }
commit 318672980a79e294ff2c4871c79f3e17cb6af1a9
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Oracle.COM>
Date:   Wed Dec 15 13:24:33 2010 +0100

    ooo33gsl13: #i116085# adjust PageRange handling in writer PDF export

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index e687727..a3bdc9b 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -789,7 +789,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
                 pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
                 pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
 
-                Sequence< PropertyValue > aRenderOptions( 5 );
+                Sequence< PropertyValue > aRenderOptions( 6 );
                 aRenderOptions[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) );
                 aRenderOptions[ 0 ].Value <<= Reference< awt::XDevice >( pXDevice );
                 aRenderOptions[ 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) );
@@ -801,12 +801,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
                 aRenderOptions[ 3 ].Value <<= sal_False;
                 aRenderOptions[ 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) );
                 aRenderOptions[ 4 ].Value <<= mbSkipEmptyPages;
-                #if 0
-                // #i113919# writer has to begun "PageRange" for itself changing its renderer count
-                // we should unify this behavior but not for OOo 3.3
                 aRenderOptions[ 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
                 aRenderOptions[ 5 ].Value <<= aPageRange;
-                #endif
 
                 if( aPageRange.getLength() || !aSelection.hasValue() )
                 {


More information about the Libreoffice-commits mailing list