[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/msfilter/escherex.cxx | 37 ++-- 1 file changed, 19 insertions(+), 18 deletions(-) New commits: commit a1e252733e3ddbab7b4854799acb05edc25dd07a Author: Caolán McNamara caol...@redhat.com Date: Mon Apr 13 12:46:34 2015 +0100 Related: tdf#74018 fix int wraparound + crash on export of fdo74018-2.docx to doc nPoints is 16bit and accumulated value wraps around, so use a 32bit nTotalPoints instead and move 16bit declarations to use points to confirm no other wraparounds (cherry picked from commit ce705ac56a8709970356d634abb964adef105594) Change-Id: If97ccb46ed8eb7f4305cdfe328ae83bc2b0c778c Reviewed-on: https://gerrit.libreoffice.org/15281 Tested-by: Michael Stahl mst...@redhat.com Reviewed-by: Michael Stahl mst...@redhat.com diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7217ec1..b85979d 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -2059,42 +2059,43 @@ bool EscherPropertyContainer::CreatePolygonProperties( { Polygon aPolygon; -sal_uInt16 i, j, k, nPoints, nBezPoints, nPolyCount = aPolyPolygon.Count(); +sal_uInt16 nPolyCount = aPolyPolygon.Count(); +sal_uInt32 nTotalPoints(0), nTotalBezPoints(0); Rectangle aRect( aPolyPolygon.GetBoundRect() ); rGeoRect = ::com::sun::star::awt::Rectangle( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight() ); -for ( nBezPoints = nPoints = i = 0; i nPolyCount; i++ ) +for (sal_uInt16 i = 0; i nPolyCount; ++i) { -k = aPolyPolygon[ i ].GetSize(); -nPoints = nPoints + k; -for ( j = 0; j k; j++ ) +sal_uInt16 k = aPolyPolygon[ i ].GetSize(); +nTotalPoints += k; +for (sal_uInt16 j = 0; j k; ++j) { if ( aPolyPolygon[ i ].GetFlags( j ) != POLY_CONTROL ) -nBezPoints++; +nTotalBezPoints++; } } -sal_uInt32 nVerticesBufSize = ( nPoints 2 ) + 6; +sal_uInt32 nVerticesBufSize = ( nTotalPoints 2 ) + 6; sal_uInt8* pVerticesBuf = new sal_uInt8[ nVerticesBufSize ]; -sal_uInt32 nSegmentBufSize = ( ( nBezPoints 2 ) + 8 ); +sal_uInt32 nSegmentBufSize = ( ( nTotalBezPoints 2 ) + 8 ); if ( nPolyCount 1 ) nSegmentBufSize += ( nPolyCount 1 ); sal_uInt8* pSegmentBuf = new sal_uInt8[ nSegmentBufSize ]; sal_uInt8* pPtr = pVerticesBuf; -*pPtr++ = (sal_uInt8)( nPoints );// Little endian -*pPtr++ = (sal_uInt8)( nPoints 8 ); -*pPtr++ = (sal_uInt8)( nPoints ); -*pPtr++ = (sal_uInt8)( nPoints 8 ); +*pPtr++ = (sal_uInt8)( nTotalPoints );// Little endian +*pPtr++ = (sal_uInt8)( nTotalPoints 8 ); +*pPtr++ = (sal_uInt8)( nTotalPoints ); +*pPtr++ = (sal_uInt8)( nTotalPoints 8 ); *pPtr++ = (sal_uInt8)0xf0; *pPtr++ = (sal_uInt8)0xff; -for ( j = 0; j nPolyCount; j++ ) +for (sal_uInt16 j = 0; j nPolyCount; ++j) { aPolygon = aPolyPolygon[ j ]; -nPoints = aPolygon.GetSize(); -for ( i = 0; i nPoints; i++ ) // write points from polygon to buffer +sal_uInt16 nPoints = aPolygon.GetSize(); +for (sal_uInt16 i = 0; i nPoints; ++i) // write points from polygon to buffer { Point aPoint = aPolygon[ i ]; aPoint.X() -= rGeoRect.X; @@ -2115,13 +2116,13 @@ bool EscherPropertyContainer::CreatePolygonProperties( *pPtr++ = (sal_uInt8)2; *pPtr++ = (sal_uInt8)0; -for ( j = 0; j nPolyCount; j++ ) +for (sal_uInt16 j = 0; j nPolyCount; ++j) { *pPtr++ = 0x0; // Polygon start *pPtr++ = 0x40; aPolygon = aPolyPolygon[ j ]; -nPoints = aPolygon.GetSize(); -for ( i = 0; i nPoints; i++ ) // write Polyflags to Buffer +sal_uInt16 nPoints = aPolygon.GetSize(); +for (sal_uInt16 i = 0; i nPoints; ++i) // write Polyflags to Buffer { *pPtr++ = 0; if ( bBezier ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/flash/swfwriter1.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 09037c9f41799893c42b719aa332730a5e1c4bf7 Author: Matthew Francis mjay.fran...@gmail.com Date: Wed Jan 21 23:58:03 2015 +0800 fdo#84336 Fix swf rendering Commit d83dfeb5e59c8f3de12d673b001a44001f644e7d accidentally inverted a test, causing at least the presentation linked on the above bug to render all black Change-Id: I2267ef43023b735587d6921f17aa7207f70dbd7b Reviewed-on: https://gerrit.libreoffice.org/14084 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit eb4c29f4d10ae4be0e6be15a4c7c8c5bfb1edcc3) Reviewed-on: https://gerrit.libreoffice.org/14087 diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 89e5e97..82f8d4e 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -181,7 +181,7 @@ void Writer::Impl_addShapeRecordChange( BitStream rBits, sal_Int16 dx, sal_Int1 rBits.writeUB( 0, 1 ); // StateNewStyles rBits.writeUB( sal_uInt32(!bFilled), 1 ); // StateLineStyle rBits.writeUB( 0, 1 ); // StateFillStyle0 -rBits.writeUB( bFilled ? 0 : 1, 1 );// StateFillStyle1 +rBits.writeUB( bFilled ? 1 : 0, 1 );// StateFillStyle1 rBits.writeUB( 1, 1 ); // StateMoveTo sal_uInt16 nMoveBits = max( getMaxBitsSigned( dx ), getMaxBitsSigned( dy ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source include/vcl vcl/source
filter/source/msfilter/mstoolbar.cxx |2 - include/vcl/dibtools.hxx |3 +- vcl/source/gdi/dibtools.cxx | 39 --- 3 files changed, 35 insertions(+), 9 deletions(-) New commits: commit 643b9a71941dc8b3707d1ea64665cc70df20767a Author: Caolán McNamara caol...@redhat.com Date: Mon Jan 12 13:27:21 2015 + Resolves: fdo#87015 image missing from doc regression from commit e0cce521f1ad0cc384d30ce2f1077ea229fffe62 Author: Armin Le Grand a...@apache.org AuthorDate: Thu Jan 10 16:28:40 2013 + Commit: Caolán McNamara caol...@redhat.com CommitDate: Thu Jun 13 14:50:46 2013 +0100 Resolves: #i121504# Support for alpha channel in clipboard for all systems (cherry picked from commit ef3931ff410117e1237b3bef7bc090e8b83b9519) which blindly just bulldozed out the bMSOFormat branch Change-Id: Iec354f1fb585f0803b9df472bc9ec9e103aa5847 (cherry picked from commit 470fcca594ba4f6bf473d4d44b415c2ba151b0d9) Reviewed-on: https://gerrit.libreoffice.org/13875 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 589b7d9..cf63a1f 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -733,7 +733,7 @@ bool TBCBitMap::Read( SvStream rS) nOffSet = rS.Tell(); rS.ReadInt32( cbDIB ); // cbDIB = sizeOf(biHeader) + sizeOf(colors) + sizeOf(bitmapData) + 10 -return ReadDIB(mBitMap, rS, false); +return ReadDIB(mBitMap, rS, false, true); } #if OSL_DEBUG_LEVEL 1 diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx index 6091f6e..a43764f 100644 --- a/include/vcl/dibtools.hxx +++ b/include/vcl/dibtools.hxx @@ -36,7 +36,8 @@ class Bitmap; bool VCL_DLLPUBLIC ReadDIB( // ReadDIB(rBitmap, rIStm, true); Bitmap rTarget, SvStream rIStm, -bool bFileHeader); +bool bFileHeader, +bool bMSOFormat=false); bool VCL_DLLPUBLIC ReadDIBBitmapEx( BitmapEx rTarget, diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 92490cb..4ca04eb 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -161,7 +161,7 @@ namespace } } -bool ImplReadDIBInfoHeader(SvStream rIStm, DIBV5Header rHeader, bool bTopDown) +bool ImplReadDIBInfoHeader(SvStream rIStm, DIBV5Header rHeader, bool bTopDown, bool bMSOFormat) { // BITMAPINFOHEADER or BITMAPCOREHEADER or BITMAPV5HEADER const sal_Size aStartPos(rIStm.Tell()); @@ -177,6 +177,29 @@ bool ImplReadDIBInfoHeader(SvStream rIStm, DIBV5Header rHeader, bool bTopDown rIStm.ReadUInt16( rHeader.nPlanes ); rIStm.ReadUInt16( rHeader.nBitCount ); } +else if ( bMSOFormat rHeader.nSize == DIBINFOHEADERSIZE ) +{ +sal_Int16 nTmp16(0); +rIStm.ReadInt16(nTmp16); +rHeader.nWidth = nTmp16; +rIStm.ReadInt16(nTmp16); +rHeader.nHeight = nTmp16; +sal_uInt8 nTmp8(0); +rIStm.ReadUChar(nTmp8); +rHeader.nPlanes = nTmp8; +rIStm.ReadUChar(nTmp8); +rHeader.nBitCount = nTmp8; +rIStm.ReadInt16(nTmp16); +rHeader.nSizeImage = nTmp16; +rIStm.ReadInt16(nTmp16); +rHeader.nCompression = nTmp16; +if ( !rHeader.nSizeImage ) // uncompressed? +rHeader.nSizeImage = ((rHeader.nWidth * rHeader.nBitCount + 31) ~31) / 8 * rHeader.nHeight; +rIStm.ReadInt32( rHeader.nXPelsPerMeter ); +rIStm.ReadInt32( rHeader.nYPelsPerMeter ); +rIStm.ReadUInt32( rHeader.nColsUsed ); +rIStm.ReadUInt32( rHeader.nColsImportant ); +} else { // BITMAPCOREHEADER, BITMAPV5HEADER or unknown. Read as far as possible @@ -671,14 +694,14 @@ bool ImplReadDIBBits(SvStream rIStm, DIBV5Header rHeader, BitmapWriteAccess r return( rIStm.GetError() == 0UL ); } -bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, Bitmap* pBmpAlpha, sal_uLong nOffset ) +bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, Bitmap* pBmpAlpha, sal_uLong nOffset, bool bMSOFormat = false ) { DIBV5Header aHeader; const sal_uLong nStmPos = rIStm.Tell(); bool bRet(false); bool bTopDown(false); -if(ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown) aHeader.nWidth aHeader.nHeight aHeader.nBitCount) +if(ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown, bMSOFormat) aHeader.nWidth aHeader.nHeight aHeader.nBitCount) { // In case ImplReadDIB() didn't call ImplReadDIBFileHeader() before // this method, nOffset is 0, that's OK. @@ -1404,7 +1427,8 @@ bool ImplReadDIB( Bitmap rTarget, Bitmap* pTargetAlpha, SvStream rIStm, -bool bFileHeader) +bool bFileHeader, +bool bMSOFormat=false) { const sal_uInt16 nOldFormat(rIStm.GetNumberFormatInt()); const sal_uLong
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/itiff/itiff.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit f28a5e89eb668b702e90beb58276cef5d74a6d18 Author: Caolán McNamara caol...@redhat.com Date: Mon Jan 5 10:56:32 2015 + asan wrt mandriva57054-1.tiff Change-Id: Ibb7ecfa637ff96fbda3a8ed5d67943ece28927e5 (cherry picked from commit f901624b5e13e300f8e2facd2a824202c21d9729) Reviewed-on: https://gerrit.libreoffice.org/13739 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 4122ab2..1d532cc 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -926,23 +926,22 @@ bool TIFFReader::ConvertScanline( sal_uLong nY ) { case 8 : { -sal_uInt8 nLast; if ( bByteSwap ) { if ( nPredictor == 2 ) { -nLast = BYTESWAP( (sal_uInt8)*pt++ ); +sal_uInt8 nLast = 0; for ( nx = 0; nx nImageWidth; nx++ ) { +nLast += nx == 0 ? BYTESWAP( (sal_uInt8)*pt++ ) : *pt++; pAcc-SetPixelIndex( nY, nx, nLast ); -nLast = nLast + *pt++; } } else { for ( nx = 0; nx nImageWidth; nx++ ) { -nLast = *pt++; +sal_uInt8 nLast = *pt++; pAcc-SetPixelIndex( nY, nx, static_castsal_uInt8( (BYTESWAP((sal_uLong)nLast) - nMinSampleValue) * nMinMax ) ); } } @@ -951,11 +950,11 @@ bool TIFFReader::ConvertScanline( sal_uLong nY ) { if ( nPredictor == 2 ) { -nLast = *pt++; +sal_uInt8 nLast = 0; for ( nx = 0; nx nImageWidth; nx++ ) { +nLast += *pt++; pAcc-SetPixelIndex( nY, nx, nLast ); -nLast = nLast + *pt++; } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 15 +++ filter/source/xsltdialog/xmlfiltersettingsdialog.hxx |1 + 2 files changed, 16 insertions(+) New commits: commit 90452b4eb40086b98ad21a19b154c404251c08e6 Author: Caolán McNamara caol...@redhat.com Date: Mon Dec 8 09:56:33 2014 + Resolves: rhbz#1164614 xslt dialog crashes if there are no entries Change-Id: Id7d967389cbc9f8ae120749bbe1c79bbbe46b212 Reviewed-on: https://gerrit.libreoffice.org/13370 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 8d85688..e698688 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -1355,6 +1355,16 @@ SvxPathControl::SvxPathControl(Window* pParent) #define ITEMID_NAME 1 #define ITEMID_TYPE 2 +Size SvxPathControl::GetOptimalSize() const +{ +Size aDefSize(LogicToPixel(Size(150, 0), MapMode(MAP_APPFONT))); +Size aOptSize(VclVBox::GetOptimalSize()); +long nRowHeight(GetTextHeight()); +aOptSize.Height() = nRowHeight * 10; +aOptSize.Width() = std::max(aDefSize.Width(), aOptSize.Width()); +return aOptSize; +} + void SvxPathControl::setAllocation(const Size rAllocation) { VclVBox::setAllocation(rAllocation); @@ -1366,6 +1376,11 @@ void SvxPathControl::setAllocation(const Size rAllocation) { std::vectorlong aWidths; m_pFocusCtrl-getPreferredDimensions(aWidths); +if (aWidths.empty()) +{ +bHasBeenShown = false; +return; +} long nFirstColumnWidth = aWidths[1]; m_pHeaderBar-SetItemSize(ITEMID_NAME, nFirstColumnWidth); m_pHeaderBar-SetItemSize(ITEMID_TYPE, 0x); diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx index 7fbd362..86828af 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx @@ -44,6 +44,7 @@ private: HeaderBar* m_pHeaderBar; XMLFilterListBox* m_pFocusCtrl; protected: +virtual Size GetOptimalSize() const SAL_OVERRIDE; virtual void setAllocation(const Size rAllocation) SAL_OVERRIDE; public: SvxPathControl(Window* pParent); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/msfilter/msdffimp.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit a88078f6574057b7b54c25a8b0fc65bdb88dd2b1 Author: Andras Timar andras.ti...@collabora.com Date: Thu Nov 27 20:56:32 2014 +0100 fdo#84686 prevent std::bad_alloc exception by stricter input check The bugdoc has invalid length (rh.recLen) in header of blipStore's OfficeArtFBSE record. Therefore LibreOffice read junk for the next BLIP, and tried to seek to an invalid stream position, which caused bad allocation exception on 32-bit systems. Change-Id: I72fae4c2b00216b57736f4409a32c62a40f25785 (cherry picked from commit 6945971c79d70d77c5c8bb6593b3f25ef46b0887) Reviewed-on: https://gerrit.libreoffice.org/13158 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 12ef20a..a96a9f6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5814,8 +5814,7 @@ void SvxMSDffManager::GetCtrlData( sal_uInt32 nOffsDgg_ ) } -// from here on: Drawing Group Container i.e. Ddocument-wide valid data -// === +// from here on: Drawing Group Container i.e. document-wide valid data void SvxMSDffManager::GetDrawingGroupContainerData( SvStream rSt, sal_uLong nLenDgg ) { @@ -5855,7 +5854,7 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream rSt, sal_uLong nLe { if(!this-ReadCommonRecordHeader( rSt, nVer, nInst, nFbt, nLength)) return; nRead += DFF_COMMON_RECORD_HEADER_SIZE + nLength; -if( DFF_msofbtBSE == nFbt ) +if( DFF_msofbtBSE == nFbt /* magic value from spec */ 0x2 == nVer ) { nLenFBSE = nLength; // is FBSE big enough for our data @@ -5892,8 +5891,9 @@ void SvxMSDffManager::GetDrawingGroupContainerData( SvStream rSt, sal_uLong nLe // now save the info for later access pBLIPInfos-push_back( new SvxMSDffBLIPInfo( nInst, nBLIPPos, nBLIPLen ) ); } +rSt.SeekRel( nLength ); } -rSt.SeekRel( nLength ); +else return; // invalid input } while( nRead nLenBStoreCont ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/ios2met/ios2met.cxx | 29 ++-- 1 file changed, 17 insertions(+), 12 deletions(-) New commits: commit 4d511b91d2fef9e316bcc9fecc33e2ceacaeebd4 Author: Caolán McNamara caol...@redhat.com Date: Mon Nov 17 15:22:08 2014 + afl: divide-by-zero (cherry picked from commit eb6d27321d2d5f9d069c4a3cbcc9bc6e5b4c98ab) Change-Id: Ided311873f654c0f40dae57c8876a6412ee97d3e Reviewed-on: https://gerrit.libreoffice.org/12515 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 2b3d25b..e80ee85 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -770,20 +770,18 @@ Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex) sal::static_int_cast sal_uInt8 (nIndex0xff)); } - sal_uInt16 OS2METReader::ReadBigEndianWord() { -sal_uInt8 nLo,nHi; +sal_uInt8 nLo(0), nHi(0); pOS2MET-ReadUChar( nHi ).ReadUChar( nLo ); return (((sal_uInt16)nHi)8)|(((sal_uInt16)nLo)0x00ff); } sal_uLong OS2METReader::ReadBigEndian3BytesLong() { -sal_uInt16 nLo; -sal_uInt8 nHi; +sal_uInt8 nHi(0); pOS2MET-ReadUChar( nHi ); -nLo=ReadBigEndianWord(); +sal_uInt16 nLo = ReadBigEndianWord(); return sal_uLong)nHi)16)0x00ff)|((sal_uLong)nLo); } @@ -2354,7 +2352,14 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) pOS2MET-SeekRel(4); nStartIndex=ReadBigEndianWord(); pOS2MET-SeekRel(3); -pOS2MET-ReadUChar( nbyte ); nBytesPerCol=((sal_uInt16)nbyte) 0x00ff; +pOS2MET-ReadUChar( nbyte ); +nBytesPerCol=((sal_uInt16)nbyte) 0x00ff; +if (nBytesPerCol == 0) +{ +pOS2MET-SetError(SVSTREAM_FILEFORMAT_ERROR); +ErrorCode=4; +break; +} nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol; for (i=nStartIndex; inEndIndex; i++) { if (nBytesPerCol 3) pOS2MET-SeekRel(nBytesPerCol-3); @@ -2553,10 +2558,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize) void OS2METReader::ReadOS2MET( SvStream rStreamOS2MET, GDIMetaFile rGDIMetaFile ) { -sal_uInt16 nFieldSize; -sal_uInt16 nFieldType; sal_uLong nPercent, nLastPercent; -sal_uInt8 nMagicByte; ErrorCode=0; @@ -2622,6 +2624,7 @@ void OS2METReader::ReadOS2MET( SvStream rStreamOS2MET, GDIMetaFile rGDIMetaF sal_uInt64 const nStartPos = pOS2MET-Tell(); sal_uInt64 const nRemaining = pOS2MET-remainingSize(); + Callback(0); nLastPercent=0; sal_uInt64 nPos = pOS2MET-Tell(); @@ -2634,15 +2637,17 @@ void OS2METReader::ReadOS2MET( SvStream rStreamOS2MET, GDIMetaFile rGDIMetaF nLastPercent=nPercent; } -nFieldSize=ReadBigEndianWord(); - +sal_uInt16 nFieldSize = ReadBigEndianWord(); +sal_uInt8 nMagicByte(0); pOS2MET-ReadUChar( nMagicByte ); if (nMagicByte!=0xd3) { pOS2MET-SetError(SVSTREAM_FILEFORMAT_ERROR); ErrorCode=7; break; } -pOS2MET-ReadUInt16( nFieldType ); + +sal_uInt16 nFieldType(0); +pOS2MET-ReadUInt16(nFieldType); pOS2MET-SeekRel(3); nPos+=8; nFieldSize-=8; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source include/filter sw/source vcl/source
filter/source/graphicfilter/ios2met/ios2met.cxx | 16 +- filter/source/graphicfilter/ipcx/ipcx.cxx |7 + filter/source/msfilter/msdffimp.cxx | 89 + filter/source/msfilter/svdfppt.cxx |5 include/filter/msfilter/svdfppt.hxx |2 sw/source/filter/ww8/ww8par.cxx | 13 + vcl/source/filter/wmf/winwmf.cxx| 159 +++- vcl/source/fontsubset/sft.cxx | 31 +++- 8 files changed, 249 insertions(+), 73 deletions(-) New commits: commit 22590777ac1fbb1b6dadedae166a59ed3c34dc5b Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 20 09:59:28 2014 +0100 various untrusted loop bounds coverity#1242704 Untrusted loop bound Change-Id: Ib2e00c0cd269dc7ae55b206713fe07e5326072f2 (cherry picked from commit d615d83381a0830a815fe2879ce761f1b00b04e9) coverity#1242606 Untrusted loop bound Change-Id: Iafa03d4dd65eb343a80996880bc1ed846d1b7491 (cherry picked from commit 1361dfc0aa835dcb134d5de4bac594519aa16efe) coverity#1242582 Untrusted loop bound Change-Id: I72d2c4979b62a025d212ce5ee3b7141c40376fa7 (cherry picked from commit 6118c11a0c5122169979547e8c27136cf58a54a7) coverity#1242778 Untrusted value as argument Change-Id: I34d5a5e7c5f0eef51d941c65ab73d5421d5a36cb (cherry picked from commit be31503ef86d2ad3291ced8fddb9c4da4d324c46) coverity#1242724 Untrusted value as argument Change-Id: I6041d09ef0a4ed4af5f1bf93f31a1eac60be1af7 (cherry picked from commit bbe264a19fb82f50d859fc72a47312db0527640f) coverity#1242717 Untrusted loop bound Change-Id: I983bba075ab9626c90555fa41f9d473ae60fafea (cherry picked from commit cf63ebe0f005513c1e989682459bcd0688eb190b) coverity#1242624 Untrusted loop bound Change-Id: If2ae1982eec100f5602a13d648beec247ced6aa2 (cherry picked from commit 711e74544d70b108e9bc70772b31f386dbf1c2a4) coverity#138 Untrusted loop bound Change-Id: I1a4dec8727d0a27f7fd0396fd22d955f61daaee4 (cherry picked from commit 5a89092d5fe43638832ea8f86df34f81869337d9) coverity#1242573 Untrusted loop bound Change-Id: Id2847c55ccab7272919e76542bc0e0570bc9af12 (cherry picked from commit 5e2d089f763963e6ce7d3d183bd1bf7932aeaaaf) coverity#1242573 Untrusted loop bound (cherry picked from commit 11a514e06bf38c70f2364c8535782aa3f33d6206) Conflicts: vcl/source/filter/wmf/winwmf.cxx Change-Id: Ic84e57fbfa2b532409865c4364b91be594d252cf pass sfntLen to DumpSfnts etc so sfntP reads can be checked Change-Id: I5d8092eceb31ba251e75fe2c51b87890b8adcbf2 (cherry picked from commit b4a0104849eeecb7779fda41116c92c362759882) coverity#1242908 Untrusted value as argument Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b (cherry picked from commit d0be09322d127e7d517851db38c764d57fbab2dc) Reviewed-on: https://gerrit.libreoffice.org/12067 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index aed623e..2b3d25b 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -1010,6 +1010,8 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1 else nLen = nOrderLen-4; } +if (nLen pOS2MET-remainingSize()) +throw css::uno::Exception(attempt to read past end of input, 0); boost::scoped_arraychar pChr(new char[nLen+1]); for (i=0; inLen; i++) pOS2MET-ReadChar( pChr[i] ); @@ -2750,12 +2752,18 @@ GraphicImport( SvStream rStream, Graphic rGraphic, FilterConfigItem* ) GDIMetaFile aMTF; boolbRet = false; -aOS2METReader.ReadOS2MET( rStream, aMTF ); +try +{ +aOS2METReader.ReadOS2MET( rStream, aMTF ); -if ( !rStream.GetError() ) +if ( !rStream.GetError() ) +{ +rGraphic=Graphic( aMTF ); +bRet = true; +} +} +catch (const css::uno::Exception) { -rGraphic=Graphic( aMTF ); -bRet = true; } return bRet; diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx index 32dc0d9..f6fc871 100644 --- a/filter/source/graphicfilter/ipcx/ipcx.cxx +++ b/filter/source/graphicfilter/ipcx/ipcx.cxx @@ -222,6 +222,13 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc) sal_uLong nLastPercent = 0; sal_uInt8 nDat = 0, nCol = 0; +//sanity check there is enough data before trying allocation +if (nPlanes m_rPCX.remainingSize() / nBytesPerPlaneLin) +{ +nStatus = false; +return; +} + for( np = 0; np nPlanes; np++ )
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source include/svx svx/source
filter/source/svg/svgexport.cxx| 18 -- filter/source/svg/svgfilter.hxx|1 + include/svx/svdmodel.hxx |2 ++ svx/source/inc/svdoutlinercache.hxx|7 +++ svx/source/svdraw/svdmodel.cxx | 11 +++ svx/source/svdraw/svdoutlinercache.cxx |2 ++ 6 files changed, 39 insertions(+), 2 deletions(-) New commits: commit 0bb29affae83d0410f745f46267527e10777fcd2 Author: Caolán McNamara caol...@redhat.com Date: Fri Oct 17 15:03:34 2014 +0100 Resolves: fdo#62682 crash on second export of svg because the first export has left dangling CalcFieldValueHdl Links in Outliners that got created based on the Drawing Outliner while it had a temporary CalcFieldValueHdl installed, and didn't get the old CalcFieldValueHdl installed when the old Drawing Outliner one was re-installed. (cherry picked from commit 5bdfa8c12472eb9ff6ca054c2ada7150b1869fff) Change-Id: I064a154ece488c9a4c3467b753451df7e73ae883 Reviewed-on: https://gerrit.libreoffice.org/12009 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 07cf0a4..7dc2419 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -602,7 +602,8 @@ bool SVGFilter::implExport( const Sequence PropertyValue rDescriptor ) SdrOutliner rOutl = mpSdrModel-GetDrawOutliner(NULL); maOldFieldHdl = rOutl.GetCalcFieldValueHdl(); -rOutl.SetCalcFieldValueHdl( LINK( this, SVGFilter, CalcFieldHdl) ); +maNewFieldHdl = LINK(this, SVGFilter, CalcFieldHdl); +rOutl.SetCalcFieldValueHdl(maNewFieldHdl); } } bRet = implExportDocument(); @@ -615,7 +616,20 @@ bool SVGFilter::implExport( const Sequence PropertyValue rDescriptor ) } if( mpSdrModel ) -mpSdrModel-GetDrawOutliner( NULL ).SetCalcFieldValueHdl( maOldFieldHdl ); +{ +//fdo#62682 The maNewFieldHdl can end up getting copied +//into various other outliners which live past this +//method, so get the full list of outliners and restore +//the maOldFieldHdl for all that have ended up using +//maNewFieldHdl +std::vectorSdrOutliner* aOutliners(mpSdrModel-GetActiveOutliners()); +for (std::vectorSdrOutliner*::iterator aIter = aOutliners.begin(); aIter != aOutliners.end(); ++aIter) +{ +SdrOutliner* pOutliner = *aIter; +if (maNewFieldHdl == pOutliner-GetCalcFieldValueHdl()) +pOutliner-SetCalcFieldValueHdl(maOldFieldHdl); +} +} delete mpSVGWriter, mpSVGWriter = NULL; mpSVGExport = NULL; // pointed object is released by xSVGExport dtor at the end of this scope diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index 7b68c2b..0c6371f 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -265,6 +265,7 @@ private: XDrawPageSequence mMasterPageTargets; LinkmaOldFieldHdl; +LinkmaNewFieldHdl; boolimplImport( const Sequence PropertyValue rDescriptor ) throw (RuntimeException); diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index e982cb5..5aeeb70 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -233,6 +233,8 @@ public: sal_uIntPtr nSwapGraphicsMode; SdrOutlinerCache* mpOutlinerCache; +//get a vector of all the SdrOutliner belonging to the model +std::vectorSdrOutliner* GetActiveOutliners() const; SdrModelImpl* mpImpl; sal_uInt16 mnCharCompressType; sal_uInt16 mnHandoutPageCount; diff --git a/svx/source/inc/svdoutlinercache.hxx b/svx/source/inc/svdoutlinercache.hxx index 6dbf728..03572fc 100644 --- a/svx/source/inc/svdoutlinercache.hxx +++ b/svx/source/inc/svdoutlinercache.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SVX_SOURCE_INC_SVDOUTLINERCACHE_HXX #include sal/types.h +#include vector class SdrModel; class SdrOutliner; @@ -33,12 +34,18 @@ private: SdrOutliner*mpModeOutline; SdrOutliner*mpModeText; + +std::vectorSdrOutliner* maActiveOutliners; public: SdrOutlinerCache( SdrModel* pModel ); ~SdrOutlinerCache();
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/icgm/actimpr.cxx | 67 ++- filter/source/graphicfilter/icgm/bundles.cxx | 10 +--- filter/source/graphicfilter/icgm/cgm.cxx | 41 filter/source/graphicfilter/icgm/cgm.hxx |5 +- filter/source/graphicfilter/icgm/outact.cxx | 35 ++ 5 files changed, 60 insertions(+), 98 deletions(-) New commits: commit b8e1fa8258c0d7aa928182b9226991fcf2320bc7 Author: Caolán McNamara caol...@redhat.com Date: Tue Oct 14 13:16:49 2014 +0100 valgrind: multiple problems in cgm filter valgrind: Mismatched free() / delete / delete [] (cherry picked from commit 4d82ccb1edcc700f1ff8387ec51ac8114d5d77e3) valgrind: Mismatched free() / delete / delete [] (cherry picked from commit 61550120b45640898677c7f765a491737445954f) valgrind: Source and destination overlap in memcpy (cherry picked from commit b2b5bc10b6574e4717f651602c970bdb20abd1a7) sal_True-true (cherry picked from commit aeea1cab4300371797fc1283c1e8623fa8238908) check for short reads (cherry picked from commit 2e234939874575a41673b3ceb4a759afa3b333aa) valgrind: multiple errors (cherry picked from commit b251762c6549639975a7e9962c9fb5b365ef2063) stray ;s all other the place (cherry picked from commit 740617901dc2e7a1effd211c755ea9d00b32094b) valgrind: init GroupLevels (cherry picked from commit b13591d48f58b45f4465ce03bd1248ec1e95584f) Change-Id: Idccebc826ade29a507e115108d20fd461b7bb4ec Reviewed-on: https://gerrit.libreoffice.org/11977 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 8db2cc3..ba96bde 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -74,9 +74,7 @@ CGMImpressOutAct::CGMImpressOutAct( CGM rCGM, const uno::Reference frame::XMod } mpCGM-mbStatus = bStatRet; } -}; - - +} bool CGMImpressOutAct::ImplInitPage() { @@ -176,9 +174,7 @@ void CGMImpressOutAct::ImplSetLineBundle() aAny = aLineDash; maXPropSet-setPropertyValue( LineDash, aAny ); } -}; - - +} void CGMImpressOutAct::ImplSetFillBundle() { @@ -343,9 +339,7 @@ void CGMImpressOutAct::ImplSetFillBundle() aAny = aHatch; maXPropSet-setPropertyValue( FillHatch, aAny ); } -}; - - +} void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference beans::XPropertySet rProperty ) { @@ -387,9 +381,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference beans::XProperty } aAny = aFontDescriptor; rProperty-setPropertyValue( FontDescriptor, aAny ); -}; - - +} void CGMImpressOutAct::InsertPage() { @@ -401,9 +393,7 @@ void CGMImpressOutAct::InsertPage() mpCGM-mbStatus = false; } mnCurrentPage++; -}; - - +} void CGMImpressOutAct::BeginGroup() { @@ -413,9 +403,7 @@ void CGMImpressOutAct::BeginGroup() } mnGroupLevel++; mnGroupActCount = mpCGM-mnActCount; -}; - - +} void CGMImpressOutAct::EndGroup() { @@ -446,9 +434,7 @@ void CGMImpressOutAct::EndGroup() } } } -}; - - +} void CGMImpressOutAct::EndGrouping() { @@ -458,8 +444,6 @@ void CGMImpressOutAct::EndGrouping() } } - - void CGMImpressOutAct::DrawRectangle( FloatRect rFloatRect ) { if ( mnGroupActCount != ( mpCGM-mnActCount - 1 ) ) // POWERPOINT HACK !!! @@ -472,9 +456,7 @@ void CGMImpressOutAct::DrawRectangle( FloatRect rFloatRect ) ImplSetFillBundle(); } } -}; - - +} void CGMImpressOutAct::DrawEllipse( FloatPoint rCenter, FloatPoint rSize, double rOrientation ) { @@ -499,9 +481,7 @@ void CGMImpressOutAct::DrawEllipse( FloatPoint rCenter, FloatPoint rSize, doub } ImplSetFillBundle(); } -}; - - +} void CGMImpressOutAct::DrawEllipticalArc( FloatPoint rCenter, FloatPoint rSize, double rOrientation, sal_uInt32 nType, double fStartAngle, double fEndAngle ) @@ -572,9 +552,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint rCenter, FloatPoint rSize } } } -}; - - +} void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) { @@ -613,9 +591,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) } } -}; - - +} void CGMImpressOutAct::DrawPolygon( Polygon rPoly ) { @@ -645,10 +621,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon rPoly ) maXPropSet-setPropertyValue( PolyPolygon, aParam ); ImplSetFillBundle(); } -}; - - - +} void CGMImpressOutAct::DrawPolyLine( Polygon rPoly ) { @@ -678,9 +651,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon rPoly ) maXPropSet-setPropertyValue( PolyPolygon, aParam );
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source sd/source
filter/source/config/fragments/filters/draw8.xcu |2 filter/source/config/fragments/filters/draw8_template.xcu|2 filter/source/config/fragments/filters/impress8.xcu |2 filter/source/config/fragments/filters/impress8_draw.xcu |2 filter/source/config/fragments/filters/impress8_template.xcu |2 sd/source/ui/unoidl/UnoDocumentSettings.cxx | 25 ++- 6 files changed, 29 insertions(+), 6 deletions(-) New commits: commit e5222cf76a94c4ec20664b3e6f5a48e00ee9669f Author: Katarina Behrens bu...@bubli.org Date: Wed Sep 17 21:40:34 2014 +0200 fdo#63483: support for modify passwd in Impress and Draw iow, allow opening Impress and Draw ODF documents read-only Change-Id: I379b9f92b9bfb20e8177d9a5fae80069d98f Reviewed-on: https://gerrit.libreoffice.org/11758 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/filter/source/config/fragments/filters/draw8.xcu b/filter/source/config/fragments/filters/draw8.xcu index 6738cd8..70167a7 100644 --- a/filter/source/config/fragments/filters/draw8.xcu +++ b/filter/source/config/fragments/filters/draw8.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=draw8 oor:op=replace -prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION/value/prop +prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION PASSWORDTOMODIFY/value/prop prop oor:name=UIComponent/ prop oor:name=FilterService/ prop oor:name=UserDatavalueXML/value/prop diff --git a/filter/source/config/fragments/filters/draw8_template.xcu b/filter/source/config/fragments/filters/draw8_template.xcu index b81730e..4103a27 100644 --- a/filter/source/config/fragments/filters/draw8_template.xcu +++ b/filter/source/config/fragments/filters/draw8_template.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=draw8_template oor:op=replace -prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ENCRYPTION/value/prop +prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ENCRYPTION PASSWORDTOMODIFY/value/prop prop oor:name=UIComponent/ prop oor:name=FilterService/ prop oor:name=UserDatavalueCXMLV/value/prop diff --git a/filter/source/config/fragments/filters/impress8.xcu b/filter/source/config/fragments/filters/impress8.xcu index 90e11da..9e564c8 100644 --- a/filter/source/config/fragments/filters/impress8.xcu +++ b/filter/source/config/fragments/filters/impress8.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=impress8 oor:op=replace -prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION/value/prop +prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN DEFAULT PREFERRED ENCRYPTION PASSWORDTOMODIFY/value/prop prop oor:name=UIComponent/ prop oor:name=FilterService/ prop oor:name=UserDatavalueXML/value/prop diff --git a/filter/source/config/fragments/filters/impress8_draw.xcu b/filter/source/config/fragments/filters/impress8_draw.xcu index 5a5d5a2..47e0be9 100644 --- a/filter/source/config/fragments/filters/impress8_draw.xcu +++ b/filter/source/config/fragments/filters/impress8_draw.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=impress8_draw oor:op=replace -prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN ENCRYPTION/value/prop +prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE OWN ENCRYPTION PASSWORDTOMODIFY/value/prop prop oor:name=UIComponent/ prop oor:name=FilterService/ prop oor:name=UserDatavalueXML/value/prop diff --git a/filter/source/config/fragments/filters/impress8_template.xcu b/filter/source/config/fragments/filters/impress8_template.xcu index c812fd2..fb3cf0c 100644 --- a/filter/source/config/fragments/filters/impress8_template.xcu +++ b/filter/source/config/fragments/filters/impress8_template.xcu @@ -16,7 +16,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . -- node oor:name=impress8_template oor:op=replace -prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ENCRYPTION/value/prop +prop oor:name=FlagsvalueIMPORT EXPORT TEMPLATE TEMPLATEPATH OWN ENCRYPTION PASSWORDTOMODIFY/value/prop prop oor:name=UIComponent/ prop oor:name=FilterService/ prop oor:name=UserDatavalueCXMLV/value/prop diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx index 9ba698d..65a646d 100644 --- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx +++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx @@ -140,7 +140,7 @@ enum SdDocumentSettingsPropertyHandles
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/ieps/ieps.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7493c458780cce40f1b564b719c4445b8920f259 Author: Björgvin Ragnarsson nifgr...@gmail.com Date: Thu Sep 4 00:43:04 2014 +0300 fdo#81592 Use 24-bit color depth, not 256 colors when converting an EPS-file. This regression was introduced in f5c3f5601a3739dead635f9abc446951b385018f. Change-Id: Ica48732398cd5d225b433b177ff6e6fff649e732 (cherry picked from commit 0791335cf007e04de25e03c0a6e0aa53fa66016a) Reviewed-on: https://gerrit.libreoffice.org/11465 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index c361bc2c..945ae5d 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -347,7 +347,7 @@ static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, OUString arg6(-dTextAlphaBits=4); OUString arg7(-dGraphicsAlphaBits=4); OUString arg8(-r300x300); -OUString arg9(-sDEVICE=bmp256); +OUString arg9(-sDEVICE=bmp16m); OUString arg10(-sOutputFile=-); OUString arg11(-); rtl_uString *args[] = ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/config/fragments/filters/Beagle_Works.xcu |2 +- filter/source/config/fragments/filters/Beagle_Works_Calc.xcu |2 +- filter/source/config/fragments/filters/Beagle_Works_Draw.xcu |2 +- filter/source/config/fragments/filters/ClarisWorks.xcu |2 +- filter/source/config/fragments/filters/ClarisWorks_Calc.xcu |2 +- filter/source/config/fragments/filters/ClarisWorks_Draw.xcu |2 +- filter/source/config/fragments/filters/Great_Works.xcu |2 +- filter/source/config/fragments/filters/Great_Works_Calc.xcu |2 +- filter/source/config/fragments/filters/Great_Works_Draw.xcu |2 +- filter/source/config/fragments/filters/Mac_Works.xcu |2 +- filter/source/config/fragments/filters/Mac_Works_Calc.xcu|2 +- filter/source/config/fragments/filters/Mac_Works_Draw.xcu|2 +- 12 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 2c3f33f5d08458f50276da114bda8457d99c94b3 Author: Maxim Monastirsky momonas...@gmail.com Date: Sun Aug 3 15:58:37 2014 +0300 Fix showing calc/draw types in some file pickers Having the same UIName for several filters, causes some file pickers (gtk generic) to drop the whole group. Change-Id: I6d18a751cb77a6a83e8e2a46338e41b7c72180ff Reviewed-on: https://gerrit.libreoffice.org/10730 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com Reviewed-by: Andras Timar andras.ti...@collabora.com diff --git a/filter/source/config/fragments/filters/Beagle_Works.xcu b/filter/source/config/fragments/filters/Beagle_Works.xcu index 7d1a90f..a0cd6bc 100644 --- a/filter/source/config/fragments/filters/Beagle_Works.xcu +++ b/filter/source/config/fragments/filters/Beagle_Works.xcu @@ -15,7 +15,7 @@ valuecom.sun.star.comp.Writer.MWAWImportFilter/value /prop prop oor:name=UIName -value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Document/value +value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Text Document/value /prop prop oor:name=FileFormatVersion value0/value diff --git a/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu b/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu index 3d70268..4471531 100644 --- a/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu +++ b/filter/source/config/fragments/filters/Beagle_Works_Calc.xcu @@ -15,7 +15,7 @@ valuecom.sun.star.comp.Calc.MWAWCalcImportFilter/value /prop prop oor:name=UIName -value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Document/value +value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Spreadsheet/value /prop prop oor:name=FileFormatVersion value0/value diff --git a/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu index 57b5879..0dad311 100644 --- a/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu +++ b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu @@ -15,7 +15,7 @@ valuecom.sun.star.comp.Draw.MWAWDrawImportFilter/value /prop prop oor:name=UIName -value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Document/value +value xml:lang=en-USBeagleWorks/WordPerfect Works v1 Drawing/value /prop prop oor:name=FileFormatVersion value0/value diff --git a/filter/source/config/fragments/filters/ClarisWorks.xcu b/filter/source/config/fragments/filters/ClarisWorks.xcu index 7fc8f99..f429d00 100644 --- a/filter/source/config/fragments/filters/ClarisWorks.xcu +++ b/filter/source/config/fragments/filters/ClarisWorks.xcu @@ -21,7 +21,7 @@ prop oor:name=FilterServicevaluecom.sun.star.comp.Writer.MWAWImportFilter/value/prop prop oor:name=UserDatavalue/value/prop prop oor:name=UIName -value xml:lang=en-USClarisWorks/AppleWorks Document/value +value xml:lang=en-USClarisWorks/AppleWorks Text Document/value /prop prop oor:name=FileFormatVersionvalue0/value/prop prop oor:name=Typevaluewriter_ClarisWorks/value/prop diff --git a/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu b/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu index 77e6fdb..aa6edbb 100644 --- a/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu +++ b/filter/source/config/fragments/filters/ClarisWorks_Calc.xcu @@ -21,7 +21,7 @@ prop oor:name=FilterServicevaluecom.sun.star.comp.Calc.MWAWCalcImportFilter/value/prop prop oor:name=UserDatavalue/value/prop prop oor:name=UIName -value xml:lang=en-USClarisWorks/AppleWorks Document/value +value xml:lang=en-USClarisWorks/AppleWorks Spreadsheet/value /prop prop oor:name=FileFormatVersionvalue0/value/prop prop oor:name=Typevaluecalc_ClarisWorks/value/prop diff --git
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/itiff/itiff.cxx | 31 +++- 1 file changed, 22 insertions(+), 9 deletions(-) New commits: commit 6f87560daba857baecb56617ac23b8960c71ad85 Author: Caolán McNamara caol...@redhat.com Date: Sat Aug 9 17:23:07 2014 +0100 valgrind + bff: Integer divide by zero Change-Id: I4c47d17a421f1c6d2d6cc29c7b92ec930bdf901f (cherry picked from commit a1fab361cb3325b2d012942e43660f2c0a2a4b96) Reviewed-on: https://gerrit.libreoffice.org/11021 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index 061592b..f708435 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -176,6 +176,19 @@ public: delete pAlphaMask; } +sal_uLong GetRowsPerStrip() const +{ +//Rows Per Strip: +// +//(TIFF format only) The number of rows of pixels per strip to use for +//encoding the TIFF image. A value greater than zero specifies the +//number of rows per strip. A value of 0 sets the rows per strip equal +//to the image length, resulting in a single strip. A value of -1 (the +//default) sets the rows per strip equal to infinity, resulting in a +//single strip. +return nRowsPerStrip == 0 ? nImageLength : nRowsPerStrip; +} + bool ReadTIFF( SvStream rTIFF, Graphic rGraphic ); }; @@ -539,10 +552,10 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent ) { for ( np = 0; np nPlanes; np++ ) { -nStrip = ny / nRowsPerStrip + np * nStripsPerPlane; +nStrip = ny / GetRowsPerStrip() + np * nStripsPerPlane; if ( nStrip = nNumStripOffsets ) return false; -pTIFF-Seek( pStripOffsets[ nStrip ] + ( ny % nRowsPerStrip ) * nStripBytesPerRow ); +pTIFF-Seek( pStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow ); pTIFF-Read( pMap[ np ], nBytesPerRow ); if ( pTIFF-GetError() ) return false; @@ -593,9 +606,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent ) { for ( np = 0; np nPlanes; np++ ) { -if ( ny / nRowsPerStrip + np * nStripsPerPlane nStrip ) +if ( ny / GetRowsPerStrip() + np * nStripsPerPlane nStrip ) { -nStrip=ny/nRowsPerStrip+np*nStripsPerPlane; +nStrip=ny/GetRowsPerStrip()+np*nStripsPerPlane; if ( nStrip = nNumStripOffsets ) return false; pTIFF-Seek( pStripOffsets[ nStrip ] ); @@ -624,9 +637,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent ) { for ( np = 0; np nPlanes; np++ ) { -if ( ny / nRowsPerStrip + np * nStripsPerPlane nStrip ) +if ( ny / GetRowsPerStrip() + np * nStripsPerPlane nStrip ) { -nStrip = ny / nRowsPerStrip + np * nStripsPerPlane; +nStrip = ny / GetRowsPerStrip() + np * nStripsPerPlane; if ( nStrip = nNumStripOffsets ) return false; pTIFF-Seek(pStripOffsets[nStrip]); @@ -652,9 +665,9 @@ bool TIFFReader::ReadMap( sal_uLong nMinPercent, sal_uLong nMaxPercent ) { for ( np = 0; np nPlanes; np++ ) { -if ( ny / nRowsPerStrip + np * nStripsPerPlane nStrip ) +if ( ny / GetRowsPerStrip() + np * nStripsPerPlane nStrip ) { -nStrip=ny/nRowsPerStrip+np*nStripsPerPlane; +nStrip=ny/GetRowsPerStrip()+np*nStripsPerPlane; if ( nStrip = nNumStripOffsets ) return false; pTIFF-Seek(pStripOffsets[nStrip]); @@ -1310,7 +1323,7 @@ bool TIFFReader::ReadTIFF(SvStream rTIFF, Graphic rGraphic ) if ( ( nFillOrder == 2 ) ( nCompression != 5 ) ) // in the LZW mode bits are already being inverted bByteSwap = true; -nStripsPerPlane = ( nImageLength - 1 ) / nRowsPerStrip + 1; +nStripsPerPlane = ( nImageLength - 1 ) / GetRowsPerStrip() + 1; nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) 3; for ( sal_uLong j = 0; j 4; j++ ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/itiff/itiff.cxx | 29 1 file changed, 17 insertions(+), 12 deletions(-) New commits: commit 3bcdd9fc24a9bec2997768c6aa7a78a0c1f329ee Author: Caolán McNamara caol...@redhat.com Date: Tue Aug 19 15:14:04 2014 +0100 guard against division by 0 valgrind + bff Change-Id: I5fa40f7a9759c98bb70ee6eb854dd9b376401f89 (cherry picked from commit 1ab0e8717bee9fee6c42015647bccfbf1683b8fc) Reviewed-on: https://gerrit.libreoffice.org/11036 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx index f708435..4122ab2 100644 --- a/filter/source/graphicfilter/itiff/itiff.cxx +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -1324,29 +1324,34 @@ bool TIFFReader::ReadTIFF(SvStream rTIFF, Graphic rGraphic ) bByteSwap = true; nStripsPerPlane = ( nImageLength - 1 ) / GetRowsPerStrip() + 1; -nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) 3; +bStatus = nPlanes != 0; -for ( sal_uLong j = 0; j 4; j++ ) +if (bStatus) { -try -{ -pMap[ j ] = new sal_uInt8[ nBytesPerRow ]; -} -catch (const std::bad_alloc ) +nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) 3; + +for ( sal_uLong j = 0; j 4; j++ ) { -pMap[ j ] = NULL; -bStatus = false; -break; +try +{ +pMap[ j ] = new sal_uInt8[ nBytesPerRow ]; +} +catch (const std::bad_alloc ) +{ +pMap[ j ] = NULL; +bStatus = false; +break; +} } } -if (HasAlphaChannel()) +if (bStatus HasAlphaChannel()) { pAlphaMask = new AlphaMask( aTargetSize ); pMaskAcc = pAlphaMask-AcquireWriteAccess(); } -if ( bStatus ReadMap( 10, 60 ) ) +if (bStatus ReadMap(10, 60)) { nMaxPos = std::max( pTIFF-Tell(), nMaxPos ); MakePalCol(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/xsltfilter/XSLTFilter.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit e9affcdc32fe6796b60b5b4d484b296f70e745b2 Author: Maxim Monastirsky momonas...@gmail.com Date: Wed Aug 6 12:30:22 2014 +0300 fdo#45418 xslt: Make sure we're reading from the beginning Change-Id: Id5beb6af8c32ab45d7e31120d38966f8fe4d5418 (cherry picked from commit b7325b907edf0cd8e2ca577e9796c1cf7d56bd70) Reviewed-on: https://gerrit.libreoffice.org/10786 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx index 26cb3a0..4c769e8 100644 --- a/filter/source/xsltfilter/XSLTFilter.cxx +++ b/filter/source/xsltfilter/XSLTFilter.cxx @@ -58,6 +58,7 @@ #include com/sun/star/io/XActiveDataSource.hpp #include com/sun/star/io/XActiveDataSink.hpp #include com/sun/star/io/XActiveDataControl.hpp +#include com/sun/star/io/XSeekable.hpp #include com/sun/star/io/XStreamListener.hpp #include com/sun/star/util/PathSubstitution.hpp #include com/sun/star/util/XStringSubstitution.hpp @@ -338,6 +339,10 @@ namespace XSLT { try { +css::uno::Referencecss::io::XSeekable xSeek(xInputStream, UNO_QUERY); +if (xSeek.is()) +xSeek-seek(0); + // we want to be notfied when the processing is done... m_tcontrol-addListener(css::uno::ReferenceXStreamListener ( this)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/config/fragments/types/calc_MS_Works_Document.xcu |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5dcfa10a547eb60b826128a72b8eccc198e074a6 Author: Maxim Monastirsky momonas...@gmail.com Date: Sun Aug 3 15:51:51 2014 +0300 Fix calc_MS_Works_Document extensions Change-Id: Icbf087464997561b09c7b43c2269eea2c8c603bb (cherry picked from commit e5ac048af125e82829d353ec031c99e96572e2c0) Reviewed-on: https://gerrit.libreoffice.org/10728 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/filter/source/config/fragments/types/calc_MS_Works_Document.xcu b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu index 8785a32..f45dfe1 100644 --- a/filter/source/config/fragments/types/calc_MS_Works_Document.xcu +++ b/filter/source/config/fragments/types/calc_MS_Works_Document.xcu @@ -18,7 +18,7 @@ node oor:name=calc_MS_Works_Document oor:op=replace prop oor:name=DetectServicevaluecom.sun.star.comp.Calc.MSWorksCalcImportFilter/value/prop prop oor:name=URLPattern/ -prop oor:name=Extensionsvaluewks/wdb/value/prop +prop oor:name=Extensionsvaluewks wdb/value/prop prop oor:name=MediaType/prop prop oor:name=Preferredvaluetrue/value/prop prop oor:name=PreferredFiltervalueMS_Works_Calc/value/prop ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/graphicfilter/ipict/ipict.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 921c9e1a269cc2b34cfd230f73f3c2350204fde8 Author: Jan Holesovsky ke...@collabora.com Date: Tue Jun 10 17:13:38 2014 +0200 pct import: Reset clip region before closing the metafile. Otherwise parts of the image are missing. Change-Id: If9018c32807359862a9be825b0ebdaacce2d3490 diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 3cbf4a2..64f998e 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -1860,6 +1860,7 @@ void PictReader::ReadPict( SvStream rStreamPict, GDIMetaFile rGDIMetaFile ) pPict-Seek(nPos); } +pVirDev-SetClipRegion(); rGDIMetaFile.Stop(); delete pVirDev; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - filter/source
filter/source/svg/svgexport.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 62a1d235238ca946f4b960a91480107d6acdd2c0 Author: László Németh nem...@numbertext.org Date: Fri May 23 01:11:07 2014 +0200 fdo#79078 restore transparency in SVG export Change-Id: I5bdf6c3b313a73126cb692e5101836f424a2fc08 diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 244d08b..00016cd 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -353,8 +353,8 @@ SVGExport::SVGExport( // Native Decoration mbIsUseNativeTextDecoration = mbIsUseTinyProfile ? sal_False : aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_NATIVEDECORATION, sal_False); -// Tiny Opacity -mbIsUseOpacity = mbIsUseTinyProfile ? sal_False : aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_OPACITY, sal_True); +// Tiny Opacity (supported from SVG Tiny 1.2) +mbIsUseOpacity = aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_OPACITY, sal_True); // Positioned Characters(Seems to be experimental, as it was always initialized with false) mbIsUsePositionedCharacters = aFilterDataHashMap.getUnpackedValueOrDefault(SVG_PROP_POSITIONED_CHARACTERS, sal_False); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits