diff options
author | Philipp Weissenbacher <Philipp Weissenbacher> | 2012-01-11 16:07:29 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-01-12 09:47:25 +0100 |
commit | 0413cc28fc2e4d251723f7849886b33676303b90 (patch) | |
tree | a1406c09de5ea56f4892f3a3ab483b45eea61241 /sw/source | |
parent | 842523e46f347680ad2648c628c63374524135cd (diff) |
Translate German comments to English
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/docruby.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/docsort.cxx | 211 | ||||
-rw-r--r-- | sw/source/core/doc/poolfmt.cxx | 284 | ||||
-rw-r--r-- | sw/source/core/doc/sortopt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/visiturl.cxx | 13 |
5 files changed, 253 insertions, 265 deletions
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 44969d932837..baea7a78ee6d 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -27,7 +27,7 @@ ************************************************************************/ -#include <string.h> // fuer strchr() +#include <string.h> // for strchr() #include <com/sun/star/i18n/UnicodeType.hdl> #include <com/sun/star/i18n/WordType.hdl> @@ -38,12 +38,12 @@ #include <doc.hxx> #include <IDocumentUndoRedo.hxx> #include <docary.hxx> -#include <mvsave.hxx> // Strukturen zum Sichern beim Move/Delete +#include <mvsave.hxx> // structures for Saving by Move/Delete #include <ndtxt.hxx> #include <txatbase.hxx> #include <rubylist.hxx> #include <pam.hxx> -#include <swundo.hxx> // fuer die UndoIds +#include <swundo.hxx> // for the UndoIds #include <breakit.hxx> #include <crsskip.hxx> diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 6e1ae9d50fdd..69eaedd17619 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -70,12 +70,12 @@ LocaleDataWrapper* SwSortElement::pLclData = 0; SV_IMPL_OP_PTRARR_SORT( SwSortElements, SwSortElementPtr ); /*-------------------------------------------------------------------- - Beschreibung: Ein Sortierelement fuers Sort konstruieren + Description: Construct a SortElement for the Sort --------------------------------------------------------------------*/ void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt, FlatFndBox* pFltBx ) { - OSL_ENSURE( !pDoc && !pOptions && !pBox, "wer hat das Finit vergessen?" ); + OSL_ENSURE( !pDoc && !pOptions && !pBox, "Who forgot to call Finit?" ); pDoc = pD; pOptions = new SwSortOptions( rOpt ); pBox = pFltBx; @@ -128,7 +128,7 @@ double SwSortElement::StrToDouble( const String& rStr ) const } /*-------------------------------------------------------------------- - Beschreibung: Operatoren zum Vergleichen + Description: Comparison operators --------------------------------------------------------------------*/ sal_Bool SwSortElement::operator==(const SwSortElement& ) { @@ -136,13 +136,12 @@ sal_Bool SwSortElement::operator==(const SwSortElement& ) } /*-------------------------------------------------------------------- - Beschreibung: Kleiner-Operator fuers sortieren + Description: Less-than operator for sorting --------------------------------------------------------------------*/ sal_Bool SwSortElement::operator<(const SwSortElement& rCmp) { - // der eigentliche Vergleich - // + // The actual comparison for(sal_uInt16 nKey = 0; nKey < pOptions->aKeys.Count(); ++nKey) { const SwSortElement *pOrig, *pCmp; @@ -193,7 +192,7 @@ double SwSortElement::GetValue( sal_uInt16 nKey ) const } /*-------------------------------------------------------------------- - Beschreibung: SortierElemente fuer Text + Description: SortingElement for Text --------------------------------------------------------------------*/ SwSortTxtElement::SwSortTxtElement(const SwNodeIndex& rPos) : nOrg(rPos.GetIndex()), aPos(rPos) @@ -205,7 +204,7 @@ SwSortTxtElement::~SwSortTxtElement() } /*-------------------------------------------------------------------- - Beschreibung: Key ermitteln + Description: Get Key --------------------------------------------------------------------*/ String SwSortTxtElement::GetKey(sal_uInt16 nId) const { @@ -213,14 +212,14 @@ String SwSortTxtElement::GetKey(sal_uInt16 nId) const if( !pTxtNd ) return aEmptyStr; - // fuer TextNodes + // for TextNodes const String& rStr = pTxtNd->GetTxt(); sal_Unicode nDeli = pOptions->cDeli; sal_uInt16 nDCount = pOptions->aKeys[nId]->nColumnId, i = 1; xub_StrLen nStart = 0; - // Den Delimitter suchen + // Find the delimiter while( nStart != STRING_NOTFOUND && i < nDCount) if( STRING_NOTFOUND != ( nStart = rStr.Search( nDeli, nStart ) ) ) { @@ -228,13 +227,14 @@ String SwSortTxtElement::GetKey(sal_uInt16 nId) const i++; } - // naechsten Delimitter gefunden oder Ende des Strings und Kopieren + // Found next delimiter or end of String + // and copy xub_StrLen nEnd = rStr.Search( nDeli, nStart+1 ); return rStr.Copy( nStart, nEnd-nStart ); } /*-------------------------------------------------------------------- - Beschreibung: Sortier-Elemente fuer Tabellen + Description: SortingElement for Tables --------------------------------------------------------------------*/ SwSortBoxElement::SwSortBoxElement( sal_uInt16 nRC ) : nRow( nRC ) @@ -246,7 +246,7 @@ SwSortBoxElement::~SwSortBoxElement() } /*-------------------------------------------------------------------- - Beschreibung: Schluessel zu einer Zelle ermitteln + Description: Get Key for a cell --------------------------------------------------------------------*/ String SwSortBoxElement::GetKey(sal_uInt16 nKey) const { @@ -254,20 +254,20 @@ String SwSortBoxElement::GetKey(sal_uInt16 nKey) const sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1; if( SRT_ROWS == pOptions->eDirection ) - pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren + pFndBox = pBox->GetBox(nCol, nRow); // Sort rows else - pFndBox = pBox->GetBox(nRow, nCol); // Spalten sortieren + pFndBox = pBox->GetBox(nRow, nCol); // Sort columns - // Den Text rausfieseln + // Extract the Text String aRetStr; if( pFndBox ) - { // StartNode holen und ueberlesen + { // Get StartNode and skip it const SwTableBox* pMyBox = pFndBox->GetBox(); - OSL_ENSURE(pMyBox, "Keine atomare Box"); + OSL_ENSURE(pMyBox, "No atomic Box"); if( pMyBox->GetSttNd() ) { - // ueber alle TextNodes der Box + // Iterate over all the Box's TextNodes const SwNode *pNd = 0, *pEndNd = pMyBox->GetSttNd()->EndOfSectionNode(); for( sal_uLong nIdx = pMyBox->GetSttIdx() + 1; pNd != pEndNd; ++nIdx ) if( ( pNd = pDoc->GetNodes()[ nIdx ])->IsTxtNode() ) @@ -283,9 +283,10 @@ double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const sal_uInt16 nCol = pOptions->aKeys[nKey]->nColumnId-1; if( SRT_ROWS == pOptions->eDirection ) - pFndBox = pBox->GetBox(nCol, nRow); // Zeilen sortieren + pFndBox = pBox->GetBox(nCol, nRow); // Sort rows else - pFndBox = pBox->GetBox(nRow, nCol); // Spalten sortieren + pFndBox = pBox->GetBox(nRow, nCol); // Sort columns + double nVal; if( pFndBox ) @@ -303,14 +304,14 @@ double SwSortBoxElement::GetValue( sal_uInt16 nKey ) const } /*-------------------------------------------------------------------- - Beschreibung: Text sortieren im Document + Description: Sort Text in the Document --------------------------------------------------------------------*/ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) { - // pruefen ob Rahmen im Text + // Check if Frame is in the Text const SwPosition *pStart = rPaM.Start(), *pEnd = rPaM.End(); - // Index auf den Start der Selektion + // Set index to the Selection's start for ( sal_uInt16 n = 0; n < GetSpzFrmFmts()->Count(); ++n ) { SwFrmFmt *const pFmt = static_cast<SwFrmFmt*>((*GetSpzFrmFmts())[n]); @@ -322,12 +323,12 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) return sal_False; } - // pruefe ob nur TextNodes in der Selection liegen + // Check if only TextNodes are within the Selection { sal_uLong nStart = pStart->nNode.GetIndex(), nEnd = pEnd->nNode.GetIndex(); while( nStart <= nEnd ) - // Iterieren ueber einen selektierten Bereich + // Iterate over a selected Area if( !GetNodes()[ nStart++ ]->IsTxtNode() ) return sal_False; } @@ -356,12 +357,12 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) pRedlUndo = new SwUndoRedlineSort( *pRedlPam,rOpt ); GetIDocumentUndoRedo().DoUndo(false); } - // erst den Bereich kopieren, dann + // First copy the area SwNodeIndex aEndIdx( pEnd->nNode, 1 ); SwNodeRange aRg( pStart->nNode, aEndIdx ); GetNodes()._Copy( aRg, aEndIdx ); - // Bereich neu ist von pEnd->nNode+1 bis aEndIdx + // Area is new from pEnd->nNode+1 to aEndIdx DeleteRedline( *pRedlPam, true, USHRT_MAX ); pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 ); @@ -394,15 +395,13 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) SwSortElements aSortArr; while( aStart <= pEnd->nNode ) { - // Iterieren ueber einen selektierten Bereich + // Iterate over a selected Area SwSortTxtElement* pSE = new SwSortTxtElement( aStart ); aSortArr.Insert(pSE); aStart++; } - // Und jetzt der Akt: Verschieben von Nodes und immer schoen auf UNDO - // achten - // + // Now comes the tricky part: Move Nodes (and always keep Undo in mind) sal_uLong nBeg = pStart->nNode.GetIndex(); SwNodeRange aRg( aStart, aStart ); @@ -421,15 +420,15 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) aRg.aStart = pBox->aPos.GetIndex(); aRg.aEnd = aRg.aStart.GetIndex() + 1; - // Nodes verschieben + // Move Nodes MoveNodeRange( aRg, aStart, IDocumentContentOperations::DOC_MOVEDEFAULT ); - // Undo Verschiebungen einpflegen + // Insert Move in Undo if(pUndoSort) pUndoSort->Insert(pBox->nOrg, nBeg + n); } - // Alle Elemente aus dem SortArray loeschen + // Delete all elements from the SortArray aSortArr.DeleteAndDestroy(0, aSortArr.Count()); SwSortElement::Finit(); @@ -488,18 +487,18 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) } /*-------------------------------------------------------------------- - Beschreibung: Tabelle sortieren im Document + Description: Sort Table in the Document --------------------------------------------------------------------*/ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) { - // uebers SwDoc fuer Undo !! - OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" ); + // Via SwDoc for Undo! + OSL_ENSURE( !rBoxes.empty(), "no valid Box list" ); SwTableNode* pTblNd = const_cast<SwTableNode*>( rBoxes.begin()->second->GetSttNd()->FindTableNode() ); if( !pTblNd ) return sal_False; - // Auf gehts sortieren - // suche alle Boxen / Lines + // We begin sorting + // Find all Boxes/Lines _FndBox aFndBox( 0, 0 ); { _FndPara aPara( rBoxes, &aFndBox ); @@ -515,13 +514,13 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) sal_uInt16 nStart = 0; if( pTblNd->GetTable().GetRowsToRepeat() > 0 && rOpt.eDirection == SRT_ROWS ) { - // Oberste seleketierte Zeile + // Uppermost selected Cell _FndLines& rLines = aFndBox.GetLines(); while( nStart < rLines.Count() ) { - // Verschachtelung durch Split Merge beachten, - // die oberste rausholen + // Respect Split Merge nesting, + // extract the upper most SwTableLine* pLine = rLines[nStart]->GetLine(); while ( pLine->GetUpper() ) pLine = pLine->GetUpper()->GetUpper(); @@ -531,30 +530,30 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) else break; } - // Alle selektierten in der HeaderLine ? -> kein Offset + // Are all selected in the HeaderLine? -> no Offset if( nStart == rLines.Count() ) nStart = 0; } - // umschalten auf relative Formeln + // Switch to relative Formulas SwTableFmlUpdate aMsgHnt( &pTblNd->GetTable() ); aMsgHnt.eFlags = TBL_RELBOXNAME; UpdateTblFlds( &aMsgHnt ); - // Tabelle als flache Array-Struktur + // Table as a flat array structure FlatFndBox aFlatBox(this, aFndBox); if(!aFlatBox.IsSymmetric()) return sal_False; - // MIB 9.7.97: HTML-Layout loeschen + // Delete HTML layout pTblNd->GetTable().SetHTMLTableLayout( 0 ); // #i37739# A simple 'MakeFrms' after the node sorting // does not work if the table is inside a frame and has no prev/next. SwNode2Layout aNode2Layout( *pTblNd ); - // loesche die Frames der Tabelle + // Delete the Table's Frames pTblNd->DelFrms(); // ? TL_CHART2: ? @@ -568,16 +567,15 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) } ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); - // SchluesselElemente einsortieren + // Insert KeyElements sal_uInt16 nCount = (rOpt.eDirection == SRT_ROWS) ? aFlatBox.GetRows() : aFlatBox.GetCols(); - // SortList nach Schluessel sortieren + // Sort SortList by Key SwSortElement::Init( this, rOpt, &aFlatBox ); SwSortElements aSortList; - // wenn die HeaderLine wiederholt wird und die - // Zeilen sortiert werden 1.Zeile nicht mitsortieren + // When sorting, do not include the first row if the HeaderLine is repeated sal_uInt16 i; for( i = nStart; i < nCount; ++i) @@ -586,7 +584,7 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) aSortList.Insert(pEle); } - // nach Sortierung verschieben + // Move after Sorting SwMovedBoxes aMovedList; for(i=0; i < aSortList.Count(); ++i) { @@ -606,7 +604,7 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) // TL_CHART2: need to inform chart of probably changed cell names UpdateCharts( pTblNd->GetTable().GetFrmFmt()->GetName() ); - // Alle Elemente aus dem SortArray loeschen + // Delete all Elements in the SortArray aSortList.DeleteAndDestroy( 0, aSortList.Count() ); SwSortElement::Finit(); @@ -615,16 +613,16 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt) } /*-------------------------------------------------------------------- - Beschreibung: Zeilenweise verschieben + Description: Move a row --------------------------------------------------------------------*/ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD) { for( sal_uInt16 i=0; i < rBox.GetCols(); ++i ) - { // Alte Zellen-Pos bestimmen und merken + { // Get old cell position and remember it const _FndBox* pSource = rBox.GetBox(i, nS); - // neue Zellen-Pos + // new cell position const _FndBox* pTarget = rBox.GetBox(i, nT); const SwTableBox* pT = pTarget->GetBox(); @@ -632,7 +630,7 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX; - // und verschieben + // and move it MoveCell(pDoc, pS, pT, bMoved, pUD); rMovedList.Insert(pS, rMovedList.Count() ); @@ -661,23 +659,23 @@ void MoveRow(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, } /*-------------------------------------------------------------------- - Beschreibung: Spaltenweise verschieben + Description: Move a column --------------------------------------------------------------------*/ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, SwMovedBoxes& rMovedList, SwUndoSort* pUD) { for(sal_uInt16 i=0; i < rBox.GetRows(); ++i) - { // Alte Zellen-Pos bestimmen und merken + { // Get old cell position and remember it const _FndBox* pSource = rBox.GetBox(nS, i); - // neue Zellen-Pos + // new cell position const _FndBox* pTarget = rBox.GetBox(nT, i); - // und verschieben + // and move it const SwTableBox* pT = pTarget->GetBox(); const SwTableBox* pS = pSource->GetBox(); - // und verschieben + // and move it sal_Bool bMoved = rMovedList.GetPos(pT) != USHRT_MAX; MoveCell(pDoc, pS, pT, bMoved, pUD); @@ -707,12 +705,12 @@ void MoveCol(SwDoc* pDoc, const FlatFndBox& rBox, sal_uInt16 nS, sal_uInt16 nT, } /*-------------------------------------------------------------------- - Beschreibung: Eine einzelne Zelle verschieben + Description: Move a single Cell --------------------------------------------------------------------*/ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar, sal_Bool bMovedBefore, SwUndoSort* pUD) { - OSL_ENSURE(pSource && pTar,"Fehlende Quelle oder Ziel"); + OSL_ENSURE(pSource && pTar,"Source or target missing"); if(pSource == pTar) return; @@ -720,50 +718,49 @@ void MoveCell(SwDoc* pDoc, const SwTableBox* pSource, const SwTableBox* pTar, if(pUD) pUD->Insert( pSource->GetName(), pTar->GetName() ); - // Pam Quelle auf den ersten ContentNode setzen + // Set Pam source to the first ContentNode SwNodeRange aRg( *pSource->GetSttNd(), 0, *pSource->GetSttNd() ); SwNode* pNd = pDoc->GetNodes().GoNext( &aRg.aStart ); - // wurde die Zelle (Source) nicht verschoben - // -> einen Leer-Node einfuegen und den Rest verschieben - // ansonsten steht der Mark auf dem ersten Content-Node + // If the Cell (Source) wasn't moved + // -> insert an empty Node and move the rest or the Mark + // points to the first ContentNode if( pNd->StartOfSectionNode() == pSource->GetSttNd() ) pNd = pDoc->GetNodes().MakeTxtNode( aRg.aStart, (SwTxtFmtColl*)pDoc->GetDfltTxtFmtColl() ); aRg.aEnd = *pNd->EndOfSectionNode(); - // Ist das Ziel leer(1 leerer Node vorhanden) - // -> diesen loeschen und move - // Ziel + // If the Target is empty (there is one empty Node) + // -> delete it and move the Target SwNodeIndex aTar( *pTar->GetSttNd() ); - pNd = pDoc->GetNodes().GoNext( &aTar ); // naechsten ContentNode + pNd = pDoc->GetNodes().GoNext( &aTar ); // next ContentNode sal_uLong nCount = pNd->EndOfSectionIndex() - pNd->StartOfSectionIndex(); sal_Bool bDelFirst = sal_False; if( nCount == 2 ) { - OSL_ENSURE( pNd->GetCntntNode(), "Kein ContentNode"); + OSL_ENSURE( pNd->GetCntntNode(), "No ContentNode"); bDelFirst = !pNd->GetCntntNode()->Len() && bMovedBefore; } if(!bDelFirst) - { // Es besteht schon Inhalt -> alter I n h a l t Section Down + { // We already have Content -> old Content Section Down SwNodeRange aRgTar( aTar.GetNode(), 0, *pNd->EndOfSectionNode() ); pDoc->GetNodes().SectionDown( &aRgTar ); } - // Einfuegen der Source + // Insert the Source SwNodeIndex aIns( *pTar->GetSttNd()->EndOfSectionNode() ); pDoc->MoveNodeRange( aRg, aIns, IDocumentContentOperations::DOC_MOVEDEFAULT ); - // Falls erster Node leer -> weg damit + // If first Node is empty -> delete it if(bDelFirst) pDoc->GetNodes().Delete( aTar, 1 ); } /*-------------------------------------------------------------------- - Beschreibung: Zweidimensionales Array aus FndBoxes generieren + Description: Generate two-dimensional array of FndBoxes --------------------------------------------------------------------*/ FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) : pDoc(pDocPtr), @@ -772,14 +769,14 @@ FlatFndBox::FlatFndBox(SwDoc* pDocPtr, const _FndBox& rBox) : ppItemSets(0), nRow(0), nCol(0) -{ // Ist das Array symmetrisch +{ // If the array is symmetric if((bSym = CheckLineSymmetry(rBoxRef)) != 0) { - // Spalten/Reihen-Anzahl ermitteln + // Determine column/row count nCols = GetColCount(rBoxRef); nRows = GetRowCount(rBoxRef); - // lineares Array anlegen + // Create linear array pArr = new _FndBoxPtr[ nRows * nCols ]; _FndBox** ppTmp = (_FndBox**)pArr; memset( ppTmp, 0, sizeof(_FndBoxPtr) * nRows * nCols ); @@ -799,20 +796,20 @@ FlatFndBox::~FlatFndBox() } /*-------------------------------------------------------------------- - Beschreibung: Alle Lines einer Box muessen gleichviel Boxen haben + Description: All Lines of a Box need to have as many Boxes --------------------------------------------------------------------*/ sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox) { const _FndLines &rLines = rBox.GetLines(); sal_uInt16 nBoxes(0); - // UeberLines iterieren + // Iterate over Lines for(sal_uInt16 i=0; i < rLines.Count(); ++i) - { // Die Boxen einer Line + { // A List's Box _FndLine* pLn = rLines[i]; const _FndBoxes& rBoxes = pLn->GetBoxes(); - // Anzahl der Boxen aller Lines ungleich -> keine Symmetrie + // Amount of Boxes of all Lines is uneven -> no symmetry if( i && nBoxes != rBoxes.Count()) return sal_False; @@ -824,21 +821,21 @@ sal_Bool FlatFndBox::CheckLineSymmetry(const _FndBox& rBox) } /*-------------------------------------------------------------------- - Beschreibung: Box auf Symmetrie pruefen - Alle Boxen einer Line muessen gleichviele Lines haben + Description: Check Box for symmetry + All Boxes of a Line need to have as many Lines --------------------------------------------------------------------*/ sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn) { const _FndBoxes &rBoxes = rLn.GetBoxes(); sal_uInt16 nLines(0); - // Ueber Boxes iterieren + // Iterate over Boxes for(sal_uInt16 i=0; i < rBoxes.Count(); ++i) - { // Die Boxen einer Line + { // The Boxes of a Line _FndBox* pBox = rBoxes[i]; const _FndLines& rLines = pBox->GetLines(); - // Anzahl der Boxen aller Lines ungleich -> keine Symmetrie + // Amount of Boxes of all Lines is uneven -> no symmetry if( i && nLines != rLines.Count() ) return sal_False; @@ -850,23 +847,23 @@ sal_Bool FlatFndBox::CheckBoxSymmetry(const _FndLine& rLn) } /*-------------------------------------------------------------------- - Beschreibung: max Anzahl der Spalten (Boxes) + Description: Maximum count of Columns (Boxes) --------------------------------------------------------------------*/ sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox) { const _FndLines& rLines = rBox.GetLines(); - // Ueber Lines iterieren + // Iterate over Lines if( !rLines.Count() ) return 1; sal_uInt16 nSum = 0; for( sal_uInt16 i=0; i < rLines.Count(); ++i ) { - // Die Boxen einer Line + // The Boxes of a Line sal_uInt16 nCount = 0; const _FndBoxes& rBoxes = rLines[i]->GetBoxes(); for( sal_uInt16 j=0; j < rBoxes.Count(); ++j ) - // Rekursiv wirder ueber die Lines Iterieren + // Iterate recursively over the Lines nCount += rBoxes[j]->GetLines().Count() ? GetColCount(*rBoxes[j]) : 1; @@ -877,7 +874,7 @@ sal_uInt16 FlatFndBox::GetColCount(const _FndBox& rBox) } /*-------------------------------------------------------------------- - Beschreibung: max Anzahl der Zeilen (Lines) + Description: Maximum count of Rows (Lines) --------------------------------------------------------------------*/ sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox) { @@ -887,12 +884,12 @@ sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox) sal_uInt16 nLines = 0; for(sal_uInt16 i=0; i < rLines.Count(); ++i) - { // Die Boxen einer Line + { // The Boxes of a Line const _FndBoxes& rBoxes = rLines[i]->GetBoxes(); sal_uInt16 nLn = 1; for(sal_uInt16 j=0; j < rBoxes.Count(); ++j) if( rBoxes[j]->GetLines().Count() ) - // Rekursiv ueber die Lines Iterieren + // Iterate recursively over the Lines nLn = Max(GetRowCount(*rBoxes[j]), nLn); nLines = nLines + nLn; @@ -901,32 +898,32 @@ sal_uInt16 FlatFndBox::GetRowCount(const _FndBox& rBox) } /*-------------------------------------------------------------------- - Beschreibung: lineares Array aus atomaren FndBoxes erzeugen + Description: Create a linear array of atmoic FndBoxes --------------------------------------------------------------------*/ void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox) { sal_Bool bModRow = sal_False; const _FndLines& rLines = rBox.GetLines(); - // Ueber Lines iterieren + // Iterate over Lines sal_uInt16 nOldRow = nRow; for( sal_uInt16 i=0; i < rLines.Count(); ++i ) { - // Die Boxen einer Line + // The Boxes of a Line const _FndBoxes& rBoxes = rLines[i]->GetBoxes(); sal_uInt16 nOldCol = nCol; for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j ) { - // Die Box pruefen ob es eine atomare Box ist + // Check the Box if it's an atomic one const _FndBox* pBox = rBoxes[ j ]; if( !pBox->GetLines().Count() ) { - // peichern + // save it sal_uInt16 nOff = nRow * nCols + nCol; *(pArr + nOff) = pBox; - // sicher die Formel/Format/Value Werte + // Save the Formula/Format/Value values const SwFrmFmt* pFmt = pBox->GetBox()->GetFrmFmt(); if( SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMAT ) || SFX_ITEM_SET == pFmt->GetItemState( RES_BOXATR_FORMULA ) || @@ -948,7 +945,7 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox) } else { - // Rekursiv wieder ueber die Lines einer Box Iterieren + // Iterate recursively over the Lines of a Box FillFlat( *pBox, ( j == rBoxes.Count()-1 ) ); } nCol++; @@ -962,20 +959,20 @@ void FlatFndBox::FillFlat(const _FndBox& rBox, sal_Bool bLastBox) } /*-------------------------------------------------------------------- - Beschreibung: Zugriff auf eine bestimmte Zelle + Description: Access a specific Cell --------------------------------------------------------------------*/ const _FndBox* FlatFndBox::GetBox(sal_uInt16 n_Col, sal_uInt16 n_Row) const { sal_uInt16 nOff = n_Row * nCols + n_Col; const _FndBox* pTmp = *(pArr + nOff); - OSL_ENSURE(n_Col < nCols && n_Row < nRows && pTmp, "unzulaessiger Array-Zugriff"); + OSL_ENSURE(n_Col < nCols && n_Row < nRows && pTmp, "invalid array access"); return pTmp; } const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 n_Row) const { - OSL_ENSURE( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "unzulaessiger Array-Zugriff"); + OSL_ENSURE( !ppItemSets || ( n_Col < nCols && n_Row < nRows), "invalid array access"); return ppItemSets ? *(ppItemSets + (n_Row * nCols + n_Col )) : 0; } diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index dba3f7718691..25fae855febe 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -98,18 +98,18 @@ static const sal_Char sKomma[] = ", "; static const sal_uInt16 aHeadlineSizes[ 2 * MAXLEVEL ] = { // PT_16, PT_14, PT_14, PT_12, PT_12, // normal -//JP 10.12.96: jetzt soll alles prozentual sein: +// we do everything procentual now: 115, 100, 100, 85, 85, 75, 75, 75, 75, 75, // normal -// PT_22, PT_16, PT_12, PT_11, PT_9 // HTML-Mode +// PT_22, PT_16, PT_12, PT_11, PT_9 // HTML mode PT_24, PT_18, PT_14, PT_12, PT_10, - PT_7, PT_7, PT_7, PT_7, PT_7 // HTML-Mode + PT_7, PT_7, PT_7, PT_7, PT_7 // HTML mode }; long lcl_GetRightMargin( SwDoc& rDoc ) { - // sorge dafuer, dass die Druckereinstellungen in die Standard- - // Seitenvorlage uebernommen wurden. + // Make sure that the printer settings are taken over to the standard + // page template const SwFrmFmt& rPgDscFmt = const_cast<const SwDoc *>(&rDoc)->GetPageDesc( 0 ).GetMaster(); const SvxLRSpaceItem& rLR = rPgDscFmt.GetLRSpace(); @@ -304,11 +304,10 @@ void lcl_SetNumBul( SwDoc* pDoc, SwTxtFmtColl* pColl, -// Gebe die "Auto-Collection" mit der Id zurueck. Existiert -// sie noch nicht, dann erzeuge sie -// Ist der String-Pointer definiert, dann erfrage nur die -// Beschreibung der Attribute, !! es legt keine Vorlage an !! - +// Return the AutoCollection by it's Id. If it doesn't +// exist yet, create it. +// If the String pointer is defined, then only query for +// the Attribute descriptions. It doesn't create a template! SvxFrameDirection GetDefaultFrameDirection(sal_uLong nLanguage) { SvxFrameDirection eResult = (MsLangId::isRightToLeft( static_cast<LanguageType>(nLanguage)) ? @@ -325,7 +324,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) (RES_POOLCOLL_REGISTER_BEGIN <= nId && nId < RES_POOLCOLL_REGISTER_END) || (RES_POOLCOLL_DOC_BEGIN <= nId && nId < RES_POOLCOLL_DOC_END) || (RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END), - "Falsche AutoFormat-Id" ); + "Wrong AutoFormat Id" ); SwTxtFmtColl* pNewColl; sal_uInt16 nOutLvlBits = 0; @@ -340,7 +339,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) nOutLvlBits |= ( 1 << pNewColl->GetAssignedOutlineStyleLevel() );//<-end,zhaojianwei } - // bis hierher nicht gefunden -> neu anlegen + // Didn't find it until here -> create anew sal_uInt16 nResId = 0; if( RES_POOLCOLL_TEXT_BEGIN <= nId && nId < RES_POOLCOLL_TEXT_END ) nResId = RC_POOLCOLL_TEXT_BEGIN - RES_POOLCOLL_TEXT_BEGIN; @@ -355,14 +354,14 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) else if (RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END) nResId = RC_POOLCOLL_HTML_BEGIN - RES_POOLCOLL_HTML_BEGIN; - OSL_ENSURE( nResId, "Ungueltige Pool-ID" ); + OSL_ENSURE( nResId, "Invalid Pool ID" ); if( !nResId ) return GetTxtCollFromPool( RES_POOLCOLL_STANDARD ); ResId aResId( nResId + nId, *pSwResMgr ); String aNm( aResId ); - // ein Set fuer alle zusetzenden Attribute + // A Set for all to-be-set Attributes SwAttrSet aSet( GetAttrPool(), aTxtFmtCollSetRange ); sal_uInt16 nParent = GetPoolParent( nId ); @@ -384,7 +383,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) switch( nId ) { - // allgemeine Inhaltsformen + // General content forms case RES_POOLCOLL_STANDARD: /* koreans do not like SvxScriptItem(TRUE) */ if (bRegardLanguage) @@ -404,21 +403,21 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_TEXT: // Textkoerper + case RES_POOLCOLL_TEXT: // Text body { SvxULSpaceItem aUL( 0, PT_6, RES_UL_SPACE ); if( get(IDocumentSettingAccess::HTML_MODE) ) aUL.SetLower( HTML_PARSPACE ); aSet.Put( aUL ); } break; - case RES_POOLCOLL_TEXT_IDENT: // Textkoerper Einzug + case RES_POOLCOLL_TEXT_IDENT: // Text body indentation { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetTxtFirstLineOfst( GetMetricVal( CM_05 )); aSet.Put( aLR ); } break; - case RES_POOLCOLL_TEXT_NEGIDENT: // Textkoerper neg. Einzug + case RES_POOLCOLL_TEXT_NEGIDENT: // Text body neg. indentation { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetTxtFirstLineOfst( -(short)GetMetricVal( CM_05 )); @@ -429,7 +428,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) aSet.Put( aTStops ); } break; - case RES_POOLCOLL_TEXT_MOVE: // Textkoerper Einrueckung + case RES_POOLCOLL_TEXT_MOVE: // Text body move { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetTxtLeft( GetMetricVal( CM_05 )); @@ -437,7 +436,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_CONFRONTATION: // Textkoerper Gegenueberstellung + case RES_POOLCOLL_CONFRONTATION: // Text body confrontation { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetTxtFirstLineOfst( - short( GetMetricVal( CM_1 ) * 4 + @@ -449,7 +448,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) aSet.Put( aTStops ); } break; - case RES_POOLCOLL_MARGINAL: // Textkoerper maginalie + case RES_POOLCOLL_MARGINAL: // Text body marginal { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR.SetTxtLeft( GetMetricVal( CM_1 ) * 4 ); @@ -457,7 +456,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_HEADLINE_BASE: // Basis Ueberschrift + case RES_POOLCOLL_HEADLINE_BASE: // Base headline { static const sal_uInt16 aFntInit[] = { DEFAULTFONT_LATIN_HEADING, RES_CHRATR_FONT, @@ -496,57 +495,57 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_NUMBUL_BASE: // Basis Numerierung/Aufzaehlung + case RES_POOLCOLL_NUMBUL_BASE: // Base Numbering break; - case RES_POOLCOLL_GREETING: // Grussformel - case RES_POOLCOLL_REGISTER_BASE: // Basis Verzeichnisse - case RES_POOLCOLL_SIGNATURE: // Unterschrift - case RES_POOLCOLL_TABLE: // Tabelle-Inhalt + case RES_POOLCOLL_GREETING: // Greeting + case RES_POOLCOLL_REGISTER_BASE: // Base directories + case RES_POOLCOLL_SIGNATURE: // Signatures + case RES_POOLCOLL_TABLE: // Tabele content { SwFmtLineNumber aLN; aLN.SetCountLines( sal_False ); aSet.Put( aLN ); } break; - case RES_POOLCOLL_HEADLINE1: // Ueberschrift 1 + case RES_POOLCOLL_HEADLINE1: // Headinline 1 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 0, sal_False ); break; - case RES_POOLCOLL_HEADLINE2: // Ueberschrift 2 + case RES_POOLCOLL_HEADLINE2: // Headinline 2 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 1, sal_True ); break; - case RES_POOLCOLL_HEADLINE3: // Ueberschrift 3 + case RES_POOLCOLL_HEADLINE3: // Headinline 3 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 2, sal_False ); break; - case RES_POOLCOLL_HEADLINE4: // Ueberschrift 4 + case RES_POOLCOLL_HEADLINE4: // Headinline 4 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 3, sal_True ); break; - case RES_POOLCOLL_HEADLINE5: // Ueberschrift 5 + case RES_POOLCOLL_HEADLINE5: // Headinline 5 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 4, sal_False ); break; - case RES_POOLCOLL_HEADLINE6: // Ueberschrift 6 + case RES_POOLCOLL_HEADLINE6: // Headinline 6 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 5, sal_False ); break; - case RES_POOLCOLL_HEADLINE7: // Ueberschrift 7 + case RES_POOLCOLL_HEADLINE7: // Headinline 7 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 6, sal_False ); break; - case RES_POOLCOLL_HEADLINE8: // Ueberschrift 8 + case RES_POOLCOLL_HEADLINE8: // Headinline 8 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 7, sal_False ); break; - case RES_POOLCOLL_HEADLINE9: // Ueberschrift 9 + case RES_POOLCOLL_HEADLINE9: // Headinline 9 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 8, sal_False ); break; - case RES_POOLCOLL_HEADLINE10: // Ueberschrift 10 + case RES_POOLCOLL_HEADLINE10: // Headinline 10 lcl_SetHeadline( this, pNewColl, aSet, nOutLvlBits, 9, sal_False ); break; - // Sonderbereiche: - // Kopfzeilen + // Special areas: + // Header case RES_POOLCOLL_HEADER: case RES_POOLCOLL_HEADERL: case RES_POOLCOLL_HEADERR: - // Fusszeilen + // Footer case RES_POOLCOLL_FOOTER: case RES_POOLCOLL_FOOTERL: case RES_POOLCOLL_FOOTERR: @@ -586,7 +585,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_LABEL: // Beschriftung-Basis + case RES_POOLCOLL_LABEL: // Base label { SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetUpper( PT_6 ); aUL.SetLower( PT_6 ); aSet.Put( aUL ); @@ -597,14 +596,14 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_FRAME: // Rahmen Inhalt - case RES_POOLCOLL_LABEL_ABB: // Beschriftung-Abbildung - case RES_POOLCOLL_LABEL_TABLE: // Beschriftung-Tabelle - case RES_POOLCOLL_LABEL_FRAME: // Beschriftung-Rahmen - case RES_POOLCOLL_LABEL_DRAWING: // Beschriftung-Zeichnung + case RES_POOLCOLL_FRAME: // Frame content + case RES_POOLCOLL_LABEL_ABB: // Label projection + case RES_POOLCOLL_LABEL_TABLE: // Label table + case RES_POOLCOLL_LABEL_FRAME: // Label frame + case RES_POOLCOLL_LABEL_DRAWING: // Label drawing break; - case RES_POOLCOLL_JAKETADRESS: // UmschlagAdresse + case RES_POOLCOLL_JAKETADRESS: // Jaket address { SvxULSpaceItem aUL( RES_UL_SPACE ); aUL.SetLower( PT_3 ); aSet.Put( aUL ); @@ -613,7 +612,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_SENDADRESS: // AbsenderAdresse + case RES_POOLCOLL_SENDADRESS: // Sender address { if( get(IDocumentSettingAccess::HTML_MODE) ) SetAllScriptItem( aSet, SvxPostureItem(ITALIC_NORMAL, RES_CHRATR_POSTURE) ); @@ -627,7 +626,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - // Benutzer-Verzeichnisse: + // User directories: case RES_POOLCOLL_TOX_USERH: // Header lcl_SetRegister( this, aSet, 0, sal_True, sal_False ); { @@ -635,38 +634,38 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) aSet.Put( aLN ); } break; - case RES_POOLCOLL_TOX_USER1: // 1. Ebene + case RES_POOLCOLL_TOX_USER1: // 1. Level lcl_SetRegister( this, aSet, 0, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER2: // 2. Ebene + case RES_POOLCOLL_TOX_USER2: // 2. Level lcl_SetRegister( this, aSet, 1, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER3: // 3. Ebene + case RES_POOLCOLL_TOX_USER3: // 3. Level lcl_SetRegister( this, aSet, 2, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER4: // 4. Ebene + case RES_POOLCOLL_TOX_USER4: // 4. Level lcl_SetRegister( this, aSet, 3, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER5: // 5. Ebene + case RES_POOLCOLL_TOX_USER5: // 5. Level lcl_SetRegister( this, aSet, 4, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER6: // 6. Ebene + case RES_POOLCOLL_TOX_USER6: // 6. Level lcl_SetRegister( this, aSet, 5, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER7: // 7. Ebene + case RES_POOLCOLL_TOX_USER7: // 7. Level lcl_SetRegister( this, aSet, 6, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER8: // 8. Ebene + case RES_POOLCOLL_TOX_USER8: // 8. Level lcl_SetRegister( this, aSet, 7, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER9: // 9. Ebene + case RES_POOLCOLL_TOX_USER9: // 9. Level lcl_SetRegister( this, aSet, 8, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_USER10: // 10. Ebene + case RES_POOLCOLL_TOX_USER10: // 10. Level lcl_SetRegister( this, aSet, 9, sal_False, sal_True ); break; - // Index-Verzeichnisse + // Index directories case RES_POOLCOLL_TOX_IDXH: // Header lcl_SetRegister( this, aSet, 0, sal_True, sal_False ); { @@ -674,20 +673,20 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) aSet.Put( aLN ); } break; - case RES_POOLCOLL_TOX_IDX1: // 1. Ebene + case RES_POOLCOLL_TOX_IDX1: // 1. Level lcl_SetRegister( this, aSet, 0, sal_False, sal_False ); break; - case RES_POOLCOLL_TOX_IDX2: // 2. Ebene + case RES_POOLCOLL_TOX_IDX2: // 2. Level lcl_SetRegister( this, aSet, 1, sal_False, sal_False ); break; - case RES_POOLCOLL_TOX_IDX3: // 3. Ebene + case RES_POOLCOLL_TOX_IDX3: // 3. Level lcl_SetRegister( this, aSet, 2, sal_False, sal_False ); break; case RES_POOLCOLL_TOX_IDXBREAK: // Trenner lcl_SetRegister( this, aSet, 0, sal_False, sal_False ); break; - // Inhalts-Verzeichnisse + // Content directories case RES_POOLCOLL_TOX_CNTNTH: // Header lcl_SetRegister( this, aSet, 0, sal_True, sal_False ); { @@ -695,34 +694,34 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) aSet.Put( aLN ); } break; - case RES_POOLCOLL_TOX_CNTNT1: // 1. Ebene + case RES_POOLCOLL_TOX_CNTNT1: // 1. Level lcl_SetRegister( this, aSet, 0, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT2: // 2. Ebene + case RES_POOLCOLL_TOX_CNTNT2: // 2. Level lcl_SetRegister( this, aSet, 1, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT3: // 3. Ebene + case RES_POOLCOLL_TOX_CNTNT3: // 3. Level lcl_SetRegister( this, aSet, 2, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT4: // 4. Ebene + case RES_POOLCOLL_TOX_CNTNT4: // 4. Level lcl_SetRegister( this, aSet, 3, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT5: // 5. Ebene + case RES_POOLCOLL_TOX_CNTNT5: // 5. Level lcl_SetRegister( this, aSet, 4, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT6: // 6. Ebene + case RES_POOLCOLL_TOX_CNTNT6: // 6. Level lcl_SetRegister( this, aSet, 5, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT7: // 7. Ebene + case RES_POOLCOLL_TOX_CNTNT7: // 7. Level lcl_SetRegister( this, aSet, 6, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT8: // 8. Ebene + case RES_POOLCOLL_TOX_CNTNT8: // 8. Level lcl_SetRegister( this, aSet, 7, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT9: // 9. Ebene + case RES_POOLCOLL_TOX_CNTNT9: // 9. Level lcl_SetRegister( this, aSet, 8, sal_False, sal_True ); break; - case RES_POOLCOLL_TOX_CNTNT10: // 10. Ebene + case RES_POOLCOLL_TOX_CNTNT10: // 10. Level lcl_SetRegister( this, aSet, 9, sal_False, sal_True ); break; @@ -744,7 +743,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) break; - case RES_POOLCOLL_DOC_TITEL: // Doc. Titel + case RES_POOLCOLL_DOC_TITEL: // Document titel { SetAllScriptItem( aSet, SvxWeightItem( WEIGHT_BOLD, RES_CHRATR_WEIGHT ) ); SetAllScriptItem( aSet, SvxFontHeightItem( PT_18, 100, RES_CHRATR_FONTSIZE ) ); @@ -756,7 +755,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLCOLL_DOC_SUBTITEL: // Doc. UnterTitel + case RES_POOLCOLL_DOC_SUBTITEL: // Document subtitel { SetAllScriptItem( aSet, SvxPostureItem( ITALIC_NORMAL, RES_CHRATR_POSTURE )); SetAllScriptItem( aSet, SvxFontHeightItem( PT_14, 100, RES_CHRATR_FONTSIZE )); @@ -785,12 +784,12 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) { ::lcl_SetDfltFont( DEFAULTFONT_FIXED, aSet ); -// WORKAROUND: PRE auf 10pt setzten +// WORKAROUND: Set PRE to 10pt SetAllScriptItem( aSet, SvxFontHeightItem(PT_10, 100, RES_CHRATR_FONTSIZE) ); -// WORKAROUND: PRE auf 10pt setzten +// WORKAROUND: Set PRE to 10pt - // der untere Absatz-Abstand wird explizit gesetzt (macht - // die harte Attributierung einfacher) + // The lower paragraph distance is set explicitly (makes + // assigning hard attributes easier) SvxULSpaceItem aULSpaceItem( RES_UL_SPACE ); aULSpaceItem = pNewColl->GetULSpace(); aULSpaceItem.SetLower( 0 ); @@ -826,7 +825,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) { SvxLRSpaceItem aLR( RES_LR_SPACE ); aLR = pNewColl->GetLRSpace(); - // es wird um 1cm eingerueckt. Die IDs liegen immer 2 auseinander! + // We indent by 1 cm. The IDs are always 2 away from each other! aLR.SetLeft( GetMetricVal( CM_1 )); aSet.Put( aLR ); } @@ -839,7 +838,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) RES_POOLCOLL_HTML_DD )); aLR = pNewColl->GetLRSpace(); } - // es wird um 0cm eingerueckt. Die IDs liegen immer 2 auseinander! + // We indent by 0 cm. The IDs are always 2 away from each other! aLR.SetLeft( 0 ); aSet.Put( aLR ); } @@ -857,8 +856,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) - // pruefe, ob diese "Auto-Collection" in Dokument schon/noch - // benutzt wird +// Check if this AutoCollection is already/still in use in this Document bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const { OSL_ENSURE( @@ -868,7 +866,7 @@ bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const (RES_POOLCOLL_REGISTER_BEGIN <= nId && nId < RES_POOLCOLL_REGISTER_END) || (RES_POOLCOLL_DOC_BEGIN <= nId && nId < RES_POOLCOLL_DOC_END) || (RES_POOLCOLL_HTML_BEGIN <= nId && nId < RES_POOLCOLL_HTML_END), - "Falsche AutoFormat-Id" ); + "Wrong AutoFormat Id" ); SwTxtFmtColl* pNewColl = 0; sal_Bool bFnd = sal_False; @@ -886,9 +884,8 @@ bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const return !pNewColl->GetInfo( aGetHt ); } - // Gebe das "Auto[matische]-Format" mit der Id zurueck. Existiert - // es noch nicht, dann erzeuge es - +// Return the AutomaticFormat with the supplied Id. If it doesn't +// exist, create it. SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) { SwFmt *pNewFmt = 0; @@ -911,11 +908,11 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) nRCId = RC_POOLCHRFMT_BEGIN - RES_POOLCHR_BEGIN; pWhichRange = aCharFmtSetRange; - // Fehlerfall: unbekanntes Format, aber CharFormat - // -> returne das erste + // Fault: unknown Format, but a CharFormat + // -> return the first one if( RES_POOLCHR_BEGIN > nId || nId >= RES_POOLCHR_END ) { - OSL_ENSURE( !this, "ungueltige Id" ); + OSL_ENSURE( !this, "invalid Id" ); nId = RES_POOLCHR_BEGIN; } } @@ -929,22 +926,22 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) nRCId = RC_POOLFRMFMT_BEGIN - RES_POOLFRM_BEGIN; pWhichRange = aFrmFmtSetRange; - // Fehlerfall: unbekanntes Format, aber FrameFormat - // -> returne das erste + // Fault: unknown Format, but a FrameFormat + // -> return the first one if( RES_POOLFRM_BEGIN > nId || nId >= RES_POOLFRM_END ) { - OSL_ENSURE( !this, "ungueltige Id" ); + OSL_ENSURE( !this, "invalid Id" ); nId = RES_POOLFRM_BEGIN; } } break; default: - // Fehlerfall, unbekanntes Format - OSL_ENSURE( nId, "ungueltige Id" ); + // Fault, unknown Format + OSL_ENSURE( nId, "invalid Id" ); return 0; } - OSL_ENSURE( nRCId, "ungueltige Id" ); + OSL_ENSURE( nRCId, "invalid Id" ); while( nArrCnt-- ) for( sal_uInt16 n = 0; n < (*pArray[nArrCnt]).Count(); ++n ) @@ -979,30 +976,30 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) if( !bIsModified ) ResetModified(); pNewFmt->SetPoolFmtId( nId ); - pNewFmt->SetAuto( sal_False ); // kein Auto-Format + pNewFmt->SetAuto( sal_False ); // no AutoFormat } switch( nId ) { - case RES_POOLCHR_FOOTNOTE: // Fussnote - case RES_POOLCHR_PAGENO: // Seiten/Feld - case RES_POOLCHR_LABEL: // Beschriftung - case RES_POOLCHR_DROPCAPS: // Initialien - case RES_POOLCHR_NUM_LEVEL: // Aufzaehlungszeichen - case RES_POOLCHR_TOXJUMP: // Verzeichnissprung + case RES_POOLCHR_FOOTNOTE: // Footnote + case RES_POOLCHR_PAGENO: // Page/Field + case RES_POOLCHR_LABEL: // Label + case RES_POOLCHR_DROPCAPS: // Dropcaps + case RES_POOLCHR_NUM_LEVEL: // Numbering level + case RES_POOLCHR_TOXJUMP: // Table of contents jump case RES_POOLCHR_ENDNOTE: // Endnote - case RES_POOLCHR_LINENUM: // Zeilennummerierung + case RES_POOLCHR_LINENUM: // Line numbering break; - case RES_POOLCHR_ENDNOTE_ANCHOR: // Endnotenanker - case RES_POOLCHR_FOOTNOTE_ANCHOR: // Fussnotenanker + case RES_POOLCHR_ENDNOTE_ANCHOR: // Endnote anchor + case RES_POOLCHR_FOOTNOTE_ANCHOR: // Footnote anchor { aSet.Put( SvxEscapementItem( DFLT_ESC_AUTO_SUPER, 58, RES_CHRATR_ESCAPEMENT ) ); } break; - case RES_POOLCHR_BUL_LEVEL: // Aufzaehlungszeichen + case RES_POOLCHR_BUL_LEVEL: // Bullet character { const Font& rBulletFont = numfunc::GetDefBulletFont(); SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(), @@ -1128,8 +1125,7 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) aSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME )); aSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); aSet.Put( SwFmtSurround( SURROUND_PARALLEL )); - // Breite 3.5 centimeter vorgegeben, als Hoehe nur den - // min. Wert benutzen + // Set the default width to 3.5 cm, use the minimum value for the height aSet.Put( SwFmtFrmSize( ATT_MIN_SIZE, GetMetricVal( CM_1 ) * 3 + GetMetricVal( CM_05 ), MM50 )); @@ -1179,8 +1175,7 @@ SwCharFmt* SwDoc::GetCharFmtFromPool( sal_uInt16 nId ) return (SwCharFmt*)GetFmtFromPool( nId ); } - // pruefe, ob diese "Auto-Collection" in Dokument schon/noch - // benutzt wird +// Check if this AutoCollection is already/still in use bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const { SwFmt *pNewFmt = 0; @@ -1200,7 +1195,7 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const } else { - OSL_FAIL( "ungueltige Id" ); + OSL_FAIL( "invalid Id" ); bFnd = sal_False; } @@ -1214,11 +1209,11 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const bFnd = sal_True; } - // nicht gefunden oder keine Abhaengigen ? + // Not found or no dependecies? if( bFnd && pNewFmt->GetDepends() ) { - // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt - // (auch indirekte fuer Format-Ableitung! ) + // Check if we have dependent ContentNodes in the Nodes array + // (also indirect ones for derived Formats) SwAutoFmtGetDocNode aGetHt( &GetNodes() ); bFnd = !pNewFmt->GetInfo( aGetHt ); } @@ -1246,7 +1241,7 @@ void lcl_GetStdPgSize( SwDoc* pDoc, SfxItemSet& rSet ) SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) { OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END, - "Falsche AutoFormat-Id" ); + "Wrong AutoFormat Id" ); SwPageDesc *pNewPgDsc; sal_uInt16 n; @@ -1257,10 +1252,10 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) return pNewPgDsc; } - // Fehlerfall: unbekannte Poolvorlage + // Fault: unknown Pool template if( RES_POOLPAGE_BEGIN > nId || nId >= RES_POOLPAGE_END ) { - OSL_ENSURE( !this, "ungueltige Id" ); + OSL_ENSURE( !this, "invalid Id" ); nId = RES_POOLPAGE_BEGIN; } @@ -1293,7 +1288,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) switch( nId ) { - case RES_POOLPAGE_STANDARD: // Standard-Seite + case RES_POOLPAGE_STANDARD: // Standard page { aSet.Put( aLR ); aSet.Put( aUL ); @@ -1302,8 +1297,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLPAGE_FIRST: // Erste Seite - case RES_POOLPAGE_REGISTER: // Verzeichnis + case RES_POOLPAGE_FIRST: // First page + case RES_POOLPAGE_REGISTER: // Register { lcl_GetStdPgSize( this, aSet ); aSet.Put( aLR ); @@ -1317,7 +1312,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLPAGE_LEFT: // Linke Seite + case RES_POOLPAGE_LEFT: // Link page { lcl_GetStdPgSize( this, aSet ); aSet.Put( aLR ); @@ -1332,7 +1327,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) } } break; - case RES_POOLPAGE_RIGHT: // Rechte Seite + case RES_POOLPAGE_RIGHT: // Right page { lcl_GetStdPgSize( this, aSet ); aSet.Put( aLR ); @@ -1346,7 +1341,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) } break; - case RES_POOLPAGE_JAKET: // Umschlag + case RES_POOLPAGE_JAKET: // Jaket { aLR.SetLeft( 0 ); aLR.SetRight( 0 ); aUL.SetUpper( 0 ); aUL.SetLower( 0 ); @@ -1426,7 +1421,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId ) { OSL_ENSURE( RES_POOLNUMRULE_BEGIN <= nId && nId < RES_POOLNUMRULE_END, - "Falsche AutoFormat-Id" ); + "Wrong AutoFormat Id" ); SwNumRule* pNewRule; sal_uInt16 n; @@ -1437,10 +1432,10 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId ) return pNewRule; } - // Fehlerfall: unbekannte Poolvorlage + // Fault: unknown Pool template if( RES_POOLNUMRULE_BEGIN > nId || nId >= RES_POOLNUMRULE_END ) { - OSL_ENSURE( !this, "ungueltige Id" ); + OSL_ENSURE( !this, "invalid Id" ); nId = RES_POOLNUMRULE_BEGIN; } @@ -2082,12 +2077,11 @@ SwNumRule* SwDoc::GetNumRuleFromPool( sal_uInt16 nId ) - // pruefe, ob diese "Auto-Collection" in Dokument schon/noch - // benutzt wird +// Check if this AutoCollection is already/still in use in this Document bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const { OSL_ENSURE( RES_POOLPAGE_BEGIN <= nId && nId < RES_POOLPAGE_END, - "Falsche AutoFormat-Id" ); + "Wrong AutoFormat Id" ); SwPageDesc *pNewPgDsc = 0; sal_Bool bFnd = sal_False; for( sal_uInt16 n = 0; !bFnd && n < aPageDescs.Count(); ++n ) @@ -2097,26 +2091,26 @@ bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const bFnd = sal_True; } - // nicht gefunden oder keine Abhaengigen ? + // Not found or no dependencies? if( !bFnd || !pNewPgDsc->GetDepends() ) // ?????? return sal_False; - // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt - // (auch indirekte fuer Format-Ableitung! ) + // Check if we have dependent ContentNodes in the Nodes array + // (also indirect ones for derived Formats) SwAutoFmtGetDocNode aGetHt( &GetNodes() ); return !pNewPgDsc->GetInfo( aGetHt ); } -// erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird +// See if the Paragraph/Character/Frame/Page Template is in use sal_Bool SwDoc::IsUsed( const SwModify& rModify ) const { - // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt - // (auch indirekte fuer Format-Ableitung! ) + // Check if we have dependent ContentNodes in the Nodes array + // (also indirect ones for derived Formats) SwAutoFmtGetDocNode aGetHt( &GetNodes() ); return !rModify.GetInfo( aGetHt ); } -// erfrage ob die NumRule benutzt wird +// See if the NumRule is used sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const { sal_Bool bUsed = rRule.GetTxtNodeListSize() > 0 || @@ -2125,11 +2119,11 @@ sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const return bUsed; } - // Suche die Position vom Vorlagen-Namen. Ist nicht vorhanden - // dann fuege neu ein +// Look for the Template name's position. If it doesn't exist, +// insert a anew sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName ) { - OSL_ENSURE( rPatternName.Len(), "kein Dokument-Vorlagenname" ); + OSL_ENSURE( rPatternName.Len(), "no Document Template name" ); sal_uInt16 nNewPos = aPatternNms.Count(); for( sal_uInt16 n = 0; n < aPatternNms.Count(); ++n ) @@ -2142,7 +2136,7 @@ sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName ) return n; if( nNewPos < aPatternNms.Count() ) - aPatternNms.Remove( nNewPos ); // Platz wieder frei machen + aPatternNms.Remove( nNewPos ); // Free space again String* pNewNm = new String( rPatternName ); aPatternNms.Insert( pNewNm, nNewPos ); @@ -2153,17 +2147,17 @@ sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName ) sal_uInt16 GetPoolParent( sal_uInt16 nId ) { sal_uInt16 nRet = USHRT_MAX; - if( POOLGRP_NOCOLLID & nId ) // 1 == Formate / 0 == Collections + if( POOLGRP_NOCOLLID & nId ) // 1 == Formats / 0 == Collections { switch( ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID ) & nId ) { case POOLGRP_CHARFMT: case POOLGRP_FRAMEFMT: - nRet = 0; // vom default abgeleitet + nRet = 0; // derived from the default break; case POOLGRP_PAGEDESC: case POOLGRP_NUMRULE: - break; // es gibt keine Ableitung + break; // there are no derivations } } else diff --git a/sw/source/core/doc/sortopt.cxx b/sw/source/core/doc/sortopt.cxx index ae8393643743..f4cc8da8f5b7 100644 --- a/sw/source/core/doc/sortopt.cxx +++ b/sw/source/core/doc/sortopt.cxx @@ -33,7 +33,7 @@ SV_IMPL_PTRARR(SwSortKeys, SwSortKey*) /*-------------------------------------------------------------------- - Beschreibung: Sortier-Schluessel + Description: Sort Key --------------------------------------------------------------------*/ SwSortKey::SwSortKey() : eSortOrder( SRT_ASCENDING ), @@ -59,7 +59,7 @@ SwSortKey::SwSortKey(const SwSortKey& rOld) : } /*-------------------------------------------------------------------- - Beschreibung: Sortieroptionen fuers Sortieren + Description: Sorting options for Sorting --------------------------------------------------------------------*/ SwSortOptions::SwSortOptions() : eDirection( SRT_ROWS ), diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 149a076ebcf6..786d755e11bd 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -55,14 +55,14 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint ) { if( rHint.ISA( INetURLHistoryHint ) && pDoc->GetCurrentViewShell() ) //swmod 071108//swmod 071225 { - // diese URL wurde veraendert: + // This URL has been changed: const INetURLObject* pIURL = ((INetURLHistoryHint&)rHint).GetObject(); String sURL( pIURL->GetMainURL( INetURLObject::NO_DECODE ) ), sBkmk; SwEditShell* pESh = pDoc->GetEditShell(); if( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() && - // falls das unser Doc ist, kann es auch lokale Spruenge geben! + // If this is our Doc, we can also have local jumps! sURL == pDoc->GetDocShell()->GetMedium()->GetName() ) (sBkmk = pIURL->GetMark()).Insert( INET_MARK_TOKEN, 0 ); @@ -101,8 +101,8 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint ) } } - // erfrage ob die URL besucht war. Uebers Doc, falls nur ein Bookmark - // angegeben ist. Dann muss der Doc. Name davor gesetzt werden! +// Check if the URL has been visited before. Via the Doc, if only one Bookmark is set +// We need to put the Doc's name before it! sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const { sal_Bool bRet = sal_False; @@ -118,8 +118,7 @@ sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const else bRet = pHist->QueryUrl( rURL ); - // dann wollen wird auch ueber Statusaenderungen in der History - // informiert werden! + // We also want to be informed about status updates in the History if( !pURLStateChgd ) { SwDoc* pD = (SwDoc*)this; @@ -129,6 +128,4 @@ sal_Bool SwDoc::IsVisitedURL( const String& rURL ) const return bRet; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |