summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPhilipp Weissenbacher <p.weissenbacher@gmail.com>2013-03-26 15:47:41 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-03-26 15:09:10 +0000
commita5fef4aff586c053486116bcc34cea084457b5e5 (patch)
tree2b8aa247e1b2d7c74b3fd5de303a330eb132339c /vcl
parent705f0bb3280b53b4bb789a27f011486d834a01ea (diff)
Translate German comments, clean up some WS
Change-Id: I1a6a99bb8efe8c3d10973c255040fbbf0f76f27d Reviewed-on: https://gerrit.libreoffice.org/3057 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/alpha.cxx7
-rw-r--r--vcl/source/gdi/animate.cxx50
-rw-r--r--vcl/source/gdi/bitmap.cxx34
-rw-r--r--vcl/source/gdi/bitmap2.cxx4
-rw-r--r--vcl/source/gdi/bitmap3.cxx26
-rw-r--r--vcl/source/gdi/bitmapex.cxx10
-rw-r--r--vcl/source/gdi/bmpacc.cxx30
-rw-r--r--vcl/source/gdi/bmpacc2.cxx66
-rw-r--r--vcl/source/gdi/bmpacc3.cxx18
-rw-r--r--vcl/source/gdi/bmpfast.cxx37
-rw-r--r--vcl/source/gdi/configsettings.cxx31
-rw-r--r--vcl/source/gdi/cvtgrf.cxx15
-rw-r--r--vcl/source/gdi/cvtsvm.cxx93
-rw-r--r--vcl/source/gdi/font.cxx143
14 files changed, 125 insertions, 439 deletions
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 76fc9a0a1a0a..c4024137c6ff 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -22,10 +22,6 @@
#include <tools/color.hxx>
#include <vcl/alpha.hxx>
-// -------------
-// - AlphaMask -
-// -------------
-
AlphaMask::AlphaMask()
{
}
@@ -83,8 +79,7 @@ sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRect
const AlphaMask* pAlphaSrc )
{
// Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups
- // this optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
-
+ // This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor)
const Size aSizePix( GetSizePixel() );
Rectangle aRectDst( rRectDst );
sal_Bool bRet = sal_False;
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 9665f832040e..442af4ada75f 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -174,10 +174,10 @@ sal_Bool Animation::IsTransparent() const
Rectangle aRect( aPoint, maGlobalSize );
sal_Bool bRet = sal_False;
- // Falls irgendein 'kleines' Bildchen durch den Hintergrund
- // ersetzt werden soll, muessen wir 'transparent' sein, um
- // richtig dargestellt zu werden, da die Appl. aus Optimierungsgruenden
- // kein Invalidate auf nicht-transp. Grafiken ausfuehren
+ // If some small bitmap needs to be replaced by the background,
+ // we need to be transparent, in order to be displayed correctly
+ // as the application (?) does not invalidate on non-transparent
+ // graphics due to performance reasons.
for( size_t i = 0, nCount = maList.size(); i < nCount; i++ )
{
const AnimationBitmap* pAnimBmp = maList[ i ];
@@ -494,7 +494,7 @@ sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp )
maGlobalSize = aGlobalRect.Union( Rectangle( rStepBmp.aPosPix, rStepBmp.aSizePix ) ).GetSize();
maList.push_back( new AnimationBitmap( rStepBmp ) );
- // zunaechst nehmen wir die erste BitmapEx als Ersatz-BitmapEx
+ // As a start, we make the first BitmapEx the replacement BitmapEx
if( maList.size() == 1 )
maBitmapEx = rStepBmp.aBmpEx;
@@ -517,10 +517,8 @@ void Animation::Replace( const AnimationBitmap& rNewAnimationBitmap, sal_uInt16
delete maList[ nAnimation ];
maList[ nAnimation ] = new AnimationBitmap( rNewAnimationBitmap );
- // Falls wir an erster Stelle einfuegen,
- // muessen wir natuerlich auch,
- // auch die Ersatzdarstellungs-BitmapEx
- // aktualisieren;
+ // If we insert at first position we also need to
+ // update the replacement BitmapEx
if ( ( !nAnimation
&& ( !mbLoopTerminated
|| ( maList.size() == 1 )
@@ -707,14 +705,14 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
{
const sal_uInt32 nDummy32 = 0UL;
- // Falls keine BitmapEx gesetzt wurde, schreiben wir
- // einfach die erste Bitmap der Animation
+ // If no BitmapEx was set we write the first Bitmap of
+ // the Animation
if( !rAnimation.GetBitmapEx().GetBitmap() )
rOStm << rAnimation.Get( 0 ).aBmpEx;
else
rOStm << rAnimation.GetBitmapEx();
- // Kennung schreiben ( SDANIMA1 )
+ // Write identifier ( SDANIMA1 )
rOStm << (sal_uInt32) 0x5344414e << (sal_uInt32) 0x494d4931;
for( sal_uInt16 i = 0; i < nCount; i++ )
@@ -722,7 +720,7 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
const AnimationBitmap& rAnimBmp = rAnimation.Get( i );
const sal_uInt16 nRest = nCount - i - 1;
- // AnimationBitmap schreiben
+ // Write AnimationBitmap
rOStm << rAnimBmp.aBmpEx;
rOStm << rAnimBmp.aPosPix;
rOStm << rAnimBmp.aSizePix;
@@ -731,11 +729,11 @@ SvStream& operator<<( SvStream& rOStm, const Animation& rAnimation )
rOStm << (sal_uInt16) rAnimBmp.eDisposal;
rOStm << (sal_uInt8) rAnimBmp.bUserInput;
rOStm << (sal_uInt32) rAnimation.mnLoopCount;
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
- rOStm << nDummy32; // unbenutzt
+ rOStm << nDummy32; // Unused
+ rOStm << nDummy32; // Unused
+ rOStm << nDummy32; // Unused
write_lenPrefixed_uInt8s_FromOString<sal_uInt16>(rOStm, rtl::OString()); // dummy
- rOStm << nRest; // Anzahl der Strukturen, die noch _folgen_
+ rOStm << nRest; // Count of remaining structures
}
}
@@ -756,11 +754,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rAnimation.Clear();
- // Wenn die BitmapEx am Anfang schon gelesen
- // wurde ( von Graphic ), koennen wir direkt die Animationsbitmaps einlesen
+ // If the BitmapEx at the beginning have already been read (by Graphic)
+ // we can start reading the AnimationBitmaps right away
if( ( nAnimMagic1 == 0x5344414e ) && ( nAnimMagic2 == 0x494d4931 ) && !rIStm.GetError() )
bReadAnimations = sal_True;
- // ansonsten versuchen wir erstmal die Bitmap(-Ex) zu lesen
+ // Else, we try reading the Bitmap(-Ex)
else
{
rIStm.Seek( nStmPos );
@@ -774,7 +772,7 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm.Seek( nStmPos );
}
- // ggf. Animationsbitmaps lesen
+ // Read AnimationBitmaps
if( bReadAnimations )
{
AnimationBitmap aAnimBmp;
@@ -793,11 +791,11 @@ SvStream& operator>>( SvStream& rIStm, Animation& rAnimation )
rIStm >> nTmp16; aAnimBmp.eDisposal = ( Disposal) nTmp16;
rIStm >> cTmp; aAnimBmp.bUserInput = (sal_Bool) cTmp;
rIStm >> nTmp32; rAnimation.mnLoopCount = (sal_uInt16) nTmp32;
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
- rIStm >> nTmp32; // unbenutzt
- read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // unbenutzt
- rIStm >> nTmp16; // Rest zu lesen
+ rIStm >> nTmp32; // Unused
+ rIStm >> nTmp32; // Unused
+ rIStm >> nTmp32; // Unused
+ read_lenPrefixed_uInt8s_ToOString<sal_uInt16>(rIStm); // Unused
+ rIStm >> nTmp16; // The rest to read
rAnimation.Insert( aAnimBmp );
}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 64d8f4e64bec..030bed8d75e1 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -102,7 +102,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
aPal[ 14 ] = Color( COL_YELLOW );
aPal[ 15 ] = Color( COL_WHITE );
- // Dither-Palette erzeugen
+ // Create dither palette
if( 8 == nBitCount )
{
sal_uInt16 nActCol = 16;
@@ -112,7 +112,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
for( sal_uInt16 nR = 0; nR < 256; nR += 51 )
aPal[ nActCol++ ] = BitmapColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
- // Standard-Office-Farbe setzen
+ // Set standard Office colors
aPal[ nActCol++ ] = BitmapColor( 0, 184, 255 );
}
}
@@ -140,7 +140,7 @@ const BitmapPalette& Bitmap::GetGreyPalette( int nEntries )
static BitmapPalette aGreyPalette16;
static BitmapPalette aGreyPalette256;
- // create greyscale palette with 2, 4, 16 or 256 entries
+ // Create greyscale palette with 2, 4, 16 or 256 entries
if( 2 == nEntries || 4 == nEntries || 16 == nEntries || 256 == nEntries )
{
if( 2 == nEntries )
@@ -206,7 +206,7 @@ bool BitmapPalette::IsGreyPalette() const
const int nEntryCount = GetEntryCount();
if( !nEntryCount ) // NOTE: an empty palette means 1:1 mapping
return true;
- // see above: only certain entry values will result in a valid call to GetGreyPalette
+ // See above: only certain entry values will result in a valid call to GetGreyPalette
if( nEntryCount == 2 || nEntryCount == 4 || nEntryCount == 16 || nEntryCount == 256 )
{
const BitmapPalette& rGreyPalette = Bitmap::GetGreyPalette( nEntryCount );
@@ -933,9 +933,8 @@ sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst,
const sal_uInt16 nCount = pReadAcc->GetPaletteEntryCount();
sal_uInt8* pMap = new sal_uInt8[ nCount ];
- // Index-Map fuer Farbtabelle
- // aufbauen, da das Bild ja (relativ) farbgenau
- // kopiert werden soll
+ // Create index map for the color table, as the bitmap should be copied
+ // retaining it's color information relatively well
for( sal_uInt16 i = 0; i < nCount; i++ )
pMap[ i ] = (sal_uInt8) pWriteAcc->GetBestPaletteIndex( pReadAcc->GetPaletteColor( i ) );
@@ -1340,16 +1339,14 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
const sal_uInt16 nActColors = pAcc->GetPaletteEntryCount();
const sal_uInt16 nMaxColors = 1 << pAcc->GetBitCount();
- // erst einmal naechste Farbe nehmen
+ // For a start, choose the next color
aReplace = pAcc->GetBestMatchingColor( rReplaceColor );
- // falls Palettenbild, und die zu setzende Farbe ist nicht
- // in der Palette, suchen wir nach freien Eintraegen (teuer)
+ // If it's a pallette picture and the color that should be set
+ // is not in the pallette, we try finding a free entry (expensive)
if( pAcc->GetPaletteColor( (sal_uInt8) aReplace ) != BitmapColor( rReplaceColor ) )
{
- // erst einmal nachsehen, ob wir unsere ReplaceColor
- // nicht auf einen freien Platz am Ende der Palette
- // setzen koennen
+ // See first if we can put the ReplaceColor at a free entry at the end of the pallette
if( nActColors < nMaxColors )
{
pAcc->SetPaletteEntryCount( nActColors + 1 );
@@ -1360,7 +1357,7 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
{
sal_Bool* pFlags = new sal_Bool[ nMaxColors ];
- // alle Eintraege auf 0 setzen
+ // Set all entries to 0
memset( pFlags, 0, nMaxColors );
for( long nY = 0L; nY < nHeight; nY++ )
@@ -1369,7 +1366,7 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor )
for( sal_uInt16 i = 0UL; i < nMaxColors; i++ )
{
- // Hurra, wir haben einen unbenutzten Eintrag
+ // Hurray, we do have an unsused entry
if( !pFlags[ i ] )
{
pAcc->SetPaletteColor( (sal_uInt16) i, rReplaceColor );
@@ -1764,12 +1761,11 @@ sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine )
return bRet;
}
+// TODO: Have a look at OutputDevice::ImplDrawAlpha() for some
+// optimizations. Might even consolidate the code here and there.
sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor )
{
- // TODO: Have a look at OutputDevice::ImplDrawAlpha() for some
- // optimizations. Might even consolidate the code here and there.
-
- // convert to a truecolor bitmap, if we're a paletted one. There's
+ // Convert to a truecolor bitmap, if we're a paletted one. There's
// room for tradeoff decision here, maybe later for an overload (or a flag)
if( GetBitCount() <= 8 )
Convert( BMP_CONVERSION_24BIT );
diff --git a/vcl/source/gdi/bitmap2.cxx b/vcl/source/gdi/bitmap2.cxx
index ab259bfb37c6..f71e7570cf86 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -359,7 +359,7 @@ sal_Bool Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader,
rIStm >> rHeader.nColsImportant;
}
- // Eventuell bis zur Palette ueberlesen
+ // Skip to palette if we can
if ( rHeader.nSize > DIBINFOHEADERSIZE )
rIStm.SeekRel( rHeader.nSize - DIBINFOHEADERSIZE );
}
@@ -374,7 +374,7 @@ sal_Bool Bitmap::ImplReadDIBInfoHeader( SvStream& rIStm, DIBInfoHeader& rHeader,
if ( rHeader.nWidth < 0 )
rIStm.SetError( SVSTREAM_FILEFORMAT_ERROR );
- // #144105# protect a little against damaged files
+ // Protect against damaged files a little bit
if( rHeader.nSizeImage > ( 16 * static_cast< sal_uInt32 >( rHeader.nWidth * rHeader.nHeight ) ) )
rHeader.nSizeImage = 0;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 2855ca6b7ad6..99b7d7d7db01 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -219,7 +219,7 @@ void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] )
{12, 2, 15, 1, },
{7, 9, 4, 10 } };
- // MagicSquare aufbauen
+ // Build MagicSquare
for ( i = 0; i < 4; i++ )
for ( j = 0; j < 4; j++ )
for ( k = 0; k < 4; k++ )
@@ -227,7 +227,7 @@ void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] )
nMax = Max ( pMtx[ (k<<2) + i][(l<<2 ) + j] =
(sal_uInt16) ( 0.5 + pMagic[i][j]*fVal + pMagic[k][l]*fVal16 ), nMax );
- // auf Intervall [0;254] skalieren
+ // Scale to interval [0;254]
for ( i = 0, fVal = 254. / nMax; i < 16; i++ )
for( j = 0; j < 16; j++ )
(*pDitherMatrix)[i][j] = (sal_uInt8) ( fVal * pMtx[i][j] );
@@ -713,7 +713,7 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor )
for( nY = 0L; nY < nHeight; nY++, nYTmp++ )
{
- // erstes ZeilenPixel
+ // First RowPixel
cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ 0 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, 0, cIndex );
@@ -728,14 +728,14 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor )
pWriteAcc->SetPixel( nY, nX, cIndex );
}
- // letztes ZeilenPixel
+ // Last RowPixel
if( nX < nWidth )
{
cIndex = (sal_uInt8) aColorMap.GetBestPaletteIndex( pQLine1[ nWidth1 ].ImplGetColor() );
pWriteAcc->SetPixel( nY, nX, cIndex );
}
- // Zeilenpuffer neu fuellen/kopieren
+ // Refill/copy row buffer
pQLine1 = pQLine2;
pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
@@ -751,7 +751,7 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor )
}
}
- // Zeilenpuffer zerstoeren
+ // Delete row buffer
delete[] pErrQuad1;
delete[] pErrQuad2;
@@ -1389,7 +1389,7 @@ sal_Bool Bitmap::ImplDitherFloyd()
}
}
- // erstes Pixel gesondert betrachten
+ // Examine first Pixel separately
nX = 0;
CALC_ERRORS;
CALC_TABLES7;
@@ -1397,7 +1397,7 @@ sal_Bool Bitmap::ImplDitherFloyd()
CALC_TABLES5;
pWriteAcc->SetPixel( nYAcc, 0, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
- // mittlere Pixel ueber Schleife
+ // Get middle Pixels using a loop
long nXAcc;
for ( nX = 3L, nXAcc = 1L; nX < nW2; nXAcc++ )
{
@@ -1409,7 +1409,7 @@ sal_Bool Bitmap::ImplDitherFloyd()
pWriteAcc->SetPixel( nYAcc, nXAcc, BitmapColor( (sal_uInt8) ( nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ] ) ) );
}
- // letztes Pixel gesondert betrachten
+ // Treat last Pixel separately
CALC_ERRORS;
nX -= 5;
CALC_TABLES3;
@@ -1469,7 +1469,7 @@ sal_Bool Bitmap::ImplDitherFloyd16()
for( nY = 0L; nY < nHeight; nY++, nYTmp++ )
{
- // erstes ZeilenPixel
+ // First RowPixel
aBestCol = pQLine1[ 0 ].ImplGetColor();
aBestCol.SetRed( ( aBestCol.GetRed() & 248 ) | 7 );
aBestCol.SetGreen( ( aBestCol.GetGreen() & 248 ) | 7 );
@@ -1490,14 +1490,14 @@ sal_Bool Bitmap::ImplDitherFloyd16()
pWriteAcc->SetPixel( nY, nX, aBestCol );
}
- // letztes ZeilenPixel
+ // Last RowPixel
aBestCol = pQLine1[ nWidth1 ].ImplGetColor();
aBestCol.SetRed( ( aBestCol.GetRed() & 248 ) | 7 );
aBestCol.SetGreen( ( aBestCol.GetGreen() & 248 ) | 7 );
aBestCol.SetBlue( ( aBestCol.GetBlue() & 248 ) | 7 );
pWriteAcc->SetPixel( nY, nX, aBestCol );
- // Zeilenpuffer neu fuellen/kopieren
+ // Refill/copy row buffer
pQLine1 = pQLine2;
pQLine2 = ( bQ1 = !bQ1 ) != sal_False ? pErrQuad2 : pErrQuad1;
@@ -1506,7 +1506,7 @@ sal_Bool Bitmap::ImplDitherFloyd16()
pQLine2[ nX ] = pReadAcc->GetPixel( nYTmp, nX );
}
- // Zeilenpuffer zerstoeren
+ // Destroy row buffer
delete[] pErrQuad1;
delete[] pErrQuad2;
bRet = sal_True;
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index db74bde538e5..6f7147792804 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -120,7 +120,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) :
DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
"BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
- // #105489# Ensure a mask is exactly one bit deep
+ // Ensure a mask is exactly one bit deep
if( !!aMask && aMask.GetBitCount() != 1 )
{
OSL_TRACE("BitmapEx: forced mask to monochrome");
@@ -576,7 +576,7 @@ sal_Bool BitmapEx::Erase( const Color& rFillColor )
if( bRet && ( eTransparent == TRANSPARENT_BITMAP ) && !!aMask )
{
- // #104416# Respect transparency on fill color
+ // Respect transparency on fill color
if( rFillColor.GetTransparency() )
{
const Color aFill( rFillColor.GetTransparency(), rFillColor.GetTransparency(), rFillColor.GetTransparency() );
@@ -679,7 +679,7 @@ BitmapEx BitmapEx:: AutoScaleBitmap(BitmapEx & aBitmap, const long aStandardSize
aVirDevice.SetFillColor( COL_TRANSPARENT );
aVirDevice.SetLineColor( COL_TRANSPARENT );
- //draw a rect into virDevice
+ // Draw a rect into virDevice
aVirDevice.DrawRect( aRect );
Point aPointPixel( (long)imgposX, (long)imgposY );
aVirDevice.DrawBitmapEx( aPointPixel, aRet );
@@ -700,7 +700,7 @@ sal_uInt8 BitmapEx::GetTransparency(sal_Int32 nX, sal_Int32 nY) const
{
case TRANSPARENT_NONE:
{
- // not transparent, ergo all covered
+ // Not transparent, ergo all covered
nTransparency = 0x00;
break;
}
@@ -713,7 +713,7 @@ sal_uInt8 BitmapEx::GetTransparency(sal_Int32 nX, sal_Int32 nY) const
{
const Color aColor = pRead->GetColor(nY, nX);
- // if color is not equal to TransparentColor, we are not transparent
+ // If color is not equal to TransparentColor, we are not transparent
if(aColor != aTransparentColor)
{
nTransparency = 0x00;
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index b9d970cfd10b..af2d0686defd 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -26,10 +26,6 @@
#include <string.h>
-// --------------------
-// - BitmapReadAccess -
-// --------------------
-
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) :
mpBuffer ( NULL ),
mpScanBuf ( NULL ),
@@ -40,8 +36,6 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) :
ImplCreate( rBitmap );
}
-// ------------------------------------------------------------------
-
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
mpBuffer ( NULL ),
mpScanBuf ( NULL ),
@@ -52,15 +46,11 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
ImplCreate( rBitmap );
}
-// ------------------------------------------------------------------
-
BitmapReadAccess::~BitmapReadAccess()
{
ImplDestroy();
}
-// ------------------------------------------------------------------
-
void BitmapReadAccess::ImplCreate( Bitmap& rBitmap )
{
ImpBitmap* pImpBmp = rBitmap.ImplGetImpBitmap();
@@ -129,8 +119,6 @@ void BitmapReadAccess::ImplCreate( Bitmap& rBitmap )
}
}
-// ------------------------------------------------------------------
-
void BitmapReadAccess::ImplDestroy()
{
ImpBitmap* pImpBmp = maBitmap.ImplGetImpBitmap();
@@ -145,8 +133,6 @@ void BitmapReadAccess::ImplDestroy()
}
}
-// ------------------------------------------------------------------
-
sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
{
sal_Bool bRet = sal_True;
@@ -178,8 +164,6 @@ sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
return bRet;
}
-// ------------------------------------------------------------------
-
void BitmapReadAccess::ImplZeroInitUnusedBits()
{
const sal_uInt32 nWidth = Width(), nHeight = Height(), nScanSize = GetScanlineSize();
@@ -288,17 +272,11 @@ void BitmapReadAccess::ImplZeroInitUnusedBits()
}
}
-// ------------------------------------------------------------------
-
sal_uInt16 BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
{
return( HasPalette() ? mpBuffer->maPalette.GetBestIndex( rBitmapColor ) : 0 );
}
-// ---------------------
-// - BitmapWriteAccess -
-// ---------------------
-
BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) :
BitmapReadAccess( rBitmap, sal_True ),
mpLineColor ( NULL ),
@@ -306,16 +284,12 @@ BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) :
{
}
-// ------------------------------------------------------------------
-
BitmapWriteAccess::~BitmapWriteAccess()
{
delete mpLineColor;
delete mpFillColor;
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc )
{
DBG_ASSERT( ( nY >= 0 ) && ( nY < mpBuffer->mnHeight ), "y-coordinate in destination out of range!" );
@@ -333,7 +307,6 @@ void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc
SetPixel( nY, nX, rReadAcc.GetPixel( nY, nX ) );
}
-// ------------------------------------------------------------------
void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
sal_uLong nSrcScanlineFormat, sal_uLong nSrcScanlineSize )
@@ -396,9 +369,6 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
}
}
-
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
{
DBG_ASSERT( ( HasPalette() && rReadAcc.HasPalette() ) || ( !HasPalette() && !rReadAcc.HasPalette() ), "No copying possible between palette bitmap and TC bitmap!" );
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index a777ac8a18ba..22a6ce233817 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -20,17 +20,11 @@
#include <vcl/salbtype.hxx>
#include <vcl/bmpacc.hxx>
-// ----------------
-// - BitmapAccess -
-// ----------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_MSB_PAL )
{
return( pScanline[ nX >> 3 ] & ( 1 << ( 7 - ( nX & 7 ) ) ) ? 1 : 0 );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_MSB_PAL )
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
@@ -39,15 +33,11 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_MSB_PAL )
( rByte &= ~( 1 << ( 7 - ( nX & 7 ) ) ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _1BIT_LSB_PAL )
{
return( pScanline[ nX >> 3 ] & ( 1 << ( nX & 7 ) ) ? 1 : 0 );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_LSB_PAL )
{
sal_uInt8& rByte = pScanline[ nX >> 3 ];
@@ -56,15 +46,11 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _1BIT_LSB_PAL )
( rByte &= ~( 1 << ( nX & 7 ) ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
return( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 0 : 4 ) ) & 0x0f );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
@@ -73,15 +59,11 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_MSN_PAL )
( rByte &= 0x0f, rByte |= ( rBitmapColor.GetIndex() << 4 ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
return( ( pScanline[ nX >> 1 ] >> ( nX & 1 ? 4 : 0 ) ) & 0x0f );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
{
sal_uInt8& rByte = pScanline[ nX >> 1 ];
@@ -90,22 +72,16 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _4BIT_LSN_PAL )
( rByte &= 0xf0, rByte |= ( rBitmapColor.GetIndex() & 0x0f ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _8BIT_PAL )
{
return pScanline[ nX ];
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _8BIT_PAL )
{
pScanline[ nX ] = rBitmapColor.GetIndex();
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _8BIT_TC_MASK )
{
BitmapColor aColor;
@@ -113,15 +89,11 @@ IMPL_FORMAT_GETPIXEL( _8BIT_TC_MASK )
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _8BIT_TC_MASK )
{
rMask.SetColorFor8Bit( rBitmapColor, pScanline + nX );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _16BIT_TC_MSB_MASK )
{
BitmapColor aColor;
@@ -129,15 +101,11 @@ IMPL_FORMAT_GETPIXEL( _16BIT_TC_MSB_MASK )
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _16BIT_TC_MSB_MASK )
{
rMask.SetColorFor16BitMSB( rBitmapColor, pScanline + ( nX << 1UL ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _16BIT_TC_LSB_MASK )
{
BitmapColor aColor;
@@ -145,15 +113,11 @@ IMPL_FORMAT_GETPIXEL( _16BIT_TC_LSB_MASK )
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _16BIT_TC_LSB_MASK )
{
rMask.SetColorFor16BitLSB( rBitmapColor, pScanline + ( nX << 1UL ) );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_BGR )
{
BitmapColor aBitmapColor;
@@ -165,8 +129,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_BGR )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_BGR )
{
*( pScanline = pScanline + nX * 3 )++ = rBitmapColor.GetBlue();
@@ -174,8 +136,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_BGR )
*pScanline = rBitmapColor.GetRed();
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_RGB )
{
BitmapColor aBitmapColor;
@@ -187,8 +147,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_RGB )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_RGB )
{
*( pScanline = pScanline + nX * 3 )++ = rBitmapColor.GetRed();
@@ -196,8 +154,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_RGB )
*pScanline = rBitmapColor.GetBlue();
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _24BIT_TC_MASK )
{
BitmapColor aColor;
@@ -205,15 +161,11 @@ IMPL_FORMAT_GETPIXEL( _24BIT_TC_MASK )
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _24BIT_TC_MASK )
{
rMask.SetColorFor24Bit( rBitmapColor, pScanline + nX * 3L );
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ABGR )
{
BitmapColor aBitmapColor;
@@ -225,8 +177,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ABGR )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ABGR )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = 0;
@@ -235,8 +185,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ABGR )
*pScanline = rBitmapColor.GetRed();
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ARGB )
{
BitmapColor aBitmapColor;
@@ -248,8 +196,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ARGB )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ARGB )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = 0;
@@ -258,8 +204,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ARGB )
*pScanline = rBitmapColor.GetBlue();
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_BGRA )
{
BitmapColor aBitmapColor;
@@ -271,8 +215,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_BGRA )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_BGRA )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetBlue();
@@ -281,8 +223,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_BGRA )
*pScanline = 0;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_RGBA )
{
BitmapColor aBitmapColor;
@@ -294,8 +234,6 @@ IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_RGBA )
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_RGBA )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetRed();
@@ -304,8 +242,6 @@ IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_RGBA )
*pScanline = 0;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _32BIT_TC_MASK )
{
BitmapColor aColor;
@@ -313,8 +249,6 @@ IMPL_FORMAT_GETPIXEL( _32BIT_TC_MASK )
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _32BIT_TC_MASK )
{
rMask.SetColorFor32Bit( rBitmapColor, pScanline + ( nX << 2UL ) );
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 935ca1eda805..49d971c46e8a 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -27,10 +27,6 @@
#include <bmpfast.hxx>
-// ---------------------
-// - BitmapWriteAccess -
-// ---------------------
-
void BitmapWriteAccess::SetLineColor( const Color& rColor )
{
delete mpLineColor;
@@ -41,8 +37,6 @@ void BitmapWriteAccess::SetLineColor( const Color& rColor )
mpLineColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::SetFillColor( const Color& rColor )
{
delete mpFillColor;
@@ -53,8 +47,6 @@ void BitmapWriteAccess::SetFillColor( const Color& rColor )
mpFillColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::Erase( const Color& rColor )
{
// convert the color format from RGB to palette index if needed
@@ -77,8 +69,6 @@ void BitmapWriteAccess::Erase( const Color& rColor )
mpFillColor = pOldFillColor;
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
if( mpLineColor )
@@ -88,7 +78,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
if ( rStart.X() == rEnd.X() )
{
- // vertikale Line
+ // Vertical Line
const long nEndY = rEnd.Y();
nX = rStart.X();
@@ -107,7 +97,7 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
else if ( rStart.Y() == rEnd.Y() )
{
- // horizontale Line
+ // Horizontal Line
const long nEndX = rEnd.X();
nX = rStart.X();
@@ -215,8 +205,6 @@ void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
}
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::FillRect( const Rectangle& rRect )
{
if( mpFillColor )
@@ -241,8 +229,6 @@ void BitmapWriteAccess::FillRect( const Rectangle& rRect )
}
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
{
if( mpFillColor )
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index f2810e0c1ef4..2cabddf8305e 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -58,9 +58,7 @@ public:
void operator++(int);
};
-// =======================================================================
// template specializations for truecolor pixel formats
-
template <>
class TrueColorPixelPtr<BMP_FORMAT_24BIT_TC_RGB> : public BasePixelPtr
{
@@ -221,8 +219,6 @@ public:
}
};
-// -----------------------------------------------------------------------
-
template <>
class TrueColorPixelPtr<BMP_FORMAT_8BIT_TC_MASK> : public BasePixelPtr
{
@@ -240,9 +236,7 @@ class TrueColorPixelPtr<BMP_FORMAT_8BIT_PAL>
: public TrueColorPixelPtr<BMP_FORMAT_8BIT_TC_MASK>
{};
-// =======================================================================
// converting truecolor formats
-
template <sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc )
@@ -251,8 +245,6 @@ inline void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst,
rDst.SetAlpha( rSrc.GetAlpha() );
}
-// -----------------------------------------------------------------------
-
template <>
inline void ImplConvertPixel<BMP_FORMAT_16BIT_TC_LSB_MASK, BMP_FORMAT_16BIT_TC_MSB_MASK> (
const TrueColorPixelPtr<BMP_FORMAT_16BIT_TC_MSB_MASK>& rDst,
@@ -265,8 +257,6 @@ inline void ImplConvertPixel<BMP_FORMAT_16BIT_TC_LSB_MASK, BMP_FORMAT_16BIT_TC_M
pDst[0] = pSrc[1];
}
-// -----------------------------------------------------------------------
-
template <sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount )
@@ -281,9 +271,7 @@ inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
}
}
-// =======================================================================
// alpha blending truecolor pixels
-
template <unsigned ALPHABITS, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal )
@@ -314,8 +302,6 @@ inline void ImplBlendPixels( const TrueColorPixelPtr<DSTFMT>& rDst,
}
}
-// -----------------------------------------------------------------------
-
template <unsigned ALPHABITS, sal_uLong MASKFMT, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, const TrueColorPixelPtr<MASKFMT>& rMsk,
@@ -333,8 +319,6 @@ inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
}
}
-// -----------------------------------------------------------------------
-
template <unsigned ALPHABITS, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
const TrueColorPixelPtr<SRCFMT>& rSrc, unsigned nAlphaVal,
@@ -355,8 +339,6 @@ inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
}
}
-// =======================================================================
-
static bool ImplCopyImage( BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
{
const int nSrcLinestep = rSrcBuffer.mnScanlineSize;
@@ -391,8 +373,6 @@ static bool ImplCopyImage( BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuf
return true;
}
-// -----------------------------------------------------------------------
-
template <sal_uLong DSTFMT,sal_uLong SRCFMT>
bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
@@ -424,8 +404,6 @@ bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
return true;
}
-// -----------------------------------------------------------------------
-
template <sal_uLong SRCFMT>
inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc )
{
@@ -485,14 +463,12 @@ inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
return false;
}
-// =======================================================================
-
-// an universal stretching conversion is overkill in most common situations
+// A universal stretching conversion is overkill in most common situations
// => performance benefits for speeding up the non-stretching cases
bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
const SalTwoRect& rTR )
{
- // horizontal mirroring not implemented yet
+ // TODO:horizontal mirroring not implemented yet
if( rTR.mnDestWidth < 0 )
return false;
// vertical mirroring
@@ -603,14 +579,11 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
return false;
}
-// =======================================================================
-
template <sal_uLong DSTFMT,sal_uLong SRCFMT> //,sal_uLong MSKFMT>
bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer,
const BitmapBuffer& rMskBuffer )
{
- //DBG_ASSERT( rMskBuffer.mnFormat == MSKFMT, "FastBmp BlendImage: wrong MSKFMT" );
DBG_ASSERT( rMskBuffer.mnFormat == BMP_FORMAT_8BIT_PAL, "FastBmp BlendImage: unusual MSKFMT" );
const int nSrcLinestep = rSrcBuffer.mnScanlineSize;
@@ -680,8 +653,6 @@ inline bool ImplBlendToBitmap<BMP_FORMAT_32BIT_TC_BGRA,BMP_FORMAT_32BIT_TC_BGRA>
return ImplBlendToBitmap<BMP_FORMAT_32BIT_TC_RGBA>( aSrcType, rDstBuffer, rSrcBuffer, rMskBuffer );
}
-// -----------------------------------------------------------------------
-
template <sal_uLong SRCFMT>
bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, const BitmapBuffer& rMsk )
{
@@ -741,8 +712,6 @@ bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, const Bi
return false;
}
-// -----------------------------------------------------------------------
-
bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
const BitmapReadAccess& rSrcRA, const BitmapReadAccess& rMskRA,
const SalTwoRect& rTR )
@@ -939,8 +908,6 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
return false;
}
-// =======================================================================
-
#else // NO_OPTIMIZED_BITMAP_ACCESS
bool ImplFastBitmapConversion( BitmapBuffer&, const BitmapBuffer& )
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index e39be79004f3..e8614e028d96 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -37,10 +37,6 @@ using ::rtl::OUString;
#define SETTINGS_CONFIGNODE "VCL/Settings"
-/*
- * SettingsConfigItem::get
- */
-
SettingsConfigItem* SettingsConfigItem::get()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -49,10 +45,6 @@ SettingsConfigItem* SettingsConfigItem::get()
return pSVData->mpSettingsConfigItem;
}
-/*
- * SettignsConfigItem constructor
- */
-
SettingsConfigItem::SettingsConfigItem()
:
ConfigItem( OUString( SETTINGS_CONFIGNODE ),
@@ -62,20 +54,12 @@ SettingsConfigItem::SettingsConfigItem()
getValues();
}
-/*
- * SettingsConfigItem destructor
- */
-
SettingsConfigItem::~SettingsConfigItem()
{
if( IsModified() )
Commit();
}
-/*
- * SettingsConfigItem::Commit
- */
-
void SettingsConfigItem::Commit()
{
if( ! IsValidConfigMgr() )
@@ -106,18 +90,11 @@ void SettingsConfigItem::Commit()
}
}
-/*
- * SettingsConfigItem::Notify
- */
-
void SettingsConfigItem::Notify( const Sequence< OUString >& )
{
getValues();
}
-/*
- * SettingsConfigItem::getValues
- */
void SettingsConfigItem::getValues()
{
if( ! IsValidConfigMgr() )
@@ -166,10 +143,6 @@ void SettingsConfigItem::getValues()
}
}
-/*
- * SettingsConfigItem::getDefaultFont
- */
-
const OUString& SettingsConfigItem::getValue( const OUString& rGroup, const OUString& rKey ) const
{
::boost::unordered_map< OUString, SmallOUStrMap, rtl::OUStringHash >::const_iterator group = m_aSettings.find( rGroup );
@@ -181,10 +154,6 @@ const OUString& SettingsConfigItem::getValue( const OUString& rGroup, const OUSt
return group->second.find(rKey)->second;
}
-/*
- * SettingsConfigItem::setDefaultFont
- */
-
void SettingsConfigItem::setValue( const OUString& rGroup, const OUString& rKey, const OUString& rValue )
{
bool bModified = m_aSettings[ rGroup ][ rKey ] != rValue;
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 8dcc404e4464..02ca28869cd1 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -24,27 +24,16 @@
#include <salinst.hxx>
#include <svdata.hxx>
-// --------------
-// - Callback -
-// --------------
-
-// --------------------
-// - GraphicConverter -
-// --------------------
-
+// Callback
GraphicConverter::GraphicConverter() :
mpConvertData( NULL )
{
}
-// ------------------------------------------------------------------------
-
GraphicConverter::~GraphicConverter()
{
}
-// ------------------------------------------------------------------------
-
sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
@@ -66,8 +55,6 @@ sal_uLong GraphicConverter::Import( SvStream& rIStm, Graphic& rGraphic, sal_uLon
return nRet;
}
-// ------------------------------------------------------------------------
-
sal_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat )
{
GraphicConverter* pCvt = ImplGetSVData()->maGDIData.mpGrfConverter;
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 1aabaf0a7588..0b669f10e28a 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -28,10 +28,7 @@
#include <vcl/cvtsvm.hxx>
#include <rtl/strbuf.hxx>
-// -----------
-// - Inlines -
-// -----------
-
+// Inlines
void ImplReadRect( SvStream& rIStm, Rectangle& rRect )
{
Point aTL;
@@ -43,16 +40,12 @@ void ImplReadRect( SvStream& rIStm, Rectangle& rRect )
rRect = Rectangle( aTL, aBR );
}
-// ------------------------------------------------------------------------
-
void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
{
rOStm << rRect.TopLeft();
rOStm << rRect.BottomRight();
}
-// ------------------------------------------------------------------------
-
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
sal_Int32 nSize;
@@ -64,8 +57,6 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
rIStm >> rPoly[ i ];
}
-// ------------------------------------------------------------------------
-
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
Polygon aPoly;
@@ -80,8 +71,6 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
}
}
-// ------------------------------------------------------------------------
-
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
const sal_uInt16 nPoly = rPolyPoly.Count();
@@ -97,8 +86,8 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
for( n = 0; n < nPoly; n++ )
{
- // #i102224# Here the evtl. curved nature of Polygon was
- // ignored (for all those Years). Adapted to at least write
+ // #i102224# Here the possible curved nature of Polygon was
+ // ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
rPolyPoly[n].AdaptiveSubdivide(aSimplePoly);
@@ -111,8 +100,6 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
}
}
-// ------------------------------------------------------------------------
-
void ImplReadColor( SvStream& rIStm, Color& rColor )
{
sal_Int16 nVal;
@@ -122,8 +109,6 @@ void ImplReadColor( SvStream& rIStm, Color& rColor )
rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
}
-// ------------------------------------------------------------------------
-
void ImplWriteColor( SvStream& rOStm, const Color& rColor )
{
sal_Int16 nVal;
@@ -138,8 +123,6 @@ void ImplWriteColor( SvStream& rOStm, const Color& rColor )
rOStm << nVal;
}
-// ------------------------------------------------------------------------
-
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
Point aOrg;
@@ -153,8 +136,6 @@ void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
}
-// ------------------------------------------------------------------------
-
void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode )
{
rOStm << (sal_Int16) rMapMode.GetMapUnit();
@@ -165,24 +146,18 @@ void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode )
rOStm << (sal_Int32) rMapMode.GetScaleY().GetDenominator();
}
-// ------------------------------------------------------------------------
-
void ImplWritePushAction( SvStream& rOStm )
{
rOStm << (sal_Int16) GDI_PUSH_ACTION;
rOStm << (sal_Int32) 4;
}
-// ------------------------------------------------------------------------
-
void ImplWritePopAction( SvStream& rOStm )
{
rOStm << (sal_Int16) GDI_POP_ACTION;
rOStm << (sal_Int32) 4;
}
-// ------------------------------------------------------------------------
-
void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle, sal_Int32 nWidth = 0L )
{
if( rColor.GetTransparency() > 127 )
@@ -195,8 +170,6 @@ void ImplWriteLineColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle,
rOStm << nStyle;
}
-// ------------------------------------------------------------------------
-
void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle )
{
rOStm << (sal_Int16) GDI_FILLBRUSH_ACTION;
@@ -220,8 +193,6 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle
}
}
-// ------------------------------------------------------------------------
-
void ImplWriteFont( SvStream& rOStm, const Font& rFont,
rtl_TextEncoding& rActualCharSet )
{
@@ -281,15 +252,11 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont,
rActualCharSet = osl_getThreadTextEncoding();
}
-// ------------------------------------------------------------------------
-
void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp )
{
rOStm << (sal_Int16) GDI_RASTEROP_ACTION << (sal_Int32) 6 << nRasterOp;
}
-// ------------------------------------------------------------------------
-
sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString )
{
xub_StrLen nStringLen = rString.Len();
@@ -304,8 +271,6 @@ sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const String& rString )
return nStringLen != 0;
}
-// ------------------------------------------------------------------------
-
void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rString )
{
sal_uInt32 nOld = rIStm.Tell();
@@ -327,8 +292,6 @@ void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rSt
rIStm.Seek( nOld );
}
-// ------------------------------------------------------------------------
-
void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
{
sal_Int32 nActionSize;
@@ -341,8 +304,6 @@ void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
}
}
-// ------------------------------------------------------------------------
-
bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve)
{
const sal_uInt16 nPolygonCount(rPolyPolygon.Count());
@@ -423,8 +384,6 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol
return false;
}
-// ------------------------------------------------------------------------
-
void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
{
rPolyPoly.Clear();
@@ -463,10 +422,6 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
}
}
-// ----------------
-// - SVMConverter -
-// ----------------
-
SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConvertMode )
{
if( !rStm.GetError() )
@@ -478,8 +433,6 @@ SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConver
}
}
-// ------------------------------------------------------------------------
-
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const sal_uLong nPos = rIStm.Tell();
@@ -493,7 +446,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
sal_Int16 nVersion;
// read header
- rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Kennung
+ rIStm.Read( (char*) &aCode, sizeof( aCode ) ); // Identifier
rIStm >> nSize; // Size
rIStm >> nVersion; // Version
//#fdo39428 SvStream no longer supports operator>>(long&)
@@ -1368,8 +1321,6 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm.SetNumberFormatInt( nOldFormat );
}
-// ------------------------------------------------------------------------
-
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
sal_uLong nCountPos;
@@ -1384,15 +1335,15 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- //MagicCode schreiben
- rOStm << "SVGDI"; // Kennung
- rOStm << (sal_Int16) 42; // HeaderSize
- rOStm << (sal_Int16) 200; // VERSION
+ // Write MagicCode
+ rOStm << "SVGDI"; // Identifier
+ rOStm << (sal_Int16) 42; // HeaderSize
+ rOStm << (sal_Int16) 200; // VERSION
rOStm << (sal_Int32) aPrefSize.Width();
rOStm << (sal_Int32) aPrefSize.Height();
ImplWriteMapMode( rOStm, rMtf.GetPrefMapMode() );
- // ActionCount wird spaeter geschrieben
+ // ActionCount will be written later
nCountPos = rOStm.Tell();
rOStm.SeekRel( 4L );
@@ -1412,8 +1363,6 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
}
}
-// ------------------------------------------------------------------------
-
sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1,
Color& rLineCol, ::std::stack< Color* >& rLineColStack,
@@ -1602,8 +1551,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// #i102224#
MetaPolyLineAction* pAct = (MetaPolyLineAction*) pAction;
- // #i102224# Here the evtl. curved nature of Polygon was
- // ignored (for all those Years). Adapted to at least write
+ // #i102224# Here the possible curved nature of Polygon was
+ // ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
@@ -1688,8 +1637,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( META_POLYGON_ACTION ):
{
MetaPolygonAction* pAct = (MetaPolygonAction*)pAction;
- // #i102224# Here the evtl. curved nature of Polygon was
- // ignored (for all those Years). Adapted to at least write
+ // #i102224# Here the possible curved nature of Polygon was
+ // ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
@@ -1753,9 +1702,9 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rtl::OString aText(rtl::OUStringToOString(pAct->GetText(),
rActualCharSet));
String aUniText( pAct->GetText(), pAct->GetIndex(), pAct->GetLen() );
- sal_uLong nAryLen;
- sal_uLong nLen = pAct->GetLen();
- const sal_uLong nTextLen = aText.getLength();
+ sal_uLong nAryLen;
+ sal_uLong nLen = pAct->GetLen();
+ const sal_uLong nTextLen = aText.getLength();
sal_Int32* pDXArray = pAct->GetDXArray();
if ( ImplWriteUnicodeComment( rOStm, aUniText ) )
@@ -2126,8 +2075,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
sal_Int16 nRasterOp;
- // Falls vorher ROP_0/1 gesetzt war, alten
- // Zustand durch Pop erst wieder herstellen
+ // If ROP_0/1 was set earlier, restore old state
+ // via a Pop first
if( rRop_0_1 )
{
ImplWritePopAction( rOStm );
@@ -2256,7 +2205,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
// write actions for float transparence
- sal_uLong nAddCount;
+ sal_uLong nAddCount;
GDIMetaFile aMtf( rTransMtf );
const Size aSrcSize( rTransMtf.GetPrefSize() );
Point aSrcPt( rTransMtf.GetPrefMapMode().GetOrigin() );
@@ -2363,8 +2312,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction;
const Color& rColor = pA->GetColor();
- const sal_Bool bSet = pA->IsSetting();
- sal_uLong nOldPos, nNewPos;
+ const sal_Bool bSet = pA->IsSetting();
+ sal_uLong nOldPos, nNewPos;
// write RefPoint comment
rOStm << (sal_Int16) GDI_TEXTLINECOLOR_COMMENT;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 1ce1a0dd68a4..50c105dc3ca9 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -37,12 +37,8 @@
using namespace vcl;
-// =======================================================================
-
DBG_NAME( Font )
-// -----------------------------------------------------------------------
-
Impl_Font::Impl_Font() :
maColor( COL_TRANSPARENT ),
maFillColor( COL_TRANSPARENT )
@@ -72,8 +68,6 @@ Impl_Font::Impl_Font() :
mbConfigLookup = false;
}
-// -----------------------------------------------------------------------
-
Impl_Font::Impl_Font( const Impl_Font& rImplFont )
: maFamilyName( rImplFont.maFamilyName ),
maStyleName( rImplFont.maStyleName ),
@@ -106,8 +100,6 @@ Impl_Font::Impl_Font( const Impl_Font& rImplFont )
mbConfigLookup = rImplFont.mbConfigLookup;
}
-// -----------------------------------------------------------------------
-
bool Impl_Font::operator==( const Impl_Font& rOther ) const
{
// equality tests split up for easier debugging
@@ -151,8 +143,6 @@ bool Impl_Font::operator==( const Impl_Font& rOther ) const
return true;
}
-// -----------------------------------------------------------------------
-
void Impl_Font::AskConfig()
{
if( mbConfigLookup )
@@ -225,8 +215,6 @@ void Impl_Font::AskConfig()
meWidthType = eWidthType;
}
-// =======================================================================
-
void Font::MakeUnique()
{
// create a copy if others still reference it
@@ -238,8 +226,6 @@ void Font::MakeUnique()
}
}
-// -----------------------------------------------------------------------
-
Font::Font()
{
DBG_CTOR( Font, NULL );
@@ -250,8 +236,6 @@ Font::Font()
mpImplFont = &aStaticImplFont;
}
-// -----------------------------------------------------------------------
-
Font::Font( const Font& rFont )
{
DBG_CTOR( Font, NULL );
@@ -264,19 +248,15 @@ Font::Font( const Font& rFont )
mpImplFont->mnRefCount++;
}
-// -----------------------------------------------------------------------
-
Font::Font( const String& rFamilyName, const Size& rSize )
{
DBG_CTOR( Font, NULL );
- mpImplFont = new Impl_Font;
- mpImplFont->maFamilyName= rFamilyName;
- mpImplFont->maSize = rSize;
+ mpImplFont = new Impl_Font;
+ mpImplFont->maFamilyName = rFamilyName;
+ mpImplFont->maSize = rSize;
}
-// -----------------------------------------------------------------------
-
Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSize )
{
DBG_CTOR( Font, NULL );
@@ -287,8 +267,6 @@ Font::Font( const String& rFamilyName, const String& rStyleName, const Size& rSi
mpImplFont->maSize = rSize;
}
-// -----------------------------------------------------------------------
-
Font::Font( FontFamily eFamily, const Size& rSize )
{
DBG_CTOR( Font, NULL );
@@ -298,8 +276,6 @@ Font::Font( FontFamily eFamily, const Size& rSize )
mpImplFont->maSize = rSize;
}
-// -----------------------------------------------------------------------
-
Font::~Font()
{
DBG_DTOR( Font, NULL );
@@ -315,8 +291,6 @@ Font::~Font()
}
}
-// -----------------------------------------------------------------------
-
void Font::SetColor( const Color& rColor )
{
DBG_CHKTHIS( Font, NULL );
@@ -328,8 +302,6 @@ void Font::SetColor( const Color& rColor )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetFillColor( const Color& rColor )
{
DBG_CHKTHIS( Font, NULL );
@@ -340,8 +312,6 @@ void Font::SetFillColor( const Color& rColor )
mpImplFont->mbTransparent = true;
}
-// -----------------------------------------------------------------------
-
void Font::SetTransparent( sal_Bool bTransparent )
{
DBG_CHKTHIS( Font, NULL );
@@ -353,8 +323,6 @@ void Font::SetTransparent( sal_Bool bTransparent )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetAlign( FontAlign eAlign )
{
DBG_CHKTHIS( Font, NULL );
@@ -366,8 +334,6 @@ void Font::SetAlign( FontAlign eAlign )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetName( const rtl::OUString& rFamilyName )
{
DBG_CHKTHIS( Font, NULL );
@@ -376,8 +342,6 @@ void Font::SetName( const rtl::OUString& rFamilyName )
mpImplFont->maFamilyName = rFamilyName;
}
-// -----------------------------------------------------------------------
-
void Font::SetStyleName( const String& rStyleName )
{
DBG_CHKTHIS( Font, NULL );
@@ -386,8 +350,6 @@ void Font::SetStyleName( const String& rStyleName )
mpImplFont->maStyleName = rStyleName;
}
-// -----------------------------------------------------------------------
-
void Font::SetSize( const Size& rSize )
{
DBG_CHKTHIS( Font, NULL );
@@ -399,8 +361,6 @@ void Font::SetSize( const Size& rSize )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetFamily( FontFamily eFamily )
{
DBG_CHKTHIS( Font, NULL );
@@ -412,8 +372,6 @@ void Font::SetFamily( FontFamily eFamily )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetCharSet( CharSet eCharSet )
{
DBG_CHKTHIS( Font, NULL );
@@ -425,8 +383,6 @@ void Font::SetCharSet( CharSet eCharSet )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetLanguage( LanguageType eLanguage )
{
DBG_CHKTHIS( Font, NULL );
@@ -438,8 +394,6 @@ void Font::SetLanguage( LanguageType eLanguage )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetCJKContextLanguage( LanguageType eLanguage )
{
DBG_CHKTHIS( Font, NULL );
@@ -451,8 +405,6 @@ void Font::SetCJKContextLanguage( LanguageType eLanguage )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetPitch( FontPitch ePitch )
{
DBG_CHKTHIS( Font, NULL );
@@ -464,8 +416,6 @@ void Font::SetPitch( FontPitch ePitch )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetOrientation( short nOrientation )
{
DBG_CHKTHIS( Font, NULL );
@@ -477,8 +427,6 @@ void Font::SetOrientation( short nOrientation )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetVertical( sal_Bool bVertical )
{
DBG_CHKTHIS( Font, NULL );
@@ -490,8 +438,6 @@ void Font::SetVertical( sal_Bool bVertical )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetKerning( FontKerning nKerning )
{
DBG_CHKTHIS( Font, NULL );
@@ -503,15 +449,11 @@ void Font::SetKerning( FontKerning nKerning )
}
}
-// -----------------------------------------------------------------------
-
sal_Bool Font::IsKerning() const
{
return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0;
}
-// -----------------------------------------------------------------------
-
void Font::SetWeight( FontWeight eWeight )
{
DBG_CHKTHIS( Font, NULL );
@@ -523,8 +465,6 @@ void Font::SetWeight( FontWeight eWeight )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetWidthType( FontWidth eWidth )
{
DBG_CHKTHIS( Font, NULL );
@@ -536,8 +476,6 @@ void Font::SetWidthType( FontWidth eWidth )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetItalic( FontItalic eItalic )
{
DBG_CHKTHIS( Font, NULL );
@@ -549,8 +487,6 @@ void Font::SetItalic( FontItalic eItalic )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetOutline( sal_Bool bOutline )
{
DBG_CHKTHIS( Font, NULL );
@@ -562,8 +498,6 @@ void Font::SetOutline( sal_Bool bOutline )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetShadow( sal_Bool bShadow )
{
DBG_CHKTHIS( Font, NULL );
@@ -575,8 +509,6 @@ void Font::SetShadow( sal_Bool bShadow )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetUnderline( FontUnderline eUnderline )
{
DBG_CHKTHIS( Font, NULL );
@@ -588,8 +520,6 @@ void Font::SetUnderline( FontUnderline eUnderline )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetOverline( FontUnderline eOverline )
{
DBG_CHKTHIS( Font, NULL );
@@ -601,8 +531,6 @@ void Font::SetOverline( FontUnderline eOverline )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetStrikeout( FontStrikeout eStrikeout )
{
DBG_CHKTHIS( Font, NULL );
@@ -614,8 +542,6 @@ void Font::SetStrikeout( FontStrikeout eStrikeout )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetRelief( FontRelief eRelief )
{
DBG_CHKTHIS( Font, NULL );
@@ -627,8 +553,6 @@ void Font::SetRelief( FontRelief eRelief )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark )
{
DBG_CHKTHIS( Font, NULL );
@@ -640,8 +564,6 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark )
}
}
-// -----------------------------------------------------------------------
-
void Font::SetWordLineMode( sal_Bool bWordLine )
{
DBG_CHKTHIS( Font, NULL );
@@ -653,21 +575,19 @@ void Font::SetWordLineMode( sal_Bool bWordLine )
}
}
-// -----------------------------------------------------------------------
-
Font& Font::operator=( const Font& rFont )
{
DBG_CHKTHIS( Font, NULL );
DBG_CHKOBJ( &rFont, Font, NULL );
DBG_ASSERT( rFont.mpImplFont->mnRefCount < 0xFFFE, "Font: RefCount overflow" );
- // Zuerst Referenzcounter erhoehen, damit man sich selbst zuweisen kann
- // RefCount == 0 fuer statische Objekte
+ // Increment RefCount first, so that we can reference ourselves
+ // RefCount == 0 for static objects
if ( rFont.mpImplFont->mnRefCount )
rFont.mpImplFont->mnRefCount++;
- // Wenn es keine statischen ImplDaten sind, dann loeschen, wenn es
- // die letzte Referenz ist, sonst Referenzcounter decrementieren
+ // If it's not static ImplData and if it's the last reference, delete it
+ // else decrement RefCount
if ( mpImplFont->mnRefCount )
{
if ( mpImplFont->mnRefCount == 1 )
@@ -681,8 +601,6 @@ Font& Font::operator=( const Font& rFont )
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool Font::operator==( const Font& rFont ) const
{
DBG_CHKTHIS( Font, NULL );
@@ -696,8 +614,6 @@ sal_Bool Font::operator==( const Font& rFont ) const
return sal_False;
}
-// -----------------------------------------------------------------------
-
void Font::Merge( const Font& rFont )
{
if ( rFont.GetName().Len() )
@@ -761,9 +677,6 @@ void Font::GetFontAttributes( ImplFontAttributes& rAttrs ) const
rAttrs.SetSymbolFlag( mpImplFont->meCharSet == RTL_TEXTENCODING_SYMBOL );
}
-
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rIStm, STREAM_READ );
@@ -809,8 +722,6 @@ SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
return rIStm;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
@@ -847,22 +758,17 @@ SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
return rOStm;
}
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStm, Font& rFont )
{
rFont.MakeUnique();
return( rIStm >> *rFont.mpImplFont );
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStm, const Font& rFont )
{
return( rOStm << *rFont.mpImplFont );
}
-// -----------------------------------------------------------------------
namespace
{
bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
@@ -873,7 +779,7 @@ namespace
{
TTGlobalFontInfo aInfo;
GetTTGlobalFontInfo( pTTF, &aInfo );
- // most important: the family name
+ // most importantly: the family name
if( aInfo.ufamily )
o_rResult.SetName( aInfo.ufamily );
else if( aInfo.family )
@@ -1071,38 +977,67 @@ Font Font::identifyFont( const void* i_pBuffer, sal_uInt32 i_nSize )
return aResult;
}
-// the inlines from the font.hxx header are now instantiated for pImpl-ification
-// TODO: reformat
+// The inlines from the font.hxx header are now instantiated for pImpl-ification
const Color& Font::GetColor() const { return mpImplFont->maColor; }
+
const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; }
+
sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; }
+
FontAlign Font::GetAlign() const { return mpImplFont->meAlign; }
+
const String& Font::GetName() const { return mpImplFont->maFamilyName; }
+
const String& Font::GetStyleName() const { return mpImplFont->maStyleName; }
+
const Size& Font::GetSize() const { return mpImplFont->maSize; }
+
void Font::SetHeight( long nHeight ) { SetSize( Size( mpImplFont->maSize.Width(), nHeight ) ); }
+
long Font::GetHeight() const { return mpImplFont->maSize.Height(); }
+
void Font::SetWidth( long nWidth ) { SetSize( Size( nWidth, mpImplFont->maSize.Height() ) ); }
+
long Font::GetWidth() const { return mpImplFont->maSize.Width(); }
+
rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->meCharSet; }
+
LanguageType Font::GetLanguage() const { return mpImplFont->meLanguage; }
+
LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->meCJKLanguage; }
+
short Font::GetOrientation() const { return mpImplFont->mnOrientation; }
+
sal_Bool Font::IsVertical() const { return mpImplFont->mbVertical; }
+
FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; }
+
FontPitch Font::GetPitch() const { return mpImplFont->GetPitch(); }
+
FontWeight Font::GetWeight() const { return mpImplFont->GetWeight(); }
+
FontWidth Font::GetWidthType() const { return mpImplFont->GetWidthType(); }
+
FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); }
+
FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); }
+
sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; }
+
sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; }
+
FontRelief Font::GetRelief() const { return mpImplFont->meRelief; }
+
FontUnderline Font::GetUnderline() const { return mpImplFont->meUnderline; }
+
FontUnderline Font::GetOverline() const { return mpImplFont->meOverline; }
+
FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; }
+
FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; }
+
sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; }
+
sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */