[PATCH] fdo#39468 Translation and cleanup

Chris Sherlock (via Code Review) gerrit at gerrit.libreoffice.org
Sat Apr 27 19:34:42 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3643

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/43/3643/1

fdo#39468 Translation and cleanup

Cleanup of source code:
- translated German to English
- removed useless comment decorations
- removed commented out code
- some reformatting of code

Change-Id: I71d5fdab8226d61bda9ac906bb82176dc11cafd2
---
M vcl/generic/glyphs/gcach_rbmp.cxx
M vcl/generic/glyphs/glyphcache.cxx
M vcl/generic/print/psheader.ps
M vcl/headless/svptext.cxx
M vcl/qa/cppunit/graphicfilter/data/jpg/fail/CVE-2008-5314-1.jpg
M vcl/qa/cppunit/graphicfilter/data/jpg/fail/EDB-24743-3.jpg
M vcl/qa/cppunit/graphicfilter/data/png/fail/CVE-2007-2365-1.png
M vcl/qa/cppunit/graphicfilter/data/wmf/fail/CVE-2005-4560-1.wmf
M vcl/source/control/quickselectionengine.cxx
M vcl/source/control/throbber.cxx
M vcl/source/filter/graphicfilter.cxx
M vcl/source/filter/wmf/enhwmf.cxx
M vcl/source/filter/wmf/winmtf.cxx
M vcl/source/gdi/imagerepository.cxx
M vcl/source/gdi/textlayout.cxx
M vcl/source/helper/canvastools.cxx
M vcl/source/window/mnemonicengine.cxx
17 files changed, 182 insertions(+), 408 deletions(-)



diff --git a/vcl/generic/glyphs/gcach_rbmp.cxx b/vcl/generic/glyphs/gcach_rbmp.cxx
index 72a76d4..684f886 100644
--- a/vcl/generic/glyphs/gcach_rbmp.cxx
+++ b/vcl/generic/glyphs/gcach_rbmp.cxx
@@ -21,13 +21,11 @@
 #include "generic/glyphcache.hxx"
 #include <string.h>
 
-//------------------------------------------------------------------------
 
 RawBitmap::RawBitmap()
 : mpBits(0), mnAllocated(0)
 {}
 
-//------------------------------------------------------------------------
 
 RawBitmap::~RawBitmap()
 {
@@ -36,7 +34,6 @@
     mnAllocated = 0;
 }
 
-//------------------------------------------------------------------------
 
 // used by 90 and 270 degree rotations on 8 bit deep bitmaps
 static void ImplRotate8_90( unsigned char* p1, const unsigned char* p2,
@@ -51,7 +48,6 @@
     }
 }
 
-//------------------------------------------------------------------------
 
 // used by inplace 180 degree rotation on 8 bit deep bitmaps
 static void ImplRotate8_180( unsigned char* p1, int xmax, int ymax, int nPad )
@@ -79,7 +75,6 @@
     }
 }
 
-//------------------------------------------------------------------------
 
 // used by 90 or 270 degree rotations on 1 bit deep bitmaps
 static void ImplRotate1_90( unsigned char* p1, const unsigned char* p2,
@@ -119,7 +114,6 @@
     }
 }
 
-//------------------------------------------------------------------------
 
 // used by 180 degrees rotations on 1 bit deep bitmaps
 static void ImplRotate1_180( unsigned char* p1, const unsigned char* p2,
@@ -157,7 +151,6 @@
     }
 }
 
-//------------------------------------------------------------------------
 
 bool RawBitmap::Rotate( int nAngle )
 {
@@ -260,7 +253,5 @@
 
     return true;
 }
-
-//------------------------------------------------------------------------
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index a6849ec..a32b88f 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -36,10 +36,6 @@
 #include <osl/file.hxx>
 #include <tools/debug.hxx>
 
-// =======================================================================
-// GlyphCache
-// =======================================================================
-
 static GlyphCache* pInstance = NULL;
 
 GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
@@ -55,7 +51,6 @@
     mpFtManager = new FreetypeManager;
 }
 
-// -----------------------------------------------------------------------
 
 GlyphCache::~GlyphCache()
 {
@@ -63,7 +58,6 @@
     delete mpFtManager;
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::InvalidateAllGlyphs()
 {
@@ -78,7 +72,6 @@
     mpCurrentGCFont = NULL;
 }
 
-// -----------------------------------------------------------------------
 
 inline
 size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData ) const
@@ -105,7 +98,6 @@
     return nHash;
 }
 
-// -----------------------------------------------------------------------
 
 bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const FontSelectPattern& rB) const
 {
@@ -154,14 +146,12 @@
     return true;
 }
 
-// -----------------------------------------------------------------------
 
 GlyphCache& GlyphCache::GetInstance()
 {
     return *pInstance;
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::AddFontFile( const OString& rNormalizedName, int nFaceNum,
     sal_IntPtr nFontId, const ImplDevFontAttributes& rDFA, const ExtraKernInfo* pExtraKern )
@@ -170,7 +160,6 @@
         mpFtManager->AddFontFile( rNormalizedName, nFaceNum, nFontId, rDFA, pExtraKern );
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::AnnounceFonts( ImplDevFontList* pList ) const
 {
@@ -185,7 +174,6 @@
         mpFtManager->ClearFontList();
 }
 
-// -----------------------------------------------------------------------
 
 ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
 {
@@ -238,7 +226,6 @@
     return pNew;
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::UncacheFont( ServerFont& rServerFont )
 {
@@ -254,7 +241,6 @@
     }
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::GarbageCollect()
 {
@@ -306,14 +292,12 @@
     }
 }
 
-// -----------------------------------------------------------------------
 
 inline void GlyphCache::UsingGlyph( ServerFont&, GlyphData& rGlyphData )
 {
     rGlyphData.SetLruValue( mnLruIndex++ );
 }
 
-// -----------------------------------------------------------------------
 
 inline void GlyphCache::AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphData )
 {
@@ -323,7 +307,6 @@
     GrowNotify();
 }
 
-// -----------------------------------------------------------------------
 
 void GlyphCache::GrowNotify()
 {
@@ -331,7 +314,6 @@
         GarbageCollect();
 }
 
-// -----------------------------------------------------------------------
 
 inline void GlyphCache::RemovingGlyph( ServerFont& rSF, GlyphData& rGD, int nGlyphIndex )
 {
@@ -340,11 +322,10 @@
     --mnGlyphCount;
 }
 
-// -----------------------------------------------------------------------
 
 void ServerFont::ReleaseFromGarbageCollect()
 {
-   // remove from GC list
+    // remove from GC list
     ServerFont* pPrev = mpPrevGCFont;
     ServerFont* pNext = mpNextGCFont;
     if( pPrev ) pPrev->mpNextGCFont = pNext;
@@ -353,7 +334,6 @@
     mpNextGCFont = NULL;
 }
 
-// -----------------------------------------------------------------------
 
 long ServerFont::Release() const
 {
@@ -361,7 +341,6 @@
     return --mnRefCount;
 }
 
-// -----------------------------------------------------------------------
 
 GlyphData& ServerFont::GetGlyphData( int nGlyphIndex )
 {
@@ -381,7 +360,6 @@
     return rGlyphData;
 }
 
-// -----------------------------------------------------------------------
 
 void ServerFont::GarbageCollect( long nMinLruIndex )
 {
@@ -401,7 +379,6 @@
     }
 }
 
-// =======================================================================
 
 ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
 :   ImplFontEntry( rFSD )
@@ -409,7 +386,6 @@
 ,   mbGotFontOptions( false )
 {}
 
-// -----------------------------------------------------------------------
 
 void ImplServerFontEntry::SetServerFont(ServerFont* p)
 {
@@ -429,7 +405,6 @@
         mpServerFont->Release();
 }
 
-// =======================================================================
 
 ExtraKernInfo::ExtraKernInfo( sal_IntPtr nFontId )
 :   mbInitialized( false ),
@@ -437,7 +412,6 @@
     maUnicodeKernPairs( 0 )
 {}
 
-//--------------------------------------------------------------------------
 
 int ExtraKernInfo::GetUnscaledKernPairs( ImplKernPairData** ppKernPairs ) const
 {
@@ -460,7 +434,5 @@
 
     return nKernCount;
 }
-
-// =======================================================================
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/generic/print/psheader.ps b/vcl/generic/print/psheader.ps
index ebd93e1..2970a5a 100644
--- a/vcl/generic/print/psheader.ps
+++ b/vcl/generic/print/psheader.ps
@@ -20,21 +20,21 @@
 %
 % readpath
 %
