Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2617

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/17/2617/1

Translate german comments in sw/source/filter/ww8/wrtww8.cxx

Please, only apply this patch if you are a native speaking German.
I'm not a native speaker, so a double check is really necessary
and appreciated.

Thanks in advance.

Change-Id: Ic2fb6e97007c6b47851ad8a7a51e987da5a70877
---
M sw/source/filter/ww8/docxexportfilter.cxx
M sw/source/filter/ww8/wrtw8nds.cxx
M sw/source/filter/ww8/wrtw8num.cxx
M sw/source/filter/ww8/wrtww8.hxx
M sw/source/filter/ww8/wrtww8gr.cxx
5 files changed, 114 insertions(+), 127 deletions(-)



diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 8149b36..2226ed3 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -86,10 +86,8 @@
     return true;
 }
 
-//////////////////////////////////////////////////////////////////////////
-// UNO stuff so that the filter is registered
-//////////////////////////////////////////////////////////////////////////
 
+// UNO stuff so that the filter is registered
 #define IMPL_NAME "com.sun.star.comp.Writer.DocxExport"
 
 OUString DocxExport_getImplementationName()
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 9881fff..3112569 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -315,13 +315,13 @@
         for( i = 0; i < pTxtAttrs->Count(); i++ )
         {
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
-            nPos = *pHt->GetStart();    // gibt erstes Attr-Zeichen
+            nPos = *pHt->GetStart();    // give first Attr characters
             if( nPos >= nStartPos && nPos <= nMinPos )
                 nMinPos = nPos;
 
-            if( pHt->GetEnd() )         // Attr mit Ende
+            if( pHt->GetEnd() )         // Attr to end
             {
-                nPos = *pHt->GetEnd();      // gibt letztes Attr-Zeichen + 1
+                nPos = *pHt->GetEnd();      // give last Attr character + 1
                 if( nPos >= nStartPos && nPos <= nMinPos )
                     nMinPos = nPos;
             }
@@ -482,7 +482,7 @@
 
         m_rExport.ExportPoolItemsToCHP( aExportItems, GetScript() );
 
-        // HasTextItem nur in dem obigen Bereich erlaubt
+        // HasTextItem only allowed in the above range
         m_rExport.m_aCurrentCharPropStarts.pop();
         m_rExport.pOutFmtNode = pOldMod;
     }
@@ -580,12 +580,11 @@
     return false;
 }
 
-// HasItem ist fuer die Zusammenfassung des Doppel-Attributes Underline
-// und WordLineMode als TextItems. OutAttr() ruft die Ausgabefunktion,
-// die dann ueber HasItem() nach anderen Items an der
-// Attribut-Anfangposition fragen kann.
-// Es koennen nur Attribute mit Ende abgefragt werden.
-// Es wird mit bDeep gesucht
+//HasItem is for the summary of the double attributes: Underline and WordlineMode as TextItems.
+// OutAttr () calls the output function, which can then can call HasItem () for other items at the
+// beginning of the selected position.
+// It can only be retrieved by the end attributes.
+// It searches with bDeep
 const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
 {
     const SfxPoolItem* pRet = 0;
@@ -599,15 +598,15 @@
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
             const SfxPoolItem* pItem = &pHt->GetAttr();
             const xub_StrLen* pAtrEnd = 0;
-            if( 0 != ( pAtrEnd = pHt->GetEnd() ) &&     // nur Attr mit Ende
-                nWhich == pItem->Which() &&             //
+            if( 0 != ( pAtrEnd = pHt->GetEnd() ) &&     // only Attr with an end
+                nWhich == pItem->Which() &&
                 nTmpSwPos >= *pHt->GetStart() && nTmpSwPos < *pAtrEnd )
             {
-                pRet = pItem;       // gefunden
+                pRet = pItem;       // found it
                 break;
             }
             else if (nTmpSwPos < *pHt->GetStart())
-                break;              // dann kommt da nichts mehr
+                break;              // nothing more to come
         }
     }
     return pRet;
@@ -856,7 +855,7 @@
     sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
     m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
 
