diff options
author | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2014-07-14 19:09:11 +0000 |
commit | 3c1d4742e649fe9c8aed8c2817fe3e1f3364f298 (patch) | |
tree | e0c6e02c89aa9227726c9469da1001b3e29c41df /vcl/source/gdi | |
parent | c5c31e2aeaedbdf76e1f38d3c385e34f5ed875ca (diff) |
Resync to trunk, windows non-pro build
aoo/aw080
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/bitmapex.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 4 | ||||
-rwxr-xr-x | vcl/source/gdi/dibtools.cxx | 40 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/outdev2.cxx | 15 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/outdev4.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/outdev6.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/pngread.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print2.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/regband.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/region.cxx | 26 | ||||
-rwxr-xr-x | vcl/source/gdi/regionband.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/textlayout.cxx | 2 |
19 files changed, 94 insertions, 67 deletions
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index c0494b2c9ff9..5e4d6005006a 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -1002,7 +1002,7 @@ BitmapEx BitmapEx::getTransformed( // aOutlineRange aTransform = rTransformation * aTransform; - // substract top-left of absolute VisibleRange + // subtract top-left of absolute VisibleRange aTransform.translate( -aVisibleRange.getMinX(), -aVisibleRange.getMinY()); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index d78cfc77aa48..998ca97ca8dd 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -1376,7 +1376,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } } - // cleanup push-pop stack if neccessary + // cleanup push-pop stack if necessary for( void* pLineInfo = aLIStack.Pop(); pLineInfo; pLineInfo = aLIStack.Pop() ) delete (LineInfo*) pLineInfo; @@ -1421,7 +1421,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) rOStm.Seek( nActPos ); rOStm.SetNumberFormatInt( nOldFormat ); - // cleanup push-pop stack if neccessary + // cleanup push-pop stack if necessary for( void* pCol = aLineColStack.Pop(); pCol; pCol = aLineColStack.Pop() ) delete (Color*) pCol; } diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 2e7d698ba87d..503ccf902d5c 100755 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -390,7 +390,11 @@ void ImplDecodeRLE( sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& rAcc, BitmapWriteAccess* pAccAlpha, bool bTopDown, bool& rAlphaUsed) { - const sal_uLong nAlignedWidth = AlignedWidth4Bytes(rHeader.nWidth * rHeader.nBitCount); + const sal_Int64 nBitsPerLine (static_cast<sal_Int64>(rHeader.nWidth) * static_cast<sal_Int64>(rHeader.nBitCount)); + if (nBitsPerLine > SAL_MAX_UINT32) + return false; + + const sal_uLong nAlignedWidth = AlignedWidth4Bytes(static_cast<sal_uLong>(nBitsPerLine)); sal_uInt32 nRMask(( rHeader.nBitCount == 16 ) ? 0x00007c00UL : 0x00ff0000UL); sal_uInt32 nGMask(( rHeader.nBitCount == 16 ) ? 0x000003e0UL : 0x0000ff00UL); sal_uInt32 nBMask(( rHeader.nBitCount == 16 ) ? 0x0000001fUL : 0x000000ffUL); @@ -611,11 +615,21 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon { DIBV5Header aHeader; const sal_uLong nStmPos = rIStm.Tell(); - bool bRet(false); - bool bTopDown(false); + bool bRet( false ); + bool bTopDown( false ); - if(ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount) + if ( ImplReadDIBInfoHeader( rIStm, aHeader, bTopDown ) + && aHeader.nWidth != 0 + && aHeader.nHeight != 0 + && aHeader.nBitCount != 0 ) { + if ( nOffset > 0 && aHeader.nSize > nOffset ) + { + // Header size claims to extend into the image data. + // Looks like an error. + return false; + } + const sal_uInt16 nBitCount(discretizeBitcount(aHeader.nBitCount)); const Size aSizePixel(aHeader.nWidth, aHeader.nHeight); BitmapPalette aDummyPal; @@ -764,14 +778,18 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset ) { - sal_uInt32 nTmp32; - sal_uInt16 nTmp16 = 0; - bool bRet = false; + bool bRet = false; + const sal_Int64 nSavedStreamPos( rIStm.Tell() ); + const sal_Int64 nStreamLength( rIStm.Seek( STREAM_SEEK_TO_END ) ); + rIStm.Seek( nSavedStreamPos ); + + sal_uInt16 nTmp16 = 0; rIStm >> nTmp16; if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) ) { + sal_uInt32 nTmp32; if ( 0x4142 == nTmp16 ) { rIStm.SeekRel( 12L ); @@ -788,6 +806,14 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset ) rOffset = nTmp32 - 14UL; // adapt offset by sizeof(BITMAPFILEHEADER) bRet = ( rIStm.GetError() == 0UL ); } + + if ( rOffset >= nStreamLength ) + { + // Offset claims that image starts past the end of the + // stream. Unlikely. + rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); + bRet = false; + } } else rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR ); diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 68870d8486a4..a6dd49f366d2 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -3095,7 +3095,7 @@ sal_Bool GDIMetaFile::CreateThumbnail( sal_uInt32 nMaximumExtent, const_cast<GDIMetaFile *>(this)->WindStart(); const_cast<GDIMetaFile *>(this)->Play( &aVDev, aBackPosPix, aDrawSize ); - // draw overlay if neccessary + // draw overlay if necessary if ( pOverlay ) aVDev.DrawBitmapEx( aOverlayRect.TopLeft(), aOverlayRect.GetSize(), *pOverlay ); diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index f13620ad49df..3b442d867625 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -825,8 +825,11 @@ void OutputDevice::DrawTransformedBitmapEx( { // with no rotation, shear or mirroring it can be mapped to DrawBitmapEx // do *not* execute the mirroring here, it's done in the fallback + // #124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); - const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); + const Size aDestSize( + basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(), + basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); return; @@ -879,8 +882,11 @@ void OutputDevice::DrawTransformedBitmapEx( { // with no rotation or shear it can be mapped to DrawBitmapEx // do *not* execute the mirroring here, it's done in the fallback + // #124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aTranslate.getX()), basegfx::fround(aTranslate.getY())); - const Size aDestSize(basegfx::fround(aScale.getX()), basegfx::fround(aScale.getY())); + const Size aDestSize( + basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(), + basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, rBitmapEx); return; @@ -1016,8 +1022,11 @@ void OutputDevice::DrawTransformedBitmapEx( aTargetRange.getMinimum())); // extract point and size; do not remove size, the bitmap may have been prepared reduced by purpose + // #124580# the correct DestSize needs to be calculated based on MaxXY values const Point aDestPt(basegfx::fround(aVisibleRange.getMinX()), basegfx::fround(aVisibleRange.getMinY())); - const Size aDestSize(basegfx::fround(aVisibleRange.getWidth()), basegfx::fround(aVisibleRange.getHeight())); + const Size aDestSize( + basegfx::fround(aVisibleRange.getMaxX()) - aDestPt.X(), + basegfx::fround(aVisibleRange.getMaxY()) - aDestPt.Y()); DrawBitmapEx(aDestPt, aDestSize, aTransformed); } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index cb65e9d8e001..2657f23e4970 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -6043,14 +6043,6 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr, ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray ); -#ifdef MACOSX - // CoreText layouts are immutable and already contain the text color - // so we need to provide the color already for the layout request - // even if this layout will never be drawn - if( mbInitTextColor ) - const_cast<OutputDevice&>(*this).ImplInitTextColor(); -#endif - // get matching layout object for base font SalLayout* pSalLayout = NULL; if( mpPDFWriter ) diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 373b367c4dcd..95e2600328be 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -754,7 +754,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, mbInitFillColor = sal_True; - // calculate step count if neccessary + // calculate step count if necessary if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); @@ -919,7 +919,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, mbInitFillColor = sal_True; - // calculate step count if neccessary + // calculate step count if necessary if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); @@ -1028,7 +1028,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r aRect.Right()++; aRect.Bottom()++; - // calculate step count if neccessary + // calculate step count if necessary if ( !aGradient.GetSteps() ) aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index fa097c846a45..59070d06269b 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -241,7 +241,7 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly, return; } - // short circut for drawing an invisible polygon + // short circuit for drawing an invisible polygon if( !mbFillColor || (nTransparencePercent >= 100) ) { // short circuit if the polygon border is invisible too @@ -682,7 +682,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, if(GetAntialiasing()) { // #i102109# - // For MetaFile replay (see task) it may now be neccessary to take + // For MetaFile replay (see task) it may now be necessary to take // into account that the content is AntiAlialised and needs to be masked // like that. Instead of masking, i will use a copy-modify-paste cycle // here (as i already use in the VclPrimiziveRenderer with successs) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index cbc088ee1b7f..dffa0cd8db81 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4302,7 +4302,7 @@ bool PDFWriterImpl::emitFonts() if( ((++ni) & 7) == 0 ) aFontDict.append( '\n' ); } - // emit builtin font for widget apperances / variable text + // emit builtin font for widget appearances / variable text for( std::map< sal_Int32, sal_Int32 >::iterator it = m_aBuiltinFontToObjectMap.begin(); it != m_aBuiltinFontToObjectMap.end(); ++it ) { @@ -4731,7 +4731,7 @@ we check in the following sequence: } else { -// change the fragment to accomodate the bookmark (only if the file extension is PDF and +// change the fragment to accommodate the bookmark (only if the file extension is PDF and // the requested action is of the correct type) if(m_aContext.DefaultLinkAction == PDFWriter::URIActionDestination && bTargetHasPDFExtension && aFragment.getLength() > 0 ) @@ -6157,7 +6157,7 @@ sal_Int32 PDFWriterImpl::emitNamedDestinations() aLine.append( '/' ); appendDestinationName( aName, aLine ); // this conversion must be done when forming the link to target ( see in emitCatalog ) aLine.append( '[' ); // the '[' can be emitted immediately, because the appendDestinationName function - //maps the preceeding character properly + //maps the preceding character properly aLine.append( rDestPage.m_nPageObject ); aLine.append( " 0 R" ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 889dc4aa5ef7..20a216cf987d 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -964,7 +964,7 @@ i12626 sal_Int32 updateOutlineItemCount( std::vector< sal_Int32 >& rCounts, sal_Int32 nItemLevel, sal_Int32 nCurrentItemId ); - // default appearences for widgets + // default appearances for widgets sal_Int32 findRadioGroupWidget( const PDFWriter::RadioButtonWidget& rRadio ); Font replaceFont( const Font& rControlFont, const Font& rAppSetFont ); sal_Int32 getBestBuiltinFont( const Font& rFont ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 3eb610866b5f..4359d4186bce 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -104,7 +104,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz } if( i_rContext.m_nMaxImageResolution > 50 ) { - // do downsampling if neccessary + // do downsampling if necessary const Size aDstSizeTwip( i_pDummyVDev->PixelToLogic( i_pDummyVDev->LogicToPixel( aSize ), MAP_TWIP ) ); const Size aBmpSize( aBitmapEx.GetSizePixel() ); const double fBmpPixelX = aBmpSize.Width(); @@ -168,7 +168,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz if ( bUseJPGCompression ) { sal_uInt32 nZippedFileSize; // sj: we will calculate the filesize of a zipped bitmap - { // to determine if jpeg compression is usefull + { // to determine if jpeg compression is useful SvMemoryStream aTemp; aTemp.SetCompressMode( aTemp.GetCompressMode() | COMPRESSMODE_ZBITMAP ); aTemp.SetVersion( SOFFICE_FILEFORMAT_40 ); // sj: up from version 40 our bitmap stream operator @@ -1176,7 +1176,7 @@ void PDFWriterImpl::checkAndEnableStreamEncryption( register sal_Int32 nObject ) // the i+2 to take into account the generation number, always zero rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) ); // initialize the RC4 with the key - // key legth: see algoritm 3.1, step 4: (N+5) max 16 + // key legth: see algorithm 3.1, step 4: (N+5) max 16 rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 ); } } @@ -1195,7 +1195,7 @@ void PDFWriterImpl::enableStringEncryption( register sal_Int32 nObject ) // the i+2 to take into account the generation number, always zero rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) ); // initialize the RC4 with the key - // key legth: see algoritm 3.1, step 4: (N+5) max 16 + // key legth: see algorithm 3.1, step 4: (N+5) max 16 rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 ); } } @@ -1520,7 +1520,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter, else { //or 3.5, for 128 bit security - //step6, initilize the last 16 bytes of the encrypted user password to 0 + //step6, initialize the last 16 bytes of the encrypted user password to 0 for(sal_uInt32 i = MD5_DIGEST_SIZE; i < sal_uInt32(io_rProperties.UValue.size()); i++) io_rProperties.UValue[i] = 0; //step 2 diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 97531772c80b..b35db105cfca 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -117,7 +117,7 @@ private: sal_Int32 mnChunkLen; // Length of current PNG chunk Size maOrigSize; // pixel size of the full image Size maTargetSize; // pixel size of the result image - Size maPhysSize; // prefered size in MAP_100TH_MM units + Size maPhysSize; // preferred size in MAP_100TH_MM units sal_uInt32 mnBPP; // number of bytes per pixel sal_uInt32 mnScansize; // max size of scanline sal_uInt32 mnYpos; // latest y position in full image diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 76e1642f1bd6..2dbfb2a2cdf1 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -156,7 +156,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) { // get service provider Reference< XMultiServiceFactory > xSMgr( comphelper::getProcessServiceFactory() ); - // create configuration hierachical access name + // create configuration hierarchical access name if( xSMgr.is() ) { try @@ -568,7 +568,7 @@ SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const XubString& rPrinterName, ImplPrnQueueList* pPrnList = pSVData->maGDIData.mpPrinterQueueList; if ( pPrnList && pPrnList->m_aQueueInfos.size() ) { - // first search for the printer name driectly + // first search for the printer name directly ImplPrnQueueData* pInfo = pPrnList->Get( rPrinterName ); if( pInfo ) return pInfo->mpSalQueueInfo; diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 5b3b04102577..b1f9831f3c6e 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -1380,7 +1380,7 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz, const Rectangle aBmpRect( aPoint, aBmp.GetSizePixel() ); Rectangle aSrcRect( rSrcPt, rSrcSz ); - // do cropping if neccessary + // do cropping if necessary if( aSrcRect.Intersection( aBmpRect ) != aBmpRect ) { if( !aSrcRect.IsEmpty() ) @@ -1391,7 +1391,7 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz, if( !aBmp.IsEmpty() ) { - // do downsampling if neccessary + // do downsampling if necessary Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); // #103209# Normalize size (mirroring has to happen outside of this method) @@ -1449,7 +1449,7 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz, const Rectangle aBmpRect( aPoint, aBmpEx.GetSizePixel() ); Rectangle aSrcRect( rSrcPt, rSrcSz ); - // do cropping if neccessary + // do cropping if necessary if( aSrcRect.Intersection( aBmpRect ) != aBmpRect ) { if( !aSrcRect.IsEmpty() ) @@ -1460,7 +1460,7 @@ BitmapEx OutputDevice::GetDownsampledBitmapEx( const Size& rDstSz, if( !aBmpEx.IsEmpty() ) { - // do downsampling if neccessary + // do downsampling if necessary Size aDstSizeTwip( PixelToLogic( LogicToPixel( rDstSz ), MAP_TWIP ) ); // #103209# Normalize size (mirroring has to happen outside of this method) diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index a1296b7ea065..578a372582ee 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1217,7 +1217,7 @@ void PrinterController::printFilteredPage( int i_nPage ) mpImplData->mpPrinter->SetPaperBin( mpImplData->mnFixedPaperBin ); } - // if full paper is meant to be used, move the output to accomodate for pageoffset + // if full paper is meant to be used, move the output to accommodate for pageoffset if( aPageSize.bFullPaper ) { Point aPageOffset( mpImplData->mpPrinter->GetPageOffset() ); diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx index 2dec6ecac2be..d53fa74c9f7f 100644 --- a/vcl/source/gdi/regband.cxx +++ b/vcl/source/gdi/regband.cxx @@ -187,7 +187,7 @@ void ImplRegionBand::ProcessPoints() ImplRegionBandPoint* pNextBandPoint = pRegionBandPoint->mpNextBandPoint->mpNextBandPoint; - // remove allready processed points + // remove already processed points delete pRegionBandPoint->mpNextBandPoint; delete pRegionBandPoint; @@ -222,7 +222,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId, return true; } - // look if line allready touched the band + // look if line already touched the band ImplRegionBandPoint* pRegionBandPoint = mpFirstBandPoint; ImplRegionBandPoint* pLastTestedRegionBandPoint = NULL; while( pRegionBandPoint ) @@ -932,7 +932,7 @@ bool ImplRegionBand::operator==( const ImplRegionBand& rRegionBand ) const pSecondRectBandSep = pSecondRectBandSep->mpNextSep; } - // differnt number of separations? + // different number of separations? if ( pOwnRectBandSep || pSecondRectBandSep ) return false; diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 05e191f9a3b5..0aacd96e273d 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -130,7 +130,7 @@ namespace OSL_ASSERT(aStart.X() == aEnd.X()); // Sort y-coordinates to simplify the algorithm and store the - // direction seperately. The direction is calculated as it is + // direction separately. The direction is calculated as it is // in other places (but seems to be the wrong way.) const long nTop (::std::min(aStart.Y(), aEnd.Y())); const long nBottom (::std::max(aStart.Y(), aEnd.Y())); @@ -218,7 +218,7 @@ namespace pRegionBand->InsertLine( aPoly.GetPoint(nPoint-1), aPoly.GetPoint(nPoint), nLineID++ ); } - // close polygon with line from first point to last point, if neccesary + // close polygon with line from first point to last point, if necessary const Point rLastPoint = aPoly.GetPoint(nSize-1); const Point rFirstPoint = aPoly.GetPoint(0); @@ -586,7 +586,7 @@ bool Region::Union( const Rectangle& rRect ) const long nRight(std::max(rRect.Left(), rRect.Right())); const long nBottom(std::max(rRect.Top(), rRect.Bottom())); - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list pNew->InsertBands(nTop, nBottom); // process union @@ -679,7 +679,7 @@ bool Region::Intersect( const Rectangle& rRect ) const long nRight(std::max(rRect.Left(), rRect.Right())); const long nBottom(std::max(rRect.Top(), rRect.Bottom())); - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list pNew->InsertBands(nTop, nBottom); // process intersect @@ -712,7 +712,7 @@ bool Region::Exclude( const Rectangle& rRect ) if(IsNull()) { - // error; cannnot exclude from null region since this is not representable + // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)"); return true; @@ -760,7 +760,7 @@ bool Region::Exclude( const Rectangle& rRect ) const long nRight(std::max(rRect.Left(), rRect.Right())); const long nBottom(std::max(rRect.Top(), rRect.Bottom())); - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list pNew->InsertBands(nTop, nBottom); // process exclude @@ -794,7 +794,7 @@ bool Region::XOr( const Rectangle& rRect ) if(IsNull()) { - // error; cannnot exclude from null region since this is not representable + // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::XOr error: Cannot XOr with null region (!)"); return true; @@ -845,7 +845,7 @@ bool Region::XOr( const Rectangle& rRect ) const long nRight(std::max(rRect.Left(), rRect.Right())); const long nBottom(std::max(rRect.Top(), rRect.Bottom())); - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list pNew->InsertBands(nTop, nBottom); // process xor @@ -1095,7 +1095,7 @@ bool Region::Exclude( const Region& rRegion ) if(IsNull()) { - // error; cannnot exclude from null region since this is not representable + // error; cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::Exclude error: Cannot exclude from null region (!)"); return true; @@ -1167,7 +1167,7 @@ bool Region::XOr( const Region& rRegion ) if ( rRegion.IsNull() ) { - // error; cannnot exclude null region from local since this is not representable + // error; cannot exclude null region from local since this is not representable // in the data OSL_ENSURE(false, "Region::XOr error: Cannot XOr with null region (!)"); return true; @@ -1182,7 +1182,7 @@ bool Region::XOr( const Region& rRegion ) if(IsNull()) { - // error; cannnot exclude from null region since this is not representable + // error: cannot exclude from null region since this is not representable // in the data OSL_ENSURE(false, "Region::XOr error: Cannot XOr with null region (!)"); return false; @@ -1389,7 +1389,7 @@ bool Region::IsInside( const Point& rPoint ) const // return mpImplRegion->getRegionPolyPoly()->IsInside( rPoint ); //} - // ensure RegionBand existance + // ensure RegionBand existence const RegionBand* pRegionBand = GetAsRegionBand(); if(pRegionBand) @@ -1703,7 +1703,7 @@ void Region::GetRegionRectangles(RectangleVector& rTarget) const // clear returnvalues rTarget.clear(); - // ensure RegionBand existance + // ensure RegionBand existence const RegionBand* pRegionBand = GetAsRegionBand(); if(pRegionBand) diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx index c0e31a6b587b..055fb340b75d 100755 --- a/vcl/source/gdi/regionband.cxx +++ b/vcl/source/gdi/regionband.cxx @@ -788,7 +788,7 @@ void RegionBand::InsertBands(long nTop, long nBottom) break; } - // insert bands between two bands if neccessary + // insert bands between two bands if necessary if ( pBand->mpNextBand ) { if ( (pBand->mnYBottom + 1) < pBand->mpNextBand->mnYTop ) @@ -977,7 +977,7 @@ void RegionBand::Union(const RegionBand& rSource) while ( pBand ) { - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list InsertBands(pBand->mnYTop, pBand->mnYBottom); // process all elements of the list @@ -1094,7 +1094,7 @@ void RegionBand::Intersect(const RegionBand& rSource) while ( pBand ) { - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list InsertBands( pBand->mnYTop, pBand->mnYBottom ); // process all elements of the list @@ -1127,7 +1127,7 @@ void RegionBand::Intersect(const RegionBand& rSource) pBand = pBand->mpNextBand; } - // remove all untouched bands if bands allready left + // remove all untouched bands if bands already left ImplRegionBand* pPrevBand = 0; pBand = mpFirstBand; @@ -1168,7 +1168,7 @@ bool RegionBand::Exclude(const RegionBand& rSource) while ( pBand ) { - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list InsertBands( pBand->mnYTop, pBand->mnYBottom ); // process all elements of the list @@ -1225,7 +1225,7 @@ void RegionBand::XOr(const RegionBand& rSource) while ( pBand ) { - // insert bands if the boundaries are not allready in the list + // insert bands if the boundaries are not already in the list InsertBands( pBand->mnYTop, pBand->mnYBottom ); // process all elements of the list diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 70c56cff7e9e..f645dfb2139b 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -147,7 +147,7 @@ namespace vcl // normally, controls simulate "zoom" by "zooming" the font. This is responsible for (part of) the discrepancies // between text in Writer and text in controls in Writer, though both have the same font. // So, if we have a zoom set at the control, then we do not scale the font, but instead modify the map mode - // to accomodate for the zoom. + // to accommodate for the zoom. aTargetMapMode.SetScaleX( m_aZoom ); // TODO: shouldn't this be "current_scale * zoom"? aTargetMapMode.SetScaleY( m_aZoom ); |