[PATCH] Translate German comments, clean up some WS
Philipp Weissenbacher (via Code Review)
gerrit at gerrit.libreoffice.org
Tue Mar 26 07:57:58 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3057
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/57/3057/1
Translate German comments, clean up some WS
Change-Id: I1a6a99bb8efe8c3d10973c255040fbbf0f76f27d
---
M vcl/source/gdi/alpha.cxx
M vcl/source/gdi/animate.cxx
M vcl/source/gdi/bitmap.cxx
M vcl/source/gdi/bitmap2.cxx
M vcl/source/gdi/bitmap3.cxx
M vcl/source/gdi/bitmapex.cxx
M vcl/source/gdi/bmpacc.cxx
M vcl/source/gdi/bmpacc2.cxx
M vcl/source/gdi/bmpacc3.cxx
M vcl/source/gdi/bmpfast.cxx
M vcl/source/gdi/configsettings.cxx
M vcl/source/gdi/cvtgrf.cxx
M vcl/source/gdi/cvtsvm.cxx
M vcl/source/gdi/font.cxx
14 files changed, 125 insertions(+), 439 deletions(-)
diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 76fc9a0..c402413 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 @@
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 9665f83..442af4a 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -174,10 +174,10 @@
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 @@
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 @@
rIStm.Seek( nStmPos );
}
- // ggf. Animationsbitmaps lesen
+ // Read AnimationBitmaps
if( bReadAnimations )
{
AnimationBitmap aAnimBmp;
@@ -793,11 +791,11 @@
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 64d8f4e..030bed8 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -102,7 +102,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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* 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 @@
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 @@
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 ab259bf..f71e757 100644
--- a/vcl/source/gdi/bitmap2.cxx
+++ b/vcl/source/gdi/bitmap2.cxx
@@ -359,7 +359,7 @@
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 @@
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 2855ca6..99b7d7d 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -219,7 +219,7 @@
{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 @@
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 @@
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 @@
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 @@
}
}
- // Zeilenpuffer zerstoeren
+ // Delete row buffer
delete[] pErrQuad1;
delete[] pErrQuad2;
@@ -1389,7 +1389,7 @@
}
}
- // erstes Pixel gesondert betrachten
+ // Examine first Pixel separately
nX = 0;
CALC_ERRORS;
CALC_TABLES7;
@@ -1397,7 +1397,7 @@
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 @@
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 @@
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 @@
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 @@
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 db74bde..6f71477 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -120,7 +120,7 @@
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 @@
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 @@
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 @@
{
case TRANSPARENT_NONE:
{
- // not transparent, ergo all covered
+ // Not transparent, ergo all covered
nTransparency = 0x00;
break;
}
@@ -713,7 +713,7 @@
{
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 b9d970c..af2d068 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 ),
@@ -39,8 +35,6 @@
{
ImplCreate( rBitmap );
}
-
-// ------------------------------------------------------------------
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
mpBuffer ( NULL ),
@@ -52,14 +46,10 @@
ImplCreate( rBitmap );
}
-// ------------------------------------------------------------------
-
BitmapReadAccess::~BitmapReadAccess()
{
ImplDestroy();
}
-
-// ------------------------------------------------------------------
void BitmapReadAccess::ImplCreate( Bitmap& rBitmap )
{
@@ -129,8 +119,6 @@
}
}
-// ------------------------------------------------------------------
-
void BitmapReadAccess::ImplDestroy()
{
ImpBitmap* pImpBmp = maBitmap.ImplGetImpBitmap();
@@ -144,8 +132,6 @@
mpBuffer = NULL;
}
}
-
-// ------------------------------------------------------------------
sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
{
@@ -177,8 +163,6 @@
return bRet;
}
-
-// ------------------------------------------------------------------
void BitmapReadAccess::ImplZeroInitUnusedBits()
{
@@ -288,16 +272,10 @@
}
}
-// ------------------------------------------------------------------
-
sal_uInt16 BitmapReadAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const
{
return( HasPalette() ? mpBuffer->maPalette.GetBestIndex( rBitmapColor ) : 0 );
}
-
-// ---------------------
-// - BitmapWriteAccess -
-// ---------------------
BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) :
BitmapReadAccess( rBitmap, sal_True ),
@@ -306,15 +284,11 @@
{
}
-// ------------------------------------------------------------------
-
BitmapWriteAccess::~BitmapWriteAccess()
{
delete mpLineColor;
delete mpFillColor;
}
-
-// ------------------------------------------------------------------
void BitmapWriteAccess::CopyScanline( long nY, const BitmapReadAccess& rReadAcc )
{
@@ -333,7 +307,6 @@
SetPixel( nY, nX, rReadAcc.GetPixel( nY, nX ) );
}
-// ------------------------------------------------------------------
void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
sal_uLong nSrcScanlineFormat, sal_uLong nSrcScanlineSize )
@@ -395,9 +368,6 @@
}
}
}
-
-
-// ------------------------------------------------------------------
void BitmapWriteAccess::CopyBuffer( const BitmapReadAccess& rReadAcc )
{
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index a777ac8..22a6ce2 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -20,16 +20,10 @@
#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 )
{
@@ -39,14 +33,10 @@
( 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 )
{
@@ -56,14 +46,10 @@
( 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 )
{
@@ -73,14 +59,10 @@
( 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 )
{
@@ -90,21 +72,15 @@
( 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 )
{
@@ -113,14 +89,10 @@
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _8BIT_TC_MASK )
{
rMask.SetColorFor8Bit( rBitmapColor, pScanline + nX );
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL( _16BIT_TC_MSB_MASK )
{
@@ -129,14 +101,10 @@
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _16BIT_TC_MSB_MASK )
{
rMask.SetColorFor16BitMSB( rBitmapColor, pScanline + ( nX << 1UL ) );
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL( _16BIT_TC_LSB_MASK )
{
@@ -145,14 +113,10 @@
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _16BIT_TC_LSB_MASK )
{
rMask.SetColorFor16BitLSB( rBitmapColor, pScanline + ( nX << 1UL ) );
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_BGR )
{
@@ -165,16 +129,12 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_BGR )
{
*( pScanline = pScanline + nX * 3 )++ = rBitmapColor.GetBlue();
*pScanline++ = rBitmapColor.GetGreen();
*pScanline = rBitmapColor.GetRed();
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _24BIT_TC_RGB )
{
@@ -187,16 +147,12 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _24BIT_TC_RGB )
{
*( pScanline = pScanline + nX * 3 )++ = rBitmapColor.GetRed();
*pScanline++ = rBitmapColor.GetGreen();
*pScanline = rBitmapColor.GetBlue();
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL( _24BIT_TC_MASK )
{
@@ -205,14 +161,10 @@
return aColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL( _24BIT_TC_MASK )
{
rMask.SetColorFor24Bit( rBitmapColor, pScanline + nX * 3L );
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ABGR )
{
@@ -225,8 +177,6 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ABGR )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = 0;
@@ -234,8 +184,6 @@
*pScanline++ = rBitmapColor.GetGreen();
*pScanline = rBitmapColor.GetRed();
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_ARGB )
{
@@ -248,8 +196,6 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_ARGB )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = 0;
@@ -257,8 +203,6 @@
*pScanline++ = rBitmapColor.GetGreen();
*pScanline = rBitmapColor.GetBlue();
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_BGRA )
{
@@ -271,8 +215,6 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_BGRA )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetBlue();
@@ -280,8 +222,6 @@
*pScanline++ = rBitmapColor.GetRed();
*pScanline = 0;
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_GETPIXEL_NOMASK( _32BIT_TC_RGBA )
{
@@ -294,8 +234,6 @@
return aBitmapColor;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_SETPIXEL_NOMASK( _32BIT_TC_RGBA )
{
*( pScanline = pScanline + ( nX << 2 ) )++ = rBitmapColor.GetRed();
@@ -304,16 +242,12 @@
*pScanline = 0;
}
-// ------------------------------------------------------------------
-
IMPL_FORMAT_GETPIXEL( _32BIT_TC_MASK )
{
BitmapColor aColor;
rMask.GetColorFor32Bit( aColor, pScanline + ( nX << 2UL ) );
return aColor;
}
-
-// ------------------------------------------------------------------
IMPL_FORMAT_SETPIXEL( _32BIT_TC_MASK )
{
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index 935ca1e..49d971c 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 @@
mpLineColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::SetFillColor( const Color& rColor )
{
delete mpFillColor;
@@ -52,8 +46,6 @@
else
mpFillColor = ( HasPalette() ? new BitmapColor( (sal_uInt8) GetBestPaletteIndex( rColor ) ) : new BitmapColor( rColor ) );
}
-
-// ------------------------------------------------------------------
void BitmapWriteAccess::Erase( const Color& rColor )
{
@@ -77,8 +69,6 @@
mpFillColor = pOldFillColor;
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::DrawLine( const Point& rStart, const Point& rEnd )
{
if( mpLineColor )
@@ -88,7 +78,7 @@
if ( rStart.X() == rEnd.X() )
{
- // vertikale Line
+ // Vertical Line
const long nEndY = rEnd.Y();
nX = rStart.X();
@@ -107,7 +97,7 @@
}
else if ( rStart.Y() == rEnd.Y() )
{
- // horizontale Line
+ // Horizontal Line
const long nEndX = rEnd.X();
nX = rStart.X();
@@ -215,8 +205,6 @@
}
}
-// ------------------------------------------------------------------
-
void BitmapWriteAccess::FillRect( const Rectangle& rRect )
{
if( mpFillColor )
@@ -240,8 +228,6 @@
}
}
}
-
-// ------------------------------------------------------------------
void BitmapWriteAccess::DrawRect( const Rectangle& rRect )
{
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index f2810e0..2cabddf 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -58,9 +58,7 @@
void operator++(int);
};
-// =======================================================================
// template specializations for truecolor pixel formats
-
template <>
class TrueColorPixelPtr<BMP_FORMAT_24BIT_TC_RGB> : public BasePixelPtr
{
@@ -221,8 +219,6 @@
}
};
-// -----------------------------------------------------------------------
-
template <>
class TrueColorPixelPtr<BMP_FORMAT_8BIT_TC_MASK> : public BasePixelPtr
{
@@ -240,9 +236,7 @@
: 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 )
@@ -250,8 +244,6 @@
rDst.SetColor( rSrc.GetRed(), rSrc.GetGreen(), rSrc.GetBlue() );
rDst.SetAlpha( rSrc.GetAlpha() );
}
-
-// -----------------------------------------------------------------------
template <>
inline void ImplConvertPixel<BMP_FORMAT_16BIT_TC_LSB_MASK, BMP_FORMAT_16BIT_TC_MSB_MASK> (
@@ -264,8 +256,6 @@
pDst[1] = pSrc[0];
pDst[0] = pSrc[1];
}
-
-// -----------------------------------------------------------------------
template <sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
@@ -281,9 +271,7 @@
}
}
-// =======================================================================
// 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 @@
}
}
-// -----------------------------------------------------------------------
-
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,
@@ -332,8 +318,6 @@
++aMsk;
}
}
-
-// -----------------------------------------------------------------------
template <unsigned ALPHABITS, sal_uLong SRCFMT, sal_uLong DSTFMT>
inline void ImplBlendLines( const TrueColorPixelPtr<DSTFMT>& rDst,
@@ -354,8 +338,6 @@
}
}
}
-
-// =======================================================================
static bool ImplCopyImage( BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
{
@@ -391,8 +373,6 @@
return true;
}
-// -----------------------------------------------------------------------
-
template <sal_uLong DSTFMT,sal_uLong SRCFMT>
bool ImplConvertToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine,
BitmapBuffer& rDstBuffer, const BitmapBuffer& rSrcBuffer )
@@ -423,8 +403,6 @@
return true;
}
-
-// -----------------------------------------------------------------------
template <sal_uLong SRCFMT>
inline bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc )
@@ -485,14 +463,12 @@
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 @@
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 @@
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 )
{
@@ -740,8 +711,6 @@
return false;
}
-
-// -----------------------------------------------------------------------
bool ImplFastBitmapBlending( BitmapWriteAccess& rDstWA,
const BitmapReadAccess& rSrcRA, const BitmapReadAccess& rMskRA,
@@ -938,8 +907,6 @@
return false;
}
-
-// =======================================================================
#else // NO_OPTIMIZED_BITMAP_ACCESS
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index e39be79..e8614e0 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -37,10 +37,6 @@
#define SETTINGS_CONFIGNODE "VCL/Settings"
-/*
- * SettingsConfigItem::get
- */
-
SettingsConfigItem* SettingsConfigItem::get()
{
ImplSVData* pSVData = ImplGetSVData();
@@ -48,10 +44,6 @@
pSVData->mpSettingsConfigItem = new SettingsConfigItem();
return pSVData->mpSettingsConfigItem;
}
-
-/*
- * SettignsConfigItem constructor
- */
SettingsConfigItem::SettingsConfigItem()
:
@@ -62,19 +54,11 @@
getValues();
}
-/*
- * SettingsConfigItem destructor
- */
-
SettingsConfigItem::~SettingsConfigItem()
{
if( IsModified() )
Commit();
}
-
-/*
- * SettingsConfigItem::Commit
- */
void SettingsConfigItem::Commit()
{
@@ -106,18 +90,11 @@
}
}
-/*
- * SettingsConfigItem::Notify
- */
-
void SettingsConfigItem::Notify( const Sequence< OUString >& )
{
getValues();
}
-/*
- * SettingsConfigItem::getValues
- */
void SettingsConfigItem::getValues()
{
if( ! IsValidConfigMgr() )
@@ -166,10 +143,6 @@
}
}
-/*
- * 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 );
@@ -180,10 +153,6 @@
}
return group->second.find(rKey)->second;
}
-
-/*
- * SettingsConfigItem::setDefaultFont
- */
void SettingsConfigItem::setValue( const OUString& rGroup, const OUString& rKey, const OUString& rValue )
{
diff --git a/vcl/source/gdi/cvtgrf.cxx b/vcl/source/gdi/cvtgrf.cxx
index 8dcc404..02ca288 100644
--- a/vcl/source/gdi/cvtgrf.cxx
+++ b/vcl/source/gdi/cvtgrf.cxx
@@ -24,26 +24,15 @@
#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 )
{
@@ -65,8 +54,6 @@
return nRet;
}
-
-// ------------------------------------------------------------------------
sal_uLong GraphicConverter::Export( SvStream& rOStm, const Graphic& rGraphic, sal_uLong nFormat )
{
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 1aabaf0..0b669f1 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,15 +40,11 @@
rRect = Rectangle( aTL, aBR );
}
-// ------------------------------------------------------------------------
-
void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
{
rOStm << rRect.TopLeft();
rOStm << rRect.BottomRight();
}
-
-// ------------------------------------------------------------------------
void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
{
@@ -63,8 +56,6 @@
for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
rIStm >> rPoly[ i ];
}
-
-// ------------------------------------------------------------------------
void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly )
{
@@ -79,8 +70,6 @@
rPolyPoly.Insert( aPoly );
}
}
-
-// ------------------------------------------------------------------------
void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly )
{
@@ -97,8 +86,8 @@
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 ImplReadColor( SvStream& rIStm, Color& rColor )
{
sal_Int16 nVal;
@@ -121,8 +108,6 @@
rIStm >> nVal; rColor.SetGreen( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
rIStm >> nVal; rColor.SetBlue( sal::static_int_cast<sal_uInt8>((sal_uInt16)nVal >> 8) );
}
-
-// ------------------------------------------------------------------------
void ImplWriteColor( SvStream& rOStm, const Color& rColor )
{
@@ -138,8 +123,6 @@
rOStm << nVal;
}
-// ------------------------------------------------------------------------
-
void ImplReadMapMode( SvStream& rIStm, MapMode& rMapMode )
{
Point aOrg;
@@ -153,8 +136,6 @@
rMapMode = MapMode( (MapUnit) nUnit, aOrg, Fraction( nXNum, nXDenom ), Fraction( nYNum, nYDenom ) );
}
-// ------------------------------------------------------------------------
-
void ImplWriteMapMode( SvStream& rOStm, const MapMode& rMapMode )
{
rOStm << (sal_Int16) rMapMode.GetMapUnit();
@@ -165,23 +146,17 @@
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 )
{
@@ -194,8 +169,6 @@
rOStm << nWidth;
rOStm << nStyle;
}
-
-// ------------------------------------------------------------------------
void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle )
{
@@ -219,8 +192,6 @@
rOStm << (sal_Int16) 0;
}
}
-
-// ------------------------------------------------------------------------
void ImplWriteFont( SvStream& rOStm, const Font& rFont,
rtl_TextEncoding& rActualCharSet )
@@ -281,14 +252,10 @@
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 )
{
@@ -303,8 +270,6 @@
}
return nStringLen != 0;
}
-
-// ------------------------------------------------------------------------
void ImplReadUnicodeComment( sal_uInt32 nStrmPos, SvStream& rIStm, OUString& rString )
{
@@ -327,8 +292,6 @@
rIStm.Seek( nOld );
}
-// ------------------------------------------------------------------------
-
void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount )
{
sal_Int32 nActionSize;
@@ -340,8 +303,6 @@
rIStm.SeekRel( nActionSize - 4L );
}
}
-
-// ------------------------------------------------------------------------
bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve)
{
@@ -423,8 +384,6 @@
return false;
}
-// ------------------------------------------------------------------------
-
void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly)
{
rPolyPoly.Clear();
@@ -463,10 +422,6 @@
}
}
-// ----------------
-// - SVMConverter -
-// ----------------
-
SVMConverter::SVMConverter( SvStream& rStm, GDIMetaFile& rMtf, sal_uLong nConvertMode )
{
if( !rStm.GetError() )
@@ -477,8 +432,6 @@
ImplConvertToSVM1( rStm, rMtf );
}
}
-
-// ------------------------------------------------------------------------
void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
@@ -493,7 +446,7 @@
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 @@
rIStm.SetNumberFormatInt( nOldFormat );
}
-// ------------------------------------------------------------------------
-
void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf )
{
sal_uLong nCountPos;
@@ -1384,15 +1335,15 @@
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 );
@@ -1411,8 +1362,6 @@
aLineColStack.pop();
}
}
-
-// ------------------------------------------------------------------------
sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1,
@@ -1602,8 +1551,8 @@
{
// #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 @@
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 @@
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_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 @@
{
// 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 @@
{
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 1ce1a0d..50c105d 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -37,11 +37,7 @@
using namespace vcl;
-// =======================================================================
-
DBG_NAME( Font )
-
-// -----------------------------------------------------------------------
Impl_Font::Impl_Font() :
maColor( COL_TRANSPARENT ),
@@ -71,8 +67,6 @@
mbTransparent = true;
mbConfigLookup = false;
}
-
-// -----------------------------------------------------------------------
Impl_Font::Impl_Font( const Impl_Font& rImplFont )
: maFamilyName( rImplFont.maFamilyName ),
@@ -105,8 +99,6 @@
mbTransparent = rImplFont.mbTransparent;
mbConfigLookup = rImplFont.mbConfigLookup;
}
-
-// -----------------------------------------------------------------------
bool Impl_Font::operator==( const Impl_Font& rOther ) const
{
@@ -150,8 +142,6 @@
return true;
}
-
-// -----------------------------------------------------------------------
void Impl_Font::AskConfig()
{
@@ -225,8 +215,6 @@
meWidthType = eWidthType;
}
-// =======================================================================
-
void Font::MakeUnique()
{
// create a copy if others still reference it
@@ -238,8 +226,6 @@
}
}
-// -----------------------------------------------------------------------
-
Font::Font()
{
DBG_CTOR( Font, NULL );
@@ -249,8 +235,6 @@
aStaticImplFont.mnRefCount = 0;
mpImplFont = &aStaticImplFont;
}
-
-// -----------------------------------------------------------------------
Font::Font( const Font& rFont )
{
@@ -264,18 +248,14 @@
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 )
{
@@ -287,8 +267,6 @@
mpImplFont->maSize = rSize;
}
-// -----------------------------------------------------------------------
-
Font::Font( FontFamily eFamily, const Size& rSize )
{
DBG_CTOR( Font, NULL );
@@ -297,8 +275,6 @@
mpImplFont->meFamily = eFamily;
mpImplFont->maSize = rSize;
}
-
-// -----------------------------------------------------------------------
Font::~Font()
{
@@ -315,8 +291,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetColor( const Color& rColor )
{
DBG_CHKTHIS( Font, NULL );
@@ -328,8 +302,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetFillColor( const Color& rColor )
{
DBG_CHKTHIS( Font, NULL );
@@ -339,8 +311,6 @@
if ( rColor.GetTransparency() )
mpImplFont->mbTransparent = true;
}
-
-// -----------------------------------------------------------------------
void Font::SetTransparent( sal_Bool bTransparent )
{
@@ -353,8 +323,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetAlign( FontAlign eAlign )
{
DBG_CHKTHIS( Font, NULL );
@@ -366,8 +334,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetName( const rtl::OUString& rFamilyName )
{
DBG_CHKTHIS( Font, NULL );
@@ -376,8 +342,6 @@
mpImplFont->maFamilyName = rFamilyName;
}
-// -----------------------------------------------------------------------
-
void Font::SetStyleName( const String& rStyleName )
{
DBG_CHKTHIS( Font, NULL );
@@ -385,8 +349,6 @@
MakeUnique();
mpImplFont->maStyleName = rStyleName;
}
-
-// -----------------------------------------------------------------------
void Font::SetSize( const Size& rSize )
{
@@ -399,8 +361,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetFamily( FontFamily eFamily )
{
DBG_CHKTHIS( Font, NULL );
@@ -411,8 +371,6 @@
mpImplFont->meFamily = eFamily;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetCharSet( CharSet eCharSet )
{
@@ -425,8 +383,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetLanguage( LanguageType eLanguage )
{
DBG_CHKTHIS( Font, NULL );
@@ -437,8 +393,6 @@
mpImplFont->meLanguage = eLanguage;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetCJKContextLanguage( LanguageType eLanguage )
{
@@ -451,8 +405,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetPitch( FontPitch ePitch )
{
DBG_CHKTHIS( Font, NULL );
@@ -463,8 +415,6 @@
mpImplFont->mePitch = ePitch;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetOrientation( short nOrientation )
{
@@ -477,8 +427,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetVertical( sal_Bool bVertical )
{
DBG_CHKTHIS( Font, NULL );
@@ -489,8 +437,6 @@
mpImplFont->mbVertical = bVertical;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetKerning( FontKerning nKerning )
{
@@ -503,14 +449,10 @@
}
}
-// -----------------------------------------------------------------------
-
sal_Bool Font::IsKerning() const
{
return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0;
}
-
-// -----------------------------------------------------------------------
void Font::SetWeight( FontWeight eWeight )
{
@@ -523,8 +465,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetWidthType( FontWidth eWidth )
{
DBG_CHKTHIS( Font, NULL );
@@ -535,8 +475,6 @@
mpImplFont->meWidthType = eWidth;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetItalic( FontItalic eItalic )
{
@@ -549,8 +487,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetOutline( sal_Bool bOutline )
{
DBG_CHKTHIS( Font, NULL );
@@ -561,8 +497,6 @@
mpImplFont->mbOutline = bOutline;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetShadow( sal_Bool bShadow )
{
@@ -575,8 +509,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetUnderline( FontUnderline eUnderline )
{
DBG_CHKTHIS( Font, NULL );
@@ -587,8 +519,6 @@
mpImplFont->meUnderline = eUnderline;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetOverline( FontUnderline eOverline )
{
@@ -601,8 +531,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetStrikeout( FontStrikeout eStrikeout )
{
DBG_CHKTHIS( Font, NULL );
@@ -613,8 +541,6 @@
mpImplFont->meStrikeout = eStrikeout;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetRelief( FontRelief eRelief )
{
@@ -627,8 +553,6 @@
}
}
-// -----------------------------------------------------------------------
-
void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark )
{
DBG_CHKTHIS( Font, NULL );
@@ -639,8 +563,6 @@
mpImplFont->meEmphasisMark = eEmphasisMark;
}
}
-
-// -----------------------------------------------------------------------
void Font::SetWordLineMode( sal_Bool bWordLine )
{
@@ -653,21 +575,19 @@
}
}
-// -----------------------------------------------------------------------
-
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 @@
return *this;
}
-// -----------------------------------------------------------------------
-
sal_Bool Font::operator==( const Font& rFont ) const
{
DBG_CHKTHIS( Font, NULL );
@@ -695,8 +613,6 @@
return sal_False;
}
-
-// -----------------------------------------------------------------------
void Font::Merge( const Font& rFont )
{
@@ -761,9 +677,6 @@
rAttrs.SetSymbolFlag( mpImplFont->meCharSet == RTL_TEXTENCODING_SYMBOL );
}
-
-// -----------------------------------------------------------------------
-
SvStream& operator>>( SvStream& rIStm, Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rIStm, STREAM_READ );
@@ -809,8 +722,6 @@
return rIStm;
}
-// -----------------------------------------------------------------------
-
SvStream& operator<<( SvStream& rOStm, const Impl_Font& rImpl_Font )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 3 );
@@ -847,22 +758,17 @@
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 @@
{
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 @@
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: */
--
To view, visit https://gerrit.libreoffice.org/3057
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a6a99bb8efe8c3d10973c255040fbbf0f76f27d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Philipp Weissenbacher <p.weissenbacher at gmail.com>
More information about the LibreOffice
mailing list