-//  WinWord 2000 doesn't write this - so its a temp solution by W97 ?
+    // WinWord 2000 doesn't write this - so its a temp solution by W97 ?
     m_rWW8Export.WriteChar( 0x01 );
 
     static sal_uInt8 aArr1[] = {
@@ -974,7 +973,6 @@
         // an write some data to the data stream, but dont ask
         // what the data mean, except for the URL.
         // The First piece is the WW8_PIC structure.
-        //
         static sal_uInt8 MAGIC_B[] = {
             0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
             0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
@@ -1177,7 +1175,7 @@
                     break;
             }
         }
-        m_rExport.m_aCurrentCharPropStarts.pop(); // HasTextItem nur in dem obigen Bereich erlaubt
+        m_rExport.m_aCurrentCharPropStarts.pop(); // HasTextItem only allowed in the above range
     }
     return nRet;
 }
@@ -1811,8 +1809,8 @@
             nNextAttr = nEnd;
 
         aAttrIter.OutFlys( nAktPos );
-        //Append bookmarks in this range after flys, exclusive of final
-        //position of this range
+        // Append bookmarks in this range after flys, exclusive of final
+        // position of this range
         AppendBookmarks( rNode, nAktPos, nNextAttr - nAktPos );
         bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos );
         nOpenAttrWithRange += aAttrIter.OutAttrWithRange(nAktPos);
@@ -2376,9 +2374,8 @@
         ++aIt;
     }
 }