-% The intention of readpath is to save disk space since the vcl clip region routines 
+% The intention of readpath is to save disk space since the vcl clip region routines
 % produce a huge amount of lineto/moveto commands
 %
 % The principal idea is to maintain the current point on stack and to provide only deltas
 % in the command. These deltas are added to the current point. The new point is used for
 % the lineto and moveto command and saved on stack for the next command.
 %
-% pathdict implements binary/hex representation of lineto and moveto commands. 
+% pathdict implements binary/hex representation of lineto and moveto commands.
 % The command consists of a 1byte opcode to switch between lineto and moveto and the size
-% of the following delta-x and delta-y values. The opcode is read with /rcmd, the two 
+% of the following delta-x and delta-y values. The opcode is read with /rcmd, the two
 % coordinates are read with /rhex. The whole command is executed with /xcmd
 %
-% 
+%
 
-/pathdict dup 8 dict def load 
+/pathdict dup 8 dict def load
 begin
 
 	% the command is of the bit format cxxyy
@@ -43,10 +43,10 @@
 	% xx is a 2bit value for the number of bytes for x position
 	% yy is the same for y, values are off by one: 00 means 1; 11 means 4 !
 	% the command has been added to 'A' to be always in the ascii character
-	% range. the command is followed by 2*xx + 2*yy hexchars. 
-	% '~' denotes the special case of EOD 
-	/rcmd  	{ 
-				{ 
+	% range. the command is followed by 2*xx + 2*yy hexchars.
+	% '~' denotes the special case of EOD
+	/rcmd  	{
+				{
 					currentfile 1 string readstring % s bool
 					pop								% s
 					0 get							% s[0]
@@ -64,7 +64,7 @@
 				dup 16#3 and 1 add				% cmd yy
 												% -- Separate xx bits
 				exch							% yy cmd
-				dup 16#C and -2 bitshift 
+				dup 16#C and -2 bitshift
 				16#3 and 1 add exch 			% yy xx cmd
 												% -- Separate command bit
 				16#10 and 16#10 eq				% yy xx bool
@@ -73,12 +73,12 @@
 
 	% length rhex -- reads a signed hex value of given length
 	% the left most bit of char 0 is considered as the sign (0 means '+', 1 means '-')
-	% the rest of the bits is considered to be the abs value. Please note that this 
-	% does not match the C binary representation of integers 
-	/rhex 	{ 
+	% the rest of the bits is considered to be the abs value. Please note that this
+	% does not match the C binary representation of integers
+	/rhex 	{
 				dup 1 sub exch 			% l-1 l
 				currentfile exch string readhexstring 	% l-1 substring[l] bool
-				pop 
+				pop
 				dup 0 get dup 			% l-1 s s[0] s[0]
 										% -- Extract the sign
 				16#80 and 16#80 eq dup  % l-1 s s[0] sign=- sign=-
@@ -88,10 +88,10 @@
 				2 index 0 				% l-1 s sign=- +s[0] s 0
 				3 -1 roll put			% l-1 s sign=- s 0 +s[0]
 										% -- Read loop: add to prev sum, mul with 256
-				3 1 roll 0			    % sign=- l-1 s Sum=0 
+				3 1 roll 0			    % sign=- l-1 s Sum=0
 				0 1 5 -1 roll			% sign=- s Sum=0 0 1 l-1
 				{						% sign=- s Sum idx
-					2 index exch		% sign=- s Sum s idx 
+					2 index exch		% sign=- s Sum s idx
 					get 				% sign=- s Sum s[idx]
 					add	256 mul			% sign=- s Sum=(s[idx]+Sum)*256
 				}
@@ -99,11 +99,11 @@
 										% -- mul was once too often, weave in the sign
 				256 div					% sign=- s Sum/256
 				exch pop 				% sign=- Sum/256
-				exch { neg } if 		% (sign=- ? -Sum : Sum) 
+				exch { neg } if 		% (sign=- ? -Sum : Sum)
 		  	} def
 
 	% execute a single command, the former x and y position is already on stack
-	% only offsets are read from cmdstring 
+	% only offsets are read from cmdstring
 	/xcmd	{							% x y
 				rcmd					% x y bool wx wy
 				exch rhex				% x y bool wy Dx
@@ -121,9 +121,9 @@
 
 /readpath
 {	
-	0 0		% push initial-x initial-y 
+	0 0		% push initial-x initial-y
 	pathdict begin
-		{ xcmd } loop 
+		{ xcmd } loop
 	end
 	pop pop % pop final-x final-y
 } def
@@ -157,7 +157,7 @@
 									% -- store the current point
 			currentpoint 3 -1 roll	% a s a[idx] x y s1
 									% -- draw the character
-			show					% a s a[idx] x y  
+			show					% a s a[idx] x y
 									% -- move to the offset
 			moveto 0 rmoveto		% a s
 		}
@@ -167,26 +167,26 @@
 
 	% x y width height rectfill
 	% x y width height rectshow
-	% in contrast to the languagelevel 2 operator 
+	% in contrast to the languagelevel 2 operator
 	% they use and change the currentpath
 	/rectangle {
-		4 -2 roll			% width height x y 
+		4 -2 roll			% width height x y
 		moveto				% width height
 		1 index 0 rlineto	% width height	% rmoveto(width,  0)
 		0 exch rlineto		% width   		% rmoveto(0,      height)
 		neg 0 rlineto 		% -  			% rmoveto(-width, 0)
 		closepath
-	} def 
+	} def
 
 	/rectfill   { rectangle fill   } def
 	/rectstroke { rectangle stroke } def
 }
-if 
+if
 
 % -- small test program
 % 75 75 moveto /Times-Roman findfont 12 scalefont setfont
 % <292a2b2c2d2e2f30313233343536373839>
-% [5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 5] xshow <21>[0] xshow 
+% [5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 5] xshow <21>[0] xshow
 % showpage
 
 %
@@ -195,43 +195,43 @@
 %
 %
 
-/psp_lzwfilter { 
-    currentfile /ASCII85Decode filter /LZWDecode filter 
+/psp_lzwfilter {
+    currentfile /ASCII85Decode filter /LZWDecode filter
 } def
-/psp_ascii85filter { 
-    currentfile /ASCII85Decode filter 
+/psp_ascii85filter {
+    currentfile /ASCII85Decode filter
 } def
-/psp_lzwstring { 
-    psp_lzwfilter 1024 string readstring 
+/psp_lzwstring {
+    psp_lzwfilter 1024 string readstring
 } def
-/psp_ascii85string { 
-    psp_ascii85filter 1024 string readstring 
+/psp_ascii85string {
+    psp_ascii85filter 1024 string readstring
 } def
 /psp_imagedict {
-    /psp_bitspercomponent { 
-        3 eq 
+    /psp_bitspercomponent {
+        3 eq
         { 1 }
-        { 8 } 
-        ifelse 
+        { 8 }
+        ifelse
     } def
-    /psp_decodearray { 
-        [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get 
-    } def 
+    /psp_decodearray {
+        [ [0 1 0 1 0 1] [0 255] [0 1] [0 255] ] exch get
+    } def
 
     7 dict dup
         /ImageType 1                    put dup
         /Width 7 -1 roll                put dup
         /Height 5 index                 put dup
-        /BitsPerComponent 4 index 
+        /BitsPerComponent 4 index
             psp_bitspercomponent        put dup
-        /Decode 5 -1 roll 
+        /Decode 5 -1 roll
             psp_decodearray             put dup
-        /ImageMatrix [1 0 0 1 0 0] dup 
+        /ImageMatrix [1 0 0 1 0 0] dup
             5 8 -1 roll put             put dup
-        /DataSource 4 -1 roll 
-            1 eq 
-            { psp_lzwfilter } 
-            { psp_ascii85filter } 
+        /DataSource 4 -1 roll
+            1 eq
+            { psp_lzwfilter }
+            { psp_ascii85filter }
             ifelse                      put
 } def
 
@@ -277,20 +277,20 @@
     /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis
 ] def
 
-% /fontname /encoding psp_findfont 
+% /fontname /encoding psp_findfont
 /psp_findfont {
-    exch dup                % encoding fontname fontname 
+    exch dup                % encoding fontname fontname
     findfont                % encoding fontname
-    dup length dict 
+    dup length dict
     begin
-    {  
+    {
         1 index /FID ne
         { def }
         { pop pop }
         ifelse
     } forall
     /Encoding 3 -1 roll def
-    currentdict 
+    currentdict
     end
     /psp_reencodedfont exch definefont
 } def
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 717579f..2b65746 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -39,8 +39,6 @@
 using namespace basegfx;
 using namespace basebmp;
 
-// ===========================================================================
-
 class SvpGlyphPeer
 :   public GlyphCachePeer
 {
@@ -61,8 +59,6 @@
         BitmapDeviceSharedPtr   maBitmapDev;
     };
 };
-
-// ===========================================================================
 
 class SvpGlyphCache : public GlyphCache
 {
@@ -112,7 +108,6 @@
     return theGlyphCacheHolder::get().getGlyphCache();
 }
 
-// ===========================================================================
 
 BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
     int nGlyphIndex, sal_uInt32 nBmpFormat, B2IPoint& rTargetPos )
@@ -168,14 +163,12 @@
     return pGcpHelper->maBitmapDev;
 }
 
-//--------------------------------------------------------------------------
 
 void SvpGlyphPeer::RemovingFont( ServerFont& )
 {
     // nothing to do: no font resources held in SvpGlyphPeer
 }
 
-//--------------------------------------------------------------------------
 
 void SvpGlyphPeer::RemovingGlyph( ServerFont&, GlyphData& rGlyphData, int /*nGlyphIndex*/ )
 {
@@ -189,7 +182,6 @@
     }
 }
 
-// ===========================================================================
 
 // PspKernInfo allows on-demand-querying of psprint provided kerning info (#i29881#)
 class PspKernInfo : public ExtraKernInfo
@@ -200,7 +192,6 @@
     virtual void Initialize() const;
 };
 
-//--------------------------------------------------------------------------
 
 void PspKernInfo::Initialize() const
 {
@@ -221,7 +212,6 @@
     }
 }
 
-// ===========================================================================
 
 sal_uInt16 SvpSalGraphics::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel )
 {
@@ -257,7 +247,6 @@
     return SAL_SETFONT_USEDRAWTEXTARRAY;
 }
 
-// ---------------------------------------------------------------------------
 
 void SvpSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLevel )
 {
@@ -271,7 +260,6 @@
     }
 }
 
