[Libreoffice-commits] core.git: vcl/inc vcl/win

Christian M. Heller christian.heller63 at gmail.com
Thu Feb 28 03:09:14 PST 2013


 vcl/inc/vcl/graphicfilter.hxx    |   51 +++++++++++++++++----------------------
 vcl/inc/vcl/prgsbar.hxx          |   43 +++++++++++++++-----------------
 vcl/win/source/window/salobj.cxx |   33 ++++++++++---------------
 3 files changed, 57 insertions(+), 70 deletions(-)

New commits:
commit 02a985013e816c94a07cf93491873fddfe090b1d
Author: Christian M. Heller <christian.heller63 at gmail.com>
Date:   Sun Feb 24 11:30:51 2013 -0500

    fdo#39468: Translated German comments in vcl/{inc,win}
    
    Change-Id: I1b11872dd56d93b116a65ac2e3905f751cfafeeb
    Signed-off-by: Philipp Riemer <ruderphilipp at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/2447
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Tested-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/vcl/inc/vcl/graphicfilter.hxx b/vcl/inc/vcl/graphicfilter.hxx
index f9a7ae1..3e2218c 100644
--- a/vcl/inc/vcl/graphicfilter.hxx
+++ b/vcl/inc/vcl/graphicfilter.hxx
@@ -87,10 +87,7 @@ struct ConvertData;
 #define EMF_SHORTNAME           "EMF"
 #define SVG_SHORTNAME           "SVG"
 
-// ------------------------------------
-// - Info-Klasse fuer alle von uns
-//  unterstuetzten Grafik-Fileformate
-// ------------------------------------
+//  Info class for all supported file formats
 
 #define GFF_NOT ( (sal_uInt16)0x0000 )
 #define GFF_BMP ( (sal_uInt16)0x0001 )
@@ -169,50 +166,48 @@ class VCL_DLLPUBLIC GraphicDescriptor
 
 public:
 
-    // Ctor, um einen Filenamen zu setzen. Es muss ::Detect() gerufen werden,
-    // um das File zu identifizieren;
-    // wenn das File keinen eindeutigen Header besitzt ( Mtf's ) wird das
-    // Format anhand der Extension bestimmt
+    /** Ctor to set a filename
+
+        ::Detect() must be called to identify the file
+        If the file has no unique header (Mtf's), the format
+        is determined from the extension */
     GraphicDescriptor( const INetURLObject& rPath );
 
-    // Ctor, um einen Stream zu setzen. Es muss ::Detect() gerufen werden,
-    // um das File zu identifizieren;
-    // da einige Formate ( Mtf's ) keinen eindeutigen Header besitzen,
-    // ist es sinnvoll den Filenamen (inkl. Ext. ) mitanzugeben,
-    // da so das Format ueber die Extension ermittelt werden kann
+    /** Ctor using a stream
+
+        ::Detect() must be called to identify the file
+        As some formats (Mtf's) do not have a unique header, it makes sense
+        to supply the file name (incl. ext.), so that the format can be
+        derived from the extension */
     GraphicDescriptor( SvStream& rInStream, const String* pPath = NULL );
 
-    // Dtor
     virtual ~GraphicDescriptor();
 
-    // Startet die Detektion;
-    // bei bExtendedInfo == sal_True werden soweit wie moeglich
-    // Daten aus dem jeweiligen FileHeader ermittelt
-    // ( Groesse, Farbtiefe usw. )
+    /** starts the detection
+
+        if bExtendedInfo == sal_True the file header is used to derive
+        as many properties as possible (size, color, etc.) */
     virtual sal_Bool    Detect( sal_Bool bExtendedInfo = sal_False );
 
-    // liefert das Fileformat nach erfolgreicher  Detektion zurueck;
-    // wenn kein Format erkannt wurde, ist das Formart GFF_NOT
+    /** @return the file format, GFF_NOT if no format was recognized */
     sal_uInt16          GetFileFormat() const { return nFormat; }
 
-    // liefert die Pixel-Bildgroesse oder 0-Size zurueck
+    /** @return graphic size in pixels or 0 size */
     const Size&     GetSizePixel() const { return (Size&) aPixSize; }
 
-    // liefert die logische Bildgroesse in 1/100mm oder 0-Size zurueck
+    /** @return the logical graphic size in 1/100mm or 0 size */
     const Size&     GetSize_100TH_MM() const { return (Size&) aLogSize; }
 
-    // liefert die Bits/Pixel oder 0 zurueck
+    /** @return bits/pixel or 0 **/
     sal_uInt16          GetBitsPerPixel() const { return nBitsPerPixel; }
 
-    // liefert die Anzahl der Planes oder 0 zurueck
+    /** return number of planes or 0 */
     sal_uInt16          GetPlanes() const { return nPlanes; }
 
-    // zeigt an, ob das Bild evtl. komprimiert (wie auch immer) ist
+    /** @return true if the graphic is compressed */
     sal_Bool            IsCompressed() const { return bCompressed; }
 
-    // gibt die Filternummer des Filters zurueck,
-    // der im GraphicFilter zum Lesen dieses Formats
-    // benoetigt wird
+    /** @return filter number that is needed by the GraphFilter to read this format */
     static String GetImportFormatShortName( sal_uInt16 nFormat );
 };
 