-//---------------------------------------------------------------------------
-//       Tabellen
-//---------------------------------------------------------------------------
+
+// Tables
 
 void WW8AttributeOutput::EmptyParagraph()
 {
@@ -2431,8 +2428,8 @@
     if ( !rNd.IsSectionNode() && !IsInTable() ) //No sections in table
     {
         // Bug 74245 - if the first Node inside the section has an own
-        //              PageDesc or PageBreak attribut, then dont write
-        //              here the section break
+        // PageDesc or PageBreak attribut, then dont write
+        // here the section break
         sal_uLong nRstLnNum = 0;
         const SfxItemSet* pSet;
         if ( rNd.IsTableNode() )
@@ -2456,7 +2453,7 @@
             const SwSectionFmt& rFmt = *rSection.GetFmt();
             ReplaceCr( msword::PageBreak ); // Indikator fuer Page/Section-Break
 
-            //Get the page in use at the top of this section
+            // Get the page in use at the top of this section
             SwNodeIndex aIdxTmp(rSectionNode, 1);
             const SwPageDesc *pCurrent =
                 SwPageDesc::GetPageDescOfNode(aIdxTmp.GetNode());
@@ -2476,10 +2473,7 @@
     pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
 }
 
-
-//---------------------------------------------------------------------------
-//       Flys
-//---------------------------------------------------------------------------
+// Flys
 
 void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
 {
@@ -2494,7 +2488,7 @@
             const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
             if( RES_TXTATR_FLYCNT == pAttr->Which() )
             {
-                // zeichengebundenes Attribut
+                // character attribute bound
                 const SwFmtFlyCnt& rFlyCntnt = pAttr->GetFlyCnt();
                 const SwFlyFrmFmt& rFlyFrmFmt = *(SwFlyFrmFmt*)rFlyCntnt.GetFrmFmt();
                 const SwNodeIndex* pNodeIndex = rFlyFrmFmt.GetCntnt().GetCntntIdx();
@@ -2507,21 +2501,21 @@
                     if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
                     {
                         Point aOffset;
-                        // Rechtecke des Flys und des Absatzes besorgen
+                        // right corner of the Flys and the paragraph obtain
                         SwRect aParentRect(rNd.FindLayoutRect(false, &aOffset)),
                                aFlyRect(rFlyFrmFmt.FindLayoutRect(false, &aOffset ) );
 
                         aOffset = aFlyRect.Pos() - aParentRect.Pos();
 
-                        // PaM umsetzen: auf Inhalt des Fly-Frameformats
+                        // PaM conversion: content on the fly-frame format
                         SaveData( nStt, nEnd );
 
-                        // wird in OutputFormat() ausgewertet
+                        // is analysed in OutputFormat()
                         pFlyOffset = &aOffset;
                         eNewAnchorType = rFlyFrmFmt.GetAnchor().GetAnchorId();
                         sw::Frame aFrm(rFlyFrmFmt, SwPosition(rNd));
                         mpParentFrame = &aFrm;
-                        // Ok, rausschreiben:
+                        // Ok, write it out:
                         WriteText();
 
                         RestoreData();
@@ -2574,7 +2568,7 @@
         sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1                  : 0;
         sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
 
-        if( nStt >= nEnd )      // kein Bereich, also kein gueltiger Node
+        if( nStt >= nEnd )      // no range, also no valid node
             return;
 
         if ( !m_rWW8Export.IsInTable() && rFmt.IsInline() )
@@ -2610,10 +2604,9 @@
                  !m_rWW8Export.pDoc->GetNodes()[ nStt ]->IsNoTxtNode()
                )
             {
-                // Beachten: Flag  bOutTable  wieder setzen,
-                //           denn wir geben ja ganz normalen Content der
-                //           Tabelenzelle aus und keinen Rahmen
-                //           (Flag wurde oben in  aSaveData()  geloescht)
+                // note: set Flag  bOutTable again,
+                // because we deliver the normal content of the table cell, and no border
+                // ( Flag will be deleted in aSaveData() )
                 m_rWW8Export.bOutTable = true;
                 const String& rName = rFrmFmt.GetName();
                 m_rWW8Export.StartCommentOutput(rName);
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 830c261..d0459a1 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -64,7 +64,7 @@
 
     nNumId = GetId( *pMyNumRule );
 
-    //Map the old list to our new list
+    // Map the old list to our new list
     aRuleDuplicates[GetId( *pRule )] = nNumId;
 
     return nNumId;
@@ -94,7 +94,7 @@
 
         if ( !bOutlineRuleAdded )
         {
-            // jetzt noch die OutlineRule einfuegen
+            // still need to paste the OutlineRule
             SwNumRule* pR = (SwNumRule*)pDoc->GetOutlineNumRule();
             pUsedNumTbl->push_back( pR );
         }
@@ -102,7 +102,7 @@
     SwNumRule* p = (SwNumRule*)&rNumRule;
     sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
 
-    //Is this list now duplicated into a new list which we should use
+    // Is this list now duplicated into a new list which we should use
     // #i77812# - perform 'deep' search in duplication map
     ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
     do {
@@ -116,8 +116,8 @@
     return nRet;
 }
 
-//GetFirstLineOffset should problem never appear unadorned apart from
-//here in the ww export filter
+// GetFirstLineOffset should problem never appear unadorned apart from
+// here in the ww export filter
 sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt)
 {
     OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION,
@@ -158,7 +158,7 @@
     SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
     SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
 
-    // mit keinen Styles verbunden
+    // not associated with a Style
     for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
         SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
 
@@ -594,7 +594,7 @@
 {
     ByteToSVBT8(11, rAnlv.nfc);
 
-    sal_uInt8 nb = 0;                                // Zahlentyp
+    sal_uInt8 nb = 0;                                // type of number
     switch (rFmt.GetNumAdjust())
     {
         case SVX_ADJUST_RIGHT:
@@ -793,7 +793,7 @@
     sal_uInt8 aSprmAnld[54];
 
     memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
-    WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2);  // handlicher Pointer
+    WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2);  // handy pointer
 
     sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
     sal_uInt16 nCharLen = 31;
@@ -803,12 +803,12 @@
     else
         BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
 
-    // ... und raus damit
+    // ... spite it out
     OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
 }
 
 
-// Return: ist es eine Gliederung ?
+// Return: there is a breakdown?
 bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
 {
     int nLevel = pNd->GetActualListLevel();
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index d9d82d8..faebc9e 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -254,9 +254,8 @@
             const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag,  sal_uInt8 
nBreakCode);
 };
 
-//--------------------------------------------------------------------------
-// class WW8_WrPct zum Aufbau der Piece-Table
-//--------------------------------------------------------------------------
+
+// class WW8_WrPct to construct the piece table
 class WW8_WrPct
 {
     boost::ptr_vector<WW8_WrPc > aPcts;
@@ -324,11 +323,11 @@
 class DrawObj
 {
 public:
-    WW8_CP mnCp;                // CP-Pos der Verweise
-    sal_uInt32 mnShapeId;           // ShapeId for the SwFrmFmts
+    WW8_CP mnCp;                // CP-Pos reference
+    sal_uInt32 mnShapeId;       // ShapeId for the SwFrmFmts
     sw::Frame maCntnt;          // the frame itself
     Point maParentPos;          // Points
-    sal_Int32 mnThick;              // Border Thicknesses
+    sal_Int32 mnThick;          // Border Thicknesses
     short mnDirection;          // If BiDi or not
     unsigned int mnHdFtIndex;   // 0 for main text, +1 for each subsequent
                                 // msword hd/ft
@@ -484,18 +483,18 @@
     WW8_WrPlcAnnotations* pAtn;
     WW8_WrPlcTxtBoxes *pTxtBxs, *pHFTxtBxs;
 
-    const sw::Frame *mpParentFrame; //If set we are exporting content inside
-                                    //a frame, e.g. a graphic node
+    const sw::Frame *mpParentFrame; // If set we are exporting content inside
+                                    // a frame, e.g. a graphic node
 
     Point* pFlyOffset;              // zur Justierung eines im Writer als
     RndStdIds eNewAnchorType;       // Zeichen gebundenen Flys, der im WW
                                     // Absatzgebunden wird.
 
-    WW8_WrPlcFld* pFldMain;         // Felder im Haupttext
-    WW8_WrPlcFld* pFldHdFt;         // Felder in Header/Footer
-    WW8_WrPlcFld* pFldFtn;          // Felder in FootNotes
-    WW8_WrPlcFld* pFldEdn;          // Felder in EndNotes
-    WW8_WrPlcFld* pFldAtn;          // Felder in Annotations
+    WW8_WrPlcFld* pFldMain;         // field in MainText
+    WW8_WrPlcFld* pFldHdFt;         // field in Header/Footer
+    WW8_WrPlcFld* pFldFtn;          // field in FootNotes
+    WW8_WrPlcFld* pFldEdn;          // field in EndNotes
+    WW8_WrPlcFld* pFldAtn;          // field in Annotations
     WW8_WrPlcFld* pFldTxtBxs;       // fields in textboxes
     WW8_WrPlcFld* pFldHFTxtBxs;     // fields in header/footer textboxes
     WW8_WrMagicTable *pMagicTable;  // keeps track of table cell positions, and
@@ -503,7 +502,7 @@
                                     // which is required to make word display
                                     // graphics inside tables
     SwWW8WrGrf* pGrf;
-    const SwAttrSet* pStyAttr;      // StyleAttr fuer Tabulatoren
+    const SwAttrSet* pStyAttr;      // StyleAttr for Tabs
     const SwModify* pOutFmtNode;    // write Format or Node
     const SwFmt *pCurrentStyle;     // iff bStyDef=true, then this store the current style
 
@@ -516,15 +515,15 @@
 
     sal_uInt8 nTxtTyp;
 
-    sal_uInt8 bStyDef : 1;           // wird Style geschrieben ?
-    sal_uInt8 bBreakBefore : 1;      // Breaks werden 2mal ausgegeben
-    sal_uInt8 bOutKF : 1;            // Kopf/Fusstexte werden ausgegeben
-    sal_uInt8 bOutFlyFrmAttrs : 1;   // Rahmen-Attr von Flys werden ausgegeben
+    sal_uInt8 bStyDef : 1;           // Style written ?
+    sal_uInt8 bBreakBefore : 1;      // Breaks are being written 2 times
+    sal_uInt8 bOutKF : 1;            // Header/Footer text are being written
+    sal_uInt8 bOutFlyFrmAttrs : 1;   // Frame-attr of Flys are being written
     sal_uInt8 bOutPageDescs : 1;     ///< PageDescs (section properties) are being written
     sal_uInt8 bOutFirstPage : 1;     // write Attrset of FirstPageDesc
-    sal_uInt8 bOutTable : 1;         // Tabelle wird ausgegeben
-                                //    ( wird zB bei Flys in Tabelle zurueckgesetzt )
-    sal_uInt8 bOutGrf : 1;           // Grafik wird ausgegeben
+    sal_uInt8 bOutTable : 1;         // table are being written
+                                     // ( wird zB bei Flys in Tabelle zurueckgesetzt )
+    sal_uInt8 bOutGrf : 1;           // graphics are being written
     sal_uInt8 bInWriteEscher : 1;    // in write textboxes
     sal_uInt8 bStartTOX : 1;         // true: a TOX is startet
     sal_uInt8 bInWriteTOX : 1;       // true: all content are in a TOX
@@ -1016,7 +1015,7 @@
 
     WW8_CP Fc2Cp( sal_uLong nFc ) const          { return pPiece->Fc2Cp( nFc ); }
 
-            // einige z.T. static halb-interne Funktions-Deklarationen
+            // some z.T. static semi-internal function declarations
 
     void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
                                 { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
@@ -1125,16 +1124,16 @@
     WW8Export& operator=(const WW8Export&);
 };
 
-class WW8_WrPlcSubDoc   // Doppel-Plc fuer Foot-/Endnotes und Postits
+class WW8_WrPlcSubDoc   // double Plc for Footnotes/Endnotes and Postits
 {
 private:
-    //No copying
+    // No copying
     WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&);
     WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&);
 protected:
     std::vector<WW8_CP> aCps;
-    std::vector<const void*> aCntnt;                // PTRARR von SwFmtFtn/PostIts/..
-    WW8_WrPlc0* pTxtPos;            // Pos der einzelnen Texte
+    std::vector<const void*> aCntnt;                // PTRARR of SwFmtFtn/PostIts/..
+    WW8_WrPlc0* pTxtPos;            // position of the individual texts
 
     WW8_WrPlcSubDoc();
     virtual ~WW8_WrPlcSubDoc();
@@ -1146,13 +1145,13 @@
     virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
 };
 
-// Doppel-Plc fuer Footnotes/Endnotes
+// double Plc for Footnotes/Endnotes
 class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
 {
 private:
     sal_uInt8 nTyp;
 
-    //No copying
+    // No copying
     WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
     WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
 public:
@@ -1174,7 +1173,7 @@
     WW8_Annotation(const SwRedlineData* pRedline);
 };
 
-class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc  // Doppel-Plc fuer PostIts
+class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc  // double Plc for Postits
 {
 private:
     //No copying
@@ -1192,8 +1191,8 @@
     void WritePlc( WW8Export& rWrt ) const;
 };
 
-class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
-{                        // Rahmen/DrawTextboxes!
+class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
+{                        // Frame/DrawTextboxes!
 private:
     sal_uInt8 nTyp;
     std::vector<sal_uInt32> aShapeIds;        // VARARR of ShapeIds for the SwFrmFmts
@@ -1217,17 +1216,17 @@
     }
 };
 
-// Plc fuer Chpx und Papx ( incl PN-Plc )
+// Plc forr Chpx and Papx ( incl PN-Plc )
 typedef boost::ptr_vector<WW8_WrFkp> WW8_WrFkpPtrs;
 
-class WW8_WrPlcPn                   // Plc fuer Page Numbers
+class WW8_WrPlcPn                   // Plc ffor Page Numbers
 {
 private:
     WW8Export& rWrt;
     WW8_WrFkpPtrs aFkps;            // PTRARR
     sal_uInt16 nFkpStartPage;
     ePLCFT ePlc;
-    bool bWrtWW8;                   // Fuer Writererkennung
+    bool bWrtWW8;                   // for writer detection
     sal_uInt16 nMark;
 
     //No copying
@@ -1242,12 +1241,12 @@
     sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
 };
 
-// class WW8_WrPlc1 ist erstmal nur fuer Felder
+// class WW8_WrPlc1 is only used for fields
 class WW8_WrPlc1
 {
 private:
     std::vector<WW8_CP> aPos;
-    sal_uInt8* pData;                // Inhalte ( Strukturen )
+    sal_uInt8* pData;                // content ( structures )
     sal_uLong nDataLen;
     sal_uInt16 nStructSiz;
 
@@ -1265,7 +1264,7 @@
     void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
 };
 
-// class WW8_WrPlcFld ist fuer Felder
+// class WW8_WrPlcFld is for fields
 class WW8_WrPlcFld : public WW8_WrPlc1
 {
 private:
@@ -1299,10 +1298,10 @@
 class GraphicDetails
 {
 public:
-    sw::Frame maFly;            // Umgebende FlyFrms dazu
-    sal_uLong mnPos;                // FilePos der Grafiken
-    sal_uInt16 mnWid;               // Breite der Grafiken
-    sal_uInt16 mnHei;               // Hoehe der Grafiken
+    sw::Frame maFly;                // surrounding FlyFrms
+    sal_uLong mnPos;                // FilePos of the graphics
+    sal_uInt16 mnWid;               // Width of the graphics
+    sal_uInt16 mnHei;               // Height of the graphics
 
     GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
         : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
@@ -1318,7 +1317,7 @@
     }
 };
 
-// class SwWW8WrGrf sammelt Grafiken und gibt sie aus
+// class SwWW8WrGrf collects graphics and issues them
 class SwWW8WrGrf
 {
 private:
@@ -1410,9 +1409,8 @@
     rtl_TextEncoding GetNodeCharSet() const     { return eNdChrSet; }
 };
 
-// Die Klasse SwWW8AttrIter ist eine Hilfe zum Aufbauen der Fkp.chpx.
-// Dabei werden nur Zeichen-Attribute beachtet; Absatz-Attribute brauchen
-// diese Behandlung nicht.
+// class SwWW8AttrIter is a help for constructing the Fkp.chpx.
+// Only character attributes are observed; paragraph attributes do not need this treatment.
 // Die Absatz- und Textattribute des Writers kommen rein, und es wird
 // mit Where() die naechste Position geliefert, an der sich die Attribute
 // aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position
@@ -1523,7 +1521,7 @@
 };
 
 sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt);