-// ---------------------------------------------------------------------------
 
 sal_uLong SvpSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
 {
@@ -289,7 +277,6 @@
     return nGotPairs;
 }
 
-// ---------------------------------------------------------------------------
 
 const ImplFontCharMap* SvpSalGraphics::GetImplFontCharMap() const
 {
@@ -308,7 +295,6 @@
     return m_pServerFont[0]->GetFontCapabilities(rFontCapabilities);
 }
 
-// ---------------------------------------------------------------------------
 
 void SvpSalGraphics::GetDevFontList( ImplDevFontList* pDevFontList )
 {
@@ -360,12 +346,10 @@
     rGC.ClearFontCache();
 }
 
-// ---------------------------------------------------------------------------
 
 void SvpSalGraphics::GetDevFontSubstList( OutputDevice* )
 {}
 
-// ---------------------------------------------------------------------------
 
 bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*,
     const OUString&, const OUString& )
@@ -373,7 +357,6 @@
     return false;
 }
 
-// ---------------------------------------------------------------------------
 
 sal_Bool SvpSalGraphics::CreateFontSubset(
     const OUString& rToFile,
@@ -403,7 +386,6 @@
     return bSuccess;
 }
 
-// ---------------------------------------------------------------------------
 
 const Ucs2SIntMap* SvpSalGraphics::GetFontEncodingVector( const PhysicalFontFace* pFont, const Ucs2OStrMap** pNonEncoded )
 {
@@ -416,7 +398,6 @@
     return GenPspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded );
 }
 
-// ---------------------------------------------------------------------------
 
 const void* SvpSalGraphics::GetEmbedFontData(
     const PhysicalFontFace* pFont,
@@ -435,7 +416,6 @@
     return GenPspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen );
 }
 
-// ---------------------------------------------------------------------------
 
 void SvpSalGraphics::FreeEmbedFontData( const void* pData, long nLen )
 {
@@ -456,7 +436,6 @@
     GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
 }
 
-// ---------------------------------------------------------------------------
 
 sal_Bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
 {
@@ -474,7 +453,6 @@
     return sal_True;
 }
 
-// ---------------------------------------------------------------------------
 
 sal_Bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex, B2DPolyPolygon& rPolyPoly )
 {
@@ -493,7 +471,6 @@
     return sal_False;
 }
 
-// ---------------------------------------------------------------------------
 
 SalLayout* SvpSalGraphics::GetTextLayout( ImplLayoutArgs&, int nFallbackLevel )
 {
@@ -505,7 +482,6 @@
     return pLayout;
 }
 
-// ---------------------------------------------------------------------------
 
 void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout )
 {
diff --git a/vcl/qa/cppunit/graphicfilter/data/jpg/fail/CVE-2008-5314-1.jpg b/vcl/qa/cppunit/graphicfilter/data/jpg/fail/CVE-2008-5314-1.jpg
index 33bbe9b..d0b4e8a 100644
--- a/vcl/qa/cppunit/graphicfilter/data/jpg/fail/CVE-2008-5314-1.jpg
+++ b/vcl/qa/cppunit/graphicfilter/data/jpg/fail/CVE-2008-5314-1.jpg
Binary files differ
diff --git a/vcl/qa/cppunit/graphicfilter/data/jpg/fail/EDB-24743-3.jpg b/vcl/qa/cppunit/graphicfilter/data/jpg/fail/EDB-24743-3.jpg
index 4753ed8..10275b7 100644
--- a/vcl/qa/cppunit/graphicfilter/data/jpg/fail/EDB-24743-3.jpg
+++ b/vcl/qa/cppunit/graphicfilter/data/jpg/fail/EDB-24743-3.jpg
Binary files differ
diff --git a/vcl/qa/cppunit/graphicfilter/data/png/fail/CVE-2007-2365-1.png b/vcl/qa/cppunit/graphicfilter/data/png/fail/CVE-2007-2365-1.png
index b9ff67b..a758f87 100644
--- a/vcl/qa/cppunit/graphicfilter/data/png/fail/CVE-2007-2365-1.png
+++ b/vcl/qa/cppunit/graphicfilter/data/png/fail/CVE-2007-2365-1.png
Binary files differ
diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/CVE-2005-4560-1.wmf b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/CVE-2005-4560-1.wmf
index aab3400..120ed77 100644
--- a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/CVE-2005-4560-1.wmf
+++ b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/CVE-2005-4560-1.wmf
Binary files differ
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index d00944a..2f37966 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -26,14 +26,9 @@
 
 #include <boost/optional.hpp>
 
-//........................................................................
 namespace vcl
 {
-//........................................................................
 
-    //====================================================================
-    //= QuickSelectionEngine_Data
-    //====================================================================
     struct QuickSelectionEngine_Data
     {
         ISearchableStringList&              rEntryList;
@@ -59,7 +54,6 @@
         DECL_LINK( SearchStringTimeout, Timer* );
     };
 
-    //--------------------------------------------------------------------
     namespace
     {
         static void lcl_reset( QuickSelectionEngine_Data& _data )
@@ -70,18 +64,16 @@
         }
     }
 
-    //--------------------------------------------------------------------
     IMPL_LINK( QuickSelectionEngine_Data, SearchStringTimeout, Timer*, /*EMPTYARG*/ )
     {
         lcl_reset( *this );
         return 1;
     }
 
-    //--------------------------------------------------------------------
     static StringEntryIdentifier findMatchingEntry( const OUString& _searchString, QuickSelectionEngine_Data& _engineData )
     {
         const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetLocaleI18nHelper();
-            // TODO: do we really need the Window's settings here? The original code used it ...
+        // TODO: do we really need the Window's settings here? The original code used it ...
 
         String sEntryText;
         // get the "current + 1" entry
@@ -103,21 +95,15 @@
         return pSearchEntry;
     }
 
-    //====================================================================
-    //= QuickSelectionEngine
-    //====================================================================
-    //--------------------------------------------------------------------
     QuickSelectionEngine::QuickSelectionEngine( ISearchableStringList& _entryList )
         :m_pData( new QuickSelectionEngine_Data( _entryList ) )
     {
     }
 
-    //--------------------------------------------------------------------
     QuickSelectionEngine::~QuickSelectionEngine()
     {
     }
 
-    //--------------------------------------------------------------------
     bool QuickSelectionEngine::HandleKeyEvent( const KeyEvent& _keyEvent )
     {
         sal_Unicode c = _keyEvent.GetCharCode();
@@ -164,14 +150,11 @@
         return false;
     }
 
-    //--------------------------------------------------------------------
     void QuickSelectionEngine::Reset()
     {
         lcl_reset( *m_pData );
     }
 
-//........................................................................
 } // namespace vcl
-//........................................................................
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx
index 3197b25..de04560 100644
--- a/vcl/source/control/throbber.cxx
+++ b/vcl/source/control/throbber.cxx
@@ -179,25 +179,21 @@
     }
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 void Throbber::start()
 {
     maWaitTimer.Start();
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 void Throbber::stop()
 {
     maWaitTimer.Stop();
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 bool Throbber::isRunning() const
 {
     return maWaitTimer.IsActive();
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 void Throbber::setImageList( ::std::vector< Image > const& i_images )
 {
     maImageList = i_images;
@@ -207,7 +203,6 @@
     SetImage( aInitialImage );
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 void Throbber::setImageList( const Sequence< Reference< XGraphic > >& rImageList )
 {
     ::std::vector< Image > aImages( rImageList.getLength() );
@@ -219,7 +214,6 @@
     setImageList( aImages );
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 ::std::vector< OUString > Throbber::getDefaultImageURLs( const ImageSet i_imageSet )
 {
     ::std::vector< OUString > aImageURLs;
@@ -257,7 +251,6 @@
     return aImageURLs;
 }
 
-//----------------------------------------------------------------------------------------------------------------------
 IMPL_LINK_NOARG(Throbber, TimeOutHdl)
 {
     SolarMutexGuard aGuard;
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 15d68f8..d9944fa 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -88,16 +88,20 @@
 {
 protected:
 
-    SvStream&                           mrStm;
+    SvStream&               mrStm;
 
-    virtual void SAL_CALL               writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData ) throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Write( rData.getConstArray(), rData.getLength() ); }
-    virtual void SAL_CALL               flush() throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { mrStm.Flush(); }
-    virtual void SAL_CALL               closeOutput() throw() {}
+    virtual void SAL_CALL   writeBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& rData )
+        throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+        { mrStm.Write( rData.getConstArray(), rData.getLength() ); }
+    virtual void SAL_CALL   flush()
+        throw (::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+        { mrStm.Flush(); }
+    virtual void SAL_CALL   closeOutput() throw() {}
 
 public:
 
-                                        ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {}
-                                        ~ImpFilterOutputStream() {}
+    ImpFilterOutputStream( SvStream& rStm ) : mrStm( rStm ) {}
+    ~ImpFilterOutputStream() {}
 };
 
 #ifndef DISABLE_EXPORT
@@ -108,9 +112,9 @@
 
     try
     {
-        ::ucbhelper::Content    aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ),
-                              ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
-                              comphelper::getProcessComponentContext() );
+        ::ucbhelper::Content aCnt( rObj.GetMainURL( INetURLObject::NO_DECODE ),
+                             ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
+                             comphelper::getProcessComponentContext() );
 
         bExists = aCnt.isDocument();
     }
@@ -171,7 +175,6 @@
     return NULL;
 }
 
-//--------------------------------------------------------------------------
 
 inline String ImpGetExtension( const String &rPath )
 {
@@ -186,7 +189,7 @@
     sal_uInt8 sBuf[3];
     // store number format
     sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt();
-    sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes
+    sal_uInt32 nOffset; // in MS documents the pict format is used without the first 512 bytes
     for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 )
     {
         short y1,x1,y2,x2;
@@ -220,34 +223,31 @@
 
 
 /*************************************************************************
-|*
-|*    ImpPeekGraphicFormat()
-|*
-|*    Beschreibung:
-|*        Diese Funktion kann zweierlei:
-|*        1.) Datei anlesen, Dateiformat ermitteln
-|*            Eingabe-prarameter:
-|*              rPath            - Dateipfad
-|*              rFormatExtension - Inhalt egal
-|*              bTest            - setze sal_False
-|*            Ausgabe-parameter:
-|*              Funkionswert     - sal_True wenn Erfolg
-|*              rFormatExtension - Bei Erfolg: uebliche Dateiendung
-|*                                 des Formats (Grossbuchstaben)
-|*        2.) Datei anlesen, Dateiformat ueberpruefen
-|*            Eingabe-prarameter:
-|*              rPath            - Dateipfad
-|*              rFormatExtension - uebliche Dateiendung des Formats
-|*                                 (Grossbuchstaben)
-|*              bTest            - setze sal_True
-|*            Ausgabe-parameter:
-|*              Funkionswert     - sal_False, wenn die Datei bestimmt nicht
-|*                                 vom uebgebenen Format ist.
-|*                                 sal_True, wenn die Datei WAHRSCHEINLICH von
-|*                                 dem Format ist, ODER WENN DAS FORMAT
-|*                                 DIESER FUNKTION NICHT BEKANNT IST!
-|*
-*************************************************************************/
+ *
+ *    ImpPeekGraphicFormat()
+ *
+ *    Description:
+ *        This function is two-fold:
+ *        1.) Start reading file, determine the file format:
+ *            Input parameters:
+ *              rPath            - file path
+ *              rFormatExtension - content matter
+ *              bTest            - set sal_False
+ *            Output parameters:
+ *              Return value     - sal_True if success
+ *              rFormatExtension - on success: normal file extension in capitals
+ *        2.) Start reading file, check file format
+ *            Input parameters:
+ *              rPath            - file path
+ *              rFormatExtension - normal file extension in capitals
+ *              bTest            - set sal_True
+ *            Output parameters:
+ *              Return value    - sal_False, if cannot verify the file type
+ *                                  passed to the function
+ *                                 sal_True, when the format is PROBABLY verified or
+ *                                 WHEN THE FORMAT IS NOT KNOWN!
+ *
+ *************************************************************************/
 
 static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, sal_Bool bTest )
 {
@@ -289,7 +289,7 @@
     if( rStream.GetError() )
         return sal_False;
 
-    // Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen,
+    // Accommodate the first 8 bytes in nFirstLong, nSecondLong
     // Big-Endian:
     for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ )
     {
@@ -297,23 +297,17 @@
         nSecondLong=(nSecondLong<<8)|(sal_uLong)sFirstBytes[i+4];
     }
 
-    // Folgende Variable ist nur bei bTest==sal_True interessant. Sie
-    // bleibt sal_False, wenn das Format (rFormatExtension) hier noch nicht
-    // einprogrammiert wurde.
+    // The following variable is used when bTest == sal_True. It remains sal_False
+    // if the format (rFormatExtension) has not yet been set.
     sal_Bool bSomethingTested = sal_False;
 
-    // Nun werden die verschieden Formate ueberprueft. Dabei ist die
-    // Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch
-    // den BMP-Test gehen, umgekehrt kann eine BMP-Datei kaum durch den
-    // MET-Test gehen. Also sollte MET vor BMP getestet werden.
-    // Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar,
-    // die durch den MET-Test geht.
-    // Diese Probleme gibt es natuerlich nicht nur bei MET und BMP.
-    // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==sal_True)
-    // nur genau dieses eine Format getestet. Alles andere koennte fatale
-    // Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es
-    // ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen...
-
+    // Now the different formats are checked. The order does not matter. e.g. a MET file
+    // could also go through the BMP test, howeve a BMP file can hardly go through the MET test.
+    // So MET should be tested prior to BMP. However, theoretically a BMP file could conceivably
+    // go through the MET test. These problems are of course not only in MET and BMP.
+    // Therefore, in the case of a format check (bTest == sal_True)  we only test this format.
+    // Everything else could have fatal consequences, for example if the user says it is a BMP file
+    // (and it is a BMP) file, and the file would go through the MET test ...
     //--------------------------- MET ------------------------------------
     if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) )
     {
@@ -348,20 +342,20 @@
 
         bSomethingTested=sal_True;
 
-        // OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen,
-        // dementspr. muessen wir den Offset anpassen,
-        // um auf die erste Bitmap im Array zu stossen
+        // We could be reading an OS/2 bitmap array ('BA'), therefore we must adjust
+        // the offset to discover the first bitmap in the array
         if ( sFirstBytes[0] == 0x42 && sFirstBytes[1] == 0x41 )
             nOffs = 14;
         else
             nOffs = 0;
 
-        // Jetzt testen wir zunaechst auf 'BM'
+        // Now we initially test on 'BM'
         if ( sFirstBytes[0+nOffs]==0x42 && sFirstBytes[1+nOffs]==0x4d )
         {
-            // unter OS/2 koennen die Reserved-Flags != 0 sein
-            // (was sie eigentlich nicht duerften);
-            // in diesem Fall testen wir die Groesse des BmpInfoHeaders
+
+            // OS/2 can set the Reserved flags to a value other than 0
+            // (which they really should not do...);
+            // In this case we test the size of the BmpInfoHeaders
             if ( ( sFirstBytes[6+nOffs]==0x00 &&
                    sFirstBytes[7+nOffs]==0x00 &&
                    sFirstBytes[8+nOffs]==0x00 &&
@@ -518,14 +512,14 @@
     //--------------------------- DXF ------------------------------------
     if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) )
     {
-        //Binary DXF File Format
+        // Binary DXF File Format
         if( strncmp( (const char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 )
         {
             rFormatExtension = OUString("DXF");
             return sal_True;
         }
 
-        //ASCII DXF File Format
+        // ASCII DXF File Format
         i=0;
         while (i<256 && sFirstBytes[i]<=32)
             ++i;
@@ -534,8 +528,8 @@
         {
             ++i;
 
-            //only now do we have sufficient data to make a judgement
-            //based on a '0' + 'SECTION' == DXF argument
+            // only now do we have sufficient data to make a judgement
+            // based on a '0' + 'SECTION' == DXF argument
             bSomethingTested=sal_True;
 
             while( i<256 && sFirstBytes[i]<=32 )
@@ -694,7 +688,7 @@
         }
         else
         {
-            // #119176# Svg files which have no xml header at all have shown up,
+            // #119176# SVG files which have no xml header at all have shown up,
             // detect those, too
             bool bIsSvg(false);
 
@@ -708,7 +702,7 @@
             {
                 // look for '<svg' in full file. Should not happen too
                 // often since the tests above will handle most cases, but can happen
-                // with Svg files containing big comment headers or Svg as the host
+                // with SVG files containing big comment headers or SVG as the host
                 // language
                 const sal_uLong nSize((nStreamLen > 2048) ? 2048 : nStreamLen);
                 sal_uInt8* pBuf = new sal_uInt8[nSize];
@@ -856,7 +850,7 @@
         if( rGraphic.GetType() == GRAPHIC_BITMAP )
         {
 
-            // Aufloesung wird eingestellt
+            // Resolution is set
             if( nMode == 1 )
             {
                 Bitmap      aBitmap( rGraphic.GetBitmap() );
@@ -874,7 +868,7 @@
                aGraphic.SetPrefSize( Size( aOldSize.Width() * 100,
                                            aOldSize.Height() * 100 ) );
             }
-            // Groesse wird eingestellt
+            // Size is set
             else if( nMode == 2 )
             {
                aGraphic = rGraphic;
@@ -1398,8 +1392,7 @@
 
         bAbort = sal_False;
         nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat );
-        // Falls Pending, geben wir GRFILTER_OK zurueck,
-        // um mehr Bytes anzufordern
+        // if pending, return GRFILTER_OK in order to request more bytes
         if( rIStream.GetError() == ERRCODE_IO_PENDING )
         {
             rGraphic.SetContext( (GraphicReader*) 1 );
@@ -1563,7 +1556,7 @@
         else if( aFilterName.EqualsIgnoreCaseAscii( IMP_BMP ) ||
                     aFilterName.EqualsIgnoreCaseAscii( IMP_SVMETAFILE ) )
         {
-            // SV interne Importfilter fuer Bitmaps und MetaFiles
+            // SV internal filters for import bitmaps and MetaFiles
             rIStream >> rGraphic;
             if( rIStream.GetError() )
                 nStatus = GRFILTER_FORMATERROR;
@@ -1838,18 +1831,13 @@
             sal_uLong nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
             VirtualDevice aVirDev;
 
-            // Maximalen Speicherbedarf fuer das Bildes holen:
-//          if( GetOptionsConfig() )
-//              nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
-//          else
-                nMaxMem = 1024;
-
+            nMaxMem = 1024;
             nMaxMem *= 1024; // In Bytes
 
-            // Berechnen, wie gross das Bild normalerweise werden wuerde:
+            // Calculate how big the image would normally be:
             aSizePixel=aVirDev.LogicToPixel(aGraphic.GetPrefSize(),aGraphic.GetPrefMapMode());
 
-            // Berechnen, wieviel Speicher das Bild benoetigen wuerde:
+            // Calculate how much memory the image will take up
             nColorCount=aVirDev.GetColorCount();
             if      (nColorCount<=2)     nBitsPerPixel=1;
             else if (nColorCount<=4)     nBitsPerPixel=2;
@@ -1859,7 +1847,7 @@
             else                         nBitsPerPixel=24;
             nNeededMem=((sal_uLong)aSizePixel.Width()*(sal_uLong)aSizePixel.Height()*nBitsPerPixel+7)/8;
 
-            // ggf. Groesse des Bildes einschraenken:
+            // is the image larger than available memory?
             if (nMaxMem<nNeededMem)
             {
                 double fFak=sqrt(((double)nMaxMem)/((double)nNeededMem));
@@ -1870,7 +1858,7 @@
             aVirDev.SetMapMode(MapMode(MAP_PIXEL));
             aVirDev.SetOutputSizePixel(aSizePixel);
             Graphic aGraphic2=aGraphic;
-            aGraphic2.Draw(&aVirDev,Point(0,0),aSizePixel); // Gemein: dies aendert den MapMode
+            aGraphic2.Draw(&aVirDev,Point(0,0),aSizePixel); // this changes the MapMode
             aVirDev.SetMapMode(MapMode(MAP_PIXEL));
             aGraphic=Graphic(aVirDev.GetBitmap(Point(0,0),aSizePixel));
         }
@@ -2071,7 +2059,7 @@
                 osl::Module aLibrary( aPhysicalName );
 
                 PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(OUString(aFilterName+EXPORT_FUNCTION_NAME));
-                // Dialog in DLL ausfuehren
+                // Execute dialog in DLL
 #else
                 PFilterCall pFunc = NULL;
                 if( aFilterName.EqualsAscii( "egi" ) )
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index c19e48e..cd71a6b 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -23,7 +23,8 @@
 #include <boost/bind.hpp>
 
 using namespace std;
-//=========================== GDI-Array ===================================
+
+// GDI-Array
 
 #define EMR_HEADER                      1
 #define EMR_POLYBEZIER                  2
@@ -156,7 +157,6 @@
 #define EMFP_DEBUG(x)
 #endif
 
-//-----------------------------------------------------------------------------------
 
 #ifdef OSL_BIGENDIAN
 // currently unused
@@ -264,8 +264,8 @@
     bHaveDC = false;
 
     OSL_ASSERT(length >= 4);
-    //reduce by 32bit length itself, skip in SeekRel if
-    //impossibly unavailble
+    // reduce by 32bit length itself, skip in SeekRel if
+    // impossibly unavailble
     sal_uInt32 nRemainder = length >= 4 ? length-4 : length;
 
     const size_t nRequiredHeaderSize = 12;
@@ -285,11 +285,11 @@
             EMFP_DEBUG(printf ("\t\tEMF+ lock DC (device context)\n"));
         }
 
-        //Get the length of the remaining data of this record based
-        //on the alleged size
+        // Get the length of the remaining data of this record based
+        // on the alleged size
         sal_uInt32 nRemainingRecordData = size >= nRequiredHeaderSize ?
             size-nRequiredHeaderSize : 0;
-        //clip to available size
+        // clip to available size
         nRemainingRecordData = std::min(nRemainingRecordData, nRemainder);
         pWMF->SeekRel(nRemainingRecordData);
         nRemainder -= nRemainingRecordData;
@@ -394,13 +394,13 @@
         ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) &&
         ( (  nPoly * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) ))
     {
-        //Get number of points in each polygon
+        // Get number of points in each polygon
         sal_uInt16 * pnPoints = new sal_uInt16[ nPoly ];
         for ( i = 0; i < nPoly && pWMF->good(); i++ )
         {
             *pWMF >> nPoints;
             pnPoints[ i ] = (sal_uInt16)nPoints;
-        } //end for
+        }
         if ( pWMF->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( nEndPos - pWMF->Tell() ) )
         {
             // Get polygon points
@@ -410,14 +410,14 @@
                 T nX, nY;
                 *pWMF >> nX >> nY;
                 pPtAry[ i ] = Point( nX, nY );
-            } //end for
+            }
             // Create PolyPolygon Actions
             PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
             pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
             delete[] pPtAry;
-        } //end if
+        }
         delete[] pnPoints;
-    } //end if
+    }
 }
 
 sal_Bool EnhWMFReader::ReadEnhWMF()
@@ -475,12 +475,12 @@
 
                 EMFP_DEBUG(printf ("\t\tbegin %c%c%c%c id: 0x%x\n", (char)(id & 0xff), (char)((id & 0xff00) >> 8), (char)((id & 0xff0000) >> 16), (char)((id & 0xff000000) >> 24), (unsigned int)id));
 
-                // EMF+ comment (fixme: BE?)
+                // EMF+ comment (FIXME: BE?)
                 if( id == 0x2B464D45 && nRecSize >= 12 )
                     ReadEMFPlusComment( length, bHaveDC );
                 // GDIC comment, doesn't do anything useful yet
                 else if( id == 0x43494447 && nRecSize >= 12 ) {
-                    //ToDo: ReadGDIComment()
+                    // TODO: ReadGDIComment()
                 } else {
                     EMFP_DEBUG(printf ("\t\tunknown id: 0x%x\n",(unsigned int) id));
                 }
@@ -685,7 +685,7 @@
                         LineInfo    aLineInfo;
                         sal_uInt32      nStyle;
                         Size        aSize;
-                        //#fdo39428 Remove SvStream operator>>(long&)
+                        // #fdo39428 Remove SvStream operator>>(long&)
                         sal_Int32 nTmpW(0), nTmpH(0);
 
                         *pWMF >> nStyle >> nTmpW >> nTmpH;
@@ -1338,7 +1338,6 @@
     return bStatus;
 };
 
