[Libreoffice-commits] core.git: include/svtools svtools/source

Michael Weghorn m.weghorn at posteo.de
Sun Dec 14 04:05:45 PST 2014


 include/svtools/stdmenu.hxx        |   80 ++++++++++++++++++-------------------
 include/svtools/svlbitm.hxx        |    6 +-
 include/svtools/svparser.hxx       |   70 +++++++++++++++-----------------
 include/svtools/treelistentry.hxx  |   12 ++---
 svtools/source/control/stdmenu.cxx |    2 
 5 files changed, 83 insertions(+), 87 deletions(-)

New commits:
commit 4595dc37e601c5a1f245af38ac728d6e45c2865c
Author: Michael Weghorn <m.weghorn at posteo.de>
Date:   Fri Dec 12 22:30:32 2014 +0100

    fdo#39468 translate German comments
    
    Change-Id: I90deb0877940167c9d5e3ba630528e575af6dd66
    Reviewed-on: https://gerrit.libreoffice.org/13459
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx
index 7f4e9af..504db1f 100644
--- a/include/svtools/stdmenu.hxx
+++ b/include/svtools/stdmenu.hxx
@@ -31,36 +31,34 @@ namespace vcl {
 
 /*************************************************************************
 
-Beschreibung
+Description
 ============
 
 class FontNameMenu
 
-Beschreibung
+Description
 
-Erlaubt die Auswahl von Fonts. Das Menu wird ueber Fill mit den FontNamen
-gefuellt. Fill sortiert automatisch die FontNamen (inkl. aller Umlaute und
-sprachabhaengig). Mit SetCurName()/GetCurName() kann der aktuelle Fontname
-gesetzt/abgefragt werden. Wenn SetCurName() mit einem leeren String
-aufgerufen wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow).
-Vor dem Selectaufruf wird der ausgewaehlte Name automatisch als aktueller
-gesetzt und wuerde beim naechsten Aufruf auch als aktueller Name angezeigt
-werden. Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit
-SetCurName() der aktuelle Fontname gesetzt werden.
+Allows the selection of fonts. The menu is filled with the FontNames by
+the method Fill(). Fill() automatically sorts the FontNames (incl. all
+umlauts and language-dependent). Using SetCurName()/GetCurName(), the
+current FontName can be set/requested. If SetCurName() is called with
+an empty string, no entry is displayed as the current one.
+Before the Select call, the selected name is automatically set as the
+current one and would be displayed as the current name on the next call.
+Because of this, the current FontName should be set using SetCurName()
+if necessary before calling PopupMenu::Execute().
 
-Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein
-Select-Handler gesetzt werden, um die Auswahl eines Namens mitzubekommen.
+As the Ids and the internal structure of the menu are not known, a
+Select handler must be set in order to notice the selection of a name.
 
-In dieses Menu koennen keine weiteren Items eingefuegt werden.
+No further items can be inserted into that menu.
 
-Spaeter soll auch das Menu die gleichen Bitmaps anzeigen, wie die
-FontNameBox. Auf den Systemen, wo Menues nicht automatisch scrollen,
-wird spaeter wohl ein A-Z Menu ziwschengeschaltet. Da ein Menu bei vielen
-installierten Fonts bisher schon immer lange gebraucht hat, sollte dieses
-Menu schon jetzt nur einmal erzeugt werden (da sonst das Kontextmenu bis
-zu 10-Sekunden fuer die Erzeugung brauchen koennte).
+Later on, the menu shall display the same bitmaps as the FontNameBox.
+On many systems, where menues don't scroll automatically, an A-Z menu
+might be interposed. As a menu has always needed long when many Fonts
+are installed, this menu should only be generated once.
 
-Querverweise
+References
 
 FontList; FontSizeMenu; FontNameBox
 
@@ -68,32 +66,32 @@ FontList; FontSizeMenu; FontNameBox
 
 class FontSizeMenu
 
-Beschreibung
+Description
 
-Erlaubt die Auswahl von Fontgroessen. Ueber Fill wird das FontSizeMenu
-gefuellt und ueber GetCurHeight() kann die ausgewaehlte Fontgroesse
-abgefragt werden. Mit SetCurHeight()/GetCurHeight() kann die aktuelle
-Fontgroesse gesetzt/abgefragt werden. Wenn SetCurHeight() mit 0 aufgerufen
-wird, wird kein Eintrag als aktueller angezeigt (fuer DontKnow). Vor dem
-Selectaufruf wird die ausgewaehlte Groesse automatisch als aktuelle gesetzt
-und wuerde beim naechsten Aufruf auch als aktuelle Groesse angezeigt werden.
-Deshalb sollte vor PopupMenu::Execute() gegebenenfalls mit SetCurHeight()
-die aktuelle Groesse gesetzt werden. Da die Groessen vom ausgewaehlten Font
-abhaengen, sollte nach einer Aenderung des Fontnamen das Menu mit Fill mit
-den Groessen des Fonts neu gefuellt werden.
+Allows the selection of font sizes. The FontSizeMenu is filled using
+Fill(). The selected font size can be queried using GetCurHeight().
+Using SetCurHeight()/GetCurHeight(), the current font size can be set/
+requested. If SetCurHeight() is called with 0, no entry is displayed
+as the current one.
+Before the Select call, the selected size is automatically set as the
+current one and would be displayed as the current size on the next call.
+Because of this, the current font size should be set using SetCurHeight()
+if necessary before calling PopupMenu::Execute(). As the font sizes
+depend on the selected Font, the Menu should be re-filled with the
+sizes of the font using Fill() after a change to the font name.
 
-Da die Id's und der interne Aufbau des Menus nicht bekannt ist, muss ein
-Select-Handler gesetzt werden, um die Auswahl einer Groesse mitzubekommen.
+As the Ids and the internal structure of the menu are not known, a
+Select handler must be set in order to notice the selection of a size.
 
-Alle Groessen werden in 10tel Point angegeben.
+All sizes are given in 1/10 points.
 
-In dieses Menu koennen keine weiteren Items eingefuegt werden.
+No further items can be inserted into that menu.
 
-Spaeter soll das Menu je nach System die Groessen anders darstelllen. Zum
-Beispiel koennte der Mac spaeter vielleicht einmal die Groessen als Outline
-darstellen, die als Bitmap-Fonts vorhanden sind.
+Later on, the menu shall display the sizes in respect to the system.
+For example, Mac could possibly show an outline of the fonts that are
+available as bitmaps.
 
-Querverweise
+References
 
 FontList; FontNameMenu; FontSizeBox
 
diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx
index 9661460..491f2c5 100644
--- a/include/svtools/svlbitm.hxx
+++ b/include/svtools/svlbitm.hxx
@@ -51,7 +51,7 @@ private:
     SvLBoxButtonData_Impl*  pImpl;
     bool                    bDataOk;
     SvButtonState           eState;
-    std::vector<Image>      aBmps;  // Indizes siehe Konstanten BMP_ ....
+    std::vector<Image>      aBmps;  // indices s. constants BMP_ ....
 
     SVT_DLLPRIVATE void     SetWidthAndHeight();
     SVT_DLLPRIVATE void     InitData( bool bImagesFromDefault,
@@ -69,7 +69,7 @@ public:
     void                    SetLink( const Link& rLink) { aLink=rLink; }
     const Link&             GetLink() const { return aLink; }
     bool                    IsRadio();
-    // weil Buttons nicht von LinkHdl abgeleitet sind
+    // as buttons are not derived from LinkHdl
     void                    CallLink();
 
     void                    StoreButtonState( SvTreeListEntry* pEntry, sal_uInt16 nItemFlags );
@@ -130,7 +130,7 @@ public:
 #define SV_ITEMSTATE_CHECKED            0x0002
 #define SV_ITEMSTATE_TRISTATE           0x0004
 #define SV_ITEMSTATE_HILIGHTED          0x0008
-#define SV_STATE_MASK 0xFFF8  // zum Loeschen von UNCHECKED,CHECKED,TRISTATE
+#define SV_STATE_MASK 0xFFF8  // for deletion of UNCHECKED,CHECKED,TRISTATE
 
 class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem
 {
diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx
index f6cfc9c..5216220 100644
--- a/include/svtools/svparser.hxx
+++ b/include/svtools/svparser.hxx
@@ -47,32 +47,31 @@ class SVT_DLLPUBLIC SvParser : public SvRefBase
 
 protected:
     SvStream&           rInput;
-    OUString            aToken;             // gescanntes Token
-    sal_uLong           nlLineNr;           // akt. Zeilen Nummer
-    sal_uLong           nlLinePos;          // akt. Spalten Nummer
+    OUString            aToken;             // scanned token
+    sal_uLong           nlLineNr;           // current line number
+    sal_uLong           nlLinePos;          // current column number
 
-    SvParser_Impl       *pImplData;         // interne Daten
-    long                nTokenValue;        // zusaetzlicher Wert (RTF)
+    SvParser_Impl       *pImplData;         // internal data
+    long                nTokenValue;        // additional vavlue (RTF)
     bool                bTokenHasValue;     // indicates whether nTokenValue is valid
-    SvParserState       eState;             // Status auch in abgl. Klassen
+    SvParserState       eState;             // status also in derived classes
 
     rtl_TextEncoding    eSrcEnc;        // Source encoding
 
     sal_uLong nNextChPos;
-    sal_Unicode nNextCh;                // Akt. Zeichen fuer die "lex"
+    sal_Unicode nNextCh;                // current character for the "lex"
 
 
-    bool                bDownloadingFile : 1;// sal_True: Es wird gerade ein externes
-                                        //       File geladen. d.h. alle
-                                        //       DataAvailable Links muessen
-                                        //       ignoriert werden.
-                                        // Wenn keibes der folgenden
-                                        // Flags gesetzt ist, wird der
-                                        // Stream als ANSI gelesen,
-                                        // aber als CharSet DONTKNOW
-                                        // zurueckgegeben.
-    bool                bUCS2BSrcEnc : 1;   // oder als big-endian UCS2
-    bool                bSwitchToUCS2 : 1;  // Umschalten des ist erlaubt
+    bool                bDownloadingFile : 1; // true: An external file is
+                                        // currently being loaded, i.e.
+                                        // all DataAvailable Links must
+                                        // be ignored.
+                                        // If none of the following
+                                        // flags is set, the stream
+                                        // is read as ANSI, but returned
+                                        // as CharSet DONTKNOW.
+    bool                bUCS2BSrcEnc : 1;   // or as big-endian UCS2
+    bool                bSwitchToUCS2 : 1;  // switching is allowed
 
     bool                bRTF_InTextRead : 1;  // only for RTF-Parser!!!
 
@@ -92,21 +91,21 @@ protected:
         ~TokenStackType() { }
     };
 
-    // Methoden fuer Token-Stack
-    int SkipToken( short nCnt = -1 );       // n Tokens zurueck "skippen"
+    // methods for Token stack
+    int SkipToken( short nCnt = -1 );       // "skip" n Tokens back
     TokenStackType* GetStackPtr( short nCnt );
     inline sal_uInt8 GetStackPos() const;
 
-    // scanne das naechste Token:
-    //  Tokenstack abarbeiten und ggfs. _GetNextToken() rufen. Diese
-    //  ist fuers erkennen von neuen Token verantwortlich
+    // scan the next token:
+    //  work off Token stack and call _GetNextToken() if necessary.
+    //  That one is responsible for the recognition of new Tokens.
     int GetNextToken();
     virtual int _GetNextToken() = 0;
 
-    // wird fuer jedes Token gerufen, das in CallParser erkannt wird
+    // is called for each Token that is recognized in CallParser
     virtual void NextToken( int nToken );
 
-    // zu Zeiten der SvRefBase-Ableitung darf nicht jeder loeschen
+    // at times of SvRefBase derivation, not everybody may delete
     virtual ~SvParser();
 
     void ClearTxtConvContext();
@@ -117,10 +116,9 @@ private:
     sal_uInt8 nTokenStackSize, nTokenStackPos;
 
 public:
-    // Konstruktor
     SvParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
 
-    virtual  SvParserState CallParser() = 0;    // Aufruf des Parsers
+    virtual  SvParserState CallParser() = 0; // calling of the parser
 
     inline SvParserState GetStatus() const  { return eState; }  // StatusInfo
 
@@ -128,8 +126,8 @@ public:
     inline sal_uLong    GetLinePos() const      { return nlLinePos; }
     inline sal_uLong    IncLineNr()             { return ++nlLineNr; }
     inline sal_uLong    IncLinePos()            { return ++nlLinePos; }
-    inline sal_uLong    SetLineNr( sal_uLong nlNum );           // inline unten
-    inline sal_uLong    SetLinePos( sal_uLong nlPos );          // inline unten
+    inline sal_uLong    SetLineNr( sal_uLong nlNum );           // inline bottom
+    inline sal_uLong    SetLinePos( sal_uLong nlPos );          // inline bottom
 
     sal_Unicode GetNextChar();
     void RereadLookahead();
@@ -141,7 +139,7 @@ public:
 
     long CallAsyncCallLink() { return NewDataRead( this, 0 ); }
 
-    // fuers asynchrone lesen aus dem SvStream
+    // for asynchronous reading from the SvStream
     void SaveState( int nToken );
     void RestoreState();
     virtual void Continue( int nToken );
@@ -157,19 +155,19 @@ public:
     void SetSrcUCS2BEncoding( bool bSet ) { bUCS2BSrcEnc = bSet; }
     bool IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
 
-    // Darf der Zeichensatz auf UCS/2 umgeschaltet werden, wenn
-    // in den ersten beiden Zeichen im Stream eine BOM steht?
+    // May the character set be switched to UCS/2, if a BOM
+    // is in the first two characters of the stream?
     void SetSwitchToUCS2( bool bSet ) { bSwitchToUCS2 = bSet; }
     bool IsSwitchToUCS2() const { return bSwitchToUCS2; }
 
-    // Aus wie vielen Bytes betseht ein Zeichen
+    // how many bytes a character consists of
     inline sal_uInt16 GetCharSize() const;
 
     int GetSaveToken() const;
 
-    // Aufbau einer Which-Map 'rWhichMap' aus einem Array von
-    // 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'.
-    // Die Which-Map wird nicht geloescht.
+    // build a Which-Map 'rWhichMap' from an array of WhichIds
+    // 'pWhichIds'. It has the length 'nWhichIds'.
+    // The WhichMap is not deleted.
     static void BuildWhichTbl( std::vector<sal_uInt16> &rWhichMap,
                                sal_uInt16 *pWhichIds,
                                sal_uInt16 nWhichIds );
diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx
index 2692bec..0612893 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -27,13 +27,13 @@
 
 #include <boost/ptr_container/ptr_vector.hpp>
 
-// Flags, die am Model haengen
+// flags related to the model
 #define SV_ENTRYFLAG_CHILDREN_ON_DEMAND   0x0001
 #define SV_ENTRYFLAG_DISABLE_DROP       0x0002
 #define SV_ENTRYFLAG_IN_USE             0x0004
-// wird gesetzt, wenn RequestingChildren keine Children gestzt hat
+// is set if RequestingChildren has not set any children
 #define SV_ENTRYFLAG_NO_NODEBMP         0x0008
-// Eintrag hatte oder hat Kinder
+// entry had or has children
 #define SV_ENTRYFLAG_HAD_CHILDREN       0x0010
 
 #define SV_ENTRYFLAG_USER_FLAGS         0xF000
@@ -81,9 +81,9 @@ public:
 
     size_t ItemCount() const;
 
-    // DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
-    // EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
-    // DATEN ALLOZIERT WERDEN!
+    // MAY ONLY BE CALLED IF THE ENTRY HAS NOT YET BEEN INSERTED INTO
+    // THE MODEL, AS OTHERWISE NO VIEW-DEPENDENT DATEA ARE ALLOCATED
+    // FOR THE ITEM!
     void        AddItem( SvLBoxItem* pItem );
     void ReplaceItem( SvLBoxItem* pNewItem, size_t nPos );
     const SvLBoxItem* GetItem( size_t nPos ) const;
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 4a91286..fef618c 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -83,7 +83,7 @@ void FontNameMenu::SetCurName(const OUString& rName)
 {
     maCurName = rName;
 
-    // Menueintrag checken
+    // check menu entry
     sal_uInt16 nChecked = 0;
     sal_uInt16 nItemCount = GetItemCount();
     for( sal_uInt16 i = 0; i < nItemCount; i++ )


More information about the Libreoffice-commits mailing list