-//A bit of a bag on the side for now
+// A bit of a bag on the side for now
 String FieldString(ww::eField eIndex);
 String BookmarkToWord(const String &rBookmark);
 
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 6c0c31e..ebb72f0 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -71,10 +71,10 @@
 using namespace ::com::sun::star;
 using namespace nsFieldFlags;
 
-// ToDo:
-// 5. Die MapModes, die Win nicht kann, umrechnen
+// TODO:
+// 5. convert the MapModes that Widows can't
 
-// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm
+// OutGrf () is called for every GrafNode in the document. Es wird ein PicLocFc-Sprm
 // eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
 // in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
 // Grafiken und Patchen der PicLocFc-Attribute )
@@ -381,7 +381,7 @@
 
 void WW8Export::OutGrf(const sw::Frame &rFrame)
 {
-    // GrfNode fuer spaeteres rausschreiben der Grafik merken
+    // GrfNode to write out the graphic settings later
     pGrf->Insert(rFrame);
 
     pChpPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() );
@@ -409,7 +409,7 @@
                    WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
     }
 
-    WriteChar( (char)1 );   // Grafik-Sonderzeichen in Haupttext einfuegen
+    WriteChar( (char)1 );   // paste graphic symbols in the main text
 
     sal_uInt8 aArr[ 18 ];
     sal_uInt8* pArr = aArr;