-//-----------------------------------------------------------------------------------
 
 sal_Bool EnhWMFReader::ReadHeader()
 {
@@ -1367,12 +1366,12 @@
     rclFrame.Right() = nRight;
     rclFrame.Bottom() = nBottom;
 
-    *pWMF >> nsal_uInt32;                                   // signature
+    *pWMF >> nsal_uInt32;                               // signature
 
     if ( nsal_uInt32 != 0x464d4520 )
         return sal_False;
 
-    *pWMF >> nsal_uInt32;                                   // nVersion
+    *pWMF >> nsal_uInt32;                               // nVersion
     *pWMF >> nEndPos;                                   // size of metafile
     nEndPos += nStartPos;
 
@@ -1401,7 +1400,6 @@
     return sal_True;
 }
 
-//-----------------------------------------------------------------------------------
 
 Rectangle  EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
 {
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 63af426..1fc47f5 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -30,7 +30,6 @@
 #include <vcl/svapp.hxx>
 #include <vcl/virdev.hxx>
 
-// ------------------------------------------------------------------------
 
 #if OSL_DEBUG_LEVEL > 1
 #define EMFP_DEBUG(x) x
@@ -90,7 +89,6 @@
     return maClip.getClipPoly();
 }
 
-// ------------------------------------------------------------------------
 
 void WinMtfPathObj::AddPoint( const Point& rPoint )
 {
@@ -139,7 +137,6 @@
     bClosed = sal_True;
 }
 
-// ------------------------------------------------------------------------
 
 WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
 {
@@ -267,7 +264,6 @@
     aFont.SetSize( aFontSize );
 };
 
-// ------------------------------------------------------------------------
 
 #ifdef WIN_MTF_ASSERT
 void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags )
@@ -294,7 +290,6 @@
 }
 #endif
 
-// ------------------------------------------------------------------------
 
 WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem ) :
     pOut                ( pWinMtfOutput ),
@@ -303,7 +298,7 @@
 {
 #ifdef WIN_MTF_ASSERT
     // we want to assert not implemented features, but we do this
-    // only once, so that nobody is handicaped by getting too much assertions
+    // only once, so that nobody is handicapped by getting too many assertions
     // I hope this will bring more testdocuments, without support of these
     // testdocuments the implementation of missing features won't be possible. (SJ)
     WinMtfAssertHandler( NULL, WIN_MTF_ASSERT_INIT | WIN_MTF_ASSERT_ONCE );
@@ -327,7 +322,6 @@
     }
 }
 
-// ------------------------------------------------------------------------
 
 WinMtf::~WinMtf()
 {
@@ -337,7 +331,6 @@
         xStatusIndicator->end();
 }
 
-// ------------------------------------------------------------------------
 
 void WinMtf::Callback( sal_uInt16 nPercent )
 {
@@ -345,7 +338,6 @@
         xStatusIndicator->setValue( nPercent );
 }
 
-// ------------------------------------------------------------------------
 
 Color WinMtf::ReadColor()
 {
@@ -354,11 +346,8 @@
     return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
 };
 
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
 
-Point WinMtfOutput::ImplScale( const Point& rPt)//Hack to set varying defaults for incompletely defined files.
+Point WinMtfOutput::ImplScale( const Point& rPt) // Hack to set varying defaults for incompletely defined files.
 {
         if (mbIsMapDevSet && mbIsMapWinSet)
         {
@@ -370,7 +359,6 @@
         }
 }
 
-//-----------------------------------------------------------------------------------
 
 Point WinMtfOutput::ImplMap( const Point& rPt )
 {
@@ -439,7 +427,7 @@
                     fY2 += mnDevOrgY;
                 }
                 break;
-                case MM_HIMETRIC : //in hundredth of a millimeter
+                case MM_HIMETRIC : // in hundredth of a millimeter
                 {
                     fX2 -= mnWinOrgX;
                     fY2  = mnWinOrgY-fY2;
@@ -471,7 +459,6 @@
         return Point();
 };
 
-// ------------------------------------------------------------------------
 
 Size WinMtfOutput::ImplMap( const Size& rSz )
 {
@@ -511,7 +498,7 @@
                     fHeight*=-10;
                 }
                 break;
-                case MM_HIMETRIC : //in hundredth of millimeters
+                case MM_HIMETRIC : // in hundredth of millimeters
                 {
                     fHeight *= -1;
                 }
@@ -540,20 +527,17 @@
         return Size();
 }
 
-//-----------------------------------------------------------------------------------
 
 Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect )
 {
     return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ImplMap( Font& rFont )
 {
-    // !!! HACK: Wir setzen die Breite jetzt immer auf Null,
-    // da OS die Breite unterschiedlich interpretieren;
-    // muss spaeter in SV portabel gemacht werden ( KA 08.02.96 )
+    // !!! HACK: we now always set the width to zero because the OS width is interpreted differently;
+    // must later be made portable in SV (CA 08/02/96)
     Size  aFontSize = ImplMap ( rFont.GetSize() );
 
     if( aFontSize.Height() < 0 )
@@ -565,8 +549,6 @@
         rFont.SetOrientation( 3600 - rFont.GetOrientation() );
 }
 
-//-----------------------------------------------------------------------------------
-
 Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
 {
     sal_uInt16 nPoints = rPolygon.GetSize();
@@ -577,7 +559,6 @@
     return rPolygon;
 }
 
-//-----------------------------------------------------------------------------------
 
 Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon )
 {
@@ -589,7 +570,6 @@
     return rPolygon;
 }
 
-//-----------------------------------------------------------------------------------
 
 PolyPolygon& WinMtfOutput::ImplScale( PolyPolygon& rPolyPolygon )
 {
@@ -598,7 +578,6 @@
     return rPolyPolygon;
 }
 
