[Libreoffice-commits] .: 2 commits - svx/source sw/source
Stefan Knorr
astron at kemper.freedesktop.org
Wed Feb 15 05:40:52 PST 2012
svx/source/svdraw/sdrpagewindow.cxx | 4
svx/source/svdraw/svdattr.cxx | 2
svx/source/svdraw/svdcrtv.cxx | 8
svx/source/svdraw/svddrgmt.cxx | 6
svx/source/svdraw/svdedtv1.cxx | 23 -
svx/source/svdraw/svdedtv2.cxx | 2
svx/source/svdraw/svdedxv.cxx | 3
svx/source/svdraw/svdfmtf.cxx | 4
svx/source/svdraw/svdglue.cxx | 2
svx/source/svdraw/svdhdl.cxx | 2
svx/source/svdraw/svdibrow.cxx | 2
svx/source/svdraw/svdmodel.cxx | 2
svx/source/svdraw/svdmrkv.cxx | 7
svx/source/svdraw/svdmrkv1.cxx | 2
svx/source/svdraw/svdoashp.cxx | 6
svx/source/svdraw/svdograf.cxx | 4
svx/source/svdraw/svdomeas.cxx | 2
svx/source/svdraw/svdoole2.cxx | 2
svx/source/svdraw/svdorect.cxx | 2
svx/source/svdraw/svdotext.cxx | 2
svx/source/svdraw/svdotxdr.cxx | 2
svx/source/svdraw/svdpage.cxx | 14
svx/source/svdraw/svdstr.src | 2
svx/source/svdraw/svdtext.cxx | 2
svx/source/svdraw/svdundo.cxx | 2
svx/source/svdraw/svdview.cxx | 2
sw/source/core/doc/ftnidx.cxx | 23 -
sw/source/core/doc/gctable.cxx | 54 +-
sw/source/core/doc/notxtfrm.cxx | 113 ++---
sw/source/core/doc/swserv.cxx | 29 -
sw/source/core/doc/tblafmt.cxx | 65 +--
sw/source/core/doc/tblrwcl.cxx | 742 +++++++++++++++++-------------------
32 files changed, 545 insertions(+), 592 deletions(-)
New commits:
commit 5be6008e9e13c30bee2f5c70b9de778529d128c0
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date: Wed Feb 15 13:19:06 2012 +0100
Translate German comments
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index 52f9873..0b12880 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -204,8 +204,7 @@ void SwFtnIdxs::UpdateAllFtn()
if( !Count() )
return;
- // besorge erstmal das Nodes-Array ueber den StartIndex der
- // ersten Fussnote
+ // Get the NodesArray via the StartIndex of the first Footnote
SwDoc* pDoc = (SwDoc*) (*this)[ 0 ]->GetTxtNode().GetDoc();
SwTxtFtn* pTxtFtn;
const SwEndNoteInfo& rEndInfo = pDoc->GetEndNoteInfo();
@@ -215,26 +214,25 @@ void SwFtnIdxs::UpdateAllFtn()
SwRootFrm* pTmpRoot = pDoc->GetCurrentLayout();//swmod 080305
std::set<SwRootFrm*> aAllLayouts = pDoc->GetAllLayouts();
- //Fuer normale Fussnoten werden Chapter- und Dokumentweise Nummerierung
- //getrennt behandelt. Fuer Endnoten gibt es nur die Dokumentweise
- //Nummerierung.
+ // For normal Footnotes per-chapter and per-document numbering are treated separately.
+ // For Endnotes we only have document-wise numbering.
if( FTNNUM_CHAPTER == rFtnInfo.eNum )
{
const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- sal_uInt16 nNo = 1, // Nummer fuer die Fussnoten
- nFtnIdx = 0; // Index in das FtnIdx-Array
+ sal_uInt16 nNo = 1, // Number for the Footnotes
+ nFtnIdx = 0; // Index into theFtnIdx array
for( sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
{
if ( rOutlNds[ n ]->GetTxtNode()->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
- sal_uLong nCapStt = rOutlNds[ n ]->GetIndex(); // Start eines neuen Kapitels
+ sal_uLong nCapStt = rOutlNds[ n ]->GetIndex(); // Start of a new chapter
for( ; nFtnIdx < Count(); ++nFtnIdx )
{
pTxtFtn = (*this)[ nFtnIdx ];
if( pTxtFtn->GetTxtNode().GetIndex() >= nCapStt )
break;
- // Endnoten nur Dokumentweise
+ // Endnotes are per-document only
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.IsEndNote() && !rFtn.GetNumStr().Len() &&
!SwUpdFtnEndNtAtEnd::FindSectNdWithEndAttr( *pTxtFtn ))
@@ -242,14 +240,14 @@ void SwFtnIdxs::UpdateAllFtn()
&rFtn.GetNumStr() );
}
if( nFtnIdx >= Count() )
- break; // ok alles geupdatet
+ break; // ok, everything is updated
nNo = 1;
}
}
for( nNo = 1; nFtnIdx < Count(); ++nFtnIdx )
{
- //Endnoten nur Dokumentweise
+ // Endnotes are per-document
pTxtFtn = (*this)[ nFtnIdx ];
const SwFmtFtn &rFtn = pTxtFtn->GetFtn();
if( !rFtn.IsEndNote() && !rFtn.GetNumStr().Len() &&
@@ -260,8 +258,7 @@ void SwFtnIdxs::UpdateAllFtn()
}
- // sal_Bool, damit hier auch bei Chapter-Einstellung die Endnoten
- // durchlaufen.
+ // We use sal_Bool here, so that we also iterate through the Endnotes with a chapter setting.
const sal_Bool bEndNoteOnly = FTNNUM_DOC != rFtnInfo.eNum;
sal_uInt16 nFtnNo = 0, nEndNo = 0;
for( sal_uInt16 nPos = 0; nPos < Count(); ++nPos )
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 9091642..4764f94 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -101,7 +101,7 @@ sal_Bool lcl_GCBorder_GetLastBox_B( const SwTableBox*& rpBox, void* pPara )
return sal_True;
}
-// suche das "Ende" der vorgegebene BorderLine. Returnt wird die "Layout"Pos!
+// Find the "end" of the passed BorderLine. Returns the "Layout"Pos!
sal_uInt16 lcl_FindEndPosOfBorder( const SwCollectTblLineBoxes& rCollTLB,
const SvxBorderLine& rBrdLn, sal_uInt16& rStt, sal_Bool bTop )
{
@@ -173,8 +173,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
{
_SwGCLineBorder* pGCPara = (_SwGCLineBorder*)pPara;
- // zuerst die rechte Kante mit der linken Kante der naechsten Box
- // innerhalb dieser Line
+ // First the right edge with the left edge of the succeeding Box within this Line
{
_SwGCBorder_BoxBrd aBPara;
const SvxBorderLine* pBrd;
@@ -215,7 +214,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
}
}
- // und jetzt die eigene untere Kante mit der nachfolgenden oberen Kante
+ // And now the own bottom edge with the succeeding top edge
if( !pGCPara->IsLastLine() )
{
SwCollectTblLineBoxes aBottom( sal_False );
@@ -226,7 +225,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
const SwTableLine* pNextLine = (*pGCPara->pLines)[ pGCPara->nLinePos+1 ];
::lcl_Line_CollectBox( pNextLine, &aTop );
- // dann entferne mal alle "doppelten" gleichen Lines
+ // remove all "duplicated" Lines that are the same
sal_uInt16 nBtmPos, nTopPos,
nSttBtm = 0, nSttTop = 0,
nEndBtm = aBottom.Count(), nEndTop = aTop.Count();
@@ -245,7 +244,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
if( pTopLine && pBtmLine && *pTopLine == *pBtmLine )
{
- // dann kann einer entfernt werden, aber welche?
+ // We can remove one, but which one?
sal_uInt16 nSavSttBtm = nSttBtm, nSavSttTop = nSttTop;
sal_uInt16 nBtmEndPos = ::lcl_FindEndPosOfBorder( aBottom,
*pTopLine, nSttBtm, sal_False );
@@ -257,7 +256,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
if( nTopEndPos <= nBtmEndPos )
{
- // dann die TopBorder bis zur BottomEndPos loeschen
+ // Delete the TopBorders until BottomEndPos
nSttTop = nSavSttTop;
if( nTopPos <= nBtmEndPos )
lcl_GCBorder_DelBorder( aTop, --nSttTop, sal_True,
@@ -268,7 +267,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
}
else
{
- // sonst die BottomBorder bis zur TopEndPos loeschen
+ // Else delete the BottomBorders until TopEndPos
nSttBtm = nSavSttBtm;
if( nBtmPos <= nTopEndPos )
lcl_GCBorder_DelBorder( aBottom, --nSttBtm, sal_False,
@@ -343,7 +342,7 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
sal_uInt16 n, nLen = rpBox->GetTabLines().Count();
if( nLen )
{
- // ACHTUNG: die Anzahl der Lines kann sich aendern!
+ // ATTENTION: The Line count can change!
_GCLinePara aPara( rpBox->GetTabLines(), (_GCLinePara*)pPara );
for( n = 0; n < rpBox->GetTabLines().Count() &&
lcl_MergeGCLine( *(rpBox->GetTabLines().GetData() + n), &aPara );
@@ -352,8 +351,8 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
if( 1 == rpBox->GetTabLines().Count() )
{
- // Box mit einer Line, dann verschiebe alle Boxen der Line
- // hinter diese Box in der Parent-Line und loesche diese Box
+ // Box with a Line, then move all the Line's Boxes after this Box
+ // into the parent Line and delete this Box
SwTableLine* pInsLine = rpBox->GetUpper();
SwTableLine* pCpyLine = rpBox->GetTabLines()[0];
sal_uInt16 nInsPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, rpBox );
@@ -362,10 +361,10 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
pInsLine->GetTabBoxes().Insert( &pCpyLine->GetTabBoxes(), nInsPos+1 );
pCpyLine->GetTabBoxes().Remove( 0, n );
- // loesche alte die Box mit der Line
+ // Delete the old Box with the Line
pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos );
- return sal_False; // neu aufsetzen
+ return sal_False; // set up anew
}
}
return sal_True;
@@ -380,31 +379,30 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
_GCLinePara* pGCPara = (_GCLinePara*)pPara;
while( 1 == nLen )
{
- // es gibt eine Box mit Lines
+ // We have a Box with Lines
SwTableBox* pBox = pLn->GetTabBoxes()[0];
if( !pBox->GetTabLines().Count() )
break;
SwTableLine* pLine = pBox->GetTabLines()[0];
- // pLine wird zu der aktuellen, also der rpLine,
- // die restlichen werden ins LinesArray hinter der akt.
- // verschoben.
- // Das LinesArray ist im pPara!
+ // pLine turns into the current Line (that is rpLine), the rest is moved
+ // into the LinesArray past the current one.
+ // The LinesArray is in pPara!
nLen = pBox->GetTabLines().Count();
SwTableLines& rLns = *pGCPara->pLns;
const SwTableLine* pTmp = pLn;
sal_uInt16 nInsPos = rLns.GetPos( pTmp );
- OSL_ENSURE( USHRT_MAX != nInsPos, "Line nicht gefunden!" );
+ OSL_ENSURE( USHRT_MAX != nInsPos, "Could not find Line!" );
SwTableBox* pUpper = pLn->GetUpper();
- rLns.Remove( nInsPos, 1 ); // die Line dem aus Array loeschen
+ rLns.Remove( nInsPos, 1 ); // remove the Line from the array
rLns.Insert( &pBox->GetTabLines(), nInsPos );
- // JP 31.03.99: Bug 60000 - die Attribute der zu loeschenden
- // Line an die "eingefuegten" uebertragen
+ // JP 31.03.99: Bug 60000
+ // Pass the attributes of the to-be-deleted Lines to the "inserted" one
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pLn->GetFrmFmt()->GetItemState(
RES_BACKGROUND, sal_True, &pItem ))
@@ -416,19 +414,19 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem );
}
- pBox->GetTabLines().Remove( 0, nLen ); // Lines aus Array loeschen
+ pBox->GetTabLines().Remove( 0, nLen ); // Remove Lines from the array
delete pLn;
- // Abhaengigkeit neu setzen
+ // Set the dependency anew
while( nLen-- )
rLns[ nInsPos++ ]->SetUpper( pUpper );
- pLn = pLine; // und neu setzen
+ pLn = pLine; // and set up anew
nLen = pLn->GetTabBoxes().Count();
}
- // ACHTUNG: die Anzahl der Boxen kann sich aendern!
+ // ATTENTION: The number of boxes can change!
for( nLen = 0; nLen < pLn->GetTabBoxes().Count(); ++nLen )
if( !lcl_MergeGCBox( *(pLn->GetTabBoxes().GetData() + nLen ), pPara ))
--nLen;
@@ -436,10 +434,10 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
return sal_True;
}
- // Struktur ein wenig aufraeumen
+// Clean structure a bit
void SwTable::GCLines()
{
- // ACHTUNG: die Anzahl der Lines kann sich aendern!
+ // ATTENTION: The Line count can change!
_GCLinePara aPara( GetTabLines() );
SwShareBoxFmts aShareFmts;
aPara.pShareFmts = &aShareFmts;
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index b46220c..83b2fa9 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -159,16 +159,15 @@ SwNoTxtFrm::SwNoTxtFrm(SwNoTxtNode * const pNode, SwFrm* pSib )
InitCtor();
}
-// Initialisierung: z.Zt. Eintragen des Frames im Cache
+// Initialization: Currently add the Frame to the Cache
void SwNoTxtFrm::InitCtor()
{
nType = FRMC_NOTXT;
- // Das Gewicht der Grafik ist 0, wenn sie noch nicht
- // gelesen ist, < 0, wenn ein Lesefehler auftrat und
- // Ersatzdarstellung angewendet werden musste und >0,
- // wenn sie zur Verfuegung steht.
+ // The graphic's weight is 0 if it has not been read,
+ // < 0 if we had a read error and we needed to use the replacement and
+ // > 0 if it is available
nWeight = 0;
}
@@ -268,7 +267,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
!pSh->GetWin() )
StopAnimation();
- SfxProgress::EnterLock(); //Keine Progress-Reschedules im Paint (SwapIn)
+ SfxProgress::EnterLock(); // No progress reschedules in paint (SwapIn)
OutputDevice *pOut = pSh->GetOut();
pOut->Push();
@@ -303,16 +302,15 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
aPaintArea._Intersection( aOrigPaint );
SwRect aNormal( Frm().Pos() + Prt().Pos(), Prt().SSize() );
- aNormal.Justify(); //Normalisiertes Rechteck fuer die Vergleiche
+ aNormal.Justify(); // Normalized rectangle for the comparisons
if( aPaintArea.IsOver( aNormal ) )
{
- // berechne die 4 zu loeschenden Rechtecke
+ // Calculate the four to-be-deleted rectangles
if( pSh->GetWin() )
::lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, aNormal );
- // in der Schnittmenge vom PaintBereich und der Bitmap liegt
- // der absolut sichtbare Bereich vom Frame
+ // The intersection of the PaintArea and the Bitmap contains the absolutely visible area of the Frame
aPaintArea._Intersection( aNormal );
if ( bClip )
@@ -321,7 +319,7 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
PaintPicture( pOut, aGrfArea );
}
else
- // wenn nicht sichtbar, loesche einfach den angegebenen Bereich
+ // If it's not visible, simply delete the given Area
lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, SwRect() );
if( pGrfNd )
pGrfNd->SetFrameInPaint( sal_False );
@@ -335,12 +333,12 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|* void lcl_CalcRect( Point & aPt, Size & aDim,
|* sal_uInt16 nMirror )
|*
-|* Beschreibung Errechne die Position und die Groesse der Grafik im
-|* Frame, entsprechen der aktuellen Grafik-Attribute
+|* Calculate the position and the size of the graphic in the Frame,
+|* corresponding to the current graphic attributes
|*
-|* Parameter Point& die Position im Frame ( auch Return-Wert )
-|* Size& die Groesse der Grafik ( auch Return-Wert )
-|* MirrorGrf akt. Spiegelungs-Attribut
+|* Point& the position in the Frame (also returned)
+|* Size& the graphic's size (also returned)
+|* nMirror the current mirror attribute
|*
*************************************************************************/
@@ -364,19 +362,18 @@ void lcl_CalcRect( Point& rPt, Size& rDim, sal_uInt16 nMirror )
|*
|* void SwNoTxtFrm::GetGrfArea()
|*
-|* Beschreibung Errechne die Position und die Groesse der Bitmap
-|* innerhalb des uebergebenem Rechtecks.
+|* Calculate the Bitmap's position and the size within the passed rectangle
|*
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
sal_Bool ) const
{
- //currently only used for scaling, cropping and mirroring the contour of graphics!
- //all other is handled by the GraphicObject
+ // Currently only used for scaling, cropping and mirroring the contour of graphics!
+ // Everything else is handled by GraphicObject
- //In rRect wird das sichbare Rechteck der Grafik gesteckt.
- //In pOrigRect werden Pos+Size der Gesamtgrafik gesteck.
+ // We put the graphic's visible rectangle into rRect.
+ // pOrigRect contains position and size of the whole graphic.
const SwAttrSet& rAttrSet = GetNode()->GetSwAttrSet();
const SwCropGrf& rCrop = rAttrSet.GetCropGrf();
@@ -396,7 +393,8 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
}
}
- //Grafik wird vom Node eingelesen falls notwendig. Kann aber schiefgehen.
+ // We read graphic from the Node, if needed.
+ // It may fail, however.
long nLeftCrop, nRightCrop, nTopCrop, nBottomCrop;
Size aOrigSz( ((SwNoTxtNode*)GetNode())->GetTwipSize() );
if ( !aOrigSz.Width() )
@@ -449,7 +447,7 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
Point aVisPt( Frm().Pos() + Prt().Pos() );
Point aGrfPt( aVisPt );
- //Erst das 'sichtbare' Rect einstellen.
+ // Set the "visible" rectangle first
if ( nLeftCrop > 0 )
{
aVisPt.X() += nLeftCrop;
@@ -468,7 +466,7 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
rRect.Pos ( aVisPt );
rRect.SSize( aVisSz );
- //Ggf. Die Gesamtgrafik berechnen
+ // Calculate the whole graphic if needed
if ( pOrigRect )
{
Size aTmpSz( aGrfSz );
@@ -489,15 +487,14 @@ void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
|*
|* Size SwNoTxtFrm::GetSize()
|*
-|* Beschreibung Gebe die Groesse des umgebenen FLys und
-|* damit die der Grafik zurueck.
+|* By returning the surrounding Fly's size which equals the graphic's size
|*
*************************************************************************/
const Size& SwNoTxtFrm::GetSize() const
{
- // gebe die Groesse des Frames zurueck
+ // Return the Frame's size
const SwFrm *pFly = FindFlyFrm();
if( !pFly )
pFly = this;
@@ -537,7 +534,7 @@ void SwNoTxtFrm::MakeAll()
|*
|* SwNoTxtFrm::Format()
|*
-|* Beschreibung Errechne die Groesse der Bitmap, wenn noetig
+|* Calculate the Bitmap's site, if needed
|*
*************************************************************************/
@@ -546,7 +543,7 @@ void SwNoTxtFrm::Format( const SwBorderAttrs * )
{
const Size aNewSize( GetSize() );
- // hat sich die Hoehe geaendert?
+ // Did the height change?
SwTwips nChgHght = IsVertical() ?
(SwTwips)(aNewSize.Width() - Prt().Width()) :
(SwTwips)(aNewSize.Height() - Prt().Height());
@@ -577,10 +574,10 @@ sal_Bool SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
rRect.Justify();
- // liegt die Bitmap ueberhaupt im sichtbaren Berich ?
+ // Is the Bitmap in the visible area at all?
if( !aFrameRect.IsOver( rRect ) )
{
- // wenn nicht dann steht der Cursor auf dem Frame
+ // If not, then the Cursor is on the Frame
rRect = aFrameRect;
rRect.Width( 1 );
}
@@ -721,7 +718,7 @@ void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
else if ( pSh->VisArea().IsOver( aRect ) &&
OUTDEV_WINDOW == pSh->GetOut()->GetOutDevType() )
{
- //invalidate instead of painting
+ // invalidate instead of painting
pSh->GetWin()->Invalidate( aRect.SVRect() );
}
@@ -771,12 +768,12 @@ void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, Out
}
}
-// Ausgabe der Grafik. Hier wird entweder eine QuickDraw-Bmp oder
-// eine Grafik vorausgesetzt. Ist nichts davon vorhanden, wird
-// eine Ersatzdarstellung ausgegeben.
-/// delete unused 3rd parameter.
-/// use aligned rectangle for drawing graphic.
-/// pixel-align coordinations for drawing graphic.
+// Paint the graphic.
+// We require either a QuickDraw-Bitmap or a graphic here. If we do not have
+// either, we return a replacement.
+// delete unused 3rd parameter.
+// use aligned rectangle for drawing graphic.
+// pixel-align coordinations for drawing graphic.
void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) const
{
ViewShell* pShell = getRootFrm()->GetCurrShell();
@@ -790,25 +787,25 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() );
- /// calculate aligned rectangle from parameter <rGrfArea>.
- /// Use aligned rectangle <aAlignedGrfArea> instead of <rGrfArea> in
- /// the following code.
+ // calculate aligned rectangle from parameter <rGrfArea>.
+ // Use aligned rectangle <aAlignedGrfArea> instead of <rGrfArea> in
+ // the following code.
SwRect aAlignedGrfArea = rGrfArea;
::SwAlignRect( aAlignedGrfArea, pShell );
if( !bIsChart )
{
- /// Because for drawing a graphic left-top-corner and size coordinations are
- /// used, these coordinations have to be determined on pixel level.
+ // Because for drawing a graphic left-top-corner and size coordinations are
+ // used, these coordinations have to be determined on pixel level.
::SwAlignGrfRect( &aAlignedGrfArea, *pOut );
}
else //if( bIsChart )
{
- //#i78025# charts own borders are not completely visible
- //the above pixel correction is not correct - at least not for charts
- //so a different pixel correction is choosen here
- //this might be a good idea for all other OLE objects also,
- //but as I cannot oversee the consequences I fix it only for charts for now
+ // #i78025# charts own borders are not completely visible
+ // the above pixel correction is not correct - at least not for charts
+ // so a different pixel correction is chosen here
+ // this might be a good idea for all other OLE objects also,
+ // but as I cannot oversee the consequences I fix it only for charts for now
lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut );
}
@@ -836,7 +833,6 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
}
// #i85717#, #i90395# - check, if asynchronous retrieval
// if input stream for the graphic is possible
-// else if( GRAPHIC_DEFAULT == rGrfObj.GetType() &&
else if ( ( rGrfObj.GetType() == GRAPHIC_DEFAULT ||
rGrfObj.GetType() == GRAPHIC_NONE ) &&
pGrfNd->IsLinkedFile() &&
@@ -893,7 +889,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
OSL_ENSURE( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport(),
- "pOut sollte kein virtuelles Device sein" );
+ "pOut should not be a virtual device" );
rGrfObj.StartAnimation( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), long(this),
@@ -928,7 +924,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, sal_True );
}
- //Beim Drucken duerfen wir nicht die Grafiken sammeln...
+ // When printing, we must not collect the graphics
if( bSwapped && bPrn )
bForceSwap = sal_True;
}
@@ -940,13 +936,13 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
}
else if( bIsChart
- //charts must be painted resolution dependent!! #i82893#, #i75867#
+ // Charts must be painted resolution dependent!! #i82893#, #i75867#
&& ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice( pOut )
&& svt::EmbeddedObjectRef::TryRunningState( pOLENd->GetOLEObj().GetOleRef() )
&& ChartPrettyPainter::DoPrettyPaintChart( uno::Reference< frame::XModel >(
pOLENd->GetOLEObj().GetOleRef()->getComponent(), uno::UNO_QUERY), pOut, aAlignedGrfArea.SVRect() ) )
{
- (void)(0);//all was done in if statement
+ (void)(0);// all was done in if statement
}
else if( pOLENd )
{
@@ -967,8 +963,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
Point aPosition(aAlignedGrfArea.Pos());
Size aSize(aAlignedGrfArea.SSize());
- // Im BrowseModus gibt es nicht unbedingt einen Drucker und
- // damit kein JobSetup, also legen wir eines an ...
+ // We do not have a printer in the BrowseMode and thus no JobSetup, so we create one ...
const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup();
sal_Bool bDummyJobSetup = 0 == pJobSetup;
if( bDummyJobSetup )
@@ -995,7 +990,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
::svt::EmbeddedObjectRef::DrawPaintReplacement( Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut );
if( bDummyJobSetup )
- delete pJobSetup; // ... und raeumen wieder auf.
+ delete pJobSetup; // ... and clean it up again
sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() );
if ( !bPrn && pShell->ISA( SwCrsrShell ) &&
@@ -1022,14 +1017,14 @@ sal_Bool SwNoTxtFrm::IsTransparent() const
if( 0 != (pNd = GetNode()->GetGrfNode()) )
return pNd->IsTransparent();
- //#29381# OLE sind immer Transparent.
+ //#29381# OLE are always transparent
return sal_True;
}
void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
{
- //animierte Grafiken anhalten
+ // Stop animated graphics
SwGrfNode* pGrfNd = (SwGrfNode*)GetNode()->GetGrfNode();
if( pGrfNd && pGrfNd->IsAnimated() )
pGrfNd->GetGrfObj().StopAnimation( pOut, long(this) );
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index ed09579..1445b27 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -76,7 +76,7 @@ sal_Bool SwServerObject::GetData( uno::Any & rData,
case BOOKMARK_SERVER:
if( CNTNT_TYPE.pBkmk->IsExpanded() )
{
- // Bereich aufspannen
+ // Span area
pPam = new SwPaM( CNTNT_TYPE.pBkmk->GetMarkPos(),
CNTNT_TYPE.pBkmk->GetOtherMarkPos() );
}
@@ -99,7 +99,7 @@ sal_Bool SwServerObject::GetData( uno::Any & rData,
if( pPam )
{
- // Stream anlegen
+ // Create stream
SvMemoryStream aMemStm( 65535, 65535 );
SwWriter aWrt( aMemStm, *pPam, sal_False );
if( !IsError( aWrt.Write( xWrt )) )
@@ -128,7 +128,7 @@ sal_Bool SwServerObject::SetData( const String & ,
void SwServerObject::SendDataChanged( const SwPosition& rPos )
{
- // ist an unseren Aenderungen jemand interessiert ?
+ // Is someone interested in our changes?
if( HasDataLinks() )
{
int bCall = sal_False;
@@ -155,7 +155,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
if( bCall )
{
- // Recursionen erkennen und flaggen
+ // Recognize recursions and flag them
IsLinkInServer( 0 );
SvLinkSource::NotifyDataChanged();
}
@@ -165,7 +165,7 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
void SwServerObject::SendDataChanged( const SwPaM& rRange )
{
- // ist an unseren Aenderungen jemand interessiert ?
+ // Is someone interested in our changes?
if( HasDataLinks() )
{
int bCall = sal_False;
@@ -187,14 +187,14 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
}
if( pNd )
{
- // liegt der Start-Bereich im Node Bereich ?
+ // Is the start area within the node area?
bCall = pStt->nNode.GetIndex() < pNd->EndOfSectionIndex() &&
pEnd->nNode.GetIndex() >= pNd->GetIndex();
}
if( bCall )
{
- // Recursionen erkennen und flaggen
+ // Recognize recursions and flag them
IsLinkInServer( 0 );
SvLinkSource::NotifyDataChanged();
}
@@ -243,10 +243,10 @@ sal_Bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
if( nSttNd && nEndNd )
{
- // LinkManager besorgen:
+ // Get LinkManager
const ::sfx2::SvBaseLinks& rLnks = pNds->GetDoc()->GetLinkManager().GetLinks();
-// um Rekursionen zu Verhindern: ServerType umsetzen!
+// To avoid recursions: convert ServerType!
SwServerObject::ServerModes eSave = eType;
if( !pChkLnk )
((SwServerObject*)this)->eType = NONE_SERVER;
@@ -322,8 +322,7 @@ SwDataChanged::SwDataChanged( SwDoc* pDc, const SwPosition& rPos, sal_uInt16 nTy
SwDataChanged::~SwDataChanged()
{
- // JP 09.04.96: nur wenn das Layout vorhanden ist ( also waehrend der
- // Eingabe)
+ // JP 09.04.96: Only if the Layout is available (thus during input)
if( pDoc->GetCurrentViewShell() ) //swmod 071108//swmod 071225
{
const ::sfx2::SvLinkSources& rServers = pDoc->GetLinkManager().GetServers();
@@ -331,7 +330,7 @@ SwDataChanged::~SwDataChanged()
for( sal_uInt16 nCnt = rServers.Count(); nCnt; )
{
::sfx2::SvLinkSourceRef refObj( rServers[ --nCnt ] );
- // noch jemand am Object interessiert ?
+ // Any one else interested in the Object?
if( refObj->HasDataLinks() && refObj->ISA( SwServerObject ))
{
SwServerObject& rObj = *(SwServerObject*)&refObj;
@@ -341,11 +340,11 @@ SwDataChanged::~SwDataChanged()
rObj.SendDataChanged( *pPam );
}
- // sollte jetzt gar keine Verbindung mehr bestehen
+ // We shouldn't have a connection anymore
if( !refObj->HasDataLinks() )
{
- // dann raus aus der Liste (Object bleibt aber bestehen!)
- // falls es noch da ist !!
+ // Then remove from the list
+ // Object is not destroyed, if it still is there!
if( nCnt < rServers.Count() && &refObj == rServers[ nCnt ] )
pDoc->GetLinkManager().RemoveServer( nCnt, 1 );
}
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 1fdb642..266db7f 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -41,7 +41,7 @@
#include <svx/dialmgr.hxx>
#include <svx/dialogs.hrc>
-#define READ_OLDVERS // erstmal noch alte Versionen lesen
+#define READ_OLDVERS // read the old version for a start
#include <swtypes.hxx>
#include <doc.hxx>
#include <poolfmt.hxx>
@@ -51,13 +51,13 @@
using ::editeng::SvxBorderLine;
-// bis SO5PF
+// until SO5PF
const sal_uInt16 AUTOFORMAT_ID_X = 9501;
const sal_uInt16 AUTOFORMAT_ID_358 = 9601;
const sal_uInt16 AUTOFORMAT_DATA_ID_X = 9502;
-// ab SO5
-//! in nachfolgenden Versionen muss der Betrag dieser IDs groesser sein
+// from SO5
+//! In follow-up versions these IDs' values need to increase
const sal_uInt16 AUTOFORMAT_ID_504 = 9801;
const sal_uInt16 AUTOFORMAT_DATA_ID_504 = 9802;
@@ -96,11 +96,11 @@ SwBoxAutoFmt* SwTableAutoFmt::pDfltBoxAutoFmt = 0;
#define sAutoTblFmtName "autotbl.fmt"
-// SwTable Auto-Format-Tabelle
+// SwTable AutoFormat Table
SV_IMPL_PTRARR( _SwTableAutoFmtTbl, SwTableAutoFmt* )
-// Struct mit Versionsnummern der Items
+// Struct with version numbers of the Items
struct SwAfVersions
{
@@ -405,7 +405,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s
rStream >> eSys >> eLge;
eSysLanguage = (LanguageType) eSys;
eNumFmtLanguage = (LanguageType) eLge;
- if ( eSysLanguage == LANGUAGE_SYSTEM ) // von alten Versionen (Calc)
+ if ( eSysLanguage == LANGUAGE_SYSTEM ) // from old versions (Calc)
eSysLanguage = static_cast<LanguageType>(::GetAppLanguage());
}
@@ -481,7 +481,7 @@ sal_Bool SwBoxAutoFmt::Save( SvStream& rStream ) const
aOrientation.Store( rStream, aOrientation.GetVersion(SOFFICE_FILEFORMAT_40) );
aMargin.Store( rStream, aMargin.GetVersion(SOFFICE_FILEFORMAT_40) );
aLinebreak.Store( rStream, aLinebreak.GetVersion(SOFFICE_FILEFORMAT_40) );
- // Calc Rotation ab SO5
+ // Calc Rotation from SO5
aRotateAngle.Store( rStream, aRotateAngle.GetVersion(SOFFICE_FILEFORMAT_40) );
aRotateMode.Store( rStream, aRotateMode.GetVersion(SOFFICE_FILEFORMAT_40) );
@@ -556,9 +556,9 @@ SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
delete aBoxAutoFmt[ n ];
SwBoxAutoFmt* pFmt = rNew.aBoxAutoFmt[ n ];
- if( pFmt ) // ist gesetzt -> kopieren
+ if( pFmt ) // if is set -> copy
aBoxAutoFmt[ n ] = new SwBoxAutoFmt( *pFmt );
- else // sonst default
+ else // else default
aBoxAutoFmt[ n ] = 0;
}
@@ -586,26 +586,26 @@ SwTableAutoFmt::~SwTableAutoFmt()
void SwTableAutoFmt::SetBoxFmt( const SwBoxAutoFmt& rNew, sal_uInt8 nPos )
{
- OSL_ENSURE( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "wrong area" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
- if( pFmt ) // ist gesetzt -> kopieren
+ if( pFmt ) // if is set -> copy
*aBoxAutoFmt[ nPos ] = rNew;
- else // sonst neu setzen
+ else // else set anew
aBoxAutoFmt[ nPos ] = new SwBoxAutoFmt( rNew );
}
const SwBoxAutoFmt& SwTableAutoFmt::GetBoxFmt( sal_uInt8 nPos ) const
{
- OSL_ENSURE( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "wrong area" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
- if( pFmt ) // ist gesetzt -> kopieren
+ if( pFmt ) // if is set -> copy
return *pFmt;
- else // sonst den default returnen
+ else // else return the default
{
- // falls noch nicht vorhanden:
+ // If it doesn't exist yet:
if( !pDfltBoxAutoFmt )
pDfltBoxAutoFmt = new SwBoxAutoFmt;
return *pDfltBoxAutoFmt;
@@ -619,10 +619,10 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
UpdateFlags eFlags,
SvNumberFormatter* pNFmtr )
{
- OSL_ENSURE( nPos < 16, "falscher Bereich" );
+ OSL_ENSURE( nPos < 16, "wrong area" );
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ nPos ];
- if( !pFmt ) // ist gesetzt -> kopieren
+ if( !pFmt ) // if is set -> copy
{
pFmt = new SwBoxAutoFmt;
aBoxAutoFmt[ nPos ] = pFmt;
@@ -668,12 +668,12 @@ SwBoxAutoFmt& SwTableAutoFmt::UpdateFromSet( sal_uInt8 nPos,
static_cast<LanguageType>(::GetAppLanguage()));
else
{
- // defaulten
+ // default
pFmt->SetValueFormat( aEmptyStr, LANGUAGE_SYSTEM,
static_cast<LanguageType>(::GetAppLanguage() ));
}
}
- // den Rest koennen wir nicht, StarCalc spezifisch
+ // we cannot handle the rest, that's specific to StarCalc
return *pFmt;
}
@@ -763,7 +763,7 @@ void SwTableAutoFmt::UpdateToSet( sal_uInt8 nPos, SfxItemSet& rSet,
}
}
- // den Rest koennen wir nicht, StarCalc spezifisch
+ // we cannot handle the rest, that's specific to StarCalc
}
@@ -876,9 +876,9 @@ sal_Bool SwTableAutoFmt::Save( SvStream& rStream ) const
for( int i = 0; bRet && i < 16; ++i )
{
SwBoxAutoFmt* pFmt = aBoxAutoFmt[ i ];
- if( !pFmt ) // nicht gesetzt -> default schreiben
+ if( !pFmt ) // if not set -> write default
{
- // falls noch nicht vorhanden:
+ // If it doesn't exist yet:
if( !pDfltBoxAutoFmt )
pDfltBoxAutoFmt = new SwBoxAutoFmt;
pFmt = pDfltBoxAutoFmt;
@@ -907,13 +907,13 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
for( i = 0; i < 4; ++i )
pNew->SetBoxFmt( aNew, i );
- // 70% Grau
+ // 70% gray
aBrushItem.SetColor( RGB_COLORDATA( 0x4d, 0x4d, 0x4d ) );
aNew.SetBackground( aBrushItem );
for( i = 4; i <= 12; i += 4 )
pNew->SetBoxFmt( aNew, i );
- // 20% Grau
+ // 20% gray
aBrushItem.SetColor( RGB_COLORDATA( 0xcc, 0xcc, 0xcc ) );
aNew.SetBackground( aBrushItem );
aColor.SetColor( COL_BLACK );
@@ -978,7 +978,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
sal_Bool bRet = 0 == rStream.GetError();
if (bRet)
{
- // Achtung hier muss ein allgemeiner Header gelesen werden
+ // Attention: We need to read a general Header here
sal_uInt16 nVal = 0;
rStream >> nVal;
bRet = 0 == rStream.GetError();
@@ -998,7 +998,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
// rStream >> nFileVers;
if( rStream.Tell() != sal_uLong(nPos + nCnt) )
{
- OSL_ENSURE( !this, "Der Header enthaelt mehr/neuere Daten" );
+ OSL_ENSURE( !this, "The Header contains more or newer Data" );
rStream.Seek( nPos + nCnt );
}
rStream.SetStreamCharSet( (CharSet)nChrSet );
@@ -1008,7 +1008,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream )
if( nVal == AUTOFORMAT_ID_358 || nVal == AUTOFORMAT_ID_X ||
(AUTOFORMAT_ID_504 <= nVal && nVal <= AUTOFORMAT_ID) )
{
- aVersions.Load( rStream, nVal ); // Item-Versionen
+ aVersions.Load( rStream, nVal ); // Item versions
SwTableAutoFmt* pNew;
sal_uInt16 nAnz = 0;
@@ -1075,16 +1075,15 @@ sal_Bool SwTableAutoFmtTbl::Save( SvStream& rStream ) const
{
rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
- // Achtung hier muss ein allgemeiner Header gespeichert werden
+ // Attention: We need to save a general Header here
sal_uInt16 nVal = AUTOFORMAT_ID;
rStream << nVal
- << (sal_uInt8)2 // Anzahl von Zeichen des Headers incl. diesem
+ << (sal_uInt8)2 // Character count of the Header including this value
<< (sal_uInt8)GetStoreCharSet( ::osl_getThreadTextEncoding() );
bRet = 0 == rStream.GetError();
- //-----------------------------------------------------------
- // die VersionsNummer fuer alle Attribute schreiben
+ // Write this version number for all attributes
(*this)[ 0 ]->GetBoxFmt( 0 ).SaveVerionNo( rStream );
rStream << (sal_uInt16)(Count() - 1);
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index e351599..39397ae 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -83,13 +83,13 @@ SV_IMPL_PTRARR_SORT( SwSortTableLines, SwTableLinePtr );
SV_IMPL_PTRARR( _SwShareBoxFmts, SwShareBoxFmt* )
-// fuers setzen der Frame-Formate an den Boxen reicht es, das aktuelle
-// im Array zu suchen. Ist es vorhanden, so gebe das neue zurueck
+// In order to set the Frame Formats for the Boxes, it's enough to look
+// up the current one in the array. If it's already there return the new one.
struct _CpyTabFrm
{
union {
- SwTableBoxFmt *pFrmFmt; // fuer CopyCol
- SwTwips nSize; // fuer DelCol
+ SwTableBoxFmt *pFrmFmt; // for CopyCol
+ SwTwips nSize; // for DelCol
} Value;
SwTableBoxFmt *pNewFrmFmt;
@@ -290,7 +290,7 @@ struct _CpyPara
_CpyTabFrms& rTabFrmArr;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- sal_uLong nOldSize, nNewSize; // zum Korrigieren der Size-Attribute
+ sal_uLong nOldSize, nNewSize; // in order to correct the size attributes
sal_uLong nMinLeft, nMaxRight;
sal_uInt16 nCpyCnt, nInsPos;
sal_uInt16 nLnIdx, nBoxIdx;
@@ -329,7 +329,7 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
- // suche das FrmFmt im Array aller Frame-Formate
+ // Look up the Frame Format in the Frame Format Array
SwTableBox* pBox = (SwTableBox*)rpFndBox->GetBox();
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)pBox->GetFrmFmt() );
@@ -338,11 +338,10 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
{
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
- // fuer das verschachtelte Kopieren sicher auch das neue Format
- // als alt.
+ // For nested copying, also save the new Format as an old one.
SwTableBoxFmt* pNewFmt = (SwTableBoxFmt*)pBox->ClaimFrmFmt();
- // suche die selektierten Boxen in der Line:
+ // Find the selected Boxes in the Line:
_FndLine* pCmpLine = NULL;
SwFmtFrmSize aFrmSz( pNewFmt->GetFrmSize() );
@@ -356,7 +355,7 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
if( bDiffCount )
{
- // die erste Line sollte reichen
+ // The first Line should be enough
_FndBoxes& rFndBoxes = pCmpLine->GetBoxes();
long nSz = 0;
for( sal_uInt16 n = rFndBoxes.Count(); n; )
@@ -366,7 +365,7 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
pNewFmt->SetFmtAttr( aFrmSz );
aFrmSz.SetWidth( nSz / ( pCpyPara->nCpyCnt + 1 ) );
- // fuer die neue Box ein neues Format mit der Groesse anlegen!
+ // Create a new Format for the new Box, specifying it's size.
aFindFrm.pNewFrmFmt = (SwTableBoxFmt*)pNewFmt->GetDoc()->
MakeTableLineFmt();
*aFindFrm.pNewFrmFmt = *pNewFmt;
@@ -434,16 +433,15 @@ sal_Bool lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
if( 1 == pCpyPara->nDelBorderFlag ||
8 == pCpyPara->nDelBorderFlag )
{
- // es wird dahinter kopiert, bei allen Boxen die
- // TopBorderLine loeschen
+ // For all Boxes that delete TopBorderLine, we copy after that
pBox = pCpyPara->pInsLine->GetTabBoxes()[
pCpyPara->nInsPos - 1 ];
}
aFindFrm.pNewFrmFmt = (SwTableBoxFmt*)pBox->GetFrmFmt();
- // ansonsten wird davor kopiert und die erste Line behaelt
- // die TopLine und an der originalen wird sie entfernt
+ // Else we copy before that and the first Line keeps the TopLine
+ // and we remove it at the original
pBox->ClaimFrmFmt()->SetFmtAttr( aNew );
if( !pCpyPara->nCpyCnt )
@@ -480,13 +478,12 @@ sal_Bool lcl_CopyRow( const _FndLine*& rpFndLine, void* pPara )
void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
sal_Bool bBehind )
{
- // Bug 29124: nicht nur in den Grundlines kopieren. Wenns geht, so weit
- // runter wie moeglich.
+ // Bug 29124: Not only copy in the BaseLines. If possible, we go down as far as possible
_FndBox* pFBox;
if( 1 == pFndLn->GetBoxes().Count() &&
!( pFBox = pFndLn->GetBoxes()[ 0 ] )->GetBox()->GetSttNd() )
{
- // eine Box mit mehreren Lines, also in diese Lines einfuegen
+ // A Box with multiple Lines, so insert into these Lines
for( sal_uInt16 n = 0; n < pFBox->GetLines().Count(); ++n )
lcl_InsCol( pFBox->GetLines()[ n ], rCpyPara, nCpyCnt, bBehind );
}
@@ -521,7 +518,7 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
- OSL_ENSURE( !rBoxes.empty() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty() && nCnt, "No valid Box List" );
SwTableNode* pTblNd = const_cast<SwTableNode*>( rBoxes.begin()->second->GetSttNd()->FindTableNode() );
if( !pTblNd )
return sal_False;
@@ -531,7 +528,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
bRes = NewInsertCol( pDoc, rBoxes, nCnt, bBehind );
else
{
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
_FndBox aFndBox( 0, 0 );
{
_FndPara aPara( rBoxes, &aFndBox );
@@ -540,9 +537,9 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
if( !aFndBox.GetLines().Count() )
return sal_False;
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the layout update
aFndBox.SetTableLines( *this );
aFndBox.DelFrms( *this );
@@ -555,10 +552,10 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
for( sal_uInt16 n = 0; n < aFndBox.GetLines().Count(); ++n )
lcl_InsCol( aFndBox.GetLines()[ n ], aCpyPara, nCnt, bBehind );
- // dann raeume die Struktur dieser Line noch mal auf, generell alle
+ // clean up this Line's structure once again, generally all of them
GCLines();
- //Layout updaten
+ // Update Layout
aFndBox.MakeFrms( *this );
CHECKBOXWIDTH;
@@ -577,12 +574,12 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
sal_uInt16 nCnt, sal_Bool bBehind )
{
- OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid Box List" );
SwTableNode* pTblNd = const_cast<SwTableNode*>( rBoxes.begin()->second->GetSttNd()->FindTableNode() );
if( !pTblNd )
return sal_False;
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
_FndBox aFndBox( 0, 0 );
{
_FndPara aPara( rBoxes, &aFndBox );
@@ -591,7 +588,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
if( !aFndBox.GetLines().Count() )
return sal_False;
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
_FndBox* pFndBox = &aFndBox;
{
@@ -599,7 +596,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
while( 1 == pFndBox->GetLines().Count() &&
1 == ( pFndLine = pFndBox->GetLines()[ 0 ])->GetBoxes().Count() )
{
- // nicht zu weit runter, eine Line mit Boxen muss nachbleiben!!
+ // Don't go down too far! One Line with Box needs to remain!
_FndBox* pTmpBox = pFndLine->GetBoxes()[ 0 ];
if( pTmpBox->GetLines().Count() )
pFndBox = pTmpBox;
@@ -608,7 +605,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
}
}
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the layout update
const sal_Bool bLayout = !IsNewModel() &&
0 != SwIterator<SwTabFrm,SwFmt>::FirstElement( *GetFrmFmt() );
@@ -649,11 +646,11 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pFndBox->GetLines().ForEach( &lcl_CopyRow, &aCpyPara );
}
- // dann raeume die Struktur dieser Line noch mal auf, generell alle
+ // clean up this Line's structure once again, generally all of them
if( !pDoc->IsInReading() )
GCLines();
- //Layout updaten
+ // Update Layout
if ( bLayout )
{
if( pFndBox != &aFndBox )
@@ -714,12 +711,12 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
if( !pTblNd )
return sal_False;
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
_FndBox aFndBox( 0, 0 );
{
const SwTableLine* pLLine = GetTabLines()[ GetTabLines().Count()-1 ];
- const SwSelBoxes* pBxs = 0; // Dummy !!!
+ const SwSelBoxes* pBxs = 0; // Dummy!!!
_FndPara aPara( *pBxs, &aFndBox );
_FndBoxAppendRowLine( pLLine, &aPara );
@@ -727,9 +724,9 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
if( !aFndBox.GetLines().Count() )
return sal_False;
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the Layout update
bool bLayout = 0 != SwIterator<SwTabFrm,SwFmt>::FirstElement( *GetFrmFmt() );
if( bLayout )
{
@@ -749,11 +746,11 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
aFndBox.GetLines().ForEach( &lcl_CopyRow, &aCpyPara );
}
- // dann raeume die Struktur dieser Line noch mal auf, generell alle
+ // Clean up this Line's structure once again, generally all of them
if( !pDoc->IsInReading() )
GCLines();
- //Layout updaten
+ // Update Layout
if ( bLayout )
{
aFndBox.MakeNewFrms( *this, nCnt, sal_True );
@@ -786,7 +783,7 @@ void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
::lcl_LastBoxSetWidthLine( rBox.GetTabLines(), nOffset,
bFirst, rShareFmts );
- //Die Box anpassen
+ // Adapt the Box
const SwFrmFmt *pBoxFmt = rBox.GetFrmFmt();
SwFmtFrmSize aNew( pBoxFmt->GetFrmSize() );
aNew.SetWidth( aNew.GetWidth() + nOffset );
@@ -817,7 +814,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
sal_uInt16 nDelPos = rTblBoxes.C40_GETPOS( SwTableBox, pBox );
SwTableBox* pUpperBox = pBox->GetUpper()->GetUpper();
- // Sonderbehandlung fuer Umrandung:
+ // Special treatment for the border:
if( bCorrBorder && 1 < rTblBoxes.Count() )
{
sal_Bool bChgd = sal_False;
@@ -825,8 +822,8 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( rBoxItem.GetLeft() || rBoxItem.GetRight() )
{
- //JP 02.04.97: 1.Teil fuer Bug 36271
- // zuerst die linken/rechten Kanten
+ // JP 02.04.97: 1st part for Bug 36271
+ // First the left/right edges
if( nDelPos + 1 < rTblBoxes.Count() )
{
SwTableBox* pNxtBox = rTblBoxes[ nDelPos + 1 ];
@@ -873,7 +870,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
}
- // erst die Box, dann die Nodes loeschen!!
+ // Delete the Box first, then the Nodes!
SwStartNode* pSttNd = (SwStartNode*)pBox->GetSttNd();
if( pShareFmts )
pShareFmts->RemoveFormat( *rTblBoxes[ nDelPos ]->GetFrmFmt() );
@@ -881,17 +878,17 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( pSttNd )
{
- // ist das UndoObject zum speichern der Section vorbereitet?
+ // Has the UndoObject been prepared to save the Section?
if( pUndo && pUndo->IsDelBox() )
((SwUndoTblNdsChg*)pUndo)->SaveSection( pSttNd );
else
pSttNd->GetDoc()->DeleteSection( pSttNd );
}
- // auch die Zeile noch loeschen ??
+ // Also delete the Line?
if( rTblBoxes.Count() )
{
- // dann passe noch die Frame-SSize an
+ // Then adapt the Frame-SSize
sal_Bool bLastBox = nDelPos == rTblBoxes.Count();
if( bLastBox )
--nDelPos;
@@ -907,8 +904,7 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
if( !pBox->GetSttNd() )
{
- // dann muss es auch rekursiv in allen Zeilen, in allen
- // Zellen erfolgen!
+ // We need to this recursively in all Lines in all Cells!
SwShareBoxFmts aShareFmts;
::lcl_LastBoxSetWidthLine( pBox->GetTabLines(), nBoxSz,
!bLastBox,
@@ -916,20 +912,20 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
: aShareFmts );
}
}
- break; // nichts mehr loeschen
+ break; // Stop deleting
}
- // loesche die Line aus Tabelle/Box
+ // Delete the Line from the Table/Box
if( !pUpperBox )
{
- // dann loesche auch noch die Line aus der Tabelle
+ // Also delete the Line from the Table
nDelPos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( pShareFmts )
pShareFmts->RemoveFormat( *rTbl.GetTabLines()[ nDelPos ]->GetFrmFmt() );
rTbl.GetTabLines().DeleteAndDestroy( nDelPos );
- break; // mehr kann nicht geloescht werden
+ break; // we cannot delete more
}
- // dann loesche auch noch die Line
+ // finally also delete the Line
pBox = pUpperBox;
nDelPos = pBox->GetTabLines().C40_GETPOS( SwTableLine, pLine );
if( pShareFmts )
@@ -962,7 +958,7 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
GetFrmSize().GetWidth());
}
- // suche die erste ContentBox
+ // Find the first ContentBox
while( !pFndBox->GetSttNd() )
{
const SwTableLines& rLowLns = pFndBox->GetTabLines();
@@ -977,13 +973,13 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
pFndBox = 0;
else if( pAllDelBoxes )
{
- // falls der Vorganger auch geloscht wird, ist nicht zu tun
+ // If the predecessor will also be deleted, there's nothing to do
SwSelBoxes::iterator it = pAllDelBoxes->find( pFndBox );
if( it == pAllDelBoxes->end() )
break;
- // sonst noch mal weitersuchen
- // Die Box muessen wir aber nicht nochmal abpruefen
+ // else, we keep on searching.
+ // We do not need to recheck the Box, however
if( pFndBox->GetSttIdx() <= (*pCurPos)->second->GetSttIdx() )
--*pCurPos;
pFndBox = 0;
@@ -998,7 +994,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
SwSelBoxes* pAllDelBoxes = 0,
SwSelBoxes::iterator* pCurPos = 0 )
{
-//JP 16.04.97: 2.Teil fuer Bug 36271
+//JP 16.04.97: 2. part for Bug 36271
sal_Bool bChgd = sal_False;
const SwTableLine* pLine = rBox.GetUpper();
const SwTableBoxes& rTblBoxes = pLine->GetTabBoxes();
@@ -1007,7 +1003,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
pUpperBox = rBox.GetUpper()->GetUpper();
const SvxBoxItem& rBoxItem = rBox.GetFrmFmt()->GetBox();
- // dann die unteren/oberen Kanten
+ // then the top/bottom edges
if( rBoxItem.GetTop() || rBoxItem.GetBottom() )
{
bChgd = sal_False;
@@ -1019,20 +1015,19 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
sal_uInt16 nLnPos = pTblLns->GetPos( pLine );
- // bestimme die Attr.Position der akt. zu loeschenden Box
- // und suche dann in der unteren / oberen Line die entspr.
- // Gegenstuecke
+ // Calculate the attribute position of the top-be-deleted Box and then
+ // search in the top/bottom Line of the respective counterparts.
SwTwips nBoxStt = 0;
for( sal_uInt16 n = 0; n < nDelPos; ++n )
nBoxStt += rTblBoxes[ n ]->GetFrmFmt()->GetFrmSize().GetWidth();
SwTwips nBoxWidth = rBox.GetFrmFmt()->GetFrmSize().GetWidth();
SwTableBox *pPrvBox = 0, *pNxtBox = 0;
- if( nLnPos ) // Vorgaenger?
+ if( nLnPos ) // Predecessor?
pPrvBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
nLnPos, sal_False, pAllDelBoxes, pCurPos );
- if( nLnPos + 1 < pTblLns->Count() ) // Nachfolger?
+ if( nLnPos + 1 < pTblLns->Count() ) // Successor?
pNxtBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
nLnPos, sal_True, pAllDelBoxes, pCurPos );
@@ -1083,9 +1078,9 @@ sal_Bool SwTable::DeleteSel(
return sal_False;
}
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the Layout update
_FndBox aFndBox( 0, 0 );
if ( bDelMakeFrms )
{
@@ -1098,7 +1093,7 @@ sal_Bool SwTable::DeleteSel(
SwShareBoxFmts aShareFmts;
- // erst die Umrandung umsetzen, dann loeschen
+ // First switch the Border, then delete
if( bCorrBorder )
{
SwSelBoxes aBoxes( rBoxes );
@@ -1110,11 +1105,10 @@ sal_Bool SwTable::DeleteSel(
PrepareDelBoxes( rBoxes );
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
- //
- // delete boxes from last to first
+ // Delete boxes from last to first
for( SwSelBoxes::const_reverse_iterator it = rBoxes.rbegin(); it != rBoxes.rend(); ++it )
{
- // first adapt the data-sequence for chart if necessary
+ // First adapt the data-sequence for chart if necessary
// (needed to move the implementation cursor properly to it's new
// position which can't be done properly if the cell is already gone)
if (pPCD && pTblNd)
@@ -1124,7 +1118,7 @@ sal_Bool SwTable::DeleteSel(
_DeleteBox( *this, it->second, pUndo, sal_True, bCorrBorder, &aShareFmts );
}
- // dann raeume die Struktur aller Lines auf
+ // then clean up the structure of all Lines
GCLines();
if( bDelMakeFrms && aFndBox.AreLinesToRestore( *this ) )
@@ -1142,7 +1136,7 @@ sal_Bool SwTable::DeleteSel(
sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
sal_Bool bSameHeight )
{
- OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "keine gueltigen Werte" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes.begin()->second->GetSttNd()->FindTableNode());
if( !pTblNd )
return sal_False;
@@ -1152,7 +1146,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
// If the rows should get the same (min) height, we first have
// to store the old row heights before deleting the frames
@@ -1164,13 +1158,13 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
{
SwTableBox* pSelBox = it->second;
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
- OSL_ENSURE( pRow, "wo ist der Frm von der SwTableLine?" );
+ OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" );
SWRECTFN( pRow )
aRowHeights.push_back((pRow->Frm().*fnRect->fnGetHeight)());
}
}
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the Layout update
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
@@ -1179,13 +1173,13 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
for( SwSelBoxes::const_iterator it = rBoxes.begin(); it != rBoxes.end(); ++it, ++n )
{
SwTableBox* pSelBox = it->second;
- OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
+ OSL_ENSURE( pSelBox, "Box is not within the Table" );
- // dann fuege in die Box nCnt neue Zeilen ein
+ // Insert nCnt new Lines into the Box
SwTableLine* pInsLine = pSelBox->GetUpper();
SwTableBoxFmt* pFrmFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
- // Hoehe der Line beachten, gegebenenfalls neu setzen
+ // Respect the Line's height, reset if needed
SwFmtFrmSize aFSz( pInsLine->GetFrmFmt()->GetFrmSize() );
if ( bSameHeight && ATT_VAR_SIZE == aFSz.GetHeightSizeType() )
aFSz.SetHeightSizeType( ATT_MIN_SIZE );
@@ -1197,13 +1191,13 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
SwTableBox* pNewBox = new SwTableBox( pFrmFmt, nCnt, pInsLine );
sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
- pInsLine->GetTabBoxes().Remove( nBoxPos ); // alte loeschen
+ pInsLine->GetTabBoxes().Remove( nBoxPos ); // delete old ones
pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pNewBox, nBoxPos );
- // Hintergrund- / Rand Attribut loeschen
- SwTableBox* pLastBox = pSelBox; // zum verteilen der TextNodes !!
- // sollte Bereiche in der Box stehen, dann bleibt sie so bestehen
- // !! FALLS DAS GEAENDERT WIRD MUSS DAS UNDO ANGEPASST WERDEN !!!
+ // Delete background/border attribute
+ SwTableBox* pLastBox = pSelBox; // To distribute the TextNodes!
+ // If Areas are contained in the Box, it stays as is
+ // !! If this is changed we need to adapt the Undo, too !!!
sal_Bool bMoveNodes = sal_True;
{
sal_uLong nSttNd = pLastBox->GetSttIdx() + 1,
@@ -1223,7 +1217,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
for( sal_uInt16 i = 0; i <= nCnt; ++i )
{
- // also erstmal eine neue Linie in der neuen Box
+ // Create a new Line in the new Box
SwTableLine* pNewLine = new SwTableLine(
(SwTableLineFmt*)pInsLine->GetFrmFmt(), 1, pNewBox );
if( bChgLineSz )
@@ -1232,8 +1226,8 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
}
pNewBox->GetTabLines().C40_INSERT( SwTableLine, pNewLine, i );
- // dann eine neue Box in der Line
- if( !i ) // haenge die originale Box ein
+ // then a new Box in the Line
+ if( !i ) // hang up the original Box
{
pSelBox->SetUpper( pNewLine );
pNewLine->GetTabBoxes().C40_INSERT( SwTableBox, pSelBox, 0 );
@@ -1257,17 +1251,17 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
const SwNode* pEndNd = pLastBox->GetSttNd()->EndOfSectionNode();
if( pLastBox->GetSttIdx()+2 != pEndNd->GetIndex() )
{
- // TextNodes verschieben
+ // Move TextNodes
SwNodeRange aRg( *pLastBox->GetSttNd(), +2, *pEndNd );
- pLastBox = pNewLine->GetTabBoxes()[0]; // neu setzen
+ pLastBox = pNewLine->GetTabBoxes()[0]; // reset
SwNodeIndex aInsPos( *pLastBox->GetSttNd(), 1 );
pDoc->GetNodes()._MoveNodes(aRg, pDoc->GetNodes(), aInsPos, sal_False);
- pDoc->GetNodes().Delete( aInsPos, 1 ); // den leeren noch loeschen
+ pDoc->GetNodes().Delete( aInsPos, 1 ); // delete the empty one
}
}
}
}
- // in Boxen mit Lines darf es nur noch Size/Fillorder geben
+ // In Boxes with Lines, we can only have Size/Fillorder
pFrmFmt = (SwTableBoxFmt*)pNewBox->ClaimFrmFmt();
pFrmFmt->ResetFmtAttr( RES_LR_SPACE, RES_FRMATR_END - 1 );
pFrmFmt->ResetFmtAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 );
@@ -1284,7 +1278,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
- OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "keine gueltigen Werte" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes.begin()->second->GetSttNd()->FindTableNode());
if( !pTblNd )
return sal_False;
@@ -1294,11 +1288,11 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
SwSelBoxes aSelBoxes( rBoxes );
ExpandSelection( aSelBoxes );
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the Layout update
_FndBox aFndBox( 0, 0 );
aFndBox.SetTableLines( aSelBoxes, *this );
aFndBox.DelFrms( *this );
@@ -1315,16 +1309,16 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
if( pSelBox->GetFrmFmt()->GetFrmSize().GetWidth()/( nCnt + 1 ) < 10 )
continue;
- // dann teile die Box nCnt in nCnt Boxen
+ // Then split the nCnt Box up into nCnt Boxes
SwTableLine* pInsLine = pSelBox->GetUpper();
sal_uInt16 nBoxPos = pInsLine->GetTabBoxes().C40_GETPOS( SwTableBox, pSelBox );
- // suche das FrmFmt im Array aller Frame-Formate
+ // Find the Frame Format in the Frame Format Array
SwTableBoxFmt* pLastBoxFmt;
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)pSelBox->GetFrmFmt() );
if( !aFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
- // aender das FrmFmt
+ // Change the FrmFmt
aFindFrm.pNewFrmFmt = (SwTableBoxFmt*)pSelBox->ClaimFrmFmt();
SwTwips nBoxSz = aFindFrm.pNewFrmFmt->GetFrmSize().GetWidth();
SwTwips nNewBoxSz = nBoxSz / ( nCnt + 1 );
@@ -1335,8 +1329,8 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
pLastBoxFmt = aFindFrm.pNewFrmFmt;
if( nBoxSz != ( nNewBoxSz * (nCnt + 1)))
{
- // es bleibt ein Rest, also muss fuer die letzte Box ein
- // eigenes Format definiert werden
+ // We have a remainder, so we need to define an own Format
+ // for the last Box.
pLastBoxFmt = new SwTableBoxFmt( *aFindFrm.pNewFrmFmt );
pLastBoxFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
nBoxSz - ( nNewBoxSz * nCnt ), 0 ) );
@@ -1351,15 +1345,15 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
pLastBoxFmt = (SwTableBoxFmt*)aLastBoxArr[ nFndPos ];
}
- // dann fuege mal an der Position die neuen Boxen ein
+ // Insert the Boxes at the Position
for( sal_uInt16 i = 1; i < nCnt; ++i )
::_InsTblBox( pDoc, pTblNd, pInsLine, aFindFrm.pNewFrmFmt,
- pSelBox, nBoxPos + i ); // dahinter einfuegen
+ pSelBox, nBoxPos + i ); // insert after
::_InsTblBox( pDoc, pTblNd, pInsLine, pLastBoxFmt,
- pSelBox, nBoxPos + nCnt ); // dahinter einfuegen
+ pSelBox, nBoxPos + nCnt ); // insert after
- // Sonderbehandlung fuer die Umrandung:
+ // Special treatment for the Border:
const SvxBoxItem& aSelBoxItem = aFindFrm.pNewFrmFmt->GetBox();
if( aSelBoxItem.GetRight() )
{
@@ -1369,7 +1363,7 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
aTmp.SetLine( 0, BOX_LINE_RIGHT );
aFindFrm.pNewFrmFmt->SetFmtAttr( aTmp );
- // und dann das Format aus dem "cache" entfernen
+ // Remove the Format from the "cache"
for( sal_uInt16 i = aFrmArr.Count(); i; )
{
const _CpyTabFrm& rCTF = aFrmArr[ --i ];
@@ -1383,7 +1377,7 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
}
}
- //Layout updaten
+ // Update Layout
aFndBox.MakeFrms( *this );
CHECKBOXWIDTH
@@ -1393,15 +1387,15 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
/*
----------------------- >> MERGE << ------------------------
- Algorithmus:
- ist in der _FndBox nur eine Line angegeben, nehme die Line
- und teste die Anzahl der Boxen
- - ist mehr als 1 Box angegeben, so wird auf Boxenebene zusammen-
- gefasst, d.H. die neue Box wird so Breit wie die alten.
- - Alle Lines die ueber/unter dem Bereich liegen werden in die
- Box als Line + Box mit Lines eingefuegt
- - Alle Lines die vor/hinter dem Bereich liegen werden in
- die Boxen Left/Right eingetragen
+ Algorithm:
+ If we only have one Line in the _FndBox, take this Line and test
+ the Box count:
+ - If we have more than one Box, we merge on Box level, meaning
+ the new Box will be as wide as the old ones.
+ - All Lines that are above/under the Area, are inserted into
+ the Box as Line + Box.
+ - All Lines that come before/after the Area, are inserted into
+ the Boxes Left/Right.
----------------------- >> MERGE << ------------------------
*/
@@ -1433,12 +1427,12 @@ void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
void lcl_CalcWidth( SwTableBox* pBox )
{
- // Annahme: jede Line in der Box ist gleich gross
+ // Assertion: Every Line in the Box is as large
SwFrmFmt* pFmt = pBox->ClaimFrmFmt();
- OSL_ENSURE( pBox->GetTabLines().Count(), "Box hat keine Lines" );
+ OSL_ENSURE( pBox->GetTabLines().Count(), "Box does not have any Lines" );
SwTableLine* pLine = pBox->GetTabLines()[0];
- OSL_ENSURE( pLine, "Box steht in keiner Line" );
+ OSL_ENSURE( pLine, "Box is not within a Line" );
long nWidth = 0;
for( sal_uInt16 n = 0; n < pLine->GetTabBoxes().Count(); ++n )
@@ -1446,7 +1440,7 @@ void lcl_CalcWidth( SwTableBox* pBox )
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
- // in Boxen mit Lines darf es nur noch Size/Fillorder geben
+ // Boxes with Lines can only have Size/Fillorder
pFmt->ResetFmtAttr( RES_LR_SPACE, RES_FRMATR_END - 1 );
pFmt->ResetFmtAttr( RES_BOXATR_BEGIN, RES_BOXATR_END - 1 );
}
@@ -1456,8 +1450,8 @@ struct _InsULPara
SwTableNode* pTblNd;
SwTableLine* pInsLine;
SwTableBox* pInsBox;
- sal_Bool bUL_LR : 1; // Upper-Lower(sal_True) oder Left-Right(sal_False) ?
- sal_Bool bUL : 1; // Upper-Left(sal_True) oder Lower-Right(sal_False) ?
+ sal_Bool bUL_LR : 1; // Upper-Lower(sal_True) or Left-Right(sal_False) ?
+ sal_Bool bUL : 1; // Upper-Left(sal_True) or Lower-Right(sal_False) ?
SwTableBox* pLeftBox;
SwTableBox* pRightBox;
@@ -1494,12 +1488,12 @@ sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
pBoxes = &pFndBox->GetUpper()->GetTabBoxes();
if( pULPara->bUL ) // Left ?
{
- // gibt es noch davor Boxen, dann move sie
+ // if there are Boxes before it, move them
if( 0 != ( nPos = pBoxes->C40_GETPOS( SwTableBox, pFndBox )) )
lcl_CpyBoxes( 0, nPos, *pBoxes, pULPara->pInsLine );
}
else // Right
- // gibt es noch dahinter Boxen, dann move sie
+ // if there are Boxes behind it, move them
if( (nPos = pBoxes->C40_GETPOS( SwTableBox, pFndBox )) +1 < pBoxes->Count() )
{
nInsPos = pULPara->pInsLine->GetTabBoxes().Count();
@@ -1507,17 +1501,17 @@ sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
*pBoxes, pULPara->pInsLine );
}
}
- // Upper/Lower und gehts noch tiefer ??
+ // Upper/Lower and still deeper?
else if( rpFndBox->GetLines().Count() )
{
- // suche nur die Line, ab der Verschoben werden muss
+ // Only search the Line from which we need to move
nStt = pULPara->bUL ? 0 : rpFndBox->GetLines().Count()-1;
nEnd = nStt+1;
}
pBoxes = &pULPara->pInsLine->GetTabBoxes();
- // geht es noch eine weitere Stufe runter?
+ // Is there still a level to step down to?
if( rpFndBox->GetBox()->GetTabLines().Count() )
{
SwTableBox* pBox = new SwTableBox(
@@ -1531,7 +1525,7 @@ sal_Bool lcl_Merge_MoveBox( const _FndBox*& rpFndBox, void* pPara )
if( USHRT_MAX == nInsPos )
nInsPos = pBoxes->Count();
pBoxes->C40_INSERT( SwTableBox, pBox, nInsPos );
- lcl_CalcWidth( pBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pBox ); // calculate the Box's width
}
else
delete pBox;
@@ -1564,12 +1558,12 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
{
if( pULPara->bUL ) // Upper ?
{
- // gibt es noch davor Zeilen, dann move sie
+ // If there are Lines before it, move them
if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
lcl_CpyLines( 0, nPos, *pLines, pULPara->pInsBox );
}
else
- // gibt es noch dahinter Zeilen, dann move sie
+ // If there are Lines after it, move them
if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
{
nInsPos = pULPara->pInsBox->GetTabLines().Count();
@@ -1579,10 +1573,10 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
}
else if( nLeft )
{
- // es gibt links noch weitere Boxen, also setze Left-
- // und Merge-Box in eine Box und Line, fuege davor/dahinter
- // eine Line mit Box ein, in die die oberen/unteren Lines
- // eingefuegt werden
+ // There are still Boxes on the left side, so put the Left-
+ // and Merge-Box into one Box and Line, insert before/after
+ // a Line with a Box, into which the upper/lower Lines are
+ // inserted
SwTableLine* pInsLine = pULPara->pLeftBox->GetUpper();
SwTableBox* pLMBox = new SwTableBox(
(SwTableBoxFmt*)pULPara->pLeftBox->GetFrmFmt(), 0, pInsLine );
@@ -1598,23 +1592,23 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
if( pULPara->bUL ) // Upper ?
{
- // gibt es noch davor Zeilen, dann move sie
+ // If there are Lines before it, move them
if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
lcl_CpyLines( 0, nPos, *pLines, pLMBox, 0 );
}
else
- // gibt es noch dahinter Zeilen, dann move sie
+ // If there are Lines after it, move them
if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
lcl_CpyLines( nPos+1, pLines->Count(), *pLines,
pLMBox );
- lcl_CalcWidth( pLMBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pLMBox ); // calculate the Box's width
}
else if( nRight+1 < pFndLn->GetTabBoxes().Count() )
{
- // es gibt rechts noch weitere Boxen, also setze Right-
- // und Merge-Box in eine Box und Line, fuege davor/dahinter
- // eine Line mit Box ein, in die die oberen/unteren Lines
- // eingefuegt werden
+ // There are still Boxes on the right, so put the Right-
+ // and Merge-Box into one Box and Line, insert before/after
+ // a Line with a Box, into which the upper/lower Lines are
+ // inserted
SwTableLine* pInsLine = pULPara->pRightBox->GetUpper();
SwTableBox* pRMBox;
if( pULPara->pLeftBox->GetUpper() == pInsLine )
@@ -1632,9 +1626,7 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
}
else
{
- // Left und Merge wurden schon zusammengefuegt, also move
- // Right auch mit in die Line
-
+ // Left and Merge have been merged, so also move Right into the Line
pInsLine = pULPara->pLeftBox->GetUpper();
sal_uInt16 nMvPos = pULPara->pRightBox->GetUpper()->GetTabBoxes().
C40_GETPOS( SwTableBox, pULPara->pRightBox );
@@ -1643,13 +1635,12 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
pInsLine );
pRMBox = pInsLine->GetUpper();
- // sind schon Lines vorhanden, dann muessen diese in eine
- // neue Line und Box
+ // If there are already Lines, then these need to go into a new Line and Box
nMvPos = pRMBox->GetTabLines().C40_GETPOS( SwTableLine, pInsLine );
if( pULPara->bUL ? nMvPos
: nMvPos+1 < pRMBox->GetTabLines().Count() )
{
- // alle Lines zu einer neuen Line und Box zusammenfassen
+ // Merge all Lines into a new Line and Box
SwTableLine* pNewLn = new SwTableLine(
(SwTableLineFmt*)pInsLine->GetFrmFmt(), 1, pRMBox );
pNewLn->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
@@ -1668,7 +1659,7 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
lcl_CpyLines( nPos1, nPos2,
pNewLn->GetUpper()->GetTabLines(), pRMBox );
- lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pRMBox ); // calculate the Box's width
pRMBox = new SwTableBox( (SwTableBoxFmt*)pRMBox->GetFrmFmt(), 0, pNewLn );
pNewLn->GetTabBoxes().C40_INSERT( SwTableBox, pRMBox,
@@ -1677,25 +1668,25 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
}
if( pULPara->bUL ) // Upper ?
{
- // gibt es noch davor Zeilen, dann move sie
+ // If there are Lines before it, move them
if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
lcl_CpyLines( 0, nPos, *pLines, pRMBox, 0 );
}
else
- // gibt es noch dahinter Zeilen, dann move sie
+ // If there are Lines after it, move them
if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
lcl_CpyLines( nPos+1, pLines->Count(), *pLines,
pRMBox );
- lcl_CalcWidth( pRMBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pRMBox ); // calculate the Box's width
}
else {
- OSL_FAIL( "Was denn nun" );
+ OSL_FAIL( "So ... what do we do now?" );
}
}
// Left/Right
else
{
- // suche nur die Line, ab der Verschoben werden muss
+ // Find only the Line from which we need to move
nStt = pULPara->bUL ? 0 : rpFndLine->GetBoxes().Count()-1;
nEnd = nStt+1;
}
@@ -1722,12 +1713,12 @@ sal_Bool lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
- OSL_ENSURE( !rBoxes.empty() && pMergeBox, "keine gueltigen Werte" );
+ OSL_ENSURE( !rBoxes.empty() && pMergeBox, "no valid values" );
SwTableNode* pTblNd = const_cast<SwTableNode*>(rBoxes.begin()->second->GetSttNd()->FindTableNode());
if( !pTblNd )
return sal_False;
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
_FndBox aFndBox( 0, 0 );
{
_FndPara aPara( rBoxes, &aFndBox );
@@ -1741,12 +1732,12 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// Thus we tell the charts to use their own data provider and forget about this table
pDoc->CreateChartInternalDataProviders( this );
- SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
+ SetHTMLTableLayout( 0 ); // Delete HTML Layout
if( pUndo )
pUndo->SetSelBoxes( rBoxes );
- //Lines fuer das Layout-Update herausuchen.
+ // Find Lines for the Layout update
aFndBox.SetTableLines( *this );
aFndBox.DelFrms( *this );
@@ -1760,7 +1751,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
!pFndBox->GetUpper() ? 0 : pFndBox->GetBox() );
pInsLine->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
- // trage die neue Line ein
+ // Add the new Line
SwTableLines* pLines = pFndBox->GetUpper() ?
&pFndBox->GetBox()->GetTabLines() : &GetTabLines();
@@ -1777,11 +1768,11 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pRightBox, 2 );
pRightBox->ClaimFrmFmt();
- // in diese kommen alle Lines, die ueber dem selektierten Bereich stehen
- // Sie bilden also eine Upper/Lower Line
+ // This contains all Lines that are above the selected Area,
+ // thus they form a Upper/Lower Line
_InsULPara aPara( pTblNd, sal_True, sal_True, pLeftBox, pMergeBox, pRightBox, pInsLine );
- // move die oben/unten ueberhaengenden Lines vom selektierten Bereich
+ // Move the overlapping upper/lower Lines of the selected Area
pFndBox->GetLines()[0]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
aPara.SetLower( pInsLine );
@@ -1789,7 +1780,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
pFndBox->GetLines()[nEnd]->GetBoxes().ForEach( &lcl_Merge_MoveBox,
&aPara );
- // move die links/rechts hereinreichenden Boxen vom selektierten Bereich
+ // Move the Boxes extending into the selected Area from left/right
aPara.SetLeft( pLeftBox );
pFndBox->GetLines().ForEach( &lcl_Merge_MoveLine, &aPara );
@@ -1800,7 +1791,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_DeleteBox( *this, pLeftBox, 0, sal_False, sal_False );
else
{
- lcl_CalcWidth( pLeftBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pLeftBox ); // calculate the Box's width
if( pUndo && pLeftBox->GetSttNd() )
pUndo->AddNewBox( pLeftBox->GetSttIdx() );
}
@@ -1808,15 +1799,14 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
_DeleteBox( *this, pRightBox, 0, sal_False, sal_False );
else
{
- lcl_CalcWidth( pRightBox ); // bereche die Breite der Box
+ lcl_CalcWidth( pRightBox ); // calculate the Box's width
if( pUndo && pRightBox->GetSttNd() )
pUndo->AddNewBox( pRightBox->GetSttIdx() );
}
DeleteSel( pDoc, rBoxes, 0, 0, sal_False, sal_False );
- // dann raeume die Struktur dieser Line noch mal auf:
- // generell alle Aufraeumen
+ // Clean up this Line's structure once again, generally all of them
GCLines();
GetTabLines()[0]->GetTabBoxes().ForEach( &lcl_BoxSetHeadCondColl, 0 );
@@ -1853,13 +1843,13 @@ void lcl_CheckRowSpan( SwTable &rTbl )
sal_uInt16 lcl_GetBoxOffset( const _FndBox& rBox )
{
- // suche die erste Box
+ // Find the first Box
const _FndBox* pFirstBox = &rBox;
while( pFirstBox->GetLines().Count() )
pFirstBox = pFirstBox->GetLines()[ 0 ]->GetBoxes()[ 0 ];
sal_uInt16 nRet = 0;
- // dann ueber die Lines nach oben die Position bestimmen
+ // Calculate the position relative to above via the Lines
const SwTableBox* pBox = pFirstBox->GetBox();
do {
const SwTableBoxes& rBoxes = pBox->GetUpper()->GetTabBoxes();
@@ -1913,7 +1903,7 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
else
break;
}
- // nPos is now the left border of the first selceted box
+ // nPos is now the left border of the first selected box
if( rPara.nMinLeft > nPos )
rPara.nMinLeft = nPos;
nBoxCount = pFndLine->GetBoxes().Count();
@@ -1996,7 +1986,7 @@ sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
}
do
{
- // suche das Frame-Format in der Liste aller Frame-Formate
+ // Find the Frame Format in the list of all Frame Formats
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndBox->GetBox()->GetFrmFmt() );
SwFmtFrmSize aFrmSz;
@@ -2005,7 +1995,7 @@ sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
( aFrmSz = ( aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ]).pNewFrmFmt->
GetFrmSize()).GetWidth() != (SwTwips)nSize )
{
- // es ist noch nicht vorhanden, also kopiere es
+ // It doesn't exist yet, so copy it
aFindFrm.pNewFrmFmt = pCpyPara->pDoc->MakeTableBoxFmt();
aFindFrm.pNewFrmFmt->CopyAttrs( *rpFndBox->GetBox()->GetFrmFmt() );
if( !pCpyPara->bCpyCntnt )
@@ -2022,12 +2012,12 @@ sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
rpFndBox->GetLines().Count(), pCpyPara->pInsLine );
pCpyPara->pInsLine->GetTabBoxes().C40_INSERT( SwTableBox, pBox, pCpyPara->nInsPos++ );
_CpyPara aPara( *pCpyPara, pBox );
- aPara.nNewSize = nSize; // hole die Groesse
+ aPara.nNewSize = nSize; // get the size
((_FndBox*)rpFndBox)->GetLines().ForEach( &lcl_CopyLineToDoc, &aPara );
}
else
{
- // erzeuge eine leere Box
+ // Create an empty Box
pCpyPara->pDoc->GetNodes().InsBoxen( pCpyPara->pTblNd, pCpyPara->pInsLine,
aFindFrm.pNewFrmFmt,
(SwTxtFmtColl*)pCpyPara->pDoc->GetDfltTxtFmtColl(),
@@ -2037,11 +2027,10 @@ sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
pBox->setDummyFlag( true );
else if( pCpyPara->bCpyCntnt )
{
- // dann kopiere mal den Inhalt in diese leere Box
+ // Copy the content into this empty Box
pBox->setRowSpan( rpFndBox->GetBox()->getRowSpan() );
- // der Inhalt kopiert wird, dann koennen auch Formeln&Values
- // kopiert werden.
+ // We can also copy formulas and values, if we copy the content
{
SfxItemSet aBoxAttrSet( pCpyPara->pDoc->GetAttrPool(),
RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
@@ -2067,7 +2056,7 @@ sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara )
SwNodeIndex aInsIdx( *pBox->GetSttNd(), 1 );
pFromDoc->CopyWithFlyInFly( aCpyRg, 0, aInsIdx, sal_False );
- // den initialen TextNode loeschen
+ // Delete the initial TextNode
pCpyPara->pDoc->GetNodes().Delete( aInsIdx, 1 );
}
++pCpyPara->nInsPos;
@@ -2093,12 +2082,12 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
{
_CpyPara* pCpyPara = (_CpyPara*)pPara;
- // suche das Format in der Liste aller Formate
+ // Find the Frame Format in the list of all Frame Formats
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rpFndLine->GetLine()->GetFrmFmt() );
sal_uInt16 nFndPos;
if( !pCpyPara->rTabFrmArr.Seek_Entry( aFindFrm, &nFndPos ))
{
- // es ist noch nicht vorhanden, also kopiere es
+ // It doesn't exist yet, so copy it
aFindFrm.pNewFrmFmt = (SwTableBoxFmt*)pCpyPara->pDoc->MakeTableLineFmt();
aFindFrm.pNewFrmFmt->CopyAttrs( *rpFndLine->GetLine()->GetFrmFmt() );
pCpyPara->rTabFrmArr.Insert( aFindFrm );
@@ -2128,7 +2117,7 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
else if( rpFndLine->GetBoxes().Count() ==
rpFndLine->GetLine()->GetTabBoxes().Count() )
{
- // hole die Size vom Parent
+ // Get the Parent's size
const SwFrmFmt* pFmt;
if( rpFndLine->GetLine()->GetUpper() )
@@ -2138,7 +2127,7 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
aPara.nOldSize = pFmt->GetFrmSize().GetWidth();
}
else
- // errechne sie
+ // Calculate it
for( sal_uInt16 n = 0; n < rpFndLine->GetBoxes().Count(); ++n )
aPara.nOldSize += rpFndLine->GetBoxes()[n]
->GetBox()->GetFrmFmt()->GetFrmSize().GetWidth();
@@ -2151,7 +2140,7 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine*& rpFndLine, void* pPara )
sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
{
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
SwSelBoxes aSelBoxes;
SwTableBox* pBox = GetTabSortBoxes()[ 0 ];
pBox = GetTblBox( pBox->GetSttNd()->StartOfSectionNode()->GetIndex() + 1 );
@@ -2166,7 +2155,7 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
return sal_False;
{
- // Tabellen-Formeln in die relative Darstellung umwandeln
+ // Convert Table formulas to their relative representation
SwTableFmlUpdate aMsgHnt( this );
aMsgHnt.eFlags = TBL_RELBOXNAME;
GetFrmFmt()->GetDoc()->UpdateTblFlds( &aMsgHnt );
@@ -2175,7 +2164,7 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
_CpyTabFrms aCpyFmt;
_CpyPara aPara( &rTblNd, 1, aCpyFmt, sal_True );
aPara.nNewSize = aPara.nOldSize = rTblNd.GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
- // dann kopiere mal
+ // Copy
if( IsNewModel() )
lcl_CalcNewWidths( aFndBox.GetLines(), aPara );
aFndBox.GetLines().ForEach( &lcl_CopyLineToDoc, &aPara );
@@ -2199,7 +2188,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
const SwSelBoxes& rSelBoxes, sal_Bool bCpyNds,
sal_Bool bCpyName ) const
{
- // suche alle Boxen / Lines
+ // Find all Boxes/Lines
_FndBox aFndBox( 0, 0 );
{
_FndPara aPara( rSelBoxes, &aFndBox );
@@ -2208,8 +2197,8 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( !aFndBox.GetLines().Count() )
return sal_False;
- // erst die Poolvorlagen fuer die Tabelle kopieren, damit die dann
- // wirklich kopiert und damit die gueltigen Werte haben.
+ // First copy the PoolTemplates for the Table, so that the Tables are
+ // actually copied and have valid values.
SwDoc* pSrcDoc = GetFrmFmt()->GetDoc();
if( pSrcDoc != pInsDoc )
{
@@ -2227,19 +2216,19 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwNodeIndex aIdx( rPos.nNode, -1 );
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
aIdx++;
- OSL_ENSURE( pTblNd, "wo ist denn nun der TableNode?" );
+ OSL_ENSURE( pTblNd, "Where is the TableNode now?" );
pTblNd->GetTable().SetRowsToRepeat( GetRowsToRepeat() );
if( IS_TYPE( SwDDETable, this ))
{
- // es wird eine DDE-Tabelle kopiert
- // ist im neuen Dokument ueberhaupt der FeldTyp vorhanden ?
+ // A DDE-Table is being copied
+ // Does the new Document actually have it's FieldType?
SwFieldType* pFldType = pInsDoc->InsertFldType(
*((SwDDETable*)this)->GetDDEFldType() );
- OSL_ENSURE( pFldType, "unbekannter FieldType" );
+ OSL_ENSURE( pFldType, "unknown FieldType" );
- // tauschen am Node den Tabellen-Pointer aus
+ // Change the Table Pointer at the Node
pNewTbl = new SwDDETable( *pNewTbl,
(SwDDEFieldType*)pFldType );
pTblNd->SetNewTable( pNewTbl, sal_False );
@@ -2248,11 +2237,11 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
pNewTbl->GetFrmFmt()->CopyAttrs( *GetFrmFmt() );
pNewTbl->SetTblChgMode( GetTblChgMode() );
- //Vernichten der Frms die bereits angelegt wurden.
+ // Destroy the already created Frames
pTblNd->DelFrms();
{
- // Tabellen-Formeln in die relative Darstellung umwandeln
+ // Conver the Table formulas to their relative representation
SwTableFmlUpdate aMsgHnt( this );
aMsgHnt.eFlags = TBL_RELBOXNAME;
pSrcDoc->UpdateTblFlds( &aMsgHnt );
@@ -2260,7 +2249,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
SwTblNumFmtMerge aTNFM( *pSrcDoc, *pInsDoc );
- // Namen auch kopieren oder neuen eindeutigen erzeugen
+ // Also copy Names or enforce a new unique one
if( bCpyName )
pNewTbl->GetFrmFmt()->SetName( GetFrmFmt()->GetName() );
@@ -2270,10 +2259,10 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
if( IsNewModel() )
lcl_CalcNewWidths( aFndBox.GetLines(), aPara );
- // dann kopiere mal
+ // Copy
aFndBox.GetLines().ForEach( &lcl_CopyLineToDoc, &aPara );
- // dann setze oben und unten noch die "richtigen" Raender:
+ // Set the "right" margin above/below
{
_FndLine* pFndLn = aFndBox.GetLines()[ 0 ];
SwTableLine* pLn = pFndLn->GetLine();
@@ -2281,7 +2270,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
sal_uInt16 nLnPos = GetTabLines().GetPos( pTmp );
if( USHRT_MAX != nLnPos && nLnPos )
{
- // es gibt eine Line davor
+ // There is a Line before it
SwCollectTblLineBoxes aLnPara( sal_False, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos - 1 ];
@@ -2302,7 +2291,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
nLnPos = GetTabLines().GetPos( pTmp );
if( nLnPos < GetTabLines().Count() - 1 )
{
- // es gibt eine Line dahinter
+ // There is a Line following it
SwCollectTblLineBoxes aLnPara( sal_True, HEADLINE_BORDERCOPY );
pLn = GetTabLines()[ nLnPos + 1 ];
@@ -2318,28 +2307,28 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
}
}
- // die initiale Box muss noch geloescht werden
+ // We need to delete the initial Box
_DeleteBox( *pNewTbl, pNewTbl->GetTabLines()[
pNewTbl->GetTabLines().Count() - 1 ]->GetTabBoxes()[0],
0, sal_False, sal_False );
if( pNewTbl->IsNewModel() )
lcl_CheckRowSpan( *pNewTbl );
- // Mal kurz aufraeumen:
+ // Clean up
pNewTbl->GCLines();
- pTblNd->MakeFrms( &aIdx ); // erzeuge die Frames neu
+ pTblNd->MakeFrms( &aIdx ); // re-generate the Frames
CHECKTABLELAYOUT
return sal_True;
}
-// suche ab dieser Line nach der naechsten Box mit Inhalt
+// Find the next Box with content from this Line
SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
- const SwTableLine* pLine = this; // fuer M800
+ const SwTableLine* pLine = this; // for M800
SwTableBox* pBox;
sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
@@ -2355,18 +2344,18 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
if( GetUpper() )
{
nFndPos = GetUpper()->GetTabLines().GetPos( pLine );
- OSL_ENSURE( USHRT_MAX != nFndPos, "Line nicht in der Tabelle" );
- // gibts eine weitere Line
+ OSL_ENSURE( USHRT_MAX != nFndPos, "Line is not in the Table" );
+ // Is there another Line?
if( nFndPos+1 >= GetUpper()->GetTabLines().Count() )
return GetUpper()->GetUpper()->FindNextBox( rTbl, GetUpper(), bOvrTblLns );
pLine = GetUpper()->GetTabLines()[nFndPos+1];
}
- else if( bOvrTblLns ) // ueber die "GrundLines" einer Tabelle ?
+ else if( bOvrTblLns ) // Over a Table's the "BaseLines"??
{
- // suche in der Tabelle nach der naechsten Line
+ // Search for the next Line in the Table
nFndPos = rTbl.GetTabLines().GetPos( pLine );
if( nFndPos + 1 >= rTbl.GetTabLines().Count() )
- return 0; // es gibt keine weitere Box mehr
+ return 0; // there are no more Boxes
pLine = rTbl.GetTabLines()[ nFndPos+1 ];
}
@@ -2383,11 +2372,11 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
return pLine->FindNextBox( rTbl, 0, bOvrTblLns );
}
-// suche ab dieser Line nach der vorherigen Box
+// Find the previous Box from this Line
SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
{
- const SwTableLine* pLine = this; // fuer M800
+ const SwTableLine* pLine = this; // for M800
SwTableBox* pBox;
sal_uInt16 nFndPos;
if( GetTabBoxes().Count() && pSrchBox &&
@@ -2406,18 +2395,18 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
if( GetUpper() )
{
nFndPos = GetUpper()->GetTabLines().GetPos( pLine );
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list