diff --git a/vcl/inc/vcl/prgsbar.hxx b/vcl/inc/vcl/prgsbar.hxx
index fb68670..9f22df4 100644
--- a/vcl/inc/vcl/prgsbar.hxx
+++ b/vcl/inc/vcl/prgsbar.hxx
@@ -24,29 +24,26 @@
 #include <vcl/window.hxx>
 
 /*************************************************************************
-
-Beschreibung
-============
-
-class ProgressBar
-
-Diese Klasse dient zur Anzeige einer Progress-Anzeige.
-
---------------------------------------------------------------------------
-
-WinBits
-
-WB_BORDER           Border um das Fenster
-WB_3DLOOK           3D-Darstellung
-
---------------------------------------------------------------------------
-
-Methoden
-
-Mit SetValue() setzt man einen Prozent-Wert zwischen 0 und 100. Wenn Werte
-groesser 100 gesetzt werden, faengt das letzte Rechteck an zu blinken.
-
-*************************************************************************/
+ *
+ * class ProgressBar
+ *
+ * this class is used to display the ProgressBar
+ *
+ * -----------------------------------------------------------------------
+ *
+ * WinBits
+ *
+ * WB_BORDER           border around the window
+ * WB_3DLOOK           3D representation
+ *
+ * -----------------------------------------------------------------------
+ *
+ * Methodes
+ *
+ * Use SetValue() to set a percentage between 0 and 100. A value larger
+ * than 100 will cause the last rectangle to start flashing
+ *
+ ************************************************************************/
 
 // -----------
 // - WinBits -
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index e2c1b24..f6287e7 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -41,7 +41,7 @@ static sal_Bool ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild )
     HWND hTempWnd = ::GetParent( hWndChild );
     while ( hTempWnd )
     {
-        // Ab nicht Child-Fenstern hoeren wir auf zu suchen
+        // stop searching if not a child window
         if ( !(GetWindowStyle( hTempWnd ) & WS_CHILD) )
             return FALSE;
         if ( hTempWnd == hWndParent )
@@ -129,8 +129,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
             pObject = ImplFindSalObject( pData->hwnd );
             if ( pObject && !ImplFindSalObject( (HWND)pData->wParam ) )
             {
-                // LoseFocus nur rufen, wenn wirklich kein ChildFenster
-                // den Focus bekommt
+                // only call LoseFocus, if truly no child window gets the focus
                 if ( !pData->wParam || !ImplFindSalObject( (HWND)pData->wParam ) )
                 {
                     if ( ImplSalYieldMutexTryToAcquire() )
@@ -172,11 +171,9 @@ sal_Bool ImplSalPreDispatchMsg( MSG* pMsg )
     if ( (pMsg->message == WM_KEYDOWN) ||
          (pMsg->message == WM_KEYUP) )
     {
-        // KeyEvents wollen wir nach Moeglichkeit auch abarbeiten,
-        // wenn das Control diese nicht selber auswertet
-        // SysKeys werden als WM_SYSCOMMAND verarbeitet
-        // Char-Events verarbeiten wir nicht, da wir nur
-        // Accelerator relevante Keys verarbeiten wollen
+        // process KeyEvents even if the control does not process them itself
+        // SysKeys are processed as WM_SYSCOMMAND
+        // Char-Events are not processed, as they are not accelerator-relevant
         sal_Bool bWantedKeyCode = FALSE;
         // A-Z, 0-9 nur in Verbindung mit Control-Taste
         if ( ((pMsg->wParam >= 65) && (pMsg->wParam <= 90)) ||
@@ -200,7 +197,7 @@ sal_Bool ImplSalPreDispatchMsg( MSG* pMsg )
             ImplSalYieldMutexRelease();
         }
     }
-    // Hier WM_SYSCHAR abfangen, um mit Alt+Taste evtl. Menu zu aktivieren
+    // check WM_SYSCHAR, to activate menu with Alt key
     else if ( pMsg->message == WM_SYSCHAR )
     {
         pSalData->mnSalObjWantKeyEvt = 0;
@@ -362,9 +359,8 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
             CREATESTRUCTA* pStruct = (CREATESTRUCTA*)lParam;
             pSysObj = (WinSalObject*)pStruct->lpCreateParams;
             SetSalObjWindowPtr( hWnd, pSysObj );
-            // HWND schon hier setzen, da schon auf den Instanzdaten
-            // gearbeitet werden kann, wenn Messages waehrend
-            // CreateWindow() gesendet werden
+            // set HWND already here,
+            // as instance data might be used during CreateWindow() events
             pSysObj->mhWnd = hWnd;
             rDef = FALSE;
             }
@@ -400,7 +396,7 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA
 
     switch( nMsg )
     {
-        // Wegen PlugIn's loeschen wir erstmal den Hintergrund
+        // clear background for plugins
         case WM_ERASEBKGND:
             {
                 WinSalObject* pSysObj = GetSalObjWindowPtr( ::GetParent( hWnd ) );
@@ -480,7 +476,7 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
 {
     SalData* pSalData = GetSalData();
 
-    // Hook installieren, wenn es das erste SalObject ist
+    // install hook, if it is the first SalObject
     if ( !pSalData->mpFirstObject )
     {
         pSalData->mhSalObjMsgHook = SetWindowsHookExW( WH_CALLWNDPROC,
@@ -599,7 +595,7 @@ WinSalObject::~WinSalObject()
     {
         pSalData->mpFirstObject = mpNextObject;
 
-        // Wenn letztes SalObject, dann Hook wieder entfernen
+        // remove hook, if it is the last SalObject
         if ( !pSalData->mpFirstObject )
             UnhookWindowsHookEx( pSalData->mhSalObjMsgHook );
     }
@@ -622,9 +618,8 @@ WinSalObject::~WinSalObject()
     if ( mhWnd )
         DestroyWindow( mhWnd );
 
-    // Palette wieder zuruecksetzen, wenn kein externes Child-Fenster
-    // mehr vorhanden ist, da diese unsere Palette ueberschrieben haben
-    // koennen
+    // reset palette, if no external child window is left,
+    // as they might have overwritten our palette
     if ( hWndParent &&
          ::GetActiveWindow() == hWndParent &&
          !GetWindow( hWndParent, GW_CHILD ) )
@@ -712,7 +707,7 @@ void WinSalObject::EndSetClipRegion()
 {
     HRGN hRegion;
 
-    // Aus den Region-Daten muessen wir jetzt eine ClipRegion erzeugen
+    // create a ClipRegion from the Region data
     if ( mpClipRgnData->rdh.nCount == 1 )
     {
         RECT* pRect = &(mpClipRgnData->rdh.rcBound);


More information about the Libreoffice-commits mailing list