-//-----------------------------------------------------------------------------------
 
 PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon )
 {
@@ -607,7 +586,6 @@
     return rPolyPolygon;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SelectObject( sal_Int32 nIndex )
 {
@@ -617,7 +595,7 @@
         pGDIObj = new GDIObj();
     else
     {
-        nIndex &= 0xffff;       // zur Sicherheit: mehr als 65535 nicht zulassen
+        nIndex &= 0xffff;       // safety check: don't allow index to be > 65535
 
         if ( (sal_uInt32)nIndex < vGDIObj.size() )
             pGDIObj = vGDIObj[ nIndex ];
@@ -700,49 +678,42 @@
         delete pGDIObj;
 }
 
-//-----------------------------------------------------------------------------------
 
 const Font& WinMtfOutput::GetFont() const
 {
     return maFont;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SetTextLayoutMode( const sal_uInt32 nTextLayoutMode )
 {
     mnTextLayoutMode = nTextLayoutMode;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SetBkMode( sal_uInt32 nMode )
 {
     mnBkMode = nMode;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SetBkColor( const Color& rColor )
 {
     maBkColor = rColor;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SetTextColor( const Color& rColor )
 {
     maTextColor = rColor;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
 {
     mnTextAlign = nAlign;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
 {
@@ -752,7 +723,6 @@
         vGDIObj[ i ] = NULL;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly )
 {
@@ -784,7 +754,6 @@
 }
 
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
 {
@@ -822,13 +791,12 @@
     vGDIObj[ nIndex ] = new GDIObj( eType, pStyle );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle )
 {
     if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
     {
-        nIndex &= 0xffff;       // zur Sicherheit: mehr als 65535 nicht zulassen
+        nIndex &= 0xffff;       // safety check: do not allow index to be > 65535
         if ( pStyle )
         {
             if ( eType == GDI_FONT )
@@ -876,7 +844,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
 {
@@ -890,7 +857,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::IntersectClipRect( const Rectangle& rRect )
 {
@@ -902,7 +868,6 @@
     aClipPath.intersectClipRect( ImplMap( rRect ) );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ExcludeClipRect( const Rectangle& rRect )
 {
@@ -910,7 +875,6 @@
     aClipPath.excludeClipRect( ImplMap( rRect ) );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::MoveClipRegion( const Size& rSize )
 {
@@ -933,9 +897,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
-//-----------------------------------------------------------------------------------
 
 WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
     mnLatestTextAlign   ( 0 ),
@@ -977,8 +938,8 @@
                                                                             // this is necessary to be able to support
                                                                             // SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
 
-    maFont.SetName( "Arial" );  // sj: #i57205#, we do have some scaling problems if using
-    maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 );                      // the default font then most times a x11 font is used, we
+    maFont.SetName( "Arial" );                                              // sj: #i57205#, we do have some scaling problems if using
+    maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 );                          // the default font then most times a x11 font is used, we
     maFont.SetHeight( 423 );                                                // will prevent this defining a font
 
     maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 );
@@ -988,7 +949,6 @@
     SetRasterOp( R2_BLACK );
 };
 
-//-----------------------------------------------------------------------------------
 
 WinMtfOutput::~WinMtfOutput()
 {
@@ -1003,7 +963,6 @@
         delete vGDIObj[ i ];
 };
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::UpdateClipRegion()
 {
@@ -1012,7 +971,7 @@
         mbClipNeedsUpdate = false;
         mbComplexClip = false;
 
-        mpGDIMetaFile->AddAction( new MetaPopAction() );                    // taking the orignal clipregion
+        mpGDIMetaFile->AddAction( new MetaPopAction() );                    // taking the original clipregion
         mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) );  //
 
         // skip for 'no clipping at all' case
@@ -1030,7 +989,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz()
 {
@@ -1043,7 +1001,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::UpdateLineStyle()
 {
@@ -1054,7 +1011,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::UpdateFillStyle()
 {
@@ -1068,7 +1024,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
 {
@@ -1080,8 +1035,7 @@
         static WinMtfLineStyle aNopLineStyle;
 
         if ( mbNopMode && ( nRasterOp != R2_NOP ) )
-        {   // beim uebergang von R2_NOP auf anderen Modus
-            // gesetzten Pen und Brush aktivieren
+        {   // changing modes from R2_NOP so set pen and brush
             maFillStyle = aNopFillStyle;
             maLineStyle = aNopLineStyle;
             mbNopMode = sal_False;
@@ -1120,7 +1074,6 @@
     return nRetROP;
 };
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill )
 {
@@ -1154,14 +1107,12 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor )
 {
     mpGDIMetaFile->AddAction( new MetaPixelAction( ImplMap( rSource), rColor ) );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath )
 {
@@ -1177,7 +1128,6 @@
     maActPos = aDest;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath )
 {
@@ -1193,7 +1143,6 @@
     maActPos = aDest;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge )
 {
@@ -1233,7 +1182,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawRoundRect( const Rectangle& rRect, const Size& rSize )
 {
@@ -1243,7 +1191,6 @@
     mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
 {
@@ -1267,7 +1214,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo )
 {
@@ -1298,7 +1244,6 @@
         maActPos = aEnd;
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
 {
@@ -1323,7 +1268,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const Point& rEnd )
 {
@@ -1348,7 +1292,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
 {
@@ -1422,7 +1365,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath )
 {
@@ -1450,7 +1392,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath )
 {
@@ -1471,7 +1412,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath )
 {
@@ -1503,7 +1443,6 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode )
 {
@@ -1645,7 +1584,7 @@
     }
     if ( bRecordPath )
     {
-        // ToDo
+        // TODO
     }
     else
     {
@@ -1670,7 +1609,6 @@
     SetGfxMode( nOldGfxMode );
 }
 
-//-----------------------------------------------------------------------------------
 
 void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap )
 {
@@ -1715,7 +1653,7 @@
         mpGDIMetaFile->AddAction( new MetaBmpScaleAction( rPos, rSize, aBmpEx.GetBitmap() ) );
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList )
 {
@@ -1941,7 +1879,7 @@
     rSaveList.clear();
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetDevOrg( const Point& rPoint )
 {
@@ -1949,7 +1887,7 @@
     mnDevOrgY = rPoint.Y();
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
 {
@@ -1957,7 +1895,7 @@
     mnDevOrgY += nYAdd;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular)
 {
@@ -1979,7 +1917,7 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::ScaleDevExt( double fX, double fY )
 {
@@ -1987,7 +1925,7 @@
     mnDevHeight = FRound( mnDevHeight * fY );
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF)
 {
@@ -2000,7 +1938,7 @@
     mbIsMapWinSet=sal_True;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
 {
@@ -2008,7 +1946,7 @@
     mnWinOrgY += nYAdd;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetDevByWin() //mnWinExt...-stuff has to be assigned before.
 {
@@ -2021,7 +1959,7 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF )
 {
@@ -2044,7 +1982,7 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::ScaleWinExt( double fX, double fY )
 {
@@ -2052,21 +1990,21 @@
     mnWinExtY = FRound( mnWinExtY * fY );
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetrclBounds( const Rectangle& rRect )
 {
     mrclBounds = rRect;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetrclFrame( const Rectangle& rRect )
 {
     mrclFrame = rRect;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetRefPix( const Size& rSize )
 {
@@ -2074,7 +2012,7 @@
     mnPixY = rSize.Height();
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetRefMill( const Size& rSize )
 {
@@ -2082,7 +2020,7 @@
     mnMillY = rSize.Height();
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetMapMode( sal_uInt32 nMapMode )
 {
@@ -2099,7 +2037,7 @@
     }
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetUnitsPerInch( sal_uInt16 nUnitsPerInch )
 {
@@ -2107,7 +2045,7 @@
     mnUnitsPerInch = nUnitsPerInch;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
 {
@@ -2119,7 +2057,7 @@
     maXForm.eDy = rXForm.eDy;
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode )
 {
@@ -2194,7 +2132,7 @@
     }
  }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::Push()                       // !! to be able to access the original ClipRegion it
 {                                               // is not allowed to use the MetaPushAction()
@@ -2233,14 +2171,14 @@
     vSaveStack.push_back( pSave );
 }
 
-//-----------------------------------------------------------------------------------
+
 
 void WinMtfOutput::Pop()
 {
-    // Die aktuellen Daten vom Stack holen
+    // Get the latest data from the stack
     if( !vSaveStack.empty() )
     {
-        // Die aktuelle Daten auf dem Stack sichern
+        // Backup the current data on the stack
         SaveStructPtr pSave( vSaveStack.back() );
 
         maLineStyle = pSave->aLineStyle;
diff --git a/vcl/source/gdi/imagerepository.cxx b/vcl/source/gdi/imagerepository.cxx
index 63aee8a..3dc04e3 100644
--- a/vcl/source/gdi/imagerepository.cxx
+++ b/vcl/source/gdi/imagerepository.cxx
@@ -23,15 +23,8 @@
 #include <vcl/svapp.hxx>
 #include "impimagetree.hxx"
 
-//........................................................................
 namespace vcl
 {
-//........................................................................
-
-    //====================================================================
-    //= ImageRepository
-    //====================================================================
-    //--------------------------------------------------------------------
     bool ImageRepository::loadImage( const OUString& _rName, BitmapEx& _out_rImage, bool _bSearchLanguageDependent, bool loadMissing )
     {
         OUString sCurrentSymbolsStyle = Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyleName();
@@ -47,8 +40,6 @@
         return aImplImageTree->loadDefaultImage( sCurrentSymbolsStyle,_out_rImage);
     }
 
-//........................................................................
 } // namespace vcl
-//........................................................................
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index a0811881..ebac541 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -32,58 +32,44 @@
 #include <rtl/strbuf.hxx>
 #endif
 
-//........................................................................
 namespace vcl
 {
-//........................................................................
 
     using ::com::sun::star::uno::Reference;
     using ::com::sun::star::uno::Exception;
     namespace ScriptDirection = ::com::sun::star::i18n::ScriptDirection;
 
-    //====================================================================
-    //= DefaultTextLayout
-    //====================================================================
-    //--------------------------------------------------------------------
     DefaultTextLayout::~DefaultTextLayout()
     {
     }
 
-    //--------------------------------------------------------------------
     long DefaultTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         return m_rTargetDevice.GetTextWidth( _rText, _nStartIndex, _nLength );
     }
 
-    //--------------------------------------------------------------------
     void DefaultTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex,
         sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
     {
         m_rTargetDevice.DrawText( _rStartPoint, _rText, _nStartIndex, _nLength, _pVector, _pDisplayText );
     }
 
-    //--------------------------------------------------------------------
     bool DefaultTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
         sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         return m_rTargetDevice.GetCaretPositions( _rText, _pCaretXArray, _nStartIndex, _nLength );
     }
 
-    //--------------------------------------------------------------------
     xub_StrLen DefaultTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         return m_rTargetDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
     }
 
-    //--------------------------------------------------------------------
     bool DefaultTextLayout::DecomposeTextRectAction() const
     {
         return false;
     }
 
-    //====================================================================
-    //= ReferenceDeviceTextLayout
-    //====================================================================
     class ReferenceDeviceTextLayout : public ITextLayout
     {
     public:
@@ -122,9 +108,6 @@
         Rectangle       m_aCompleteTextRect;
     };
 
-    //====================================================================
-    //= ControlTextRenderer
-    //====================================================================
     ReferenceDeviceTextLayout::ReferenceDeviceTextLayout( const Control& _rControl, OutputDevice& _rTargetDevice,
         OutputDevice& _rReferenceDevice )
         :m_rTargetDevice( _rTargetDevice )
@@ -170,17 +153,14 @@
         m_rReferenceDevice.SetFont( aRefFont );
     }
 
-    //--------------------------------------------------------------------
     ReferenceDeviceTextLayout::~ReferenceDeviceTextLayout()
     {
         m_rReferenceDevice.Pop();
         m_rTargetDevice.Pop();
     }
 
-    //--------------------------------------------------------------------
     namespace
     {
-        //................................................................
         bool lcl_normalizeLength( const OUString& _rText, const sal_Int32 _nStartIndex, sal_Int32& _io_nLength )
         {
             sal_Int32 nTextLength = _rText.getLength();
@@ -192,7 +172,6 @@
         }
     }
 
-    //--------------------------------------------------------------------
     long ReferenceDeviceTextLayout::GetTextArray( const OUString& _rText, sal_Int32* _pDXAry, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -222,13 +201,11 @@
         return nTextWidth;
     }
 
-    //--------------------------------------------------------------------
     long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         return GetTextArray( _rText, NULL, _nStartIndex, _nLength );
     }
 
-    //--------------------------------------------------------------------
     void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
     {
         if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -253,7 +230,6 @@
         m_aCompleteTextRect.Union( Rectangle( _rStartPoint, Size( nTextWidth, m_rTargetDevice.GetTextHeight() ) ) );
     }
 
-    //--------------------------------------------------------------------
     bool ReferenceDeviceTextLayout::GetCaretPositions( const OUString& _rText, sal_Int32* _pCaretXArray,
         sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
@@ -267,7 +243,6 @@
         return true;
     }
 
-    //--------------------------------------------------------------------
     xub_StrLen ReferenceDeviceTextLayout::GetTextBreak( const OUString& _rText, long _nMaxTextWidth, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
     {
         if ( !lcl_normalizeLength( _rText, _nStartIndex, _nLength ) )
@@ -276,13 +251,11 @@
         return m_rReferenceDevice.GetTextBreak( _rText, _nMaxTextWidth, _nStartIndex, _nLength );
     }
 
-    //--------------------------------------------------------------------
     bool ReferenceDeviceTextLayout::DecomposeTextRectAction() const
     {
         return true;
     }
 
-    //--------------------------------------------------------------------
     Rectangle ReferenceDeviceTextLayout::DrawText( const Rectangle& _rRect, const OUString& _rText, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText )
     {
         if ( _rText.isEmpty() )
@@ -292,11 +265,10 @@
         sal_uLong nTextLayoutMode = m_bRTLEnabled ? TEXT_LAYOUT_BIDI_RTL : TEXT_LAYOUT_BIDI_LTR;
         m_rReferenceDevice.SetLayoutMode( nTextLayoutMode );
         m_rTargetDevice.SetLayoutMode( nTextLayoutMode | TEXT_LAYOUT_TEXTORIGIN_LEFT );
-            // TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
-            // our caller gives us the left border of the draw position, regardless of script type, text layout,
-            // and the like
 
-        // in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
+        // TEXT_LAYOUT_TEXTORIGIN_LEFT is because when we do actually draw the text (in DrawText( Point, ... )), then
+        // our caller gives us the left border of the draw position, regardless of script type, text layout,
+        // and the like in our ctor, we set the map mode of the target device from pixel to twip, but our caller doesn't know this,
         // but passed pixel coordinates. So, adjust the rect.
         Rectangle aRect( m_rTargetDevice.PixelToLogic( _rRect ) );
 
@@ -334,29 +306,21 @@
         return aTextRect;
     }
 
-    //====================================================================
-    //= ControlTextRenderer
-    //====================================================================
-    //--------------------------------------------------------------------
     ControlTextRenderer::ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice )
         :m_pImpl( new ReferenceDeviceTextLayout( _rControl, _rTargetDevice, _rReferenceDevice ) )
     {
     }
 
-    //--------------------------------------------------------------------
     ControlTextRenderer::~ControlTextRenderer()
     {
     }
 
-    //--------------------------------------------------------------------
     Rectangle ControlTextRenderer::DrawText( const Rectangle& _rRect, const XubString& _rText, sal_uInt16 _nStyle,
         MetricVector* _pVector, OUString* _pDisplayText )
     {
         return m_pImpl->DrawText( _rRect, _rText, _nStyle, _pVector, _pDisplayText );
     }
 
-//........................................................................
 } // namespace vcl
-//........................................................................
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index d05f7e7..4218cb1 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -218,13 +218,11 @@
                 return ::BitmapEx();
 
             // tunnel directly for known implementation
-            // ----------------------------------------------------------------
             VclCanvasBitmap* pImplBitmap = dynamic_cast<VclCanvasBitmap*>(xInputBitmap.get());
             if( pImplBitmap )
                 return pImplBitmap->getBitmapEx();
 
             // retrieve data via UNO interface
-            // ----------------------------------------------------------------
 
             // volatile bitmaps are a bit more complicated to read
             // from..
@@ -358,7 +356,6 @@
             return ::BitmapEx();
         }
 
-        //---------------------------------------------------------------------------------------
 
         geometry::RealSize2D size2DFromSize( const Size& rSize )
         {
@@ -603,7 +600,6 @@
             return new StandardColorSpace();
         }
 
-        //---------------------------------------------------------------------------------------
 
         Color stdColorSpaceSequenceToColor( const uno::Sequence< double >& rColor        )
         {
@@ -648,7 +644,6 @@
                           toByteColor(aARGBColor.Blue) );
         }
 
-        //---------------------------------------------------------------------------------------
 
     } // namespace vcltools
 
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index 2fc66cb..1c83480 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -23,14 +23,8 @@
 #include <vcl/svapp.hxx>
 #include <vcl/event.hxx>
 
-//........................................................................
 namespace vcl
 {
-//........................................................................
-
-    //====================================================================
-    //= MnemonicEngine_Data
-    //====================================================================
     struct MnemonicEngine_Data
     {
         IMnemonicEntryList& rEntryList;
@@ -41,7 +35,6 @@
         }
     };
 
-    //--------------------------------------------------------------------
     namespace
     {
         const void* lcl_getEntryForMnemonic( IMnemonicEntryList& _rEntryList, sal_Unicode _cMnemonic, bool& _rbAmbiguous )
@@ -80,16 +73,11 @@
         }
     }
 
-    //====================================================================
-    //= MnemonicEngine
-    //====================================================================
-    //--------------------------------------------------------------------
     MnemonicEngine::MnemonicEngine( IMnemonicEntryList& _rEntryList )
         :m_pData( new MnemonicEngine_Data( _rEntryList ) )
     {
     }
 
-    //--------------------------------------------------------------------
     bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt )
     {
         sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2();
@@ -110,13 +98,10 @@
         return true;
     }
 
-    //--------------------------------------------------------------------
     MnemonicEngine::~MnemonicEngine()
     {
     }
 
-//........................................................................
 } // namespace vcl
-//........................................................................
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

-- 
To view, visit https://gerrit.libreoffice.org/3643
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I71d5fdab8226d61bda9ac906bb82176dc11cafd2
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock <chris.sherlock79 at gmail.com>



More information about the LibreOffice mailing list