[Libreoffice-commits] .: 2 commits - sw/source
Philipp Weissenbacher
p.weissenbacher at kemper.freedesktop.org
Wed Jun 20 04:05:10 PDT 2012
sw/source/core/text/frmform.cxx | 24 ++---
sw/source/core/text/frmpaint.cxx | 66 +++++++---------
sw/source/core/text/inftxt.cxx | 74 ++++++++----------
sw/source/core/text/inftxt.hxx | 158 +++++++++++++++++++--------------------
4 files changed, 155 insertions(+), 167 deletions(-)
New commits:
commit 3a615029d093eb1b5b3f9be5c0cd592172b101ab
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date: Wed Jun 20 13:03:44 2012 +0200
Translate German comments, fix some whitespace and spelling
Change-Id: Icbb75b707532ed81ee720c753dbee81f6be67d18
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 2bf7419..7358890 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -126,14 +126,14 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
}
MSHORT nVirtPageNum = 0;
if( bLineNum )
- { /* initialisiert die Member, die bei Zeilennumerierung notwendig sind:
-
- nDivider, wie oft ist ein Teilerstring gewuenscht, 0 == nie;
- nX, X-Position der Zeilennummern;
- pFnt, der Font der Zeilennummern;
- nLineNr, die erste Zeilennummer;
- bLineNum wird ggf.wieder auf sal_False gesetzt, wenn die Numerierung sich
- komplett ausserhalb des Paint-Rechtecks aufhaelt. */
+ {/* Initializes the Members necessary for line numbering:
+
+ nDivider, how often do we want a substring; 0 == never
+ nX, line number's x position
+ pFnt, line number's font
+ nLineNr, the first line number
+ bLineNum is set back to sal_False if the numbering is completely
+ outside of the paint rect */
nDivider = rLineInf.GetDivider().Len() ? rLineInf.GetDividerCountBy() : 0;
nX = pFrm->Frm().Left();
SwCharFmt* pFmt = rLineInf.GetCharFmt( const_cast<IDocumentStylePoolAccess&>(*pFrm->GetNode()->getIDocumentStylePoolAccess()) );
@@ -195,11 +195,11 @@ SwExtraPainter::SwExtraPainter( const SwTxtFrm *pFrm, ViewShell *pVwSh,
void SwExtraPainter::PaintExtra( SwTwips nY, long nAsc, long nMax, sal_Bool bRed )
{
- //Zeilennummer ist staerker als der Teiler
+ // Line number is stronger than the divider
const XubString aTmp( HasNumber() ? rLineInf.GetNumType().GetNumStr( nLineNr )
: rLineInf.GetDivider() );
- // get script type of line numbering:
+ // Get script type of line numbering:
pFnt->SetActual( SwScriptInfo::WhichFont( 0, &aTmp, 0 ) );
SwDrawTextInfo aDrawInf( pSh, *pSh->GetOut(), 0, aTmp, 0, aTmp.Len() );
@@ -340,7 +340,7 @@ void SwTxtFrm::PaintExtraData( const SwRect &rRect ) const
aLayoutModeModifier.Modify( sal_False );
SwTxtPainter aLine( (SwTxtFrm*)this, &aInf );
- sal_Bool bNoDummy = !aLine.GetNext(); // Nur eine Leerzeile!
+ sal_Bool bNoDummy = !aLine.GetNext(); // Only one empty line!
while( aLine.Y() + aLine.GetLineHeight() <= rRect.Top() )
{
@@ -431,8 +431,8 @@ SwRect SwTxtFrm::Paint()
aRet += Frm().Pos();
else
{
- // AMA: Wir liefern jetzt mal das richtige Repaintrechteck zurueck,
- // d.h. als linken Rand den berechneten PaintOfst!
+ // We return the right paint rect. Use the calculated PaintOfst as the
+ // left margin
SwRepaint *pRepaint = GetPara()->GetRepaint();
long l;
//Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint with Jiayanmin
@@ -602,8 +602,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if( IsLocked() || IsHiddenNow() || ! Prt().HasArea() )
return;
- //Kann gut sein, dass mir der IdleCollector mir die gecachten
- //Informationen entzogen hat.
+ // It can happen that the IdleCollector withdrew my cached information
if( !HasPara() )
{
OSL_ENSURE( GetValidPosFlag(), "+SwTxtFrm::Paint: no Calc()" );
@@ -623,25 +622,23 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
}
}
- // Waehrend wir painten, wollen wir nicht gestoert werden.
- // Aber erst hinter dem Format() !
+ // We don't want to be interrupted while painting.
+ // Do that after thr Format()!
SwTxtFrmLocker aLock((SwTxtFrm*)this);
- //Hier wird ggf. nur der Teil des TxtFrm ausgegeben, der sich veraendert
- //hat und der in dem Bereich liegt, dessen Ausgabe angefordert wurde.
- //Man kann jetzt auf die Idee kommen, dass der Bereich rRect ausgegeben
- //werden _muss_ obwohl rRepaint gesetzt ist; in der Tat kann dieses
- //Problem nicht formal vermieden werden. Gluecklicherweise koennen
- //wir davon ausgehen, dass rRepaint immer dann leer ist, wenn der Frm
- //komplett gepainted werden muss.
+ // We only paint the part of the TxtFrm which changed, is within the
+ // range and was requested to paint.
+ // One could think that the area rRect _needs_ to be painted, although
+ // rRepaint is set. Indeed, we cannot avoid this problem from a formal
+ // perspective. Luckily we can assume rRepaint to be empty when we need
+ // paint the while Frm.
SwTxtLineAccess aAccess( (SwTxtFrm*)this );
SwParaPortion *pPara = aAccess.GetPara();
SwRepaint &rRepaint = *(pPara->GetRepaint());
- // Das Recycling muss abgeschaltet werden, wenn wir uns im
- // FlyCntFrm befinden, weil ein DrawRect fuer die Retusche der
- // Zeile aufgerufen wird.
+ // Switch off recycling when in the FlyCntFrm.
+ // A DrawRect is called for repainting the line anyways.
if( rRepaint.GetOfst() )
{
const SwFlyFrm *pFly = FindFlyFrm();
@@ -649,8 +646,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
rRepaint.SetOfst( 0 );
}
- // Hier holen wir uns den String fuer die Ausgabe, besonders
- // die Laenge ist immer wieder interessant.
+ // Ge the String for painting. The length is of special interest.
// Rectangle
OSL_ENSURE( ! IsSwapped(), "A frame is swapped before Paint" );
@@ -671,8 +667,8 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
aInf.GetTxtFly()->SetTopRule();
SwTxtPainter aLine( (SwTxtFrm*)this, &aInf );
- // Eine Optimierung, die sich lohnt: wenn kein freifliegender Frame
- // in unsere Zeile ragt, schaltet sich der SwTxtFly einfach ab:
+ // Optimization: if no free flying Frm overlaps into our line, the
+ // SwTxtFly just switches off
aInf.GetTxtFly()->Relax();
OutputDevice* pOut = aInf.GetOut();
@@ -680,9 +676,9 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
SwSaveClip aClip( bOnWin || IsUndersized() ? pOut : 0 );
- // Ausgabeschleife: Fuer jede Zeile ... (die noch zu sehen ist) ...
- // rRect muss angepasst werden (Top+1, Bottom-1), weil der Iterator
- // die Zeilen nahtlos aneinanderfuegt.
+ // Output loop: For each Line ... (which is still visible) ...
+ // adapt rRect (Top + 1, Bottom - 1)
+ // Because the Iterator attaches the Lines without a gap to each other
aLine.TwipsToLine( rRect.Top() + 1 );
long nBottom = rRect.Bottom();
@@ -702,7 +698,7 @@ void SwTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
} while( aLine.Next() && aLine.Y() <= nBottom );
}
- // Einmal reicht:
+ // Once is enough:
if( aLine.IsPaintDrop() )
aLine.PaintDropPortion();
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index d9392bd..4b0b7a5 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -258,11 +258,10 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
}
else
{
- //Zugriff ueber StarONE, es muss keine Shell existieren oder aktiv sein.
+ // Access via StarONE. We do not need a Shell or an active one.
if ( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) )
{
- //in Ermangelung eines Besseren kann hier ja wohl nur noch das
- //AppWin genommen werden?
+ // We can only pick the AppWin here? (there's nothing better to pick?)
pOut = GetpApp()->GetDefaultDevice();
}
else
@@ -294,10 +293,10 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
//
pOpt = pVsh ?
pVsh->GetViewOptions() :
- SW_MOD()->GetViewOption( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ); //Options vom Module wg. StarONE
+ SW_MOD()->GetViewOption( pNd->getIDocumentSettingAccess()->get(IDocumentSettingAccess::HTML_MODE) ); // Options from Module, due to StarONE
- // bURLNotify wird gesetzt, wenn MakeGraphic dies vorbereitet
- // TODO: Aufdr?seln
+ // bURLNotify is set if MakeGraphic prepares it
+ // TODO: Unwind
bURLNotify = pNoteURL && !bOnWin;
SetSnapToGrid( pNd->GetSwAttrSet().GetParaGrid().GetValue() &&
@@ -355,10 +354,9 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt,
void SwTxtSizeInfo::SelectFont()
{
- // 8731: Der Weg muss ueber ChgPhysFnt gehen, sonst geraet
- // der FontMetricCache durcheinander. In diesem Fall steht pLastMet
- // auf dem alten Wert.
- // Falsch: GetOut()->SetFont( GetFont()->GetFnt() );
+ // The path needs to go via ChgPhysFnt or the FontMetricCache gets confused.
+ // In this case pLastMet has it's old value.
+ // Wrong: GetOut()->SetFont( GetFont()->GetFnt() );
GetFont()->Invalidate();
GetFont()->ChgPhysFnt( pVsh, *GetOut() );
}
@@ -393,7 +391,7 @@ SwPosSize SwTxtSizeInfo::GetTxtSize() const
const SwScriptInfo& rSI =
( (SwParaPortion*)GetParaPortion() )->GetScriptInfo();
- // in some cases, compression is not allowed or surpressed for
+ // in some cases, compression is not allowed or suppressed for
// performance reasons
sal_uInt16 nComp =( SW_CJK == GetFont()->GetActual() &&
rSI.CountCompChg() &&
@@ -522,19 +520,16 @@ sal_Bool lcl_IsDarkBackground( const SwTxtPaintInfo& rInf )
const SvxBrushItem* pItem;
SwRect aOrigBackRect;
- /// OD 21.08.2002
- /// consider, that [GetBackgroundBrush(...)] can set <pCol>
- /// - see implementation in /core/layout/paintfrm.cxx
- /// OD 21.08.2002 #99657#
- /// There is a background color, if there is a background brush and
- /// its color is *not* "no fill"/"auto fill".
+ // Consider, that [GetBackgroundBrush(...)] can set <pCol>
+ // See implementation in /core/layout/paintfrm.cxx
+ // There is a background color, if there is a background brush and
+ // its color is *not* "no fill"/"auto fill".
if( rInf.GetTxtFrm()->GetBackgroundBrush( pItem, pCol, aOrigBackRect, sal_False ) )
{
if ( !pCol )
pCol = &pItem->GetColor();
- /// OD 30.08.2002 #99657#
- /// determined color <pCol> can be <COL_TRANSPARENT>. Thus, check it.
+ // Determined color <pCol> can be <COL_TRANSPARENT>. Thus, check it.
if ( pCol->GetColor() == COL_TRANSPARENT)
pCol = NULL;
}
@@ -600,7 +595,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
if ( ! rPor.InFldGrp() )
pSI = &GetParaPortion()->GetScriptInfo();
- // in some cases, kana compression is not allowed or surpressed for
+ // in some cases, kana compression is not allowed or suppressed for
// performance reasons
sal_uInt16 nComp = 0;
if ( ! IsMulti() )
@@ -626,7 +621,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
if ( nSpaceAdd )
{
xub_StrLen nCharCnt;
- // #i41860# Thai justified alignemt needs some
+ // #i41860# Thai justified alignment needs some
// additional information:
aDrawInf.SetNumberOfBlanks( rPor.InTxtGrp() ?
static_cast<const SwTxtPortion&>(rPor).GetSpaceCnt( *this, nCharCnt ) :
@@ -650,8 +645,8 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
if( GetTxtFly()->IsOn() )
{
- // aPos muss als TopLeft vorliegen, weil die ClipRects sonst
- // nicht berechnet werden koennen.
+ // aPos needs to be the TopLeft, because we cannot calculate the
+ // ClipRects otherwise
const Point aPoint( aPos.X(), aPos.Y() - rPor.GetAscent() );
const Size aSize( rPor.Width(), rPor.Height() );
aDrawInf.SetPos( aPoint );
@@ -757,8 +752,8 @@ void SwTxtPaintInfo::CalcRect( const SwLinePortion& rPor,
* lcl_DrawSpecial
*
* Draws a special portion, e.g., line break portion, tab portion.
- * rPor - The portion
- * rRect - The rectangle surrounding the character
+ * rPor - The portion
+ * rRect - The rectangle surrounding the character
* pCol - Specify a color for the character
* bCenter - Draw the character centered, otherwise left aligned
* bRotate - Rotate the character if character rotation is set
@@ -1052,7 +1047,7 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
{
- OSL_ENSURE( OnWin(), "SwTxtPaintInfo::DrawBackground: printer polution ?" );
+ OSL_ENSURE( OnWin(), "SwTxtPaintInfo::DrawBackground: printer pollution ?" );
SwRect aIntersect;
CalcRect( rPor, 0, &aIntersect );
@@ -1229,7 +1224,7 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
pVal[1].Value <<= nMinTrailing;
}
else {
- OSL_FAIL( "unxpected size of sequence" );
+ OSL_FAIL( "unexpected size of sequence" );
}
}
@@ -1294,12 +1289,11 @@ void SwTxtFormatInfo::CtorInitTxtFormatInfo( SwTxtFrm *pNewFrm, const sal_Bool b
/*************************************************************************
* SwTxtFormatInfo::IsHyphenate()
- * Trennen oder nicht trennen, das ist hier die Frage:
- * - in keinem Fall trennen, wenn der Hyphenator ERROR zurueckliefert,
- * oder wenn als Sprache NOLANGUAGE eingestellt ist.
- * - ansonsten immer trennen, wenn interaktive Trennung vorliegt
- * - wenn keine interakt. Trennung, dann nur trennen, wenn im ParaFmt
- * automatische Trennung eingestellt ist.
+ * If the Hyphenator returns ERROR or the language is set to NOLANGUAGE
+ * we do not hyphenate.
+ * Else, we always hyphenate if we do interactive hyphenation.
+ * If we do not do interactive hyphenation, we only hyphenate if ParaFmt is
+ * set to automatic hyphenation.
*************************************************************************/
sal_Bool SwTxtFormatInfo::IsHyphenate() const
{
@@ -1321,7 +1315,7 @@ sal_Bool SwTxtFormatInfo::IsHyphenate() const
/*************************************************************************
* SwTxtFormatInfo::GetDropFmt()
- * Dropcaps vom SwTxtFormatter::CTOR gerufen.
+ * Dropcaps called by the SwTxtFormatter::CTOR
*************************************************************************/
const SwFmtDrop *SwTxtFormatInfo::GetDropFmt() const
@@ -1335,7 +1329,7 @@ const SwFmtDrop *SwTxtFormatInfo::GetDropFmt() const
void SwTxtFormatInfo::Init()
{
- // Nicht initialisieren: pRest, nLeft, nRight, nFirst, nRealWidth
+ // Not initialized: pRest, nLeft, nRight, nFirst, nRealWidth
X(0);
bArrowDone = bFull = bFtnDone = bErgoDone = bNumDone = bNoEndHyph =
bNoMidHyph = bStop = bNewLine = bUnderFlow = bTabOverflow = sal_False;
@@ -1534,7 +1528,7 @@ xub_StrLen SwTxtFormatInfo::ScanPortionEnd( const xub_StrLen nStart,
}
}
- // #130210# Check if character *behind* the portion has
+ // Check if character *behind* the portion has
// to become the hook:
if ( i == nEnd && i < GetTxt().Len() && bNumFound )
{
@@ -1592,7 +1586,7 @@ SwTxtSlot::SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor,
else
bOn = pPor->GetExpTxt( *pNew, aTxt );
- // Der Text wird ausgetauscht...
+ // Teh text is replaced ...
if( bOn )
{
pInf = (SwTxtSizeInfo*)pNew;
@@ -1700,7 +1694,7 @@ SwFontSave::~SwFontSave()
{
if( pFnt )
{
- // SwFont zurueckstellen
+ // Reset SwFont
pFnt->Invalidate();
pInf->SetFont( pFnt );
if( pIter )
@@ -1755,7 +1749,7 @@ SwDefFontSave::~SwDefFontSave()
if( pFnt )
{
delete pNewFnt;
- // SwFont zurueckstellen
+ // Reset SwFont
pFnt->Invalidate();
pInf->SetFont( pFnt );
}
@@ -1768,7 +1762,7 @@ sal_Bool SwTxtFormatInfo::ChgHyph( const sal_Bool bNew )
{
bAutoHyph = bNew;
InitHyph( bNew );
- // 5744: Sprache am Hyphenator einstellen.
+ // Set language in the Hyphenator
if( pFnt )
pFnt->ChgPhysFnt( pVsh, *pOut );
}
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 182f6e1..6cb4d56 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -65,7 +65,7 @@ struct SwMultiCreator;
class SwMultiPortion;
class SwWrongList;
-/* Minimum: Prozentwert fuers kernen */
+/* Minimum percentage for kerning */
#define MINKERNPERCENT 5
#define ARROW_WIDTH 200
#define DIR_LEFT2RIGHT 0
@@ -80,11 +80,10 @@ class SwWrongList;
#endif
/*************************************************************************
- * class SwLineInfo
+ * class SwLineInfo
+ * Respects the attribute LineSpace when calculating the Height/Ascent
*************************************************************************/
-// Beruecksichtigt das Attribut LineSpace bei der Hoehen/Ascentberechnung.
-
class SwLineInfo
{
friend class SwTxtIter;
@@ -133,7 +132,7 @@ public:
};
/*************************************************************************
- * class SwTxtInfo
+ * class SwTxtInfo
*************************************************************************/
class SwTxtInfo
@@ -141,7 +140,7 @@ class SwTxtInfo
// Implementation in txthyph.cxx
friend void SetParaPortion( SwTxtInfo *pInf, SwParaPortion *pRoot );
SwParaPortion *pPara;
- xub_StrLen nTxtStart; // TxtOfst bei Follows
+ xub_StrLen nTxtStart; // TxtOfst for Follows
protected:
inline SwTxtInfo() : pPara(0) {}
@@ -157,7 +156,7 @@ public:
};
/*************************************************************************
- * class SwTxtSizeInfo
+ * class SwTxtSizeInfo
*************************************************************************/
typedef ::std::map< sal_uLong, sal_IntPtr > SwTxtPortionMap;
@@ -188,8 +187,8 @@ protected:
sal_Bool bOnWin : 1;
sal_Bool bNotEOL : 1;
sal_Bool bURLNotify : 1;
- sal_Bool bStopUnderFlow : 1;// Underflow gestoppt z.B. von einer FlyPortion
- sal_Bool bFtnInside : 1; // the current line contains a footnote
+ sal_Bool bStopUnderFlow : 1; // Underflow was stopped e.g. by a FlyPortion
+ sal_Bool bFtnInside : 1; // the current line contains a footnote
sal_Bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion.
// needed for checking keep together of footnote portion with previous portion
sal_Bool bMulti : 1; // inside a multiportion
@@ -314,7 +313,7 @@ public:
friend SvStream &operator<<( SvStream &rOS, const SwTxtSizeInfo &rInf );
-// 7780: Keine Bullets beim Symbol-Zeichensatz!
+ // No Bullets for the symbol font!
inline sal_Bool IsNoSymbol() const
{ return RTL_TEXTENCODING_SYMBOL != pFnt->GetCharSet( pFnt->GetActual() ); }
@@ -374,7 +373,7 @@ public:
};
/*************************************************************************
- * class SwTxtPaintInfo
+ * class SwTxtPaintInfo
*************************************************************************/
class SwTxtPaintInfo : public SwTxtSizeInfo
@@ -383,11 +382,11 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
const SwWrongList *pGrammarCheckList;
const SwWrongList *pSmartTags; // SMARTTAGS
std::vector<long>* pSpaceAdd;
- const SvxBrushItem *pBrushItem; // Fuer den Hintergrund
- SwRect aItemRect; // ebenfalls fuer den Hintergrund
- SwTxtFly aTxtFly; // FlyFrm-Berechnung
- Point aPos; // Ausgabeposition
- SwRect aPaintRect; // Original Ausgaberechteck (aus Layout-Paint)
+ const SvxBrushItem *pBrushItem; // For the background
+ SwRect aItemRect; // Also for the background
+ SwTxtFly aTxtFly; // Calculate the FlyFrm
+ Point aPos; // Paint position
+ SwRect aPaintRect; // Original paint rect (from Layout paint)
MSHORT nSpaceIdx;
void _DrawText( const XubString &rText, const SwLinePortion &rPor,
@@ -496,7 +495,7 @@ public:
};
/*************************************************************************
- * class SwTxtFormatInfo
+ * class SwTxtFormatInfo
*************************************************************************/
class SwTxtFormatInfo : public SwTxtPaintInfo
@@ -504,60 +503,60 @@ class SwTxtFormatInfo : public SwTxtPaintInfo
// temporary arguments for hyphenation
com::sun::star::beans::PropertyValues aHyphVals;
- SwLineLayout *pRoot; // die Root der aktuellen Zeile (pCurr)
- SwLinePortion *pLast; // die letzte Portion
- SwFlyPortion *pFly; // die nachfolgende FlyPortion
- SwFldPortion *pLastFld; // umgebrochenes Feld
- SwLinePortion *pUnderFlow; // Unterlaufsituation: letzte Portion
- SwLinePortion *pRest; // Rest ist der Beginn der naechsten Zeile
+ SwLineLayout *pRoot; // The Root of the current line (pCurr)
+ SwLinePortion *pLast; // The last Portion
+ SwFlyPortion *pFly; // The following FlyPortion
+ SwFldPortion *pLastFld; // Wrapped Field
+ SwLinePortion *pUnderFlow; // Underflow: Last Portion
+ SwLinePortion *pRest; // The Rest is the start of the next Line
- SwTabPortion *pLastTab; // die _letzte_ TabPortion
+ SwTabPortion *pLastTab; // The _last_ TabPortion
- xub_StrLen nSoftHyphPos; // SoftHyphPos fuer Hyphenate
- xub_StrLen nHyphStart; // TxtPos, an der die interakt.Tr.z.Z. steht
- xub_StrLen nHyphWrdStart; // gefundene Wort-Position
- xub_StrLen nHyphWrdLen; // gefundene Wort-Laenge
- xub_StrLen nLineStart; // aktueller Zeilenbeginn im rTxt
+ xub_StrLen nSoftHyphPos; // SoftHyphPos forr Hyphenation
+ xub_StrLen nHyphStart; // TxtPos at which the interactive hyphen is at the moment
+ xub_StrLen nHyphWrdStart; // Position of the found word
+ xub_StrLen nHyphWrdLen; // Length of the found word
+ xub_StrLen nLineStart; // Current line start in rTxt
xub_StrLen nUnderScorePos; // enlarge repaint if underscore has been found
// #i34348# Changed type from sal_uInt16 to SwTwips
- SwTwips nLeft; // linker Rand
- SwTwips nRight; // rechter Rand
- SwTwips nFirst; // EZE
- KSHORT nRealWidth; // "echte" Zeilenbreite
- KSHORT nWidth; // "virtuelle" Zeilenbreite
- KSHORT nLineHeight; // endgueltige Hoehe nach CalcLine
- KSHORT nLineNettoHeight; // line height without spacing
- KSHORT nForcedLeftMargin; // Verschiebung des linken Rands wg. Rahmen
+ SwTwips nLeft; // Left margin
+ SwTwips nRight; // Right margin
+ SwTwips nFirst; // EZE
+ KSHORT nRealWidth; // "real" line width
+ KSHORT nWidth; // "virtual" line width
+ KSHORT nLineHeight; // Final height after CalcLine
+ KSHORT nLineNettoHeight; // line height without spacing
+ KSHORT nForcedLeftMargin; // Shift of left margin due to frame
sal_Int16 nMinLeading; // minimum number of chars before hyphenation point
sal_Int16 nMinTrailing; // minimum number of chars after hyphenation point
sal_Int16 nMinWordLength; // minimum length of word to be hyphenated
- sal_Bool bFull : 1; // Zeile ist voll
- sal_Bool bFtnDone : 1; // Ftn bereits formatiert
- sal_Bool bErgoDone : 1; // ErgoDone bereits formatiert
- sal_Bool bNumDone : 1; // bNumDone bereits formatiert
- sal_Bool bArrowDone : 1; // Pfeil nach links bei gescrollten Absaetzen
- sal_Bool bStop : 1; // Sofort abbrechen, Zeile verwerfen.
- sal_Bool bNewLine : 1; // Noch eine weitere Zeile formatieren.
- sal_Bool bShift : 1; // Positionsaend.: Repaint bis auf Weiteres
- sal_Bool bUnderFlow : 1; // Kontext: UnderFlow() ?
- sal_Bool bInterHyph: 1; // interaktive Trennung ?
- sal_Bool bAutoHyph : 1; // automatische Trennung ?
- sal_Bool bDropInit : 1; // DropWidth einstellen.
+ sal_Bool bFull : 1; // Line is full
+ sal_Bool bFtnDone : 1; // Ftn already formatted
+ sal_Bool bErgoDone : 1; // ErgoDone already formatted
+ sal_Bool bNumDone : 1; // bNumDone already formatted
+ sal_Bool bArrowDone : 1; // Arrow to the left for scrolling paragraphs
+ sal_Bool bStop : 1; // Cancel immediately, discarding the line
+ sal_Bool bNewLine : 1; // Format another line
+ sal_Bool bShift : 1; // Position change: Repaint until further notice
+ sal_Bool bUnderFlow : 1; // Context: UnderFlow() ?
+ sal_Bool bInterHyph: 1; // Interactive hyphenation?
+ sal_Bool bAutoHyph : 1; // Automatic hyphenation?
+ sal_Bool bDropInit : 1; // Set DropWidth
sal_Bool bQuick : 1; // FormatQuick()
- sal_Bool bNoEndHyph : 1; // Trennung am Zeilenende abgeschaltet wg. MaxHyphens
- sal_Bool bNoMidHyph : 1; // Trennung vor Flies abgeschaltet wg. MaxHyphens
- sal_Bool bIgnoreFly: 1; // FitToContent ignoriert Flies
+ sal_Bool bNoEndHyph : 1; // Switch off hyphenation at the line end (due to MaxHyphens)
+ sal_Bool bNoMidHyph : 1; // Switch off hyphenation before flys (due to MaxHyphens)
+ sal_Bool bIgnoreFly: 1; // FitToContent ignores flys
sal_Bool bFakeLineStart: 1; // String has been replaced by field portion
// info structure only pretends that we are at
// the beginning of a line
sal_Bool bTabOverflow; // Tabs are expanding after the end margin
- xub_Unicode cTabDecimal; // das _aktuelle_ Dezimalzeichen
- xub_Unicode cHookChar; // fuer Tabs in Feldern etc.
- sal_uInt8 nMaxHyph; // max. Zeilenanz. aufeinanderfolg. Trenn.
- sal_Bool bTestFormat; // Testformatierung aus WouldFit, keine Benachrichtigungen etc.
+ xub_Unicode cTabDecimal; // the current decimal delimiter
+ xub_Unicode cHookChar; // For tabs in fields etc.
+ sal_uInt8 nMaxHyph; // Max. line count of followup hyphenations
+ sal_Bool bTestFormat; // Test formatting from WouldFit, no notification etc.
// Hyphenating ...
sal_Bool InitHyph( const sal_Bool bAuto = sal_False );
@@ -579,10 +578,10 @@ public:
inline void Width( const KSHORT nNew ) { nWidth = nNew; }
void Init();
- // liefert die erste veraenderte Position im Absatz zurueck
+ // Returns the first changed position of the paragraph
inline xub_StrLen GetReformatStart() const;
- // Raender
+ // Margins
inline SwTwips Left() const { return nLeft; }
inline void Left( const SwTwips nNew ) { nLeft = nNew; }
inline SwTwips Right() const { return nRight; }
@@ -682,11 +681,11 @@ public:
inline sal_Bool IsArrowDone() const { return bArrowDone; }
inline void SetArrowDone( const sal_Bool bNew ) { bArrowDone = bNew; }
- // Fuer SwTxtPortion::Hyphenate
+ // For SwTxtPortion::Hyphenate
inline sal_Bool IsSoftHyph( const xub_StrLen nPos ) const;
sal_Bool ChgHyph( const sal_Bool bNew );
- // Soll die Trennhilfe angeschmissen werden?
+ // Should the hyphenate helper be discarded?
sal_Bool IsHyphenate() const;
inline void SetHyphStart( const xub_StrLen nNew ) { nHyphStart = nNew; }
inline xub_StrLen GetHyphStart() const { return nHyphStart; }
@@ -697,7 +696,7 @@ public:
inline xub_StrLen GetUnderScorePos() const { return nUnderScorePos; }
inline void SetUnderScorePos( xub_StrLen nNew ) { nUnderScorePos = nNew; }
- // ruft HyphenateWord() des Hyphenators
+ // Calls HyphenateWord() of Hyphenator
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenatedWord >
HyphWord( const String &rTxt, const sal_uInt16 nMinTrail );
@@ -707,17 +706,17 @@ public:
sal_Bool CheckFtnPortion( SwLineLayout* pCurr )
{ return IsFtnInside() && _CheckFtnPortion( pCurr ); }
- // Dropcaps vom SwTxtFormatter::CTOR gerufen.
+ // Dropcaps called by SwTxtFormatter::CTOR
const SwFmtDrop *GetDropFmt() const;
- // setzt die FormatInfo wieder in den Anfangszustand
+ // Resets the FormatInfo back to its original state
void Reset( const SwTxtFrm *pFrame); // , const sal_Bool bAll );
// Sets the last SwKernPortion as pLast, if it is followed by empty portions
sal_Bool LastKernPortion();
- // Sucht ab nIdx bis nEnd nach Tabs, TabDec, TXTATR und BRK.
- // Return: gefundene Position, setzt ggf. cHookChar
+ // Looks for tabs, TabDec, TXTATR and BRK from nIdx until nEnd.
+ // Return: Position; sets cHookChar if necessary
xub_StrLen ScanPortionEnd( const xub_StrLen nStart, const xub_StrLen nEnd );
friend SvStream &operator<<( SvStream &rOS, const SwTxtFormatInfo &rInf );
@@ -727,14 +726,13 @@ public:
};
/*************************************************************************
- * class SwTxtSlot
- *************************************************************************/
-
-// Fuer die Textersetzung und Restaurierung der SwTxtSizeInfo.
-// Die Art und Weise ist etwas kriminell, rInf ist const und wird
-// trotzdem veraendert. Da rInf im DTOR wieder restauriert wird,
-// ist dies zulaessig, es handelt sich um ein "logisches const".
-
+ * class SwTxtSlot
+ * For the text replacement and restoration of SwTxtSizeInfo.
+ * The way this is done is a bit of a hack: Although rInf is const we change it
+ * anyway.
+ * Because rInf is restorated again in the DTOR, we can do this.
+ * You could call it a "logical const", if you wish.
+*************************************************************************/
class SwTxtSlot
{
XubString aTxt;
@@ -748,8 +746,8 @@ class SwTxtSlot
protected:
SwTxtSizeInfo *pInf;
public:
- // Der Ersetzungstring kommt wahlweise aus der Portion via GetExpText()
- // oder aus dem char Pointer pCh, wenn dieser ungleich NULL ist.
+ // The replacement string originates either from the portion via GetExpText()
+ // or from the char * pCh, if it is not NULL
SwTxtSlot( const SwTxtSizeInfo *pNew, const SwLinePortion *pPor, bool bTxtLen,
bool bExgLists, const sal_Char *pCh = NULL );
~SwTxtSlot();
@@ -757,7 +755,7 @@ public:
};
/*************************************************************************
- * class SwFontSave
+ * class SwFontSave
*************************************************************************/
class SwFontSave
@@ -772,7 +770,7 @@ public:
};
/*************************************************************************
- * class SwDefFontSave
+ * class SwDefFontSave
*************************************************************************/
class SwDefFontSave
@@ -787,7 +785,7 @@ public:
};
/*************************************************************************
- * Inline-Implementierungen SwTxtSizeInfo
+ * Inline implementations of SwTxtSizeInfo
*************************************************************************/
inline KSHORT SwTxtSizeInfo::GetAscent() const
@@ -816,7 +814,7 @@ inline SwPosSize SwTxtSizeInfo::GetTxtSize( const SwScriptInfo* pSI,
}
/*************************************************************************
- * Inline-Implementierungen SwTxtPaintInfo
+ * Inline implementations of SwTxtPaintInfo
*************************************************************************/
inline SwTwips SwTxtPaintInfo::GetPaintOfst() const
@@ -855,7 +853,7 @@ inline void SwTxtPaintInfo::DrawMarkedText( const SwLinePortion &rPor,
}
/*************************************************************************
- * Inline-Implementierungen SwTxtFormatInfo
+ * Inline implementations of SwTxtFormatInfo
*************************************************************************/
inline xub_StrLen SwTxtFormatInfo::GetReformatStart() const
commit 204985e42d7c1b4da95e3cfd4a148f8666d5c488
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date: Tue Jun 19 00:58:26 2012 +0200
Clean up previous translation
Change-Id: Ie1400dc5a835dd97e22f72f89b42b0538adffe68
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 47111d0..51322a8 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -513,8 +513,8 @@ void SwTxtFrm::AdjustFrm( const SwTwips nChgHght, sal_Bool bHasToFit )
}
/*************************************************************************
- * SwTxtFrm::AdjustFollow()
- * AdjustFollow expects the following situtation:
+ * SwTxtFrm::AdjustFollow()
+ * AdjustFollow expects the following situation:
* The SwTxtIter points to the lower end of the Master, the Offset is set in
* the Follow.
* nOffset holds the Offset in the text string, from which the Master closes
@@ -529,8 +529,8 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
SwFrmSwapper aSwapper( this, sal_False );
// We got the rest of the text mass: Delete all Follows
- // DummyPortions() are a special caseSonderfall
- // - special cases are controlled by parameter <nMode>.
+ // DummyPortions() are a special case.
+ // Special cases are controlled by parameter <nMode>.
if( HasFollow() && !(nMode & 1) && nOffset == nEnd )
{
while( GetFollow() )
@@ -546,7 +546,7 @@ void SwTxtFrm::_AdjustFollow( SwTxtFormatter &rLine,
return;
}
- // Dancing on the vulcano: We'll just format the last line quickly
+ // Dancing on the volcano: We'll just format the last line quickly
// for the QuoVadis stuff.
// The Offset can move of course:
const xub_StrLen nNewOfst = ( IsInFtn() && ( !GetIndNext() || HasFollow() ) ) ?
@@ -585,7 +585,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
SwTxtFrm *pNxt = pFoll->GetFollow();
- // All footnotes of the to-be-destroyed Follow are reloacted to us
+ // All footnotes of the to-be-destroyed Follow are relocated to us
xub_StrLen nStart = pFoll->GetOfst();
if ( pFoll->HasFtn() )
{
@@ -679,7 +679,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
}
// If footnotes end up in pNew bz our actions, we need
- // to reregister them
+ // to re-register them
if ( HasFtn() )
{
const SwpHints *pHints = GetTxtNode()->GetpSwpHints();
@@ -1289,7 +1289,7 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
// Optimization: If rReformat starts after the first word of the line
// this line cannot possibly influence the previous one.
// Unfortunately it can: Text size changes + FlyFrames.
- // The backlash can affact multiple lines (Frame!)!
+ // The backlash can affect multiple lines (Frame!)!
// #i46560#
// FME: Yes, consider this case: (word) has to go to the next line
@@ -1554,8 +1554,8 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( rRepaint.HasArea() )
SetRepaint();
rLine.SetTruncLines( sal_False );
- if( nOldBottom ) // We check if, for paragraphs that need scrolling
- // can be shrunk, so that the don't need scrolling anymore
+ if( nOldBottom ) // We check whether paragraphs that need scrolling can
+ // be shrunk, so that they don't need scrolling anymore
{
rLine.Bottom();
SwTwips nNewBottom = rLine.Y();
@@ -1698,7 +1698,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
CalcAdditionalFirstLineOffset();
- // The raneg autopilot or the BASIC interface pass us TxtFrms with
+ // The range autopilot or the BASIC interface pass us TxtFrms with
// a width <= 0 from time to time
if( (Prt().*fnRect->fnGetWidth)() <= 0 )
{
@@ -1769,7 +1769,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
if( CalcPreps() )
; // nothing
- // We return if already formated, but if the TxtFrm was just created
+ // We return if already formatted, but if the TxtFrm was just created
// and does not have any format information
else if( !bNew && !aAccess.GetPara()->GetReformat()->Len() )
{
More information about the Libreoffice-commits
mailing list