ardovm commented on code in PR #167: URL: https://github.com/apache/openoffice/pull/167#discussion_r1103697601
########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -94,14 +94,14 @@ class _HTMLAttr SwNodeIndex nSttPara, nEndPara; xub_StrLen nSttCntnt, nEndCntnt; sal_Bool bInsAtStart : 1; - sal_Bool bLikePara : 1; // Attribut ueber dem gesamten Absatz setzen - sal_Bool bValid : 1; // ist das Attribut gueltig? + sal_Bool bLikePara : 1; // Set attribute over the entire paragraph + sal_Bool bValid : 1; // is the attribute valid? SfxPoolItem* pItem; - sal_uInt16 nCount; // Anzahl noch zu schliessender Attrs mit einem Wert - _HTMLAttr *pNext; // noch zu schliessene Attrs mit unterschiedl. Werten - _HTMLAttr *pPrev; // bereits geschlossene aber noch nicht gesetze Attrs - _HTMLAttr **ppHead; // der Listenkopf + sal_uInt16 nCount; // Number of attrs still to be closed with a value of + _HTMLAttr *pNext; // Attrs with different values still to be closed. Values Review Comment: Maybe this is "Still to be closed attrs, with different values" ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -204,40 +204,40 @@ struct _HTMLAttrTable class _HTMLAttrContext_SaveDoc; enum SwHTMLAppendMode { - AM_NORMAL, // keine Absatz-Abstand-Behandlung - AM_NOSPACE, // Abstand hart auf 0cm setzen - AM_SPACE, // Abstand hart auf 0.5cm setzen - AM_SOFTNOSPACE, // Abstand nicht setzen aber 0cm merken - AM_NONE // gar kein Append + AM_NORMAL, // no paragraph spacing treatment Review Comment: No changes in spacing ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) + String aScriptURL; // URL of a script + String aStyleSource; // Contents of the current style sheet + String aContents; // Text of the actual marquee, field, etc. String sTitle; - String aUnknownToken; // ein gestartetes unbekanntes Token + String aUnknownToken; // a started unknown token String aBulletGrfs[MAXLEVEL]; String sJmpMark; - SvUShorts aBaseFontStack; // Stack fuer <BASEFONT> - // Bit 0-2: Fontgroesse (1-7) - SvUShorts aFontStack; // Stack fuer <FONT>, <BIG>, <SMALL> - // Bit 0-2: Fontgroesse (1-7) - // Bit 15: Fontfarbe wurde gesetzt + SvUShorts aBaseFontStack; // Stack for <BASEFONT> + // Bit 0-2: Font size (1-7) + SvUShorts aFontStack; // Stack for <FONT>, <BIG>, <SMALL> + // Bit 0-2: Font size (1-7) + // Bit 15: Font color was set - _HTMLAttrs aSetAttrTab;// "geschlossene", noch nicht gesetzte Attr. - _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute - _HTMLAttrTable aAttrTab; // "offene" Attribute - _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved - SvXub_StrLens aMoveFlyCnts;// and the Content-Positions + _HTMLAttrs aSetAttrTab;// "closed", not yet set Attr. + _HTMLAttrs aParaAttrs; // leading paragraph attributes + _HTMLAttrTable aAttrTab; // "open" attributes + _HTMLAttrContexts aContexts;// the current attribute/token context + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, der Anker wird verschoben + SvXub_StrLens aMoveFlyCnts;// und die Content-Positionen - SwApplet_Impl *pAppletImpl; // das aktuelle Applet + SwApplet_Impl *pAppletImpl; // the current applet - SwCSS1Parser *pCSS1Parser; // der Style-Sheet-Parser + SwCSS1Parser *pCSS1Parser; // the style sheet parser SwHTMLNumRuleInfo *pNumRuleInfo; SwPendingStack *pPendStack; SwDoc *pDoc; - SwPaM *pPam; // SwPosition duerfte doch reichen, oder ?? - ViewShell *pActionViewShell; // ViewShell, an der das StartAction - // gerufen wurde. + SwPaM *pPam; // SwPosition should be enough, right? + ViewShell *pActionViewShell; // ViewShell, at which the StartAction + // was called. SwNodeIndex *pSttNdIdx; - HTMLTable *pTable; // die aktuelle "auesserste" Tabelle - SwHTMLForm_Impl *pFormImpl;// die aktuelle Form - SdrObject *pMarquee; // aktuelles Marquee - SwField *pField; // aktuelles Feld - ImageMap *pImageMap; // aktuelle Image-Map - ImageMaps *pImageMaps;// alle gelesenen Image-Maps + HTMLTable *pTable; // the current "outermost" table + SwHTMLForm_Impl *pFormImpl;// the current form + SdrObject *pMarquee; // current marquee + SwField *pField; // current field + ImageMap *pImageMap; // current image map + ImageMaps *pImageMaps;// all read image maps SwHTMLFootEndNote_Impl *pFootEndNoteImpl; - Size aHTMLPageSize; // die Seitengroesse der HTML-Vorlage + Size aHTMLPageSize; // the page size of the HTML template - sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7 - sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks + sal_uInt32 aFontHeights[7]; // the font heights 1-7 + sal_uInt32 nScriptStartLineNr; // Line number of a script block sal_uLong nEventId; sal_uInt16 nBaseFontStMin; // sal_uInt16 nFontStMin; // sal_uInt16 nDefListDeep; // - sal_uInt16 nFontStHeadStart; // Elemente im Font-Stack bei <Hn> - sal_uInt16 nSBModuleCnt; // Zaehler fuer Basic-Module - sal_uInt16 nMissingImgMaps; // Wie viele Image-Maps fehlen noch? + sal_uInt16 nFontStHeadStart; // Elements in the font stack at <Hn>. + sal_uInt16 nSBModuleCnt; // Counter for Basic modules + sal_uInt16 nMissingImgMaps; // How many image maps are missing? sal_uInt16 nParaCnt; - sal_uInt16 nContextStMin; // Untergrenze fuer PopContext - sal_uInt16 nContextStAttrMin; // Untergrenze fuer Attributierung - sal_uInt16 nSelectEntryCnt; // Anzahl der Eintraege der akt. Listbox - sal_uInt16 nOpenParaToken; // ein geoeffnetes Absatz-Element + sal_uInt16 nContextStMin; // Lower limit for PopContext + sal_uInt16 nContextStAttrMin; // Lower limit for attribution + sal_uInt16 nSelectEntryCnt; // Number of entries in the current list box + sal_uInt16 nOpenParaToken; // an opened paragraph element enum JumpToMarks { JUMPTO_NONE, JUMPTO_MARK, JUMPTO_TABLE, JUMPTO_FRAME, JUMPTO_REGION, JUMPTO_GRAPHIC } eJumpTo; #ifdef DBG_UTIL - sal_uInt16 nContinue; // Tiefe der Continue-Aufrufe + sal_uInt16 nContinue; // Depth of Continue calls #endif - SvxAdjust eParaAdjust; // Ausrichtung des aktuellen Absatz - HTMLScriptLanguage eScriptLang; // die aktuelle Script-Language + SvxAdjust eParaAdjust; // Alignment of the current paragraph + HTMLScriptLanguage eScriptLang; // the current script language - sal_Bool bOldIsHTMLMode : 1; // War's mal ein HTML-Dokument? + sal_Bool bOldIsHTMLMode : 1; // Was it once an HTML document? - sal_Bool bDocInitialized : 1; // Dokument bzw. Shell wurden initialisiert - // Flag um doppeltes init durch Rekursion - // zu verhindern. - sal_Bool bViewCreated : 1; // die View wurde schon erzeugt (asynchron) - sal_Bool bSetCrsr : 1; // Crsr wieder auf den Anfang setzen + sal_Bool bDocInitialized : 1; // Document or shell were initialized + // Flag by double init by recursion + // to prevent. Review Comment: Flag used to avoid double initialization due to recursion ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -933,12 +930,12 @@ public: SfxMedium* pMed = 0, sal_Bool bReadUTF8 = sal_False, sal_Bool bIgnoreHTMLComments = sal_False ); - virtual SvParserState CallParser(); // Aufruf des Parsers + virtual SvParserState CallParser(); // Calling the parser Review Comment: Call the parser ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -440,11 +440,11 @@ __EXPORT SwHTMLParser::~SwHTMLParser() if( pDoc->GetDocShell() && nEventId ) Application::RemoveUserEvent( nEventId ); - // das DocumentDetected kann ggfs. die DocShells loeschen, darum nochmals - // abfragen + // DocumentDetected eventual deletes DocShells, Review Comment: DocumentDetected may delete DocShells ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -204,40 +204,40 @@ struct _HTMLAttrTable class _HTMLAttrContext_SaveDoc; enum SwHTMLAppendMode { - AM_NORMAL, // keine Absatz-Abstand-Behandlung - AM_NOSPACE, // Abstand hart auf 0cm setzen - AM_SPACE, // Abstand hart auf 0.5cm setzen - AM_SOFTNOSPACE, // Abstand nicht setzen aber 0cm merken - AM_NONE // gar kein Append + AM_NORMAL, // no paragraph spacing treatment + AM_NOSPACE, // Set distance hard to 0cm Review Comment: Force zero spacing ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -1055,25 +1053,25 @@ void __EXPORT SwHTMLParser::NextToken( int nToken ) } } - // Wenn wir noch nicht wissen, was fuer ein Dokument wir vor uns haben, - // versuchen wir das erstmal rauszufinden. Das muss fuer Controls in - // Fall vor dem Einfuegen des Controls passieren, weil beim Einfuegen - // bereits eine View benoetigt wird. + // If we don't know yet, what kind of document we have in front of us, + // let's try to find out first. This must be done for controls in + // case before inserting the control, because when inserting the control + // a view is already needed. if( !bDocInitialized ) DocumentDetected(); sal_Bool bGetIDOption = sal_False, bInsertUnknown = sal_False; sal_Bool bUpperSpaceSave = bUpperSpace; bUpperSpace = sal_False; - // Die folgenden Speziallfaelle muessen oder koennen nach der - // Filter-Detection erfolgen. + // The following special cases must or can be made after the + // filter detection. if( !pPendStack ) { if( bInFloatingFrame ) { - // <SCRIPT> wird hier (von uns) ignoriert, weil es auch in - // Applets ignoriert wird! + // <SCRIPT> is ignored here (by us), because it is also ignored in + // applets is ignored! Review Comment: spurious "is ignored" at the end ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) + String aScriptURL; // URL of a script + String aStyleSource; // Contents of the current style sheet + String aContents; // Text of the actual marquee, field, etc. String sTitle; - String aUnknownToken; // ein gestartetes unbekanntes Token + String aUnknownToken; // a started unknown token String aBulletGrfs[MAXLEVEL]; String sJmpMark; - SvUShorts aBaseFontStack; // Stack fuer <BASEFONT> - // Bit 0-2: Fontgroesse (1-7) - SvUShorts aFontStack; // Stack fuer <FONT>, <BIG>, <SMALL> - // Bit 0-2: Fontgroesse (1-7) - // Bit 15: Fontfarbe wurde gesetzt + SvUShorts aBaseFontStack; // Stack for <BASEFONT> + // Bit 0-2: Font size (1-7) + SvUShorts aFontStack; // Stack for <FONT>, <BIG>, <SMALL> + // Bit 0-2: Font size (1-7) + // Bit 15: Font color was set - _HTMLAttrs aSetAttrTab;// "geschlossene", noch nicht gesetzte Attr. - _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute - _HTMLAttrTable aAttrTab; // "offene" Attribute - _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved - SvXub_StrLens aMoveFlyCnts;// and the Content-Positions + _HTMLAttrs aSetAttrTab;// "closed", not yet set Attr. Review Comment: "closed" attribute, not set yet ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -204,40 +204,40 @@ struct _HTMLAttrTable class _HTMLAttrContext_SaveDoc; enum SwHTMLAppendMode { - AM_NORMAL, // keine Absatz-Abstand-Behandlung - AM_NOSPACE, // Abstand hart auf 0cm setzen - AM_SPACE, // Abstand hart auf 0.5cm setzen - AM_SOFTNOSPACE, // Abstand nicht setzen aber 0cm merken - AM_NONE // gar kein Append + AM_NORMAL, // no paragraph spacing treatment + AM_NOSPACE, // Set distance hard to 0cm + AM_SPACE, // Set distance hard to 0.5cm Review Comment: Force 0.5 cm spacing ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) + String aScriptURL; // URL of a script + String aStyleSource; // Contents of the current style sheet + String aContents; // Text of the actual marquee, field, etc. String sTitle; - String aUnknownToken; // ein gestartetes unbekanntes Token + String aUnknownToken; // a started unknown token String aBulletGrfs[MAXLEVEL]; String sJmpMark; - SvUShorts aBaseFontStack; // Stack fuer <BASEFONT> - // Bit 0-2: Fontgroesse (1-7) - SvUShorts aFontStack; // Stack fuer <FONT>, <BIG>, <SMALL> - // Bit 0-2: Fontgroesse (1-7) - // Bit 15: Fontfarbe wurde gesetzt + SvUShorts aBaseFontStack; // Stack for <BASEFONT> + // Bit 0-2: Font size (1-7) + SvUShorts aFontStack; // Stack for <FONT>, <BIG>, <SMALL> + // Bit 0-2: Font size (1-7) + // Bit 15: Font color was set - _HTMLAttrs aSetAttrTab;// "geschlossene", noch nicht gesetzte Attr. - _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute - _HTMLAttrTable aAttrTab; // "offene" Attribute - _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved - SvXub_StrLens aMoveFlyCnts;// and the Content-Positions + _HTMLAttrs aSetAttrTab;// "closed", not yet set Attr. + _HTMLAttrs aParaAttrs; // leading paragraph attributes + _HTMLAttrTable aAttrTab; // "open" attributes + _HTMLAttrContexts aContexts;// the current attribute/token context + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, der Anker wird verschoben + SvXub_StrLens aMoveFlyCnts;// und die Content-Positionen Review Comment: Did you translate this _into_ German? :-) ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -204,40 +204,40 @@ struct _HTMLAttrTable class _HTMLAttrContext_SaveDoc; enum SwHTMLAppendMode { - AM_NORMAL, // keine Absatz-Abstand-Behandlung - AM_NOSPACE, // Abstand hart auf 0cm setzen - AM_SPACE, // Abstand hart auf 0.5cm setzen - AM_SOFTNOSPACE, // Abstand nicht setzen aber 0cm merken - AM_NONE // gar kein Append + AM_NORMAL, // no paragraph spacing treatment + AM_NOSPACE, // Set distance hard to 0cm + AM_SPACE, // Set distance hard to 0.5cm + AM_SOFTNOSPACE, // Do not set distance but remember 0cm + AM_NONE // no append at all }; class _HTMLAttrContext { - _HTMLAttrs aAttrs; // die in dem Kontext gestarteten Attribute + _HTMLAttrs aAttrs; // the attributes started in the context - String aClass; // die Klasse des Kontexts + String aClass; // the class of the context _HTMLAttrContext_SaveDoc *pSaveDocContext; SfxItemSet *pFrmItemSet; - sal_uInt16 nToken; // das Token, zu dem der Kontext gehoehrt + sal_uInt16 nToken; // the token to which the context belongs - sal_uInt16 nTxtFmtColl; // eine in dem Kontext begonnene Vorlage oder 0 + sal_uInt16 nTxtFmtColl; // a template started in the context or 0 - sal_uInt16 nLeftMargin; // ein veraenderter linker Rand - sal_uInt16 nRightMargin; // ein veraenderter rechter Rand - sal_uInt16 nFirstLineIndent; // ein veraenderter Erstzeilen-Einzug + sal_uInt16 nLeftMargin; // a changed left edge + sal_uInt16 nRightMargin; // a changed right edge + sal_uInt16 nFirstLineIndent; // a changed first line indent sal_uInt16 nUpperSpace; sal_uInt16 nLowerSpace; SwHTMLAppendMode eAppend; - sal_Bool bLRSpaceChanged : 1;// linker/rechtr Rand, Einzug veraendert? - sal_Bool bULSpaceChanged : 1;// oberer/unterer Rand veraendert? - sal_Bool bDfltTxtFmtColl : 1;// nTxtFmtColl ist nur ein default - sal_Bool bSpansSection : 1; // Der Kontext spannt eine SwSection auf - sal_Bool bPopStack : 1; // Oberhalb liegende Stack-Elemente entf. + sal_Bool bLRSpaceChanged : 1;// left/right edge, indent changed? + sal_Bool bULSpaceChanged : 1;// upper/lower edge changed? + sal_Bool bDfltTxtFmtColl : 1;// nTxtFmtColl is only a default + sal_Bool bSpansSection : 1; // The context spans a SwSection + sal_Bool bPopStack : 1; // Unstack stack elements above. Review Comment: Delete the element above in the stack ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3053,25 +3040,24 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, } else { - // es gibt noch andere offene Attribute des Typs, - // daher muss das Setzen zurueckgestellt werden. - // das aktuelle Attribut wird deshalb hinten an die - // Previous-Liste des Nachfolgers angehaengt + // there are other open attributes of the type, + // so the setting must be reset. + // the current attribute is therefore appended to the end of the + // previous list of the successor. pNext->InsertPrev( pAttr ); } } else { - // dann nicht einfuegen, sondern Loeschen. Durch das "tuerken" von - // Vorlagen durch harte Attributierung koennen sich auch mal andere - // leere Attribute in der Prev-Liste befinden, die dann trotzdem - // gesetzt werden muessen + // Then do not insert, but delete. Through "fakeing" of + // templates by hard attributes, there may be other empty attributes in the + // empty attributes in the Prev list, which then must be set anyway. Review Comment: "empty attributes" repeated twice here ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -1532,20 +1526,19 @@ void __EXPORT SwHTMLParser::NextToken( int nToken ) case HTML_DT_ON: if( nOpenParaToken ) EndPara(); - EndDefListItem( 0, sal_False );// <DD>/<DT> beenden und keine Vorl. setzen + EndDefListItem( 0, sal_False );// <DD>/<DT> quit and set no preliminaries Review Comment: preliminaries -> template? ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) Review Comment: "Type of the script" ("read" is ambiguous in English; should rather be "that we read" or "we have read" or "loaded"... but would it not be too much verbose?) ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -727,61 +727,61 @@ private: void GetDefaultScriptType( ScriptType& rType, String& rTypeStr ) const; - // die eigentlichen Einfuege-Methoden fuer <IMG>, <EMBED> und <APPLET> - // und <PARAM> + // the actual insert methods for <IMG>, <EMBED>, and <APPLET> + // and <PARAM> void InsertImage(); // htmlgrin.cxx void InsertEmbed(); // htmlplug.cxx #ifdef SOLAR_JAVA void NewObject(); // htmlplug.cxx #endif - void EndObject(); // CommandLine mit Applet verkn. (htmlplug.cxx) + void EndObject(); // CommandLine with Applet link. (htmlplug.cxx) #ifdef SOLAR_JAVA void InsertApplet(); // htmlplug.cxx #endif - void EndApplet(); // CommandLine mit Applet verkn. (htmlplug.cxx) + void EndApplet(); // CommandLine with Applet link. (htmlplug.cxx) void InsertParam(); // htmlplug.cxx void InsertFloatingFrame(); void EndFloatingFrame() { bInFloatingFrame = sal_False; } - // <BODY>-Tag auswerten: Hintergrund-Grafiken und -Farben setzen (htmlgrin.cxx) + // <BODY> tag evaluate: set background graphics and colors (htmlgrin.cxx) void InsertBodyOptions(); - // Einfuegen von Links und ::com::sun::star::text::Bookmarks (htmlgrin.cxx) + // Inserting links and ::com::sun::star::text::Bookmarks (htmlgrin.cxx) - // <A>-Tag auswerten: einen Link bzw. eine ::com::sun::star::text::Bookmark einfuegen + // Evaluate <A> tag: insert a link or ::com::sun::star::text::bookmark. void NewAnchor(); void EndAnchor(); - // eine ::com::sun::star::text::Bookmark einfuegen + // insert a ::com::sun::star::text::bookmark void InsertBookmark( const String& rName ); void InsertCommentText( const sal_Char *pTag = 0 ); void InsertComment( const String& rName, const sal_Char *pTag = 0 ); - // sind im aktuellen Absatz ::com::sun::star::text::Bookmarks vorhanden? + // are there ::com::sun::star::text::bookmarks in the current paragraph? Review Comment: are there any .... ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) + String aScriptURL; // URL of a script + String aStyleSource; // Contents of the current style sheet + String aContents; // Text of the actual marquee, field, etc. String sTitle; - String aUnknownToken; // ein gestartetes unbekanntes Token + String aUnknownToken; // a started unknown token String aBulletGrfs[MAXLEVEL]; String sJmpMark; - SvUShorts aBaseFontStack; // Stack fuer <BASEFONT> - // Bit 0-2: Fontgroesse (1-7) - SvUShorts aFontStack; // Stack fuer <FONT>, <BIG>, <SMALL> - // Bit 0-2: Fontgroesse (1-7) - // Bit 15: Fontfarbe wurde gesetzt + SvUShorts aBaseFontStack; // Stack for <BASEFONT> + // Bit 0-2: Font size (1-7) + SvUShorts aFontStack; // Stack for <FONT>, <BIG>, <SMALL> + // Bit 0-2: Font size (1-7) + // Bit 15: Font color was set - _HTMLAttrs aSetAttrTab;// "geschlossene", noch nicht gesetzte Attr. - _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute - _HTMLAttrTable aAttrTab; // "offene" Attribute - _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved - SvXub_StrLens aMoveFlyCnts;// and the Content-Positions + _HTMLAttrs aSetAttrTab;// "closed", not yet set Attr. + _HTMLAttrs aParaAttrs; // leading paragraph attributes + _HTMLAttrTable aAttrTab; // "open" attributes + _HTMLAttrContexts aContexts;// the current attribute/token context + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, der Anker wird verschoben + SvXub_StrLens aMoveFlyCnts;// und die Content-Positionen - SwApplet_Impl *pAppletImpl; // das aktuelle Applet + SwApplet_Impl *pAppletImpl; // the current applet - SwCSS1Parser *pCSS1Parser; // der Style-Sheet-Parser + SwCSS1Parser *pCSS1Parser; // the style sheet parser SwHTMLNumRuleInfo *pNumRuleInfo; SwPendingStack *pPendStack; SwDoc *pDoc; - SwPaM *pPam; // SwPosition duerfte doch reichen, oder ?? - ViewShell *pActionViewShell; // ViewShell, an der das StartAction - // gerufen wurde. + SwPaM *pPam; // SwPosition should be enough, right? + ViewShell *pActionViewShell; // ViewShell, at which the StartAction + // was called. SwNodeIndex *pSttNdIdx; - HTMLTable *pTable; // die aktuelle "auesserste" Tabelle - SwHTMLForm_Impl *pFormImpl;// die aktuelle Form - SdrObject *pMarquee; // aktuelles Marquee - SwField *pField; // aktuelles Feld - ImageMap *pImageMap; // aktuelle Image-Map - ImageMaps *pImageMaps;// alle gelesenen Image-Maps + HTMLTable *pTable; // the current "outermost" table + SwHTMLForm_Impl *pFormImpl;// the current form + SdrObject *pMarquee; // current marquee + SwField *pField; // current field + ImageMap *pImageMap; // current image map + ImageMaps *pImageMaps;// all read image maps Review Comment: all image maps read so far ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -828,11 +828,11 @@ private: sal_uInt8 nWidth ); - // eine neue Form beginnen + // start a new shape Review Comment: start a new form ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -382,110 +382,110 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient String sSaveBaseURL; String aBasicLib; String aBasicModule; - String aScriptSource; // Inhalt des aktuellen Script-Blocks - String aScriptType; // Type des gelesenen Scripts (StarBasic/VB/JAVA) - String aScriptURL; // URL eines Scripts - String aStyleSource; // Inhalt des aktuellen Style-Sheets - String aContents; // Text des akteullen Marquee, Feldes etc. + String aScriptSource; // Content of the current script block + String aScriptType; // Type of the read script (StarBasic/VB/JAVA) + String aScriptURL; // URL of a script + String aStyleSource; // Contents of the current style sheet + String aContents; // Text of the actual marquee, field, etc. String sTitle; - String aUnknownToken; // ein gestartetes unbekanntes Token + String aUnknownToken; // a started unknown token String aBulletGrfs[MAXLEVEL]; String sJmpMark; - SvUShorts aBaseFontStack; // Stack fuer <BASEFONT> - // Bit 0-2: Fontgroesse (1-7) - SvUShorts aFontStack; // Stack fuer <FONT>, <BIG>, <SMALL> - // Bit 0-2: Fontgroesse (1-7) - // Bit 15: Fontfarbe wurde gesetzt + SvUShorts aBaseFontStack; // Stack for <BASEFONT> + // Bit 0-2: Font size (1-7) + SvUShorts aFontStack; // Stack for <FONT>, <BIG>, <SMALL> + // Bit 0-2: Font size (1-7) + // Bit 15: Font color was set - _HTMLAttrs aSetAttrTab;// "geschlossene", noch nicht gesetzte Attr. - _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute - _HTMLAttrTable aAttrTab; // "offene" Attribute - _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved - SvXub_StrLens aMoveFlyCnts;// and the Content-Positions + _HTMLAttrs aSetAttrTab;// "closed", not yet set Attr. + _HTMLAttrs aParaAttrs; // leading paragraph attributes + _HTMLAttrTable aAttrTab; // "open" attributes + _HTMLAttrContexts aContexts;// the current attribute/token context + SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, der Anker wird verschoben + SvXub_StrLens aMoveFlyCnts;// und die Content-Positionen - SwApplet_Impl *pAppletImpl; // das aktuelle Applet + SwApplet_Impl *pAppletImpl; // the current applet - SwCSS1Parser *pCSS1Parser; // der Style-Sheet-Parser + SwCSS1Parser *pCSS1Parser; // the style sheet parser SwHTMLNumRuleInfo *pNumRuleInfo; SwPendingStack *pPendStack; SwDoc *pDoc; - SwPaM *pPam; // SwPosition duerfte doch reichen, oder ?? - ViewShell *pActionViewShell; // ViewShell, an der das StartAction - // gerufen wurde. + SwPaM *pPam; // SwPosition should be enough, right? + ViewShell *pActionViewShell; // ViewShell, at which the StartAction + // was called. SwNodeIndex *pSttNdIdx; - HTMLTable *pTable; // die aktuelle "auesserste" Tabelle - SwHTMLForm_Impl *pFormImpl;// die aktuelle Form - SdrObject *pMarquee; // aktuelles Marquee - SwField *pField; // aktuelles Feld - ImageMap *pImageMap; // aktuelle Image-Map - ImageMaps *pImageMaps;// alle gelesenen Image-Maps + HTMLTable *pTable; // the current "outermost" table + SwHTMLForm_Impl *pFormImpl;// the current form + SdrObject *pMarquee; // current marquee + SwField *pField; // current field + ImageMap *pImageMap; // current image map + ImageMaps *pImageMaps;// all read image maps SwHTMLFootEndNote_Impl *pFootEndNoteImpl; - Size aHTMLPageSize; // die Seitengroesse der HTML-Vorlage + Size aHTMLPageSize; // the page size of the HTML template - sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7 - sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks + sal_uInt32 aFontHeights[7]; // the font heights 1-7 + sal_uInt32 nScriptStartLineNr; // Line number of a script block sal_uLong nEventId; sal_uInt16 nBaseFontStMin; // sal_uInt16 nFontStMin; // sal_uInt16 nDefListDeep; // - sal_uInt16 nFontStHeadStart; // Elemente im Font-Stack bei <Hn> - sal_uInt16 nSBModuleCnt; // Zaehler fuer Basic-Module - sal_uInt16 nMissingImgMaps; // Wie viele Image-Maps fehlen noch? + sal_uInt16 nFontStHeadStart; // Elements in the font stack at <Hn>. + sal_uInt16 nSBModuleCnt; // Counter for Basic modules + sal_uInt16 nMissingImgMaps; // How many image maps are missing? sal_uInt16 nParaCnt; - sal_uInt16 nContextStMin; // Untergrenze fuer PopContext - sal_uInt16 nContextStAttrMin; // Untergrenze fuer Attributierung - sal_uInt16 nSelectEntryCnt; // Anzahl der Eintraege der akt. Listbox - sal_uInt16 nOpenParaToken; // ein geoeffnetes Absatz-Element + sal_uInt16 nContextStMin; // Lower limit for PopContext + sal_uInt16 nContextStAttrMin; // Lower limit for attribution + sal_uInt16 nSelectEntryCnt; // Number of entries in the current list box + sal_uInt16 nOpenParaToken; // an opened paragraph element enum JumpToMarks { JUMPTO_NONE, JUMPTO_MARK, JUMPTO_TABLE, JUMPTO_FRAME, JUMPTO_REGION, JUMPTO_GRAPHIC } eJumpTo; #ifdef DBG_UTIL - sal_uInt16 nContinue; // Tiefe der Continue-Aufrufe + sal_uInt16 nContinue; // Depth of Continue calls #endif - SvxAdjust eParaAdjust; // Ausrichtung des aktuellen Absatz - HTMLScriptLanguage eScriptLang; // die aktuelle Script-Language + SvxAdjust eParaAdjust; // Alignment of the current paragraph + HTMLScriptLanguage eScriptLang; // the current script language - sal_Bool bOldIsHTMLMode : 1; // War's mal ein HTML-Dokument? + sal_Bool bOldIsHTMLMode : 1; // Was it once an HTML document? - sal_Bool bDocInitialized : 1; // Dokument bzw. Shell wurden initialisiert - // Flag um doppeltes init durch Rekursion - // zu verhindern. - sal_Bool bViewCreated : 1; // die View wurde schon erzeugt (asynchron) - sal_Bool bSetCrsr : 1; // Crsr wieder auf den Anfang setzen + sal_Bool bDocInitialized : 1; // Document or shell were initialized + // Flag by double init by recursion + // to prevent. + sal_Bool bViewCreated : 1; // the view was already created (asynchronous) + sal_Bool bSetCrsr : 1; // Set Crsr back to the beginning sal_Bool bSetModEnabled : 1; - sal_Bool bInFloatingFrame : 1; // Wir sind in einen Floating ::com::sun::star::frame::Frame + sal_Bool bInFloatingFrame : 1; // We are in a floating ::com::sun::star::frame::Frame sal_Bool bInField : 1; - sal_Bool bKeepUnknown : 1; // unbekannte/nicht unterstuetze Tokens beh. + sal_Bool bKeepUnknown : 1; // unknown/unsupported tokens treatment Review Comment: treatment of unknown/unsupported tokens ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -844,23 +844,23 @@ private: void InsertSelectText(); void EndSelect(); - // Einfuegen von Tabellen (htmltab.cxx) + // Insert tables (htmltab.cxx) -public: // wird in Tabellen benoetigt +public: // is needed in tables - // einen Boxen-Inhalt hinter dem angegebenen Node einfuegen + // insert a box content after the specified node const SwStartNode *InsertTableSection( const SwStartNode *pPrevStNd ); - // Einen Boxen-Inhalt am Ende der Tabelle einfuegen, in der der PaM - // steht un den PaM in die Zelle schieben + // Insert a box content at the end of the table containing the PaM + // and move the PaM into the cell const SwStartNode *InsertTableSection( sal_uInt16 nPoolId ); - // Einfeuge-Methoden fuer die diversen Tabellen-Tags + // Insert methods for the various table tags HTMLTableCnts *InsertTableContents( sal_Bool bHead ); private: - // Eine Section fuer die voruebergende Aufnahme der Tabellen-Ueberschrift - // anlegen + // Create a section for the prefix of the table heading + // create Review Comment: Create a section for the temporary setting of the table heading ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -2930,34 +2917,34 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem ) void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, sal_Bool bChkEmpty ) { - ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" ); - // Der Listenkopf ist im Attribut gespeichert + ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: untested ppDepAttr-Feature?" ); + // The list header is stored in the attribute _HTMLAttr **ppHead = pAttr->ppHead; - ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" ); + ASSERT( ppHead, "no attribute list header found!" ); - // die aktuelle Psoition als Ende-Position merken + // remember the current psoition as the end position Review Comment: psoition -> position ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3675,8 +3661,8 @@ void SwHTMLParser::NewFontAttr( int nToken ) ASSERT( !nSize == !nFontHeight, "HTML-Font-Size != Font-Height" ); String aFontName, aStyleName; - FontFamily eFamily = FAMILY_DONTKNOW; // Family und Pitch, - FontPitch ePitch = PITCH_DONTKNOW; // falls nicht gefunden + FontFamily eFamily = FAMILY_DONTKNOW; // Family and Pitch, + FontPitch ePitch = PITCH_DONTKNOW; // in case not found Review Comment: in case it is not found ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3581,8 +3567,8 @@ void SwHTMLParser::NewFontAttr( int nToken ) String aFace, aId, aStyle, aClass, aLang, aDir; Color aColor; - sal_uLong nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe - sal_uInt16 nSize = 0; // Fontgroesse in Netscape-Notation (1-7) + sal_uLong nFontHeight = 0; // real set up font hight Review Comment: font height to be effectively set ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3662,8 +3648,8 @@ void SwHTMLParser::NewFontAttr( int nToken ) else nSize = ( nFontSize>1 ? nFontSize-1 : 1 ); - // in Ueberschriften wird die neue Fonthoehe wenn moeglich aus - // den Vorlagen geholt. + // in headlines, the new font height will be taken from the Review Comment: spurious "from the" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -250,7 +250,7 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, co sErr += ','; sErr += String::CreateFromInt32((sal_Int32)xParser->GetLinePos()); - // den Stream als Fehlernummer Transporter benutzen + // use Stream as transporter error nummber Review Comment: use Stream to carry the error number ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -412,9 +412,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, else if( sCmp.EqualsAscii( pMarkToOutline ) || sCmp.EqualsAscii( pMarkToText ) || sCmp.EqualsAscii( pMarkToFrame ) ) - eJumpTo = JUMPTO_NONE; // das ist nichts gueltiges! + eJumpTo = JUMPTO_NONE; // this is not valid! else - // ansonsten ist das ein normaler (Book)Mark + // else it is h normal (Book)Mark Review Comment: else it is a normal ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -582,27 +582,26 @@ SvParserState __EXPORT SwHTMLParser::CallParser() void __EXPORT SwHTMLParser::Continue( int nToken ) { #ifdef DBG_UTIL - ASSERT( !nContinue, "Continue im Continue - Das sollte doch nicht sein, oder?" ); + ASSERT( !nContinue, "Continue im Continue - That should not be, shouldn't it?" ); nContinue++; #endif - // Wenn der Import (vom SFX) abgebrochen wurde, wird ein Fehler - // gesetzt aber trotzdem noch weiter gemacht, damit vernuenftig - // aufgeraeumt wird. + // if Import (vom SFX) has been aborted, an error is set + // in order to clean up, the process continues ASSERT( SVPAR_ERROR!=eState, - "SwHTMLParser::Continue: bereits ein Fehler gesetzt" ); + "SwHTMLParser::Continue: already set an error" ); if( pDoc->GetDocShell() && pDoc->GetDocShell()->IsAbortingImport() ) eState = SVPAR_ERROR; - // Die ViewShell vom Dokument holen, merken und als aktuelle setzen. + // get ViewShell from Document, memorize and set as current. ViewShell *pInitVSh = CallStartAction(); if( SVPAR_ERROR != eState && GetMedium() && !bViewCreated ) { - // Beim ersten Aufruf erstmal returnen, Doc anzeigen - // und auf Timer Callback warten. - // An dieser Stelle wurde im CallParser gerade mal ein Zeichen - // gelesen und ein SaveState(0) gerufen. + // returnen at first call, show Doc + // and wait for Timer Callback. + // At this point CallParser read only one character + //and a SaveState(0) called. Review Comment: Return at first call, show Doc and wait for timer callback. At this point, CallParser read only one character and called SaveState(0) ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4291,28 +4276,28 @@ void SwHTMLParser::EndDefList() else if( bSpace ) AddParSpace(); - // ein Level weniger + // reduce one level if( nDefListDeep > 0 ) nDefListDeep--; - // den aktuellen Kontext vom Stack holen + // get the current context from the stack _HTMLAttrContext *pCntxt = PopContext( HTML_DEFLIST_ON ); - // und noch Attribute beenden + // and close end Attribute Review Comment: either "close" or "end" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3835,14 +3821,14 @@ void SwHTMLParser::NewPara() } } - // einen neuen Kontext anlegen + // set up a new context _HTMLAttrContext *pCntxt = aClass.Len() ? new _HTMLAttrContext( HTML_PARABREAK_ON, RES_POOLCOLL_TEXT, aClass ) : new _HTMLAttrContext( HTML_PARABREAK_ON ); - // Styles parsen (Class nicht beruecksichtigen. Das geht nur, solange - // keine der CSS1-Properties der Klasse hart formatiert werden muss!!!) + // parse styles (ignore Class. This only works as long as + // none of the CSS1 properties of the class need to be hard formatted!!!) Review Comment: hard -> forcibly ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4239,22 +4225,21 @@ void SwHTMLParser::NewDefList() } - // ... und in einem Kontext merken + // ... and remember in a context _HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_DEFLIST_ON ); - // darin auch die Raender merken + // remeber the borders, too sal_uInt16 nLeft=0, nRight=0; short nIndent=0; GetMarginsFromContext( nLeft, nRight, nIndent ); - // Die Einrueckung, die sich schon aus einem DL-ergibt, entspricht der - // eines DT auf dem aktuellen Level, und die entspricht der eines - // DD auf dem Level davor. Fue einen Level >=2 muss also ein DD-Abstand - // hinzugefuegt werden + // The intend, which already results from a DL-, corresponds to that Review Comment: intend -> indent ########## main/sw/source/filter/html/swhtml.hxx: ########## @@ -895,31 +894,29 @@ private: SwNodeIndex *GetFootEndNoteSection( const String& rName ); void DeleteFootEndNoteImpl(); - // Line-Break am Ende eines Absatzes entfernen + // Remove line break at the end of a paragraph xub_StrLen StripTrailingLF(); - // Einen leeren Absatz an der PaM-Position entfernen - void StripTrailingPara(); - // sind im aktuellen Absatz Fly-Frames vorhanden? + // Remove an empty paragraph at the PaM position. Review Comment: Note you deleted a method here: void StripTrailingPara(); The following comment may be translated as: Are there any visible Fly-Frames in the current paragraph? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4078,23 +4064,23 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) } } - // einen neuen Absatz aufmachen + // create new paragraph SwHTMLAppendMode eMode = AM_NORMAL; switch( nToken ) { case HTML_LISTING_ON: case HTML_XMP_ON: - // Diese beiden Tags werden jetzt auf die PRE-Vorlage gemappt. - // Fuer dem Fall, dass ein CLASS angegeben ist, loeschen wir - // es damit wir nicht die CLASS der PRE-Vorlage bekommen. + // These two tags are now mapped to the PRE template. + // In the case that a CLASS is specified, we delete it + // it so we don't get the CLASS of the PRE template. Review Comment: "it" is repeated ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4162,18 +4148,18 @@ void SwHTMLParser::EndTxtFmtColl( int nToken ) else if( AM_SPACE==eMode ) AddParSpace(); - // den aktuellen Kontext vom Stack holen + // get the current context from the stack _HTMLAttrContext *pCntxt = PopContext( static_cast< sal_uInt16 >(nToken & ~1) ); - // und noch Attribute beenden + // and close end Attribute Review Comment: either "close" or "end". Also, remove the capital from "Attribute" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4399,11 +4384,11 @@ void SwHTMLParser::EndDefListItem( int nToken, sal_Bool bSetColl, sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly, sal_Bool bSurroundOnly ) const { - // bNoSurroundOnly: Der Absatz enthaelt mindestens einen Rahmen - // ohne Umlauf - // bSurroundOnly: Der Absatz enthaelt mindestens einen Rahmen - // mit Umlauf aber keinen ohne Umlauf - // sonst: Der Absatz enthaelt irgendeinen Rahmen + // bNoSurroundOnly: The paragraph contains at least one frame + // without text flow + // bSurroundOnly: The paragraph contains at least one frame + // with a text flow but none without a text flow + // else: the paragraph contains some frame Review Comment: "some frame" -> "at least one frame" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -621,39 +620,38 @@ void __EXPORT SwHTMLParser::Continue( int nToken ) pDoc->GetDocShell()->EnableSetModified( sal_False ); } - // waehrend des einlesens kein OLE-Modified rufen + // during read. do not call OLE-Modify Link aOLELink( pDoc->GetOle2Link() ); pDoc->SetOle2Link( Link() ); sal_Bool bModified = pDoc->IsModified(); bool const bWasUndo = pDoc->GetIDocumentUndoRedo().DoesUndo(); pDoc->GetIDocumentUndoRedo().DoUndo(false); - // Wenn der Import abgebrochen wird, kein Continue mehr rufen. - // Falls ein Pending-Stack existiert aber durch einen Aufruf - // von NextToken dafuer sorgen, dass der Pending-Stack noch - // beendet wird. + // If Import aborts, do not call Continue. + // if a Pending-Stack exists, call NextToken. + // NextToken will take care of clean up. if( SVPAR_ERROR == eState ) { ASSERT( !pPendStack || pPendStack->nToken, - "SwHTMLParser::Continue: Pending-Stack ohne Token" ); + "SwHTMLParser::Continue: Pending-Stack without Token" ); if( pPendStack && pPendStack->nToken ) NextToken( pPendStack->nToken ); ASSERT( !pPendStack, - "SwHTMLParser::Continue: Es gibt wieder einen Pend-Stack" ); + "SwHTMLParser::Continue: a Pend-Stack exists again" ); Review Comment: there is still a Pend-Stack ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -698,31 +696,31 @@ void __EXPORT SwHTMLParser::Continue( int nToken ) SetAttr( sal_False ); - // Noch die erst verzoegert gesetzten Styles setzen + // set deferred Styles pCSS1Parser->SetDelayedStyles(); } - // den Start wieder korrigieren + // fix Start Review Comment: fix ...again? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -752,12 +750,12 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() ) { if( nMissingImgMaps ) { - // es fehlen noch ein paar Image-Map zuordungen. - // vielleicht sind die Image-Maps ja jetzt da? + // some image map assigns are missing. + // maybe Image-Maps do exist now? Review Comment: some image maps were not assigned. Maybe their Image-Maps are already there? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -2833,7 +2821,7 @@ void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable, const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); ASSERT( FLY_AT_PARA == rAnchor.GetAnchorId(), - "Nur Auto-Rahmen brauchen eine Spezialbehandlung" ); + "Only car frames need special treatment" ); Review Comment: "car frames"? :-) Maybe "Auto-frames"? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -2009,13 +2001,13 @@ void __EXPORT SwHTMLParser::NextToken( int nToken ) break; case HTML_UNKNOWNCONTROL_ON: - // Im Header muss der Inhalt von unbekannten Token ignoriert werden, - // es sei denn, das Token faengt mit einem '!' an. + // Integrate unkown tokens to the header, + // exept token starts with '!' Review Comment: Should this rather be: In the header we must ignore the content of unknown tokens, except for those starting with '!" ? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -2930,34 +2917,34 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem ) void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, sal_Bool bChkEmpty ) { - ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" ); - // Der Listenkopf ist im Attribut gespeichert + ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: untested ppDepAttr-Feature?" ); + // The list header is stored in the attribute _HTMLAttr **ppHead = pAttr->ppHead; - ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" ); + ASSERT( ppHead, "no attribute list header found!" ); - // die aktuelle Psoition als Ende-Position merken + // remember the current psoition as the end position const SwNodeIndex* pEndIdx = &pPam->GetPoint()->nNode; xub_StrLen nEndCnt = pPam->GetPoint()->nContent.GetIndex(); - // WIrd das zueltzt gestartete oder ein frueher gestartetes Attribut - // beendet? + // Is the last started or a previously started attribute + // finished? _HTMLAttr *pLast = 0; if( ppHead && pAttr != *ppHead ) { - // Es wird nicht das zuletzt gestartete Attribut beendet + // The last started attribute is not terminated - // Dann suche wir das unmittelbar danach gestartete Attribut, das - // ja ebenfalls noch nicht beendet wurde (sonst stuende es nicht - // mehr in der Liste + // Then we search for the attribute that was started immediately afterwards, which + // has not been finished yet either (otherwise it would not be + // more in the list Review Comment: more -> any more ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -673,15 +671,15 @@ void __EXPORT SwHTMLParser::Continue( int nToken ) EndObject(); } - // ggf. ein noch vorhandes LF hinter dem letzen Absatz entfernen + // remove LF behind last paragaf if exists if( IsNewDoc() ) bLFStripped = StripTrailingLF() > 0; - // noch offene Nummerierungen beenden. + // end open nummerations. Review Comment: end any numberings still in progress ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4370,26 +4355,26 @@ void SwHTMLParser::EndDefListItem( int nToken, sal_Bool bSetColl, } break; case HTML_DEFLIST_ON: - // keine DD/DT ausserhalb der aktuelen DefListe betrachten + // do not consider DD/DT outside the current def list case HTML_DIRLIST_ON: case HTML_MENULIST_ON: case HTML_ORDERLIST_ON: case HTML_UNORDERLIST_ON: - // und auch nicht ausserhalb einer anderen Liste + // and also not outside of another list nPos = nContextStMin; break; } } - // und noch Attribute beenden + // and close end Attribute Review Comment: either "close" or "end". I also think that "noch" shall be translated somehow, but I have no idea how, as I do not fully understand the context. ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3096,43 +3082,43 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr ) { - // Hier darf es keine vorlauefigen Absatz-Attribute geben, den die - // koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!! + // There must not be any leading paragraph attributes here, because the + // could be set now and then the pointers are invalid!!! ASSERT( !aParaAttrs.Count(), - "Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" ); + "Highest risk: There are still non-final paragraph attributes" ); if( aParaAttrs.Count() ) aParaAttrs.Remove( 0, aParaAttrs.Count() ); - // Der Listenkopf ist im Attribut gespeichert + // The list header is stored in the attribute _HTMLAttr **ppHead = pAttr->ppHead; - ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" ); + ASSERT( ppHead, "no attributes list header found!" ); - // Wird das zueltzt gestartete oder ein frueher gestartetes Attribut - // entfernt? + // Is the attribute that was started last or an attribute that was started earlier + // removed? _HTMLAttr *pLast = 0; if( ppHead && pAttr != *ppHead ) { - // Es wird nicht das zuletzt gestartete Attribut beendet + // The last started attribute is not terminated - // Dann suche wir das unmittelbar danach gestartete Attribut, das - // ja ebenfalls noch nicht beendet wurde (sonst stuende es nicht - // mehr in der Liste + // Then we search for the attribute that was started immediately afterwards, which + // has not been finished yet either (otherwise it would not be + // more in the list Review Comment: more -> any more ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -1267,8 +1263,8 @@ void __EXPORT SwHTMLParser::NextToken( int nToken ) if( IsNewDoc() ) { InsertBodyOptions(); - // Falls es eine Vorlage fuer die erste oder rechte Seite gibt, - // setzen wir die hier. + // If there is a template for the first or right side, Review Comment: side -> page ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3181,18 +3167,18 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab ) void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, sal_Bool bMoveEndBack ) { - // Hier darf es keine vorlauefigen Absatz-Attribute geben, den die - // koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!! + // There must not be any leading paragraph attributes here, because the + // could be set now and then the pointers are invalid!!! ASSERT( !aParaAttrs.Count(), - "Hoechste Gefahr: Es gibt noch nicht-endgueltige Absatz-Attribute" ); + "Highest risk: There are still non-final paragraph attributes" ); if( aParaAttrs.Count() ) aParaAttrs.Remove( 0, aParaAttrs.Count() ); const SwNodeIndex& nSttIdx = pPam->GetPoint()->nNode; SwNodeIndex nEndIdx( nSttIdx ); - // alle noch offenen Attribute beenden und hinter der Tabelle - // neu aufspannen + // terminate all attributes still open and span behind the table + // span again Review Comment: "span again" seems to be spurious here ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -2930,34 +2917,34 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem ) void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, sal_Bool bChkEmpty ) { - ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" ); - // Der Listenkopf ist im Attribut gespeichert + ASSERT( !ppDepAttr, "SwHTMLParser::EndAttr: untested ppDepAttr-Feature?" ); + // The list header is stored in the attribute _HTMLAttr **ppHead = pAttr->ppHead; - ASSERT( ppHead, "keinen Attributs-Listenkopf gefunden!" ); + ASSERT( ppHead, "no attribute list header found!" ); - // die aktuelle Psoition als Ende-Position merken + // remember the current psoition as the end position const SwNodeIndex* pEndIdx = &pPam->GetPoint()->nNode; xub_StrLen nEndCnt = pPam->GetPoint()->nContent.GetIndex(); - // WIrd das zueltzt gestartete oder ein frueher gestartetes Attribut - // beendet? + // Is the last started or a previously started attribute + // finished? _HTMLAttr *pLast = 0; if( ppHead && pAttr != *ppHead ) { - // Es wird nicht das zuletzt gestartete Attribut beendet + // The last started attribute is not terminated - // Dann suche wir das unmittelbar danach gestartete Attribut, das - // ja ebenfalls noch nicht beendet wurde (sonst stuende es nicht - // mehr in der Liste + // Then we search for the attribute that was started immediately afterwards, which + // has not been finished yet either (otherwise it would not be + // more in the list pLast = *ppHead; while( pLast && pLast->GetNext() != pAttr ) pLast = pLast->GetNext(); - ASSERT( pLast, "Attribut nicht in eigener Liste gefunden!" ); + ASSERT( pLast, "Attribute not found in own list!" ); - // das Attribut nicht an der PaM-Psoition beenden, sondern da, - // wo das danch gestartete Attribut anfing??? + // Do not end the attribute at the PaM psoition, but there, + // where the attribute started after that??? Review Comment: [...]PaM position, but there, where did the attribute start? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3261,8 +3247,8 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, } } - // den Start des Attributs neu setzen und die Verkettungen - // aufbrechen + // reset the start of the attribute and the concatenations + // break Review Comment: ... and break the concatenations ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3641,16 +3627,16 @@ void SwHTMLParser::NewFontAttr( int nToken ) if( HTML_FONT_ON != nToken ) { - // HTML_BIGPRINT_ON oder HTML_SMALLPRINT_ON + // HTML_BIGPRINT_ON or HTML_SMALLPRINT_ON - // in Ueberschriften bestimmt die aktuelle Ueberschrift - // die Font-Hoehe und nicht BASEFONT + // in headings, the current heading determines + // the font height and not BASEFONT sal_uInt16 nPoolId = GetCurrFmtColl()->GetPoolFmtId(); if( (nPoolId>=RES_POOLCOLL_HEADLINE1 && nPoolId<=RES_POOLCOLL_HEADLINE6) ) { - // wenn die Schriftgroesse in der Ueberschrift noch - // nicht veraendert ist, die aus der Vorlage nehmen + // if the font size in the heading is not yet changed + // is not changed, take the one from the template. Review Comment: extra "is not changed" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -3249,9 +3235,9 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, } else if( pPrev ) { - // Wenn das Attribut nicht gesetzt vor der Tabelle - // gesetzt werden muss, muessen der Previous-Attribute - // trotzdem gesetzt werden. + // If the attribute is not set before the table + // the Previous attribute must be set Review Comment: "must be set" is repeated ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4432,10 +4417,10 @@ sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly, } else { - // fix #42282#: Wenn Rahmen mit Umlauf gesucht sind, - // auch keine mit Durchlauf beachten. Dabei handelt es - // sich (noch) um HIDDEN-Controls, und denen weicht man - // besser auch nicht aus. + // fix #42282#: If frames with circulation are wanted, + // do not consider any with circulation either. These are + // are (still) HIDDEN controls, and it's better not to // avoid them. + // better not to avoid them. Review Comment: Watch out for repetitions here ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4865,21 +4848,21 @@ void SwHTMLParser::InsertSpacer() MapMode(MAP_TWIP) ).Height(); } - // einen Absatz-Abstand setzen + // set a paragraph spacing SwTxtNode *pTxtNode = 0; if( !pPam->GetPoint()->nContent.GetIndex() ) { - // den unteren Absatz-Abstand des vorherigen Nodes aendern, - // wenn moeglich + // change the lower paragraph spacing of the previous node, + // if possible SetAttr(); // noch offene Absatz-Attribute setzen Review Comment: Set more open paragraph attributes ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4413,12 +4398,12 @@ sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly, { SwFrmFmt *const pFmt = rFrmFmtTbl[i]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); - // Ein Rahmen wurde gefunden, wenn - // - er absatzgebunden ist, und - // - im aktuellen Absatz verankert ist, und - // - jeder absatzgebunene Rahmen zaehlt, oder - // - (nur Rahmen oder umlauf zaehlen und ) der Rahmen keinen - // Umlauf besitzt + // A frame has been found if + // - it is paragraph-bound, and + // - it is anchored in the current paragraph, and + // - every paragraph-bound frame counts, or + // - (only frames or text flow counts) the frame has no + // text flow Review Comment: The last two bullet points are indented to the right in the original comment. I think this has a meaning. ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -5004,27 +4987,27 @@ void SwHTMLParser::InsertIDOption() void SwHTMLParser::InsertLineBreak() { - // <BR CLEAR=xxx> wird wie folgt behandelt: - // 1.) Es werden nur nur absatzgebundene Rahmen betrachtet, die - // im aktuellen Absatz verankert sind. - // 2.) Fuer linksbuendig ausgerichtete Rahmen wird bei CLEAR=LEFT - // oder ALL und auf rechtsbuendige ausgerichtete Rahmen bei - // CLEAR=RIGHT oder ALL der Durchlauf wie folgt geaendert: - // 3.) Wenn der Absatz keinen Text enthaelt, bekommt der Rahmen keinen - // Umlauf - // 4.) sonst erhaelt ein links ausgerichteter Rahmen eine rechten - // "nur Anker" Umlauf und recht rechst ausg. Rahmen einen linken - // "nur Anker" Umlauf. - // 5.) wenn in einem nicht-leeren Absatz der Umlauf eines Rahmens - // geaendert wird, wird ein neuer Absatz aufgemacht - // 6.) Wenn von keinem Rahmen der Umlauf geaendert wird, wird ein - // harter Zeilenumbruch eingefuegt - - String aId, aStyle, aClass; // die ID der Bookmark + // <BR CLEAR=xxx> is handled as follows: + // 1.) Only paragraph-bound frames are considered, which are + // are anchored in the current paragraph. + // 2.) For left-aligned frames at CLEAR=LEFT + // or ALL and for right oriented frames with + // CLEAR=RIGHT or ALL the pass is changed as follows: + // 3.) If the paragraph contains no text, the frame gets no + // text flow + // 4.) otherwise a left aligned frame receives a right + // "anchor only" text flow and right aligned frame receives a + // left anchor only" text flow. Review Comment: Quotes missing between "left" and "anchor" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4546,17 +4530,16 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) aItemSet.Set( rCollSet ); pItemSet->Put( aItemSet ); } - // aber die Attribute, die aktuelle Vorlage setzt - // entfernen, weil sie sonst spaeter ueberschrieben - // werden + // but remove the attributes that the current template sets + // because otherwise they will be overwritten later. pItemSet->Differentiate( pNewColl->GetAttrSet() ); } pCollToSet = pNewColl; } else { - // hart Attributieren + // set attributes hard Review Comment: Force attributes ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4528,14 +4513,13 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) if( bSetThis ) { - // wenn jetzt eine andere Vorlage gesetzt werden soll als - // bisher, muss die bishere Vorlage durch harte Attributierung - // ersetzt werden - + // if now another template should be set than + // previously, the previous template must be replaced by hard attributes + // must be replaced if( pCollToSet ) { - // die Attribute, die die bisherige Vorlage setzt - // hart einfuegen + // the attributes set by the previous template + // insert hard Review Comment: Force the attributes set by the previous template ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4479,16 +4464,16 @@ const SwFmtColl *SwHTMLParser::GetCurrFmtColl() const void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) { - SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage - SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs + SwTxtFmtColl *pCollToSet = 0; // the template to be set + SfxItemSet *pItemSet = 0; // the set for hard attributes sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0; const String& rTopClass = pContext ? pContext->GetClass() : (const String&) aEmptyStr; sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT; - sal_Bool bInPRE=sal_False; // etwas Kontext Info + sal_Bool bInPRE=sal_False; // some context info - sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // die Einzuege und - short nFirstLineIndent = 0; // Abstaende + sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // the margins and + short nFirstLineIndent = 0; // Intend Review Comment: Intend -> Indent ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4819,18 +4802,18 @@ void SwHTMLParser::InsertSpacer() { case HTML_SPTYPE_BLOCK: { - // einen leeren Textrahmen anlegen + // create an empty text frame - // den Itemset holen + // get the itemset SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) Reader::ResetFrmFmtAttrs( aFrmSet ); - // den Anker und die Ausrichtung setzen + // set the anchor and the alignment SetAnchorAndAdjustment( eVertOri, eHoriOri, aFrmSet ); - // und noch die Groesse des Rahmens + // and still the size of the frame Review Comment: "still" -> "again" ? or "also"? ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4528,14 +4513,13 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) if( bSetThis ) { - // wenn jetzt eine andere Vorlage gesetzt werden soll als - // bisher, muss die bishere Vorlage durch harte Attributierung - // ersetzt werden - + // if now another template should be set than + // previously, the previous template must be replaced by hard attributes + // must be replaced Review Comment: Watch for repetition of "must be replaced" ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -5136,18 +5119,18 @@ void SwHTMLParser::InsertLineBreak() if( !bCleared && !bBreakItem ) { - // wenn kein CLEAR ausgefuehrt werden sollte oder konnte, wird - // ein Zeilenumbruch eingef?gt + // if no CLEAR should be executed or could be executed + // a line break is inserted String sTmp( (sal_Unicode)0x0a ); // make the Mac happy :-) pDoc->InsertString( *pPam, sTmp ); } else if( pPam->GetPoint()->nContent.GetIndex() ) { - // wenn ein Claer in einem nicht-leeren Absatz ausgefuehrt wurde, - // muss anschliessen ein neuer Absatz aufgemacht werden - // MIB 21.02.97: Eigentlich muesste man hier den unteren Absatz- - // Absatnd auf 0 drehen. Das geht aber bei sowas wie <BR ..><P> - // schief (>Netacpe). Deshalb lassen wir das erstmal. + // if a claer was executed in a non-empty paragraph, + // a new paragraph must be opened afterwards. + // MIB 21.02.97: Actually, the lower paragraph should be set to 0. + // But this works with something like <BR ..><P>. + // (>Netacpe). Therefore we leave it for now. AppendTxtNode( AM_NOSPACE ); Review Comment: If a **Clear** was executed in a non-empty paragraph, **then** a new paragraph must be opened afterwards. MIB 21.02.97: actually, the lower paragraph **spacing** should be set to 0. But this works with something like `<BR ..><P>` (>**Netscape**). Therefore we leave it for now. ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4730,15 +4713,15 @@ void SwHTMLParser::NewCharFmt( int nToken ) } } - // einen neuen Kontext anlegen + // set up a new context _HTMLAttrContext *pCntxt = new _HTMLAttrContext( static_cast< sal_uInt16 >(nToken) ); - // die Vorlage setzen und im Kontext merken + // Set the template und im Kontext merken Review Comment: Set the template and store it in the context ########## main/sw/source/filter/html/swhtml.cxx: ########## @@ -4865,21 +4848,21 @@ void SwHTMLParser::InsertSpacer() MapMode(MAP_TWIP) ).Height(); } - // einen Absatz-Abstand setzen + // set a paragraph spacing SwTxtNode *pTxtNode = 0; if( !pPam->GetPoint()->nContent.GetIndex() ) { - // den unteren Absatz-Abstand des vorherigen Nodes aendern, - // wenn moeglich + // change the lower paragraph spacing of the previous node, + // if possible SetAttr(); // noch offene Absatz-Attribute setzen pTxtNode = pDoc->GetNodes()[pPam->GetPoint()->nNode.GetIndex()-1] ->GetTxtNode(); - // Wenn der Abstz davor kein Txtenode ist, dann wird jetzt - // ein leere Absatz angelegt, der eh schon eine Zeilenhoehe - // Abstand erzeugt. + // If the paragraph in front of it is not a txttenode, then now + // an empty paragraph is created which already creates a line height + // spacing is created. Review Comment: Remove the last "is created" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org