@@ -465,8 +465,7 @@
     }
     Set_UInt32( pArr, GRF_MAGIC_321 );
 
-    // Magic variieren, damit verschiedene Grafik-Attribute nicht
-    // gemerged werden
+    // vary Magic, so that different graphic attributes will not be merged
     static sal_uInt8 nAttrMagicIdx = 0;
     --pArr;
     Set_UInt8( pArr, nAttrMagicIdx++ );
@@ -480,7 +479,7 @@
          ( ((eAn == FLY_AT_PARA) && ( bWrtWW8 || !IsInTable() )) ||
            (eAn == FLY_AT_PAGE)) )
     {
-        WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
+        WriteChar( (char)0x0d ); // close the surrounding frame with CR
 
         static sal_uInt8 nSty[2] = { 0, 0 };
         pO->insert( pO->end(), nSty, nSty+2 );     // Style #0
@@ -524,7 +523,7 @@
     sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
     sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
 
-            // Crop-AttributInhalt in Header schreiben ( falls vorhanden )
+            // write Crop-Attribut content in Header ( if available )
     const SfxPoolItem* pItem;
     if (pAttrSet && (SFX_ITEM_ON
         == pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
@@ -544,7 +543,7 @@
 
     sal_uInt8 aArr[ 0x44 ] = { 0 };
 
-    sal_uInt8* pArr = aArr + 0x2E;  //Do borders first
+    sal_uInt8* pArr = aArr + 0x2E;  // Do borders first
 
     const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
     if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
@@ -573,8 +572,8 @@
                         pBox->GetDistance( aLnArr[ i ] ), bShadow );
                 }
 
-                //use importer logic to determine how large the exported
-                //border will really be in word and adjust accordingly
+                // use importer logic to determine how large the exported
+                // border will really be in word and adjust accordingly
                 short nSpacing;
                 short nThick = aBrc.DetermineBorderProperties(!bWrtWW8,
                     &nSpacing);
@@ -604,7 +603,7 @@
         }
     }
 
-    pArr = aArr + 4;                                //skip lcb
+    pArr = aArr + 4;                                // skip lcb
     Set_UInt16( pArr, nHdrLen );                    // set cbHeader
 
     Set_UInt16( pArr, mm );                         // set mm
@@ -666,11 +665,11 @@
 
         WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
             rGrfNd.GetpSwAttrSet());
-        rStrm << (sal_uInt8)aFileN.Len();    // Pascal-String schreiben
+        rStrm << (sal_uInt8)aFileN.Len();    // write Pascal-String
         SwWW8Writer::WriteString8(rStrm, aFileN, false,
             RTL_TEXTENCODING_MS_1252);
     }
-    else                                // Embedded File oder DDE oder so was
+    else                                // Embedded File or DDE or something like that
     {
         if (rWrt.bWrtWW8)
         {
@@ -690,7 +689,7 @@
             GDIMetaFile aMeta;
             switch (rGrf.GetType())
             {
-                case GRAPHIC_BITMAP:        // Bitmap -> in Metafile abspielen
+                case GRAPHIC_BITMAP:        // Bitmap -> play in Metafile
                     {
                         VirtualDevice aVirt;
                         aMeta.Record(&aVirt);
@@ -722,7 +721,7 @@
 {
     sal_uInt16 nWidth = rItem.mnWid;
     sal_uInt16 nHeight = rItem.mnHei;
-    sal_uInt32 nPos = rStrm.Tell();         // Grafik-Anfang merken
+    sal_uInt32 nPos = rStrm.Tell();         // store start of graphic
 
     const sw::Frame &rFly = rItem.maFly;
     switch (rFly.GetWriterType())
@@ -836,28 +835,27 @@
             break;
     }
 
-    sal_uInt32 nPos2 = rStrm.Tell();                    // Ende merken
+    sal_uInt32 nPos2 = rStrm.Tell();                    // store the end
     rStrm.Seek( nPos );
     SVBT32 nLen;
-    UInt32ToSVBT32( nPos2 - nPos, nLen );             // Grafik-Laenge ausrechnen
-    rStrm.Write( nLen, 4 );                         // im Header einpatchen
-    rStrm.Seek( nPos2 );                            // Pos wiederherstellen
+    UInt32ToSVBT32( nPos2 - nPos, nLen );             // calculate graphic length
+    rStrm.Write( nLen, 4 );                         // patch it in the header
+    rStrm.Seek( nPos2 );                            // restore Pos
 }
 
-// SwWW8WrGrf::Write() wird nach dem Text gerufen. Es schreibt die alle
-// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
-// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
-// eingepatcht werden koennen.
-// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
-// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
-// hierfuer nur mit GetFPos() sequentiell die Positionen.
+// SwWW8WrGrf::Write() is called after the text.
+// It writes out all the graphics and remembers the file locations of the graphics,
+// so when writing the attributes of the items it can be patched into PicLocFc-SPRMs.
+// The search in the attributes for the Magic sal_uLong and patching
+// happens when writing the attributes. Class SwWW8WrGrf-Klasse provides with
+// GetFPos() sequentially the positions
 void SwWW8WrGrf::Write()
 {
     SvStream& rStrm = *rWrt.pDataStrm;
     myiter aEnd = maDetails.end();
     for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
     {
-        sal_uInt32 nPos = rStrm.Tell();                 // auf 4 Bytes alignen
+        sal_uInt32 nPos = rStrm.Tell();                 // align to 4 Bytes
         if( nPos & 0x3 )
             SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2fb6e97007c6b47851ad8a7a51e987da5a70877
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Joren De Cuyper <joren.libreoffice@telenet.be>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.