summaryrefslogtreecommitdiff
path: root/sw/source/core/text
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text')
-rw-r--r--sw/source/core/text/itratr.cxx56
-rw-r--r--sw/source/core/text/itrcrsr.cxx59
-rw-r--r--sw/source/core/text/itrform2.cxx114
-rw-r--r--sw/source/core/text/itrpaint.cxx28
-rw-r--r--sw/source/core/text/itrpaint.hxx4
-rw-r--r--sw/source/core/text/itrtxt.cxx82
-rw-r--r--sw/source/core/text/itrtxt.hxx29
-rw-r--r--sw/source/core/text/pordrop.hxx13
-rw-r--r--sw/source/core/text/porexp.cxx64
-rw-r--r--sw/source/core/text/porexp.hxx12
-rw-r--r--sw/source/core/text/porfld.cxx12
-rw-r--r--sw/source/core/text/porfld.hxx35
-rw-r--r--sw/source/core/text/porfly.hxx8
-rw-r--r--sw/source/core/text/porftn.hxx16
-rw-r--r--sw/source/core/text/porglue.cxx57
-rw-r--r--sw/source/core/text/porglue.hxx30
-rw-r--r--sw/source/core/text/porhyph.hxx16
-rw-r--r--sw/source/core/text/porlay.cxx193
-rw-r--r--sw/source/core/text/porlay.hxx4
-rw-r--r--sw/source/core/text/porlin.cxx74
-rw-r--r--sw/source/core/text/porlin.hxx8
-rw-r--r--sw/source/core/text/pormulti.cxx310
-rw-r--r--sw/source/core/text/pormulti.hxx39
-rw-r--r--sw/source/core/text/porref.cxx24
-rw-r--r--sw/source/core/text/porref.hxx8
-rw-r--r--sw/source/core/text/porrst.cxx43
-rw-r--r--sw/source/core/text/porrst.hxx38
-rw-r--r--sw/source/core/text/portab.hxx24
-rw-r--r--sw/source/core/text/portox.cxx24
-rw-r--r--sw/source/core/text/portox.hxx8
-rw-r--r--sw/source/core/text/portxt.cxx76
-rw-r--r--sw/source/core/text/portxt.hxx8
-rw-r--r--sw/source/core/text/redlnitr.cxx28
-rw-r--r--sw/source/core/text/txtcache.cxx54
-rw-r--r--sw/source/core/text/txtdrop.cxx41
-rw-r--r--sw/source/core/text/txtfld.cxx16
-rw-r--r--sw/source/core/text/txtfrm.cxx28
-rw-r--r--sw/source/core/text/txtftn.cxx19
-rw-r--r--sw/source/core/text/txthyph.cxx76
-rw-r--r--sw/source/core/text/txtinit.cxx4
-rw-r--r--sw/source/core/text/txtpaint.cxx8
-rw-r--r--sw/source/core/text/txtpaint.hxx20
-rw-r--r--sw/source/core/text/txttab.cxx47
-rw-r--r--sw/source/core/text/widorp.cxx28
44 files changed, 284 insertions, 1601 deletions
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 9cf80527d9f0..dc7968477301 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -84,21 +84,16 @@ SwAttrIter::~SwAttrIter()
delete pFnt;
}
-/*************************************************************************
- * SwAttrIter::GetAttr()
- *
- * Liefert fuer eine Position das Attribut, wenn das Attribut genau auf
- * der Position nPos liegt und kein EndIndex besitzt.
- * GetAttr() wird fuer Attribute benoetigt, die die Formatierung beeinflussen
- * sollen, ohne dabei den Inhalt des Strings zu veraendern. Solche "entarteten"
- * Attribute sind z.B. Felder (die expandierten Text bereit halten) und
- * zeilengebundene Frames. Um Mehrdeutigkeiten zwischen verschiedenen
- * solcher Attribute zu vermeiden, werden beim Anlegen eines Attributs
- * an der Startposition ein Sonderzeichen in den String einfuegt.
- * Der Formatierer stoesst auf das Sonderzeichen und holt sich per
- * GetAttr() das entartete Attribut.
- *************************************************************************/
-
+// Liefert fuer eine Position das Attribut, wenn das Attribut genau auf
+// der Position nPos liegt und kein EndIndex besitzt.
+// GetAttr() wird fuer Attribute benoetigt, die die Formatierung beeinflussen
+// sollen, ohne dabei den Inhalt des Strings zu veraendern. Solche "entarteten"
+// Attribute sind z.B. Felder (die expandierten Text bereit halten) und
+// zeilengebundene Frames. Um Mehrdeutigkeiten zwischen verschiedenen
+// solcher Attribute zu vermeiden, werden beim Anlegen eines Attributs
+// an der Startposition ein Sonderzeichen in den String einfuegt.
+// Der Formatierer stoesst auf das Sonderzeichen und holt sich per
+// GetAttr() das entartete Attribut.
SwTxtAttr *SwAttrIter::GetAttr( const sal_Int32 nPosition ) const
{
return (m_pTxtNode) ? m_pTxtNode->GetTxtAttrForCharAt(nPosition) : 0;
@@ -698,13 +693,11 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
if( RES_FLYFRMFMT == pFrmFmt->Which()
&& rTmpSize.GetWidthPercent() )
{
-/*-----------------------------------------------------------------------------
- * This is a hack for the wollowing situation: In the paragraph there's a
- * text frame with relative size. Then let's take 0.5 cm as minimum width
- * and KSHRT_MAX as maximum width
- * It were cleaner and maybe neccessary later on to iterate over the content
- * of the text frame and call GetMinMaxSize recursively
- * --------------------------------------------------------------------------*/
+ // This is a hack for the wollowing situation: In the paragraph there's a
+ // text frame with relative size. Then let's take 0.5 cm as minimum width
+ // and KSHRT_MAX as maximum width
+ // It were cleaner and maybe neccessary later on to iterate over the content
+ // of the text frame and call GetMinMaxSize recursively
nAktWidth = FLYINCNT_MIN_WIDTH; // 0.5 cm
if( (long)rMax < KSHRT_MAX )
rMax = KSHRT_MAX;
@@ -771,18 +764,13 @@ void SwTxtNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rMa
pOut->SetMapMode( aOldMap );
}
-/*************************************************************************
- * SwTxtNode::GetScalingOfSelectedText()
- *
- * Calculates the width of the text part specified by nStt and nEnd,
- * the height of the line containing nStt is devided by this width,
- * indicating the scaling factor, if the text part is rotated.
- * Having CH_BREAKs in the text part, this method returns the scaling
- * factor for the longest of the text parts separated by the CH_BREAKs.
- *
- * changing this method very likely requires changing of "GetMinMaxSize"
- *************************************************************************/
-
+// Calculates the width of the text part specified by nStt and nEnd,
+// the height of the line containing nStt is devided by this width,
+// indicating the scaling factor, if the text part is rotated.
+// Having CH_BREAKs in the text part, this method returns the scaling
+// factor for the longest of the text parts separated by the CH_BREAKs.
+//
+// changing this method very likely requires changing of "GetMinMaxSize"
sal_uInt16 SwTxtNode::GetScalingOfSelectedText( sal_Int32 nStt, sal_Int32 nEnd )
const
{
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 957f86ead920..450bdfd5aeff 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -52,13 +52,9 @@
// is set in GetCharRect and is interpreted in UnitUp/Down.
bool SwTxtCursor::bRightMargin = false;
-/*************************************************************************
- * lcl_GetCharRectInsideField
- *
- * After calculating the position of a character during GetCharRect
- * this function allows to find the coordinates of a position (defined
- * in pCMS->pSpecialPos) inside a special portion (e.g., a field)
- *************************************************************************/
+// After calculating the position of a character during GetCharRect
+// this function allows to find the coordinates of a position (defined
+// in pCMS->pSpecialPos) inside a special portion (e.g., a field)
static void lcl_GetCharRectInsideField( SwTxtSizeInfo& rInf, SwRect& rOrig,
const SwCrsrMoveState& rCMS,
const SwLinePortion& rPor )
@@ -162,9 +158,6 @@ namespace {
}
} // end of anonymous namespace
-/*************************************************************************
- * SwTxtMargin::CtorInitTxtMargin()
- *************************************************************************/
void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
{
CtorInitTxtIter( pNewFrm, pNewInf );
@@ -200,8 +193,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pNode->GetLeftMarginWithNum() -
// #i95907#
// #i111284#
-// rSpace.GetLeft() +
-// rSpace.GetTxtLeft();
+ // rSpace.GetLeft() + rSpace.GetTxtLeft();
( bListLevelIndentsApplicableAndLabelAlignmentActive
? 0
: ( rSpace.GetLeft() - rSpace.GetTxtLeft() ) );
@@ -359,9 +351,6 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
DropInit();
}
-/*************************************************************************
- * SwTxtMargin::DropInit()
- *************************************************************************/
void SwTxtMargin::DropInit()
{
nDropLeft = nDropLines = nDropHeight = nDropDescent = 0;
@@ -379,10 +368,6 @@ void SwTxtMargin::DropInit()
}
}
-/*************************************************************************
- * SwTxtMargin::GetLineStart()
- *************************************************************************/
-
// The function is interpreting / observing / evaluating / keeping / respecting the first line indention and the specified width.
SwTwips SwTxtMargin::GetLineStart() const
{
@@ -400,9 +385,6 @@ SwTwips SwTxtMargin::GetLineStart() const
return nRet;
}
-/*************************************************************************
- * SwTxtCursor::CtorInitTxtCursor()
- *************************************************************************/
void SwTxtCursor::CtorInitTxtCursor( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
{
CtorInitTxtMargin( pNewFrm, pNewInf );
@@ -410,12 +392,7 @@ void SwTxtCursor::CtorInitTxtCursor( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
// GetInfo().SetOut( GetInfo().GetWin() );
}
-/*************************************************************************
- * SwTxtCursor::GetEndCharRect()
- *************************************************************************/
-
// 1170: Ancient bug: Shift-End forgets the last character ...
-
bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS, const long nMax )
{
@@ -484,16 +461,12 @@ bool SwTxtCursor::GetEndCharRect( SwRect* pOrig, const sal_Int32 nOfst,
return true;
}
-/*************************************************************************
- * void SwTxtCursor::_GetCharRect(..)
- * internal function, called by SwTxtCursor::GetCharRect() to calculate
- * the relative character position in the current line.
- * pOrig referes to x and y coordinates, width and height of the cursor
- * pCMS is used for restricting the cursor, if there are different font
- * heights in one line ( first value = offset to y of pOrig, second
- * value = real height of (shortened) cursor
- *************************************************************************/
-
+// internal function, called by SwTxtCursor::GetCharRect() to calculate
+// the relative character position in the current line.
+// pOrig referes to x and y coordinates, width and height of the cursor
+// pCMS is used for restricting the cursor, if there are different font
+// heights in one line ( first value = offset to y of pOrig, second
+// value = real height of (shortened) cursor
void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS )
{
@@ -554,7 +527,7 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
if( bNoTxt )
nTmpFirst = nX;
// 8670: EndPortions count once as TxtPortions.
-// if( pPor->InTxtGrp() || pPor->IsBreakPortion() )
+ // if( pPor->InTxtGrp() || pPor->IsBreakPortion() )
if( pPor->InTxtGrp() || pPor->IsBreakPortion() || pPor->InTabGrp() )
{
bNoTxt = false;
@@ -1192,10 +1165,6 @@ void SwTxtCursor::_GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
}
}
-/*************************************************************************
- * SwTxtCursor::GetCharRect()
- *************************************************************************/
-
bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
SwCrsrMoveState* pCMS, const long nMax )
{
@@ -1284,11 +1253,7 @@ bool SwTxtCursor::GetCharRect( SwRect* pOrig, const sal_Int32 nOfst,
return bRet;
}
-/*************************************************************************
- * SwTxtCursor::GetCrsrOfst()
- *
- * Return: Offset in String
- *************************************************************************/
+// Return: Offset in String
sal_Int32 SwTxtCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint,
bool nChgNode, SwCrsrMoveState* pCMS ) const
{
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 7926e6d332a5..9c23db71c0b0 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -85,10 +85,6 @@ inline void ClearFly( SwTxtFormatInfo &rInf )
rInf.SetFly(0);
}
-/*************************************************************************
- * SwTxtFormatter::CtorInitTxtFormatter()
- *************************************************************************/
-
void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *pNewInf )
{
CtorInitTxtPainter( pNewFrm, pNewInf );
@@ -115,10 +111,6 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p
}
-/*************************************************************************
- * SwTxtFormatter::DTOR
- *************************************************************************/
-
SwTxtFormatter::~SwTxtFormatter()
{
// Extremly unlikely, but still possible
@@ -130,10 +122,6 @@ SwTxtFormatter::~SwTxtFormatter()
}
}
-/*************************************************************************
- * SwTxtFormatter::Insert()
- *************************************************************************/
-
void SwTxtFormatter::Insert( SwLineLayout *pLay )
{
// Insert BEHIND the current element
@@ -146,10 +134,6 @@ void SwTxtFormatter::Insert( SwLineLayout *pLay )
pCurr = pLay;
}
-/*************************************************************************
- * SwTxtFormatter::GetFrmRstHeight()
- *************************************************************************/
-
KSHORT SwTxtFormatter::GetFrmRstHeight() const
{
// We want the rest height relative to the page.
@@ -167,10 +151,6 @@ KSHORT SwTxtFormatter::GetFrmRstHeight() const
return KSHORT( nHeight );
}
-/*************************************************************************
- * SwTxtFormatter::Underflow()
- *************************************************************************/
-
SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
{
// Save values and initialize rInf
@@ -322,10 +302,6 @@ SwLinePortion *SwTxtFormatter::Underflow( SwTxtFormatInfo &rInf )
return pPor;
}
-/*************************************************************************
- * SwTxtFormatter::InsertPortion()
- *************************************************************************/
-
void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
SwLinePortion *pPor ) const
{
@@ -371,10 +347,6 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf,
}
}
-/*************************************************************************
- * SwTxtFormatter::BuildPortion()
- *************************************************************************/
-
void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
{
OSL_ENSURE( rInf.GetTxt().getLength() < COMPLETE_STRING,
@@ -742,10 +714,6 @@ void SwTxtFormatter::BuildPortions( SwTxtFormatInfo &rInf )
rInf.SetTabOverflow( false );
}
-/*************************************************************************
- * SwTxtFormatter::CalcAdjustLine()
- *************************************************************************/
-
void SwTxtFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
{
if( SVX_ADJUST_LEFT != GetAdjust() && !pMulti)
@@ -761,10 +729,6 @@ void SwTxtFormatter::CalcAdjustLine( SwLineLayout *pCurrent )
}
}
-/*************************************************************************
- * SwTxtFormatter::CalcAscent()
- *************************************************************************/
-
void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
{
bool bCalc = false;
@@ -848,10 +812,6 @@ void SwTxtFormatter::CalcAscent( SwTxtFormatInfo &rInf, SwLinePortion *pPor )
}
}
-/*************************************************************************
- * class SwMetaPortion
- *************************************************************************/
-
class SwMetaPortion : public SwTxtPortion
{
public:
@@ -860,10 +820,6 @@ public:
// OUTPUT_OPERATOR
};
-/*************************************************************************
- * virtual SwMetaPortion::Paint()
- *************************************************************************/
-
void SwMetaPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if ( Width() )
@@ -894,9 +850,6 @@ namespace sw { namespace mark {
}
} }
-/*************************************************************************
- * SwTxtFormatter::WhichTxtPor()
- *************************************************************************/
SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
SwTxtPortion *pPor = 0;
@@ -970,9 +923,6 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
return pPor;
}
-/*************************************************************************
- * SwTxtFormatter::NewTxtPortion()
- *************************************************************************/
// We calculate the length, the following portion limits are defined:
// 1) Tabs
// 2) Linebreaks
@@ -1044,9 +994,6 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf )
return pPor;
}
-/*************************************************************************
- * SwTxtFormatter::WhichFirstPortion()
- *************************************************************************/
SwLinePortion *SwTxtFormatter::WhichFirstPortion(SwTxtFormatInfo &rInf)
{
SwLinePortion *pPor = 0;
@@ -1199,10 +1146,6 @@ static bool lcl_OldFieldRest( const SwLineLayout* pCurr )
return bRet;
}
-/*************************************************************************
- * SwTxtFormatter::NewPortion()
- *************************************************************************/
-
/* NewPortion sets rInf.nLen
* A SwTxtPortion is limited by a tab, break, txtatr or attr change
* We can have three cases:
@@ -1530,10 +1473,6 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo &rInf )
return pPor;
}
-/*************************************************************************
- * SwTxtFormatter::FormatLine()
- *************************************************************************/
-
sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
{
OSL_ENSURE( ! pFrm->IsVertical() || pFrm->IsSwapped(),
@@ -1739,10 +1678,6 @@ sal_Int32 SwTxtFormatter::FormatLine(const sal_Int32 nStartPos)
return nNewStart;
}
-/*************************************************************************
- * SwTxtFormatter::RecalcRealHeight()
- *************************************************************************/
-
void SwTxtFormatter::RecalcRealHeight()
{
do
@@ -1751,10 +1686,6 @@ void SwTxtFormatter::RecalcRealHeight()
} while (Next());
}
-/*************************************************************************
- * SwTxtFormatter::CalcRealHeight()
- *************************************************************************/
-
void SwTxtFormatter::CalcRealHeight( bool bNewLine )
{
KSHORT nLineHeight = pCurr->Height();
@@ -1821,16 +1752,16 @@ void SwTxtFormatter::CalcRealHeight( bool bNewLine )
if( !nTmp )
++nTmp;
nLineHeight = (KSHORT)nTmp;
-/*
+ /*
//@TODO figure out how WW maps ascent and descent
//in case of prop line spacing <100%
KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
if( nAsc < pCurr->GetAscent() ||
nLineHeight - nAsc < pCurr->Height() -
-pCurr->GetAscent() )
+ pCurr->GetAscent() )
pCurr->SetClipping( true );
pCurr->SetAscent( nAsc );
-*/
+ */
pCurr->Height( nLineHeight );
pInf->GetParaPortion()->SetFixLineHeight();
}
@@ -1904,10 +1835,6 @@ pCurr->GetAscent() )
pCurr->SetRealHeight( nLineHeight );
}
-/*************************************************************************
- * SwTxtFormatter::FeedInf()
- *************************************************************************/
-
void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
{
// 3260, 3860: Fly auf jeden Fall loeschen!
@@ -1948,10 +1875,6 @@ void SwTxtFormatter::FeedInf( SwTxtFormatInfo &rInf ) const
}
}
-/*************************************************************************
- * SwTxtFormatter::FormatReset()
- *************************************************************************/
-
void SwTxtFormatter::FormatReset( SwTxtFormatInfo &rInf )
{
pCurr->Truncate();
@@ -1966,10 +1889,6 @@ void SwTxtFormatter::FormatReset( SwTxtFormatInfo &rInf )
FeedInf( rInf );
}
-/*************************************************************************
- * SwTxtFormatter::CalcOnceMore()
- *************************************************************************/
-
bool SwTxtFormatter::CalcOnceMore()
{
if( pDropFmt )
@@ -1983,10 +1902,6 @@ bool SwTxtFormatter::CalcOnceMore()
return bOnceMore;
}
-/*************************************************************************
- * SwTxtFormatter::CalcBottomLine()
- *************************************************************************/
-
SwTwips SwTxtFormatter::CalcBottomLine() const
{
SwTwips nRet = Y() + GetLineHeight();
@@ -2011,12 +1926,7 @@ SwTwips SwTxtFormatter::CalcBottomLine() const
return nRet;
}
-/*************************************************************************
- * SwTxtFormatter::_CalcFitToContent()
- *
- * FME/OD: This routine does a limited text formatting.
- *************************************************************************/
-
+// FME/OD: This routine does a limited text formatting.
SwTwips SwTxtFormatter::_CalcFitToContent()
{
FormatReset( GetInfo() );
@@ -2025,13 +1935,9 @@ SwTwips SwTxtFormatter::_CalcFitToContent()
return pCurr->Width();
}
-/*************************************************************************
- * SwTxtFormatter::AllowRepaintOpt()
- *
- * determines if the calculation of a repaint offset is allowed
- * otherwise each line is painted from 0 (this is a copy of the beginning
- * of the former SwTxtFormatter::Recycle() function
- *************************************************************************/
+// determines if the calculation of a repaint offset is allowed
+// otherwise each line is painted from 0 (this is a copy of the beginning
+// of the former SwTxtFormatter::Recycle() function
bool SwTxtFormatter::AllowRepaintOpt() const
{
// reformat position in front of current line? Only in this case
@@ -2765,11 +2671,7 @@ void SwTxtFormatter::MergeCharacterBorder( SwLinePortion& rPortion, SwTxtFormatI
}
namespace {
- /*************************************************************************
- * ::CalcOptRepaint()
- *
- * calculates and sets optimal repaint offset for the current line
- *************************************************************************/
+ // calculates and sets optimal repaint offset for the current line
long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
SwLineLayout &rCurr,
const sal_Int32 nOldLineEnd,
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 4bd2b0fd8ca1..1c109751ab22 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -56,13 +56,9 @@
#include "porrst.hxx"
#include "pormulti.hxx"
-/*************************************************************************
- * IsUnderlineBreak
- *
- * Returns, if we have an underline breaking situation
- * Adding some more conditions here means you also have to change them
- * in SwTxtPainter::CheckSpecialUnderline
- *************************************************************************/
+// Returns, if we have an underline breaking situation
+// Adding some more conditions here means you also have to change them
+// in SwTxtPainter::CheckSpecialUnderline
bool IsUnderlineBreak( const SwLinePortion& rPor, const SwFont& rFnt )
{
return UNDERLINE_NONE == rFnt.GetUnderline() ||
@@ -133,17 +129,13 @@ SwLinePortion *SwTxtPainter::CalcPaintOfst( const SwRect &rPaint )
return pPor;
}
-/*************************************************************************
- * SwTxtPainter::DrawTextLine()
- *
- * Es gibt zwei Moeglichkeiten bei transparenten Font auszugeben:
- * 1) DrawRect auf die ganze Zeile und die DrawText hinterher
- * (objektiv schnell, subjektiv langsam).
- * 2) Fuer jede Portion ein DrawRect mit anschliessendem DrawText
- * ausgefuehrt (objektiv langsam, subjektiv schnell).
- * Da der User in der Regel subjektiv urteilt, wird die 2. Methode
- * als Default eingestellt.
- *************************************************************************/
+// Es gibt zwei Moeglichkeiten bei transparenten Font auszugeben:
+// 1) DrawRect auf die ganze Zeile und die DrawText hinterher
+// (objektiv schnell, subjektiv langsam).
+// 2) Fuer jede Portion ein DrawRect mit anschliessendem DrawText
+// ausgefuehrt (objektiv langsam, subjektiv schnell).
+// Da der User in der Regel subjektiv urteilt, wird die 2. Methode
+// als Default eingestellt.
void SwTxtPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
const bool bUnderSz )
{
diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx
index f23033789e78..767e878236da 100644
--- a/sw/source/core/text/itrpaint.hxx
+++ b/sw/source/core/text/itrpaint.hxx
@@ -23,10 +23,6 @@
class SwSaveClip; // SwTxtPainter
class SwMultiPortion;
-/*************************************************************************
- * class SwTxtPainter
- *************************************************************************/
-
class SwTxtPainter : public SwTxtCursor
{
bool bPaintDrop;
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index 5abe029a8d3e..6268c8c138cb 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -33,10 +33,6 @@
#include "txtfrm.hxx"
#include "porfly.hxx"
-/*************************************************************************
- * SwTxtIter::CtorInitTxtIter()
- *************************************************************************/
-
void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
{
SwTxtNode *pNode = pNewFrm->GetTxtNode();
@@ -56,10 +52,6 @@ void SwTxtIter::CtorInitTxtIter( SwTxtFrm *pNewFrm, SwTxtInfo *pNewInf )
&& pFrm->FillRegister( nRegStart, nRegDiff );
}
-/*************************************************************************
- * SwTxtIter::Init()
- *************************************************************************/
-
void SwTxtIter::Init()
{
pCurr = pInf->GetParaPortion();
@@ -70,20 +62,12 @@ void SwTxtIter::Init()
nLineNr = 1;
}
-/*************************************************************************
- * SwTxtIter::_GetHeightAndAscent()
- *************************************************************************/
-
void SwTxtIter::CalcAscentAndHeight( KSHORT &rAscent, KSHORT &rHeight ) const
{
rHeight = GetLineHeight();
rAscent = pCurr->GetAscent() + rHeight - pCurr->Height();
}
-/*************************************************************************
- * SwTxtIter::_GetPrev()
- *************************************************************************/
-
SwLineLayout *SwTxtIter::_GetPrev()
{
pPrev = 0;
@@ -96,10 +80,6 @@ SwLineLayout *SwTxtIter::_GetPrev()
return pPrev = pLay;
}
-/*************************************************************************
- * SwTxtIter::GetPrev()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::GetPrev()
{
if(! bPrev)
@@ -107,10 +87,6 @@ const SwLineLayout *SwTxtIter::GetPrev()
return pPrev;
}
-/*************************************************************************
- * SwTxtIter::Prev()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::Prev()
{
if( !bPrev )
@@ -129,10 +105,6 @@ const SwLineLayout *SwTxtIter::Prev()
return 0;
}
-/*************************************************************************
- * SwTxtIter::Next()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::Next()
{
if(pCurr->GetNext())
@@ -149,10 +121,6 @@ const SwLineLayout *SwTxtIter::Next()
return 0;
}
-/*************************************************************************
- * SwTxtIter::NextLine()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::NextLine()
{
const SwLineLayout *pNext = Next();
@@ -163,10 +131,6 @@ const SwLineLayout *SwTxtIter::NextLine()
return pNext;
}
-/*************************************************************************
- * SwTxtIter::GetNextLine()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::GetNextLine() const
{
const SwLineLayout *pNext = pCurr->GetNext();
@@ -177,10 +141,6 @@ const SwLineLayout *SwTxtIter::GetNextLine() const
return (SwLineLayout*)pNext;
}
-/*************************************************************************
- * SwTxtIter::GetPrevLine()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::GetPrevLine()
{
const SwLineLayout *pRoot = pInf->GetParaPortion();
@@ -207,10 +167,6 @@ const SwLineLayout *SwTxtIter::GetPrevLine()
return (SwLineLayout*)pLay;
}
-/*************************************************************************
- * SwTxtIter::PrevLine()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::PrevLine()
{
const SwLineLayout *pMyPrev = Prev();
@@ -226,10 +182,6 @@ const SwLineLayout *SwTxtIter::PrevLine()
return (SwLineLayout*)(pMyPrev ? pMyPrev : pLast);
}
-/*************************************************************************
- * SwTxtIter::Bottom()
- *************************************************************************/
-
void SwTxtIter::Bottom()
{
while( Next() )
@@ -238,10 +190,6 @@ void SwTxtIter::Bottom()
}
}
-/*************************************************************************
- * SwTxtIter::CharToLine()
- *************************************************************************/
-
void SwTxtIter::CharToLine(const sal_Int32 nChar)
{
while( nStart + pCurr->GetLen() <= nChar && Next() )
@@ -250,10 +198,6 @@ void SwTxtIter::CharToLine(const sal_Int32 nChar)
;
}
-/*************************************************************************
- * SwTxtIter::CharCrsrToLine()
- *************************************************************************/
-
// 1170: beruecksichtigt Mehrdeutigkeiten:
const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
{
@@ -267,10 +211,6 @@ const SwLineLayout *SwTxtCursor::CharCrsrToLine( const sal_Int32 nPosition )
return bPrevious ? PrevLine() : pCurr;
}
-/*************************************************************************
- * SwTxtCrsr::AdjustBaseLine()
- *************************************************************************/
-
sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
const SwLinePortion* pPor,
sal_uInt16 nPorHeight, sal_uInt16 nPorAscent,
@@ -350,10 +290,6 @@ sal_uInt16 SwTxtCursor::AdjustBaseLine( const SwLineLayout& rLine,
return nOfst;
}
-/*************************************************************************
- * SwTxtIter::TwipsToLine()
- *************************************************************************/
-
const SwLineLayout *SwTxtIter::TwipsToLine( const SwTwips y)
{
while( nY + GetLineHeight() <= y && Next() )
@@ -364,7 +300,6 @@ const SwLineLayout *SwTxtIter::TwipsToLine( const SwTwips y)
}
// Local helper function to check, if pCurr needs a field rest portion:
-
static bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
{
const SwLinePortion *pPor = pCurr->GetPortion();
@@ -379,10 +314,6 @@ static bool lcl_NeedsFieldRest( const SwLineLayout* pCurr )
return bRet;
}
-/*************************************************************************
- * SwTxtIter::TruncLines()
- *************************************************************************/
-
void SwTxtIter::TruncLines( bool bNoteFollow )
{
SwLineLayout *pDel = pCurr->GetNext();
@@ -438,10 +369,6 @@ void SwTxtIter::TruncLines( bool bNoteFollow )
pFrm->RemoveFtn( nEnd );
}
-/*************************************************************************
- * SwTxtIter::CntHyphens()
- *************************************************************************/
-
void SwTxtIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
{
nEndCnt = 0;
@@ -465,13 +392,8 @@ void SwTxtIter::CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const
}
}
-/*************************************************************************
- * SwHookOut
- *
- * Change current output device to formatting device, this has to be done before
- * formatting.
- *************************************************************************/
-
+// Change current output device to formatting device, this has to be done before
+// formatting.
SwHookOut::SwHookOut( SwTxtSizeInfo& rInfo ) :
pInf( &rInfo ),
pOut( rInfo.GetOut() ),
diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
index 576b177e1238..49064f16c846 100644
--- a/sw/source/core/text/itrtxt.hxx
+++ b/sw/source/core/text/itrtxt.hxx
@@ -28,10 +28,6 @@ struct SwCrsrMoveState;
class SwMarginPortion;
class SwFlyPortion;
-/*************************************************************************
- * class SwTxtIter
- *************************************************************************/
-
class SwTxtIter : public SwAttrIter
{
protected:
@@ -142,10 +138,6 @@ public:
void CntHyphens( sal_uInt8 &nEndCnt, sal_uInt8 &nMidCnt) const;
};
-/*************************************************************************
- * class SwTxtMargin
- *************************************************************************/
-
class SwTxtMargin : public SwTxtIter
{
private:
@@ -229,10 +221,6 @@ public:
};
-/*************************************************************************
- * class SwTxtAdjuster
- *************************************************************************/
-
class SwTxtAdjuster : public SwTxtMargin
{
// Adjusts the portion, if we have adjustment and FlyFrms
@@ -273,10 +261,6 @@ public:
void CalcDropRepaint();
};
-/*************************************************************************
- * class SwTxtCursor
- *************************************************************************/
-
class SwTxtCursor : public SwTxtAdjuster
{
// A small helper-class to save SwTxtCursor member, manipulate them
@@ -314,13 +298,8 @@ public:
static inline bool IsRightMargin() { return bRightMargin; }
};
-/*************************************************************************
- * SwHookOut
- *
- * Change current output device to printer, this has to be done before
- * formatting.
- *************************************************************************/
-
+// Change current output device to printer, this has to be done before
+// formatting.
class SwHookOut
{
SwTxtSizeInfo* pInf;
@@ -331,10 +310,6 @@ public:
~SwHookOut();
};
-/*************************************************************************
- * Inline implementation
- *************************************************************************/
-
inline bool SwTxtIter::SeekAndChg( SwTxtSizeInfo &rInf )
{
return SeekAndChgAttrIter( rInf.GetIdx(), rInf.GetOut() );
diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 4568fa2349fc..a56d28b684e9 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -29,13 +29,8 @@ class SwFont;
class SwDropCapCache;
extern SwDropCapCache *pDropCapCache;
-/*************************************************************************
- * class SwDropPortionPart
- *
- * A drop portion can consist of one or more parts in order to allow
- * attribute changes inside them.
- *************************************************************************/
-
+// A drop portion can consist of one or more parts in order to allow
+// attribute changes inside them.
class SwDropPortionPart
{
SwDropPortionPart* pFollow;
@@ -63,10 +58,6 @@ public:
void SetJoinBorderWithNext( const bool bJoinNext ) { m_bJoinBorderWithNext = bJoinNext; }
};
-/*************************************************************************
- * class SwDropPortion
- *************************************************************************/
-
class SwDropPortion : public SwTxtPortion
{
friend class SwDropCapCache;
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 9e909f1e4a6c..14190ab7896c 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -22,17 +22,9 @@
#include <inftxt.hxx>
#include <porexp.hxx>
-/*************************************************************************
- * class SwExpandPortion
- *************************************************************************/
-
sal_Int32 SwExpandPortion::GetCrsrOfst( const MSHORT nOfst ) const
{ return SwLinePortion::GetCrsrOfst( nOfst ); }
-/*************************************************************************
- * virtual SwExpandPortion::GetExpTxt()
- *************************************************************************/
-
bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
{
rTxt = OUString();
@@ -41,30 +33,18 @@ bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
return true;
}
-/*************************************************************************
- * virtual SwExpandPortion::HandlePortion()
- *************************************************************************/
-
void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString;
rPH.Special( GetLen(), aString, GetWhichPor() );
}
-/*************************************************************************
- * virtual SwExpandPortion::GetTxtSize()
- *************************************************************************/
-
SwPosSize SwExpandPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
SwTxtSlot aDiffTxt( &rInf, this, false, false );
return rInf.GetTxtSize();
}
-/*************************************************************************
- * virtual SwExpandPortion::Format()
- *************************************************************************/
-
// 5010: Exp und Tabs
bool SwExpandPortion::Format( SwTxtFormatInfo &rInf )
@@ -84,10 +64,6 @@ bool SwExpandPortion::Format( SwTxtFormatInfo &rInf )
return SwTxtPortion::Format( rInf );
}
-/*************************************************************************
- * virtual SwExpandPortion::Paint()
- *************************************************************************/
-
void SwExpandPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
SwTxtSlot aDiffTxt( &rInf, this, true, true );
@@ -121,16 +97,8 @@ void SwExpandPortion::Paint( const SwTxtPaintInfo &rInf ) const
*const_cast<SwTxtPaintInfo&>(rInf).GetFont() = aOldFont;
}
-/*************************************************************************
- * class SwBlankPortion
- *************************************************************************/
-
SwLinePortion *SwBlankPortion::Compress() { return this; }
-/*************************************************************************
- * SwBlankPortion::MayUnderflow()
- *************************************************************************/
-
// 5497: Es gibt schon Gemeinheiten auf der Welt...
// Wenn eine Zeile voll mit HardBlanks ist und diese ueberlaeuft,
// dann duerfen keine Underflows generiert werden!
@@ -182,11 +150,7 @@ MSHORT SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf,
return 2;
}
-/*************************************************************************
- * virtual SwBlankPortion::FormatEOL()
- *************************************************************************/
// Format end of Line
-
void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
MSHORT nMay = MayUnderflow( rInf, rInf.GetIdx() - nLineLength, true );
@@ -206,10 +170,6 @@ void SwBlankPortion::FormatEOL( SwTxtFormatInfo &rInf )
}
}
-/*************************************************************************
- * virtual SwBlankPortion::Format()
- *************************************************************************/
-
// 7771: Underflows weiterreichen und selbst ausloesen!
bool SwBlankPortion::Format( SwTxtFormatInfo &rInf )
{
@@ -224,10 +184,6 @@ bool SwBlankPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwBlankPortion::Paint()
- *************************************************************************/
-
void SwBlankPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( !bMulti ) // No gray background for multiportion brackets
@@ -235,30 +191,18 @@ void SwBlankPortion::Paint( const SwTxtPaintInfo &rInf ) const
SwExpandPortion::Paint( rInf );
}
-/*************************************************************************
- * virtual SwBlankPortion::GetExpTxt()
- *************************************************************************/
-
bool SwBlankPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) const
{
rTxt = OUString(cChar);
return true;
}
-/*************************************************************************
- * virtual SwBlankPortion::HandlePortion()
- *************************************************************************/
-
void SwBlankPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString( cChar );
rPH.Special( GetLen(), aString, GetWhichPor() );
}
-/*************************************************************************
- * class SwPostItsPortion
- *************************************************************************/
-
SwPostItsPortion::SwPostItsPortion( bool bScrpt )
: bScript( bScrpt )
{
@@ -279,10 +223,6 @@ KSHORT SwPostItsPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
(KSHORT)rInf.GetOpt().GetPostItsWidth( rInf.GetOut() ) : 0;
}
-/*************************************************************************
- * virtual SwPostItsPortion::Format()
- *************************************************************************/
-
bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
{
const bool bRet = SwLinePortion::Format( rInf );
@@ -292,10 +232,6 @@ bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf )
return bRet;
}
-/*************************************************************************
- * virtual SwPostItsPortion::GetExpTxt()
- *************************************************************************/
-
bool SwPostItsPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsPostIts() )
diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx
index 23afa3675782..6a2e99d56ecc 100644
--- a/sw/source/core/text/porexp.hxx
+++ b/sw/source/core/text/porexp.hxx
@@ -22,10 +22,6 @@
#include "portxt.hxx"
-/*************************************************************************
- * class SwExpandPortion
- *************************************************************************/
-
class SwExpandPortion : public SwTxtPortion
{
public:
@@ -42,10 +38,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwBlankPortion
- *************************************************************************/
-
class SwBlankPortion : public SwExpandPortion
{
sal_Unicode cChar;
@@ -72,10 +64,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwPostItsPortion
- *************************************************************************/
-
class SwPostItsPortion : public SwExpandPortion
{
bool bScript;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 7064e436e241..99874d791625 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -44,8 +44,6 @@
using namespace ::com::sun::star;
-// class SwFldPortion
-
SwLinePortion *SwFldPortion::Compress()
{ return (GetLen() || !aExpand.isEmpty() || SwLinePortion::Compress()) ? this : 0; }
@@ -134,8 +132,6 @@ KSHORT SwFldPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
// 8653: in keinem Fall nur SetLen(0);
-// Helper class SwFldSlot
-
class SwFldSlot
{
const OUString *pOldTxt;
@@ -467,8 +463,6 @@ SwPosSize SwFldPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return aSize;
}
-// class SwHiddenPortion
-
SwFldPortion *SwHiddenPortion::Clone(const OUString &rExpand ) const
{
SwFont *pNewFnt;
@@ -493,8 +487,6 @@ bool SwHiddenPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) con
return SwFldPortion::GetExpTxt( rInf, rTxt );
}
-// class SwNumberPortion
-
SwNumberPortion::SwNumberPortion( const OUString &rExpand,
SwFont *pFont,
const bool bLft,
@@ -733,8 +725,6 @@ void SwNumberPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-// class SwBulletPortion
-
SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
const OUString& rBulletFollowedBy,
SwFont *pFont,
@@ -749,8 +739,6 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet,
SetWhichPor( POR_BULLET );
}
-// class SwGrfNumPortion
-
#define GRFNUM_SECURE 10
SwGrfNumPortion::SwGrfNumPortion(
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 90b5342760a4..25adb3602a01 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -28,10 +28,6 @@ class SvxBrushItem;
class SwFmtVertOrient;
class SwFrm;
-/*************************************************************************
- * class SwFldPortion
- *************************************************************************/
-
class SwFldPortion : public SwExpandPortion
{
friend class SwTxtFormatter;
@@ -111,9 +107,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwHiddenPortion
- *************************************************************************/
// Distinguish only for painting/hide
class SwHiddenPortion : public SwFldPortion
@@ -130,10 +123,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwNumberPortion
- *************************************************************************/
-
class SwNumberPortion : public SwFldPortion
{
protected:
@@ -159,10 +148,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwBulletPortion
- *************************************************************************/
-
class SwBulletPortion : public SwNumberPortion
{
public:
@@ -176,10 +161,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwBmpBulletPortion
- *************************************************************************/
-
class SwGrfNumPortion : public SwNumberPortion
{
SvxBrushItem* pBrush;
@@ -221,16 +202,12 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwCombinedPortion
- * Used in for asian layout specialities to display up to six characters
- * in 2 rows and 2-3 columns.
- * e.g.
- *
- * A.. A.. A.B A.B A.B.C A.B.C
- * ... ..B .C. C.D .D.E. D.E.F
- *************************************************************************/
-
+// Used in for asian layout specialities to display up to six characters
+// in 2 rows and 2-3 columns.
+// e.g.
+//
+// A.. A.. A.B A.B A.B.C A.B.C
+// ... ..B .C. C.D .D.E. D.E.F
class SwCombinedPortion : public SwFldPortion
{
sal_uInt16 aPos[6]; // up to six X positions
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 48532fa651f4..9c1aac0139a3 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -28,10 +28,6 @@ class SwFlyInCntFrm;
class SwTxtFrm;
struct SwCrsrMoveState;
-/*************************************************************************
- * class SwFlyPortion
- *************************************************************************/
-
class SwFlyPortion : public SwFixPortion
{
KSHORT nBlankWidth;
@@ -45,10 +41,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwFlyCntPortion
- *************************************************************************/
-
/// This portion represents an as-character anchored fly (shape, frame, etc.)
class SwFlyCntPortion : public SwLinePortion
{
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index 161d3e1730f0..f2cf83fb605c 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -24,10 +24,6 @@
class SwTxtFrm;
class SwTxtFtn;
-/*************************************************************************
- * class SwFtnPortion
- *************************************************************************/
-
class SwFtnPortion : public SwFldPortion
{
SwTxtFtn *pFtn;
@@ -52,10 +48,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwFtnNumPortion
- *************************************************************************/
-
class SwFtnNumPortion : public SwNumberPortion
{
public:
@@ -66,10 +58,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwQuoVadisPortion
- *************************************************************************/
-
class SwQuoVadisPortion : public SwFldPortion
{
OUString aErgo;
@@ -92,10 +80,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwErgoSumPortion
- *************************************************************************/
-
class SwErgoSumPortion : public SwFldPortion
{
public:
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 13f0d6d2a907..6ea87bc1d2ed 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -27,10 +27,6 @@
#include "porfly.hxx"
#include <comphelper/string.hxx>
-/*************************************************************************
- * class SwGluePortion
- *************************************************************************/
-
SwGluePortion::SwGluePortion( const KSHORT nInitFixWidth )
: nFixWidth( nInitFixWidth )
{
@@ -38,10 +34,6 @@ SwGluePortion::SwGluePortion( const KSHORT nInitFixWidth )
SetWhichPor( POR_GLUE );
}
-/*************************************************************************
- * virtual SwGluePortion::GetCrsrOfst()
- *************************************************************************/
-
sal_Int32 SwGluePortion::GetCrsrOfst( const KSHORT nOfst ) const
{
if( !GetLen() || nOfst > GetLen() || !Width() )
@@ -50,10 +42,6 @@ sal_Int32 SwGluePortion::GetCrsrOfst( const KSHORT nOfst ) const
return nOfst / (Width() / GetLen());
}
-/*************************************************************************
- * virtual SwGluePortion::GetTxtSize()
- *************************************************************************/
-
SwPosSize SwGluePortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
if( 1 >= GetLen() || rInf.GetLen() > GetLen() || !Width() || !GetLen() )
@@ -62,10 +50,6 @@ SwPosSize SwGluePortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return SwPosSize( (Width() / GetLen()) * rInf.GetLen(), Height() );
}
-/*************************************************************************
- * virtual SwGluePortion::GetExpTxt()
- *************************************************************************/
-
bool SwGluePortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
{
if( GetLen() && rInf.OnWin() &&
@@ -79,10 +63,6 @@ bool SwGluePortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
return false;
}
-/*************************************************************************
- * virtual SwGluePortion::Paint()
- *************************************************************************/
-
void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( !GetLen() )
@@ -126,10 +106,6 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * SwGluePortion::MoveGlue()
- *************************************************************************/
-
void SwGluePortion::MoveGlue( SwGluePortion *pTarget, const short nPrtGlue )
{
short nPrt = std::min( nPrtGlue, GetPrtGlue() );
@@ -140,10 +116,6 @@ void SwGluePortion::MoveGlue( SwGluePortion *pTarget, const short nPrtGlue )
}
}
-/*************************************************************************
- * void SwGluePortion::Join()
- *************************************************************************/
-
void SwGluePortion::Join( SwGluePortion *pVictim )
{
// Die GluePortion wird ausgesogen und weggespuelt ...
@@ -157,10 +129,6 @@ void SwGluePortion::Join( SwGluePortion *pVictim )
delete pVictim;
}
-/*************************************************************************
- * class SwFixPortion
- *************************************************************************/
-
// Wir erwarten ein framelokales SwRect !
SwFixPortion::SwFixPortion( const SwRect &rRect )
:SwGluePortion( KSHORT(rRect.Width()) ), nFix( KSHORT(rRect.Left()) )
@@ -175,29 +143,20 @@ SwFixPortion::SwFixPortion(const KSHORT nFixedWidth, const KSHORT nFixedPos)
SetWhichPor( POR_FIX );
}
-/*************************************************************************
- * class SwMarginPortion
- *************************************************************************/
-
SwMarginPortion::SwMarginPortion( const KSHORT nFixedWidth )
:SwGluePortion( nFixedWidth )
{
SetWhichPor( POR_MARGIN );
}
-/*************************************************************************
- * SwMarginPortion::AdjustRight()
- *
- * In the outer loop all portions are inspected - the GluePortions
- * at the end are processed first.
- * The end is shifted forwardly till no more GluePortions remain.
- * Always GluePortion-pairs (pLeft and pRight) are treated, where
- * textportions between pLeft and pRight are moved at the back of
- * pRight if pRight has enough Glue. With every move part of the
- * Glue is transferred from pRight to pLeft.
- * The next loop starts with the processed pLeft as pRight.
- *************************************************************************/
-
+// In the outer loop all portions are inspected - the GluePortions
+// at the end are processed first.
+// The end is shifted forwardly till no more GluePortions remain.
+// Always GluePortion-pairs (pLeft and pRight) are treated, where
+// textportions between pLeft and pRight are moved at the back of
+// pRight if pRight has enough Glue. With every move part of the
+// Glue is transferred from pRight to pLeft.
+// The next loop starts with the processed pLeft as pRight.
void SwMarginPortion::AdjustRight( const SwLineLayout *pCurr )
{
SwGluePortion *pRight = 0;
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index 7c5edccbec6b..9c8568633635 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -24,10 +24,6 @@
class SwRect;
class SwLineLayout;
-/*************************************************************************
- * class SwGluePortion
- *************************************************************************/
-
class SwGluePortion : public SwLinePortion
{
private:
@@ -52,10 +48,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwFixPortion
- *************************************************************************/
-
class SwFixPortion : public SwGluePortion
{
KSHORT nFix; // The width offset in the line
@@ -67,10 +59,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwMarginPortion
- *************************************************************************/
-
class SwMarginPortion : public SwGluePortion
{
public:
@@ -79,37 +67,21 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * inline SwGluePortion::GetPrtGlue()
- *************************************************************************/
-
inline short SwGluePortion::GetPrtGlue() const
{ return Width() - nFixWidth; }
-/*************************************************************************
- * inline SwGluePortion::AdjFixWidth()
- * The FixWidth MUST NEVER be larger than the accumulated width!
- *************************************************************************/
-
+// The FixWidth MUST NEVER be larger than the accumulated width!
inline void SwGluePortion::AdjFixWidth()
{
if( nFixWidth > PrtWidth() )
nFixWidth = PrtWidth();
}
-/*************************************************************************
- * inline SwGluePortion::MoveGlue()
- *************************************************************************/
-
inline void SwGluePortion::MoveAllGlue( SwGluePortion *pTarget )
{
MoveGlue( pTarget, GetPrtGlue() );
}
-/*************************************************************************
- * inline SwGluePortion::MoveHalfGlue()
- *************************************************************************/
-
inline void SwGluePortion::MoveHalfGlue( SwGluePortion *pTarget )
{
MoveGlue( pTarget, GetPrtGlue() / 2 );
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 400fd3cbbf18..47c7707c2fdf 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -21,10 +21,6 @@
#include "porexp.hxx"
-/*************************************************************************
- * class SwHyphPortion
- *************************************************************************/
-
class SwHyphPortion : public SwExpandPortion
{
public:
@@ -41,10 +37,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwHyphStrPortion
- *************************************************************************/
-
class SwHyphStrPortion : public SwHyphPortion
{
OUString aExpand;
@@ -63,10 +55,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwSoftHyphPortion
- *************************************************************************/
-
class SwSoftHyphPortion : public SwHyphPortion
{
bool bExpand;
@@ -91,10 +79,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwSoftHyphStrPortion
- *************************************************************************/
-
class SwSoftHyphStrPortion : public SwHyphStrPortion
{
public:
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index a099b7405923..92bc234bd9fd 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -84,24 +84,14 @@ bool isTransparentChar ( sal_Unicode cCh )
return u_getIntPropertyValue( cCh, UCHAR_JOINING_TYPE ) == U_JT_TRANSPARENT;
}
-/*************************************************************************
- * lcl_IsLigature
- *
- * Checks if cCh + cNectCh builds a ligature (used for Kashidas)
- *************************************************************************/
-
+// Checks if cCh + cNectCh builds a ligature (used for Kashidas)
static bool lcl_IsLigature( sal_Unicode cCh, sal_Unicode cNextCh )
{
// Lam + Alef
return ( isLamChar ( cCh ) && isAlefChar ( cNextCh ));
}
-/*************************************************************************
- * lcl_ConnectToPrev
- *
- * Checks if cCh is connectable to cPrevCh (used for Kashidas)
- *************************************************************************/
-
+// Checks if cCh is connectable to cPrevCh (used for Kashidas)
static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
{
const int32_t nJoiningType = u_getIntPropertyValue( cPrevCh, UCHAR_JOINING_TYPE );
@@ -114,9 +104,6 @@ static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
return bRet;
}
-/*************************************************************************
- * lcl_HasStrongLTR
- *************************************************************************/
static bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int32 nEnd )
{
for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
@@ -130,16 +117,10 @@ static bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int3
return false;
}
-/*************************************************************************
- * SwLineLayout::~SwLineLayout()
- *
- * class SwLineLayout: This is the layout of a single line, which is made
- * up of it's dimension, the character count and the word spacing in the
- * line.
- * Line objects are managed in an own pool, in order to store them continuously
- * in memory so that they are paged out together and don't fragment memory.
- *************************************************************************/
-
+// class SwLineLayout: This is the layout of a single line, which is made
+// up of it's dimension, the character count and the word spacing in the line.
+// Line objects are managed in an own pool, in order to store them continuously
+// in memory so that they are paged out together and don't fragment memory.
SwLineLayout::~SwLineLayout()
{
Truncate();
@@ -196,13 +177,8 @@ bool SwLineLayout::Format( SwTxtFormatInfo &rInf )
return true;
}
-/*************************************************************************
- * SwLineLayout::CalcLeftMargin()
- *
- * We collect all FlyPortions at the beginning of the line and make that a
- * MarginPortion.
- *************************************************************************/
-
+// We collect all FlyPortions at the beginning of the line and make that a
+// MarginPortion.
SwMarginPortion *SwLineLayout::CalcLeftMargin()
{
SwMarginPortion *pLeft = (GetPortion() && GetPortion()->IsMarginPortion()) ?
@@ -256,11 +232,7 @@ void SwLineLayout::CreateSpaceAdd( const long nInit )
SetLLSpaceAdd( nInit, 0 );
}
-/*************************************************************************
- * Local helper function. Returns true if there are only blanks
- * in [nStt, nEnd[
- *************************************************************************/
-
+// Returns true if there are only blanks in [nStt, nEnd[
static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 nEnd )
{
bool bBlankOnly = true;
@@ -276,12 +248,7 @@ static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 n
return bBlankOnly;
}
-/*************************************************************************
- * SwLineLayout::CalcLine()
- *
- * Swapped out from FormatLine()
- *************************************************************************/
-
+// Swapped out from FormatLine()
void SwLineLayout::CalcLine( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
{
const KSHORT nLineWidth = rInf.RealWidth();
@@ -630,13 +597,8 @@ SwScriptInfo::~SwScriptInfo()
{
}
-/*************************************************************************
- * SwScriptInfo::WhichFont()
- *
- * Converts i18n Script Type (LATIN, ASIAN, COMPLEX, WEAK) to
- * Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font
-*************************************************************************/
-
+// Converts i18n Script Type (LATIN, ASIAN, COMPLEX, WEAK) to
+// Sw Script Types (SW_LATIN, SW_CJK, SW_CTL), used to identify the font
sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pTxt, const SwScriptInfo* pSI )
{
SAL_WARN_IF( !pTxt && !pSI, "sw.core", "How should I determine the script type?" );
@@ -659,12 +621,7 @@ sal_uInt8 SwScriptInfo::WhichFont( sal_Int32 nIdx, const OUString* pTxt, const S
return SW_LATIN;
}
-/*************************************************************************
- * SwScriptInfo::InitScriptInfo()
- *
- * searches for script changes in rTxt and stores them
- *************************************************************************/
-
+// searches for script changes in rTxt and stores them
void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode )
{
InitScriptInfo( rNode, nDefaultDir == UBIDI_RTL );
@@ -1271,17 +1228,13 @@ void SwScriptInfo::UpdateBidiInfo( const OUString& rTxt )
ubidi_close( pBidi );
}
-/*************************************************************************
- * SwScriptInfo::NextScriptChg(..)
- * returns the position of the next character which belongs to another script
- * than the character of the actual (input) position.
- * If there's no script change until the end of the paragraph, it will return
- * COMPLETE_STRING.
- * Scripts are Asian (Chinese, Japanese, Korean),
- * Latin ( English etc.)
- * and Complex ( Hebrew, Arabian )
- *************************************************************************/
-
+// returns the position of the next character which belongs to another script
+// than the character of the actual (input) position.
+// If there's no script change until the end of the paragraph, it will return
+// COMPLETE_STRING.
+// Scripts are Asian (Chinese, Japanese, Korean),
+// Latin ( English etc.)
+// and Complex ( Hebrew, Arabian )
sal_Int32 SwScriptInfo::NextScriptChg(const sal_Int32 nPos) const
{
sal_uInt16 nEnd = CountScriptChg();
@@ -1294,11 +1247,7 @@ sal_Int32 SwScriptInfo::NextScriptChg(const sal_Int32 nPos) const
return COMPLETE_STRING;
}
-/*************************************************************************
- * SwScriptInfo::ScriptType(..)
- * returns the script of the character at the input position
- *************************************************************************/
-
+// returns the script of the character at the input position
sal_uInt8 SwScriptInfo::ScriptType(const sal_Int32 nPos) const
{
sal_uInt16 nEnd = CountScriptChg();
@@ -1339,11 +1288,7 @@ sal_uInt8 SwScriptInfo::DirType(const sal_Int32 nPos) const
return 0;
}
-/*************************************************************************
- * SwScriptInfo::MaskHiddenRanges(..)
- * Takes a string and replaced the hidden ranges with cChar.
- **************************************************************************/
-
+// Takes a string and replaced the hidden ranges with cChar.
sal_Int32 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, OUStringBuffer & rText,
const sal_Int32 nStt, const sal_Int32 nEnd,
const sal_Unicode cChar )
@@ -1379,11 +1324,7 @@ sal_Int32 SwScriptInfo::MaskHiddenRanges( const SwTxtNode& rNode, OUStringBuffer
return nNumOfHiddenChars;
}
-/*************************************************************************
- * SwScriptInfo::DeleteHiddenRanges(..)
- * Takes a SwTxtNode and deletes the hidden ranges from the node.
- **************************************************************************/
-
+// Takes a SwTxtNode and deletes the hidden ranges from the node.
void SwScriptInfo::DeleteHiddenRanges( SwTxtNode& rNode )
{
PositionList aList;
@@ -1402,11 +1343,6 @@ void SwScriptInfo::DeleteHiddenRanges( SwTxtNode& rNode )
}
}
-/*************************************************************************
- * SwScriptInfo::GetBoundsOfHiddenRange(..)
- * static version
- **************************************************************************/
-
bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPos,
sal_Int32& rnStartPos, sal_Int32& rnEndPos,
PositionList* pList )
@@ -1493,11 +1429,6 @@ bool SwScriptInfo::GetBoundsOfHiddenRange( const SwTxtNode& rNode, sal_Int32 nPo
return bNewContainsHiddenChars;
}
-/*************************************************************************
- * SwScriptInfo::GetBoundsOfHiddenRange(..)
- * non-static version
- **************************************************************************/
-
bool SwScriptInfo::GetBoundsOfHiddenRange( sal_Int32 nPos, sal_Int32& rnStartPos,
sal_Int32& rnEndPos, PositionList* pList ) const
{
@@ -1541,11 +1472,7 @@ bool SwScriptInfo::IsInHiddenRange( const SwTxtNode& rNode, sal_Int32 nPos )
}
#ifdef DBG_UTIL
-/*************************************************************************
- * SwScriptInfo::CompType(..)
- * returns the type of the compressed character
- *************************************************************************/
-
+// returns the type of the compressed character
sal_uInt8 SwScriptInfo::CompType( const sal_Int32 nPos ) const
{
sal_uInt16 nEnd = CountCompChg();
@@ -1563,12 +1490,8 @@ sal_uInt8 SwScriptInfo::CompType( const sal_Int32 nPos ) const
}
#endif
-/*************************************************************************
- * SwScriptInfo::HasKana()
- * returns, if there are compressable kanas or specials
- * between nStart and nEnd
- *************************************************************************/
-
+// returns, if there are compressable kanas or specials
+// between nStart and nEnd
sal_uInt16 SwScriptInfo::HasKana( sal_Int32 nStart, const sal_Int32 nLen ) const
{
sal_uInt16 nCnt = CountCompChg();
@@ -1698,10 +1621,6 @@ long SwScriptInfo::Compress( sal_Int32* pKernArray, sal_Int32 nIdx, sal_Int32 nL
return nSub;
}
-/*************************************************************************
- * SwScriptInfo::KashidaJustify()
- *************************************************************************/
-
// Note on calling KashidaJustify():
// Kashida positions may be marked as invalid. Therefore KashidaJustify may return the clean
// total number of kashida positions, or the number of kashida positions after some positions
@@ -1788,13 +1707,9 @@ sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
return 0;
}
-/*************************************************************************
- * SwScriptInfo::IsArabicText()
- *
- * Checks if the current text is 'Arabic' text. Note that only the first
- * character has to be checked because a ctl portion only contains one
- * script, see NewTxtPortion
- *************************************************************************/
+// Checks if the current text is 'Arabic' text. Note that only the first
+// character has to be checked because a ctl portion only contains one
+// script, see NewTxtPortion
bool SwScriptInfo::IsArabicText( const OUString& rTxt, sal_Int32 nStt, sal_Int32 nLen )
{
using namespace ::com::sun::star::i18n;
@@ -1853,16 +1768,10 @@ void SwScriptInfo::ClearKashidaInvalid(sal_Int32 nKashPos)
}
}
-/*************************************************************************
- * SwScriptInfo::MarkOrClearKashidaInvalid()
- *
- * bMark == true:
- * marks the first valid kashida in the given text range as invalid
- *
- * bMark == false:
- * clears all kashida invalid flags in the given text range
-*************************************************************************/
-
+// bMark == true:
+// marks the first valid kashida in the given text range as invalid
+// bMark == false:
+// clears all kashida invalid flags in the given text range
bool SwScriptInfo::MarkOrClearKashidaInvalid(sal_Int32 nStt, sal_Int32 nLen,
bool bMark, sal_Int32 nMarkCount)
{
@@ -1904,11 +1813,7 @@ void SwScriptInfo::MarkKashidaInvalid(sal_Int32 nKashPos)
aKashidaInvalid.push_back(nKashPos);
}
-/*************************************************************************
- * SwScriptInfo::GetKashidaPositions()
- * retrieve the kashida positions in the given text range
-*************************************************************************/
-
+// retrieve the kashida positions in the given text range
sal_Int32 SwScriptInfo::GetKashidaPositions(sal_Int32 nStt, sal_Int32 nLen,
sal_Int32* pKashidaPosition)
{
@@ -1939,11 +1844,7 @@ void SwScriptInfo::SetNoKashidaLine(sal_Int32 nStt, sal_Int32 nLen)
aNoKashidaLineEnd.push_back( nStt+nLen );
}
-/*************************************************************************
- * SwScriptInfo::IsKashidaLine()
- * determines if the line uses kashida justification
-*************************************************************************/
-
+// determines if the line uses kashida justification
bool SwScriptInfo::IsKashidaLine(sal_Int32 nCharIdx) const
{
for (size_t i = 0; i < aNoKashidaLine.size(); ++i)
@@ -1969,12 +1870,7 @@ void SwScriptInfo::ClearNoKashidaLine(sal_Int32 nStt, sal_Int32 nLen)
}
}
-/*************************************************************************
- * SwScriptInfo::MarkKashidasInvalid()
- *
- * mark the given character indices as invalid kashida positions
-************************************************************************/
-
+// mark the given character indices as invalid kashida positions
bool SwScriptInfo::MarkKashidasInvalid(sal_Int32 nCnt, sal_Int32* pKashidaPositions)
{
SAL_WARN_IF( !pKashidaPositions || nCnt == 0, "sw.core", "Where are kashidas?" );
@@ -2114,13 +2010,9 @@ void SwLineLayout::Init( SwLinePortion* pNextPortion )
SetPortion( pNextPortion );
}
-/*--------------------------------------------------
- * HangingMargin()
- * looks for hanging punctuation portions in the paragraph
- * and return the maximum right offset of them.
- * If no such portion is found, the Margin/Hanging-flags will be updated.
- * --------------------------------------------------*/
-
+// looks for hanging punctuation portions in the paragraph
+// and return the maximum right offset of them.
+// If no such portion is found, the Margin/Hanging-flags will be updated.
SwTwips SwLineLayout::_GetHangingMargin() const
{
SwLinePortion* pPor = GetPortion();
@@ -2232,12 +2124,7 @@ void SwScriptInfo::selectRedLineDeleted(const SwTxtNode& rNode, MultiSelection &
}
}
-/*************************************************************************
- * SwScriptInfo::CalcHiddenRanges()
- *
- * Returns a MultiSection indicating the hidden ranges.
- *************************************************************************/
-
+// Returns a MultiSection indicating the hidden ranges.
void SwScriptInfo::CalcHiddenRanges( const SwTxtNode& rNode, MultiSelection& rHiddenMulti )
{
selectHiddenTextProperty(rNode, rHiddenMulti);
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index ef1c3ed4445e..7d138cb5bb3c 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -345,10 +345,6 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwParaPortion)
};
-/*************************************************************************
- * Inline implementations
- *************************************************************************/
-
inline void SwLineLayout::ResetFlags()
{
bFormatAdj = bDummy = bFntChg = bTab = bEndHyph = bMidHyph = bFly
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index af2a166410e8..24712bb2f965 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -68,10 +68,6 @@ KSHORT SwLinePortion::GetViewWidth( const SwTxtSizeInfo & ) const
return 0;
}
-/*************************************************************************
- * SwLinePortion::SwLinePortion( )
- *************************************************************************/
-
SwLinePortion::SwLinePortion( ) :
pPortion( NULL ),
nLineLength( 0 ),
@@ -82,10 +78,6 @@ SwLinePortion::SwLinePortion( ) :
{
}
-/*************************************************************************
- * SwLinePortion::PrePaint()
- *************************************************************************/
-
void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
const SwLinePortion* pLast ) const
{
@@ -147,10 +139,6 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
pThis->Width(0);
}
-/*************************************************************************
- * SwLinePortion::CalcTxtSize()
- *************************************************************************/
-
void SwLinePortion::CalcTxtSize( const SwTxtSizeInfo &rInf )
{
if( GetLen() == rInf.GetLen() )
@@ -163,12 +151,7 @@ void SwLinePortion::CalcTxtSize( const SwTxtSizeInfo &rInf )
}
}
-/*************************************************************************
- * SwLinePortion::Truncate()
- *
- * Es werden alle nachfolgenden Portions geloescht.
- *************************************************************************/
-
+// Es werden alle nachfolgenden Portions geloescht.
void SwLinePortion::_Truncate()
{
SwLinePortion *pPos = pPortion;
@@ -184,12 +167,7 @@ void SwLinePortion::_Truncate()
pPortion = 0;
}
-/*************************************************************************
- * virtual SwLinePortion::Insert()
- *
- * Es wird immer hinter uns eingefuegt.
- *************************************************************************/
-
+// Es wird immer hinter uns eingefuegt.
SwLinePortion *SwLinePortion::Insert( SwLinePortion *pIns )
{
pIns->FindLastPortion()->SetPortion( pPortion );
@@ -200,10 +178,6 @@ SwLinePortion *SwLinePortion::Insert( SwLinePortion *pIns )
return pIns;
}
-/*************************************************************************
- * SwLinePortion::FindLastPortion()
- *************************************************************************/
-
SwLinePortion *SwLinePortion::FindLastPortion()
{
SwLinePortion *pPos = this;
@@ -215,10 +189,6 @@ SwLinePortion *SwLinePortion::FindLastPortion()
return pPos;
}
-/*************************************************************************
- * virtual SwLinePortion::Append()
- *************************************************************************/
-
SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
{
SwLinePortion *pPos = FindLastPortion();
@@ -230,10 +200,6 @@ SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
return pIns;
}
-/*************************************************************************
- * virtual SwLinePortion::Cut()
- *************************************************************************/
-
SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
{
SwLinePortion *pPrev = pVictim->FindPrevPortion( this );
@@ -243,10 +209,6 @@ SwLinePortion *SwLinePortion::Cut( SwLinePortion *pVictim )
return pVictim;
}
-/*************************************************************************
- * SwLinePortion::FindPrevPortion()
- *************************************************************************/
-
SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot )
{
OSL_ENSURE( pRoot != this, "SwLinePortion::FindPrevPortion(): invalid root" );
@@ -260,10 +222,6 @@ SwLinePortion *SwLinePortion::FindPrevPortion( const SwLinePortion *pRoot )
return pPos;
}
-/*************************************************************************
- * virtual SwLinePortion::GetCrsrOfst()
- *************************************************************************/
-
sal_Int32 SwLinePortion::GetCrsrOfst( const KSHORT nOfst ) const
{
if( nOfst > ( PrtWidth() / 2 ) )
@@ -272,10 +230,6 @@ sal_Int32 SwLinePortion::GetCrsrOfst( const KSHORT nOfst ) const
return 0;
}
-/*************************************************************************
- * virtual SwLinePortion::GetTxtSize()
- *************************************************************************/
-
SwPosSize SwLinePortion::GetTxtSize( const SwTxtSizeInfo & ) const
{
OSL_ENSURE( !this, "SwLinePortion::GetTxtSize: don't ask me about sizes, "
@@ -283,10 +237,6 @@ SwPosSize SwLinePortion::GetTxtSize( const SwTxtSizeInfo & ) const
return SwPosSize();
}
-/*************************************************************************
- * virtual SwLinePortion::Format()
- *************************************************************************/
-
bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
{
if( rInf.X() > rInf.Width() )
@@ -313,19 +263,11 @@ bool SwLinePortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-/*************************************************************************
- * virtual SwLinePortion::FormatEOL()
- *************************************************************************/
-
// Format end of line
void SwLinePortion::FormatEOL( SwTxtFormatInfo & )
{ }
-/*************************************************************************
- * SwLinePortion::Move()
- *************************************************************************/
-
void SwLinePortion::Move( SwTxtPaintInfo &rInf )
{
bool bB2T = rInf.GetDirection() == DIR_BOTTOM2TOP;
@@ -363,28 +305,16 @@ void SwLinePortion::Move( SwTxtPaintInfo &rInf )
rInf.SetIdx( rInf.GetIdx() + GetLen() );
}
-/*************************************************************************
- * virtual SwLinePortion::CalcSpacing()
- *************************************************************************/
-
long SwLinePortion::CalcSpacing( long , const SwTxtSizeInfo & ) const
{
return 0;
}
-/*************************************************************************
- * virtual SwLinePortion::GetExpTxt()
- *************************************************************************/
-
bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
{
return false;
}
-/*************************************************************************
- * virtual SwLinePortion::HandlePortion()
- *************************************************************************/
-
void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString;
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 16561993e4d0..1d27b8df317b 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -55,10 +55,6 @@ class SwPortionHandler;
#define PORGRP_TABNOTLFT 0x0010
#define PORGRP_TOXREF 0x0008
-/*************************************************************************
- * class SwLinePortion
- *************************************************************************/
-
/// Base class for anything that can be part of a line in the Writer layout.
class SwLinePortion: public SwPosSize
{
@@ -192,10 +188,6 @@ public:
OUTPUT_OPERATOR
};
-/*************************************************************************
- * inline - Implementations
- *************************************************************************/
-
inline SwLinePortion &SwLinePortion::operator=(const SwLinePortion &rPortion)
{
*(SwPosSize*)this = rPortion;
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 1ba90a9792f5..9671b54cb1fa 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -52,15 +52,10 @@
using namespace ::com::sun::star;
-/*--------------------------------------------------
- * class SwMultiPortion
- *
- * A SwMultiPortion is not a simple portion,
- * it's a container, which contains almost a SwLineLayoutPortion.
- * This SwLineLayout could be followed by other textportions via pPortion
- * and by another SwLineLayout via pNext to realize a doubleline portion.
- * --------------------------------------------------*/
-
+// A SwMultiPortion is not a simple portion,
+// it's a container, which contains almost a SwLineLayoutPortion.
+// This SwLineLayout could be followed by other textportions via pPortion
+// and by another SwLineLayout via pNext to realize a doubleline portion.
SwMultiPortion::~SwMultiPortion()
{
delete pFldRest;
@@ -71,11 +66,8 @@ void SwMultiPortion::Paint( const SwTxtPaintInfo & ) const
OSL_FAIL( "Don't try SwMultiPortion::Paint, try SwTxtPainter::PaintMultiPortion" );
}
-/*--------------------------------------------------
- * Summarize the internal lines to calculate the (external) size.
- * The internal line has to calculate first.
- * --------------------------------------------------*/
-
+// Summarize the internal lines to calculate the (external) size.
+// The internal line has to calculate first.
void SwMultiPortion::CalcSize( SwTxtFormatter& rLine, SwTxtFormatInfo &rInf )
{
Width( 0 );
@@ -132,20 +124,12 @@ bool SwMultiPortion::ChgSpaceAdd( SwLineLayout*, long ) const
return false;
}
-/*************************************************************************
- * virtual SwMultiPortion::HandlePortion()
- *************************************************************************/
-
void SwMultiPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor() );
}
-/*--------------------------------------------------
- * SwMultiPortion::ActualizeTabulator()
- * sets the tabulator-flag, if there's any tabulator-portion inside.
- * --------------------------------------------------*/
-
+// sets the tabulator-flag, if there's any tabulator-portion inside.
void SwMultiPortion::ActualizeTabulator()
{
SwLinePortion* pPor = GetRoot().GetFirstPortion();
@@ -166,10 +150,6 @@ void SwMultiPortion::ActualizeTabulator()
}
}
-/*--------------------------------------------------
- * SwRotatedPortion::SwRotatedPortion(..)
- * --------------------------------------------------*/
-
SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
sal_Int32 nEnd, bool bRTL ) : SwMultiPortion( nEnd )
{
@@ -196,10 +176,6 @@ SwRotatedPortion::SwRotatedPortion( const SwMultiCreator& rCreate,
}
}
-/*---------------------------------------------------
- * SwBidiPortion::SwBidiPortion(..)
- * --------------------------------------------------*/
-
SwBidiPortion::SwBidiPortion( sal_Int32 nEnd, sal_uInt8 nLv )
: SwMultiPortion( nEnd ), nLevel( nLv )
{
@@ -250,14 +226,10 @@ sal_Int32 SwBidiPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf ) const
return nBlanks;
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::SwDoubleLinePortion(..)
- * This constructor is for the continuation of a doubleline portion
- * in the next line.
- * It takes the same brackets and if the original has no content except
- * brackets, these will be deleted.
- * --------------------------------------------------*/
-
+// This constructor is for the continuation of a doubleline portion
+// in the next line.
+// It takes the same brackets and if the original has no content except
+// brackets, these will be deleted.
SwDoubleLinePortion::SwDoubleLinePortion(SwDoubleLinePortion& rDouble, sal_Int32 nEnd)
: SwMultiPortion(nEnd)
, pBracket(0)
@@ -281,13 +253,9 @@ SwDoubleLinePortion::SwDoubleLinePortion(SwDoubleLinePortion& rDouble, sal_Int32
}
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::SwDoubleLinePortion(..)
- * This constructor uses the textattribute to get the right brackets.
- * The textattribute could be a 2-line-attribute or a character- or
- * internetstyle, which contains the 2-line-attribute.
- * --------------------------------------------------*/
-
+// This constructor uses the textattribute to get the right brackets.
+// The textattribute could be a 2-line-attribute or a character- or
+// internetstyle, which contains the 2-line-attribute.
SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int32 nEnd)
: SwMultiPortion(nEnd)
, pBracket(new SwBracket())
@@ -349,14 +317,11 @@ SwDoubleLinePortion::SwDoubleLinePortion(const SwMultiCreator& rCreate, sal_Int3
SetDirection( DIR_LEFT2RIGHT );
}
-/*--------------------------------------------------
- * SwMultiPortion::PaintBracket paints the wished bracket,
- * if the multiportion has surrounding brackets.
- * The X-position of the SwTxtPaintInfo will be modified:
- * the open bracket sets position behind itself,
- * the close bracket in front of itself.
- * --------------------------------------------------*/
-
+// paints the wished bracket,
+// if the multiportion has surrounding brackets.
+// The X-position of the SwTxtPaintInfo will be modified:
+// the open bracket sets position behind itself,
+// the close bracket in front of itself.
void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
long nSpaceAdd,
bool bOpen ) const
@@ -389,11 +354,8 @@ void SwDoubleLinePortion::PaintBracket( SwTxtPaintInfo &rInf,
rInf.X( rInf.X() + PreWidth() );
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::SetBrackets creates the bracket-structur
- * and fills it, if not both characters are 0x00.
- * --------------------------------------------------*/
-
+// creates the bracket-structur
+// and fills it, if not both characters are 0x00.
void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
{
if( rDouble.pBracket )
@@ -407,13 +369,9 @@ void SwDoubleLinePortion::SetBrackets( const SwDoubleLinePortion& rDouble )
}
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::FormatBrackets
- * calculates the size of the brackets => pBracket,
- * reduces the nMaxWidth-parameter ( minus bracket-width )
- * and moves the rInf-x-position behind the opening bracket.
- * --------------------------------------------------*/
-
+// calculates the size of the brackets => pBracket,
+// reduces the nMaxWidth-parameter ( minus bracket-width )
+// and moves the rInf-x-position behind the opening bracket.
void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWidth )
{
nMaxWidth -= rInf.X();
@@ -478,13 +436,9 @@ void SwDoubleLinePortion::FormatBrackets( SwTxtFormatInfo &rInf, SwTwips& nMaxWi
delete(pTmpFnt);
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::CalcBlanks
- * calculates the number of blanks in each line and
- * the difference of the width of the two lines.
- * These results are used from the text adjustment.
- * --------------------------------------------------*/
-
+// calculates the number of blanks in each line and
+// the difference of the width of the two lines.
+// These results are used from the text adjustment.
void SwDoubleLinePortion::CalcBlanks( SwTxtFormatInfo &rInf )
{
SwLinePortion* pPor = GetRoot().GetFirstPortion();
@@ -522,16 +476,12 @@ long SwDoubleLinePortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo & ) c
return HasTabulator() ? 0 : GetSpaceCnt() * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::ChangeSpaceAdd(..)
- * merges the spaces for text adjustment from the inner and outer part.
- * Inside the doubleline portion the wider line has no spaceadd-array, the
- * smaller line has such an array to reach width of the wider line.
- * If the surrounding line has text adjustment and the doubleline portion
- * contains no tabulator, it is necessary to create/manipulate the inner
- * space arrays.
- * --------------------------------------------------*/
-
+// Merges the spaces for text adjustment from the inner and outer part.
+// Inside the doubleline portion the wider line has no spaceadd-array, the
+// smaller line has such an array to reach width of the wider line.
+// If the surrounding line has text adjustment and the doubleline portion
+// contains no tabulator, it is necessary to create/manipulate the inner
+// space arrays.
bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr,
long nSpaceAdd ) const
{
@@ -567,11 +517,7 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr,
}
return bRet;
}
-/*--------------------------------------------------
- * SwDoubleLinePortion::ResetSpaceAdd(..)
- * cancels the manipulation from SwDoubleLinePortion::ChangeSpaceAdd(..)
- * --------------------------------------------------*/
-
+// cancels the manipulation from SwDoubleLinePortion::ChangeSpaceAdd(..)
void SwDoubleLinePortion::ResetSpaceAdd( SwLineLayout* pCurr )
{
pCurr->RemoveFirstLLSpaceAdd();;
@@ -584,12 +530,8 @@ SwDoubleLinePortion::~SwDoubleLinePortion()
delete pBracket;
}
-/*--------------------------------------------------
- * SwRubyPortion::SwRubyPortion(..)
- * constructs a ruby portion, i.e. an additional text is displayed
- * beside the main text, e.g. phonetic characters.
- * --------------------------------------------------*/
-
+// constructs a ruby portion, i.e. an additional text is displayed
+// beside the main text, e.g. phonetic characters.
SwRubyPortion::SwRubyPortion( const SwRubyPortion& rRuby, sal_Int32 nEnd ) :
SwMultiPortion( nEnd ),
nRubyOffset( rRuby.GetRubyOffset() ),
@@ -600,12 +542,8 @@ SwRubyPortion::SwRubyPortion( const SwRubyPortion& rRuby, sal_Int32 nEnd ) :
SetRuby();
}
-/*--------------------------------------------------
- * SwRubyPortion::SwRubyPortion(..)
- * constructs a ruby portion, i.e. an additional text is displayed
- * beside the main text, e.g. phonetic characters.
- * --------------------------------------------------*/
-
+// constructs a ruby portion, i.e. an additional text is displayed
+// beside the main text, e.g. phonetic characters.
SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
const IDocumentSettingAccess& rIDocumentSettingAccess,
sal_Int32 nEnd, sal_Int32 nOffs,
@@ -667,19 +605,15 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
SetDirection( DIR_LEFT2RIGHT );
}
-/*--------------------------------------------------
- * SwRubyPortion::_Adjust(..)
- * In ruby portion there are different alignments for
- * the ruby text and the main text.
- * Left, right, centered and two possibilities of block adjustment
- * The block adjustment is realized by spacing between the characteres,
- * either with a half space or no space in front of the first letter and
- * a half space at the end of the last letter.
- * Notice: the smaller line will be manipulated, normally it's the ruby line,
- * but it could be the main text, too.
- * If there is a tabulator in smaller line, no adjustment is possible.
- * --------------------------------------------------*/
-
+// In ruby portion there are different alignments for
+// the ruby text and the main text.
+// Left, right, centered and two possibilities of block adjustment
+// The block adjustment is realized by spacing between the characteres,
+// either with a half space or no space in front of the first letter and
+// a half space at the end of the last letter.
+// Notice: the smaller line will be manipulated, normally it's the ruby line,
+// but it could be the main text, too.
+// If there is a tabulator in smaller line, no adjustment is possible.
void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
{
SwTwips nLineDiff = GetRoot().Width() - GetRoot().GetNext()->Width();
@@ -763,14 +697,10 @@ void SwRubyPortion::_Adjust( SwTxtFormatInfo &rInf )
rInf.SetIdx( nOldIdx );
}
-/*--------------------------------------------------
- * CalcRubyOffset()
- * has to change the nRubyOffset, if there's a fieldportion
- * in the phonetic line.
- * The nRubyOffset is the position in the rubystring, where the
- * next SwRubyPortion has start the displaying of the phonetics.
- * --------------------------------------------------*/
-
+// has to change the nRubyOffset, if there's a fieldportion
+// in the phonetic line.
+// The nRubyOffset is the position in the rubystring, where the
+// next SwRubyPortion has start the displaying of the phonetics.
void SwRubyPortion::CalcRubyOffset()
{
const SwLineLayout *pCurr = &GetRoot();
@@ -797,29 +727,12 @@ void SwRubyPortion::CalcRubyOffset()
}
}
-/*--------------------------------------------------
- * SwTxtSizeInfo::GetMultiCreator(..)
- * If we (e.g. the position rPos) are inside a two-line-attribute or
- * a ruby-attribute, the attribute will be returned in a SwMultiCreator-struct,
- * otherwise the function returns zero.
- * The rPos parameter is set to the end of the multiportion,
- * normally this is the end of the attribute,
- * but sometimes it is the start of another attribute, which finished or
- * interrupts the first attribute.
- * E.g. a ruby portion interrupts a 2-line-attribute, a 2-line-attribute
- * with different brackets interrupts another 2-line-attribute.
- * --------------------------------------------------*/
-
-/*--------------------------------------------------
- * lcl_Has2Lines(..)
- * is a little help function for GetMultiCreator(..)
- * It extracts the 2-line-format from a 2-line-attribute or a character style.
- * The rValue is set to true, if the 2-line-attribute's value is set and
- * no 2-line-format reference is passed. If there is a 2-line-format reference,
- * then the rValue is set only, if the 2-line-attribute's value is set _and_
- * the 2-line-formats has the same brackets.
- * --------------------------------------------------*/
-
+// A little helper function for GetMultiCreator(..)
+// It extracts the 2-line-format from a 2-line-attribute or a character style.
+// The rValue is set to true, if the 2-line-attribute's value is set and
+// no 2-line-format reference is passed. If there is a 2-line-format reference,
+// then the rValue is set only, if the 2-line-attribute's value is set _and_
+// the 2-line-formats has the same brackets.
static bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef,
bool &rValue )
{
@@ -839,17 +752,13 @@ static bool lcl_Has2Lines( const SwTxtAttr& rAttr, const SvxTwoLinesItem* &rpRef
return false;
}
-/*--------------------------------------------------
- * lcl_HasRotation(..)
- * is a little help function for GetMultiCreator(..)
- * It extracts the charrotation from a charrotate-attribute or a character style.
- * The rValue is set to true, if the charrotate-attribute's value is set and
- * no charrotate-format reference is passed.
- * If there is a charrotate-format reference, then the rValue is set only,
- * if the charrotate-attribute's value is set _and_ identical
- * to the charrotate-format's value.
- * --------------------------------------------------*/
-
+// is a little help function for GetMultiCreator(..)
+// It extracts the charrotation from a charrotate-attribute or a character style.
+// The rValue is set to true, if the charrotate-attribute's value is set and
+// no charrotate-format reference is passed.
+// If there is a charrotate-format reference, then the rValue is set only,
+// if the charrotate-attribute's value is set _and_ identical
+// to the charrotate-format's value.
static bool lcl_HasRotation( const SwTxtAttr& rAttr,
const SvxCharRotateItem* &rpRef, bool &rValue )
{
@@ -868,6 +777,15 @@ static bool lcl_HasRotation( const SwTxtAttr& rAttr,
return false;
}
+// If we (e.g. the position rPos) are inside a two-line-attribute or
+// a ruby-attribute, the attribute will be returned in a SwMultiCreator-struct,
+// otherwise the function returns zero.
+// The rPos parameter is set to the end of the multiportion,
+// normally this is the end of the attribute,
+// but sometimes it is the start of another attribute, which finished or
+// interrupts the first attribute.
+// E.g. a ruby portion interrupts a 2-line-attribute, a 2-line-attribute
+// with different brackets interrupts another 2-line-attribute.
SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
SwMultiPortion* pMulti ) const
{
@@ -1242,16 +1160,12 @@ SwMultiCreator* SwTxtSizeInfo::GetMultiCreator( sal_Int32 &rPos,
return NULL;
}
-/*--------------------------------------------------
- * SwSpaceManipulator
- * is a little helper class to manage the spaceadd-arrays of the text adjustment
- * during a PaintMultiPortion.
- * The constructor prepares the array for the first line of multiportion,
- * the SecondLine-function restores the values for the first line and prepares
- * the second line.
- * The destructor restores the values of the last manipulation.
- * --------------------------------------------------*/
-
+// A little helper class to manage the spaceadd-arrays of the text adjustment
+// during a PaintMultiPortion.
+// The constructor prepares the array for the first line of multiportion,
+// the SecondLine-function restores the values for the first line and prepares
+// the second line.
+// The destructor restores the values of the last manipulation.
class SwSpaceManipulator
{
SwTxtPaintInfo& rInfo;
@@ -1334,12 +1248,9 @@ SwSpaceManipulator::~SwSpaceManipulator()
rInfo.SetDirection( nOldDir );
}
-/*--------------------------------------------------
- * SwTxtPainter::PaintMultiPortion manages the paint for a SwMultiPortion.
- * External, for the calling function, it seems to be a normal Paint-function,
- * internal it is like a SwTxtFrm::Paint with multiple DrawTextLines
- * --------------------------------------------------*/
-
+// Manages the paint for a SwMultiPortion.
+// External, for the calling function, it seems to be a normal Paint-function,
+// internal it is like a SwTxtFrm::Paint with multiple DrawTextLines
void SwTxtPainter::PaintMultiPortion( const SwRect &rPaint,
SwMultiPortion& rMulti, const SwMultiPortion* pEnvPor )
{
@@ -1689,13 +1600,9 @@ static bool lcl_ExtractFieldFollow( SwLineLayout* pLine, SwLinePortion* &rpFld )
return bRet;
}
-/*----------------------------------------------------
- * lcl_TruncateMultiPortion
- * If a multi portion completely has to go to the
- * next line, this function is called to trunctate
- * the rest of the remaining multi portion
- * --------------------------------------------------*/
-
+// If a multi portion completely has to go to the
+// next line, this function is called to trunctate
+// the rest of the remaining multi portion
static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& rInf,
sal_Int32 nStartIdx )
{
@@ -1714,13 +1621,9 @@ static void lcl_TruncateMultiPortion( SwMultiPortion& rMulti, SwTxtFormatInfo& r
rInf.SetIdx( nStartIdx );
}
-/*-----------------------------------------------------------------------------
- * SwTxtFormatter::BuildMultiPortion
- * manages the formatting of a SwMultiPortion. External, for the calling
- * function, it seems to be a normal Format-function, internal it is like a
- * SwTxtFrm::_Format with multiple BuildPortions
- *---------------------------------------------------------------------------*/
-
+// Manages the formatting of a SwMultiPortion. External, for the calling
+// function, it seems to be a normal Format-function, internal it is like a
+// SwTxtFrm::_Format with multiple BuildPortions
bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
SwMultiPortion& rMulti )
{
@@ -2165,22 +2068,18 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf,
return bRet;
}
-/*--------------------------------------------------
- * SwTxtFormatter::MakeRestPortion(..)
- * When a fieldportion at the end of line breaks and needs a following
- * fieldportion in the next line, then the "restportion" of the formatinfo
- * has to be set. Normally this happens during the formatting of the first
- * part of the fieldportion.
- * But sometimes the formatting starts at the line with the following part,
- * especially when the following part is on the next page.
- * In this case the MakeRestPortion-function has to create the following part.
- * The first parameter is the line that contains possibly a first part
- * of a field. When the function finds such field part, it creates the right
- * restportion. This may be a multiportion, e.g. if the field is surrounded by
- * a doubleline- or ruby-portion.
- * The second parameter is the start index of the line.
- * --------------------------------------------------*/
-
+// When a fieldportion at the end of line breaks and needs a following
+// fieldportion in the next line, then the "restportion" of the formatinfo
+// has to be set. Normally this happens during the formatting of the first
+// part of the fieldportion.
+// But sometimes the formatting starts at the line with the following part,
+// especially when the following part is on the next page.
+// In this case the MakeRestPortion-function has to create the following part.
+// The first parameter is the line that contains possibly a first part
+// of a field. When the function finds such field part, it creates the right
+// restportion. This may be a multiportion, e.g. if the field is surrounded by
+// a doubleline- or ruby-portion.
+// The second parameter is the start index of the line.
SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
sal_Int32 nPosition )
{
@@ -2334,12 +2233,9 @@ SwLinePortion* SwTxtFormatter::MakeRestPortion( const SwLineLayout* pLine,
return pRest;
}
-/*--------------------------------------------------
- * SwTxtCursorSave notes the start and current line of a SwTxtCursor,
- * sets them to the values for GetCrsrOfst inside a multiportion
- * and restores them in the destructor.
- * --------------------------------------------------*/
-
+// SwTxtCursorSave notes the start and current line of a SwTxtCursor,
+// sets them to the values for GetCrsrOfst inside a multiportion
+// and restores them in the destructor.
SwTxtCursorSave::SwTxtCursorSave( SwTxtCursor* pTxtCursor,
SwMultiPortion* pMulti,
SwTwips nY,
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index 97bca1f7af12..85429dc13fcd 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -31,14 +31,11 @@ class SwTxtAttr;
class SfxPoolItem;
class SwFont;
-/*--------------------------------------------------
- * SwMultiCreator is a small structur to create a multiportion.
- * It contains the kind of multiportion and a textattribute
- * or a poolitem.
- * The GetMultiCreator-function fills this structur and
- * the Ctor of the SwMultiPortion uses it.
- * --------------------------------------------------*/
-
+// SwMultiCreator is a small structur to create a multiportion.
+// It contains the kind of multiportion and a textattribute
+// or a poolitem.
+// The GetMultiCreator-function fills this structur and
+// the Ctor of the SwMultiPortion uses it.
#define SW_MC_DOUBLE 0
#define SW_MC_RUBY 1
#define SW_MC_ROTATE 2
@@ -52,11 +49,8 @@ struct SwMultiCreator
sal_uInt8 nLevel;
};
-/*--------------------------------------------------
- * A two-line-portion (SwMultiPortion) could have surrounding brackets,
- * in this case the structur SwBracket will be used.
- * --------------------------------------------------*/
-
+// A two-line-portion (SwMultiPortion) could have surrounding brackets,
+// in this case the structur SwBracket will be used.
struct SwBracket
{
sal_Int32 nStart; // Start of text attribute determins the font
@@ -70,15 +64,12 @@ struct SwBracket
sal_uInt8 nPostScript; // Script of the final character
};
-/*--------------------------------------------------
- * The SwMultiPortion is line portion inside a line portion,
- * it's a group of portions,
- * e.g. a double line portion in a line
- * or phonetics (ruby)
- * or combined characters
- * or a rotated portion.
- * --------------------------------------------------*/
-
+// The SwMultiPortion is line portion inside a line portion,
+// it's a group of portions,
+// e.g. a double line portion in a line
+// or phonetics (ruby)
+// or combined characters
+// or a rotated portion.
class SwMultiPortion : public SwLinePortion
{
SwLineLayout aRoot; // One or more lines
@@ -255,10 +246,6 @@ public:
~SwTxtCursorSave();
};
-/*************************************************************************
- * inline - Implementations
- *************************************************************************/
-
inline bool SwMultiPortion::HasBrackets() const
{
return IsDouble() ? 0 != ((SwDoubleLinePortion*)this)->GetBrackets() : false;
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 1f463026b73a..b9679a6fbd8c 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -23,10 +23,6 @@
#include "porref.hxx"
#include "inftxt.hxx"
-/*************************************************************************
- * virtual SwRefPortion::Paint()
- *************************************************************************/
-
void SwRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( Width() )
@@ -36,10 +32,6 @@ void SwRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * class SwIsoRefPortion
- *************************************************************************/
-
SwLinePortion *SwIsoRefPortion::Compress() { return this; }
SwIsoRefPortion::SwIsoRefPortion() : nViewWidth(0)
@@ -48,10 +40,6 @@ SwIsoRefPortion::SwIsoRefPortion() : nViewWidth(0)
SetWhichPor( POR_ISOREF );
}
-/*************************************************************************
- * virtual SwIsoRefPortion::GetViewWidth()
- *************************************************************************/
-
KSHORT SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
@@ -68,29 +56,17 @@ KSHORT SwIsoRefPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
return nViewWidth;
}
-/*************************************************************************
- * virtual SwIsoRefPortion::Format()
- *************************************************************************/
-
bool SwIsoRefPortion::Format( SwTxtFormatInfo &rInf )
{
return SwLinePortion::Format( rInf );
}
-/*************************************************************************
- * virtual SwIsoRefPortion::Paint()
- *************************************************************************/
-
void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( Width() )
rInf.DrawViewOpt( *this, POR_REF );
}
-/*************************************************************************
- * virtual SwIsoRefPortion::HandlePortion()
- *************************************************************************/
-
void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString;
diff --git a/sw/source/core/text/porref.hxx b/sw/source/core/text/porref.hxx
index ccf7f7152760..b41fbe2db957 100644
--- a/sw/source/core/text/porref.hxx
+++ b/sw/source/core/text/porref.hxx
@@ -21,10 +21,6 @@
#include "portxt.hxx"
-/*************************************************************************
- * class SwRefPortion
- *************************************************************************/
-
class SwRefPortion : public SwTxtPortion
{
public:
@@ -33,10 +29,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwIsoRefPortion
- *************************************************************************/
-
class SwIsoRefPortion : public SwRefPortion
{
KSHORT nViewWidth;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index a56dc4133b6c..be6676ef218d 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -50,10 +50,6 @@
#include <crsrsh.hxx>
-/*************************************************************************
- * class SwTmpEndPortion
- *************************************************************************/
-
SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion )
{
Height( rPortion.Height() );
@@ -61,10 +57,6 @@ SwTmpEndPortion::SwTmpEndPortion( const SwLinePortion &rPortion )
SetWhichPor( POR_TMPEND );
}
-/*************************************************************************
- * virtual SwTmpEndPortion::Paint()
- *************************************************************************/
-
void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( rInf.OnWin() && rInf.GetOpt().IsParagraph() )
@@ -73,9 +65,6 @@ void SwTmpEndPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * class SwBreakPortion
- *************************************************************************/
SwBreakPortion::SwBreakPortion( const SwLinePortion &rPortion )
: SwLinePortion( rPortion )
{
@@ -98,10 +87,6 @@ void SwBreakPortion::Paint( const SwTxtPaintInfo &rInf ) const
rInf.DrawLineBreak( *this );
}
-/*************************************************************************
- * virtual SwBreakPortion::Format()
- *************************************************************************/
-
bool SwBreakPortion::Format( SwTxtFormatInfo &rInf )
{
const SwLinePortion *pRoot = rInf.GetRoot();
@@ -113,10 +98,6 @@ bool SwBreakPortion::Format( SwTxtFormatInfo &rInf )
return true;
}
-/*************************************************************************
- * virtual SwBreakPortion::HandlePortion()
- *************************************************************************/
-
void SwBreakPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor() );
@@ -286,10 +267,6 @@ SwTwips SwTxtFrm::EmptyHeight() const
return nRet;
}
-/*************************************************************************
- * SwTxtFrm::FormatEmpty()
- *************************************************************************/
-
bool SwTxtFrm::FormatEmpty()
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTxtFrm::FormatEmpty with swapped frame" );
@@ -469,10 +446,6 @@ bool SwTxtFrm::FillRegister( SwTwips& rRegStart, KSHORT& rRegDiff )
return ( 0 != rRegDiff );
}
-/*************************************************************************
- * virtual SwHiddenTextPortion::Paint()
- *************************************************************************/
-
void SwHiddenTextPortion::Paint( const SwTxtPaintInfo & rInf) const
{
(void)rInf;
@@ -490,10 +463,6 @@ void SwHiddenTextPortion::Paint( const SwTxtPaintInfo & rInf) const
#endif
}
-/*************************************************************************
- * virtual SwHiddenTextPortion::Format()
- *************************************************************************/
-
bool SwHiddenTextPortion::Format( SwTxtFormatInfo &rInf )
{
Width( 0 );
@@ -502,10 +471,6 @@ bool SwHiddenTextPortion::Format( SwTxtFormatInfo &rInf )
return false;
};
-/*************************************************************************
- * virtual SwControlCharPortion::Paint()
- *************************************************************************/
-
void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if ( Width() ) // is only set during prepaint mode
@@ -550,10 +515,6 @@ void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * virtual SwControlCharPortion::Format()
- *************************************************************************/
-
bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
{
const SwLinePortion* pRoot = rInf.GetRoot();
@@ -564,10 +525,6 @@ bool SwControlCharPortion::Format( SwTxtFormatInfo &rInf )
return false;
}
-/*************************************************************************
- * virtual SwControlCharPortion::GetViewWidth()
- *************************************************************************/
-
KSHORT SwControlCharPortion::GetViewWidth( const SwTxtSizeInfo& rInf ) const
{
if( !mnViewWidth )
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index 82553082f6a3..f16093d35c09 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -26,10 +26,6 @@
class SwTxtFormatInfo;
-/*************************************************************************
- * class SwTmpEndPortion
- *************************************************************************/
-
class SwTmpEndPortion : public SwLinePortion
{
public:
@@ -38,10 +34,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwBreakPortion
- *************************************************************************/
-
class SwBreakPortion : public SwLinePortion
{
public:
@@ -59,10 +51,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwKernPortion
- *************************************************************************/
-
class SwKernPortion : public SwLinePortion
{
short nKern;
@@ -89,10 +77,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwArrowPortion
- *************************************************************************/
-
class SwArrowPortion : public SwLinePortion
{
Point aPos;
@@ -107,14 +91,10 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwHangingPortion
- * The characters which are forbidden at the start of a line like the dot and
- * other punctuation marks are allowed to display in the margin of the page
- * by a user option.
- * The SwHangingPortion is the corresponding textportion to do that.
- *************************************************************************/
-
+// The characters which are forbidden at the start of a line like the dot and
+// other punctuation marks are allowed to display in the margin of the page
+// by a user option.
+// The SwHangingPortion is the corresponding textportion to do that.
class SwHangingPortion : public SwTxtPortion
{
KSHORT nInnerWidth;
@@ -125,11 +105,7 @@ public:
inline KSHORT GetInnerWidth() const { return nInnerWidth; }
};
-/*************************************************************************
- * class SwHiddenTextPortion
- * Is used to hide text
- *************************************************************************/
-
+// Used to hide text
class SwHiddenTextPortion : public SwLinePortion
{
public:
@@ -140,10 +116,6 @@ public:
virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE;
};
-/*************************************************************************
- * class SwControlCharPortion
- *************************************************************************/
-
class SwControlCharPortion : public SwLinePortion
{
diff --git a/sw/source/core/text/portab.hxx b/sw/source/core/text/portab.hxx
index 525bfbe07651..de8afaf29784 100644
--- a/sw/source/core/text/portab.hxx
+++ b/sw/source/core/text/portab.hxx
@@ -21,10 +21,6 @@
#include "porglue.hxx"
-/*************************************************************************
- * class SwTabPortion
- *************************************************************************/
-
class SwTabPortion : public SwFixPortion
{
const KSHORT nTabPos;
@@ -49,10 +45,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwTabLeftPortion
- *************************************************************************/
-
class SwTabLeftPortion : public SwTabPortion
{
public:
@@ -62,10 +54,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwTabRightPortion
- *************************************************************************/
-
class SwTabRightPortion : public SwTabPortion
{
public:
@@ -75,10 +63,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwTabCenterPortion
- *************************************************************************/
-
class SwTabCenterPortion : public SwTabPortion
{
public:
@@ -88,10 +72,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwTabDecimalPortion
- *************************************************************************/
-
class SwTabDecimalPortion : public SwTabPortion
{
const sal_Unicode mcTab;
@@ -125,10 +105,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwAutoTabDecimalPortion
- *************************************************************************/
-
class SwAutoTabDecimalPortion : public SwTabDecimalPortion
{
public:
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index 7b92f0b17c6d..d92584fa1615 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -23,10 +23,6 @@
#include "portox.hxx"
#include "inftxt.hxx"
-/*************************************************************************
- * virtual SwToxPortion::Paint()
- *************************************************************************/
-
void SwToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( Width() )
@@ -36,10 +32,6 @@ void SwToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * class SwIsoToxPortion
- *************************************************************************/
-
SwLinePortion *SwIsoToxPortion::Compress() { return this; }
SwIsoToxPortion::SwIsoToxPortion() : nViewWidth(0)
@@ -48,10 +40,6 @@ SwIsoToxPortion::SwIsoToxPortion() : nViewWidth(0)
SetWhichPor( POR_ISOTOX );
}
-/*************************************************************************
- * virtual SwIsoToxPortion::GetViewWidth()
- *************************************************************************/
-
KSHORT SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
{
// Although we are const, nViewWidth should be calculated in the last
@@ -70,29 +58,17 @@ KSHORT SwIsoToxPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
return nViewWidth;
}
-/*************************************************************************
- * virtual SwIsoToxPortion::Format()
- *************************************************************************/
-
bool SwIsoToxPortion::Format( SwTxtFormatInfo &rInf )
{
return SwLinePortion::Format( rInf );
}
-/*************************************************************************
- * virtual SwIsoToxPortion::Paint()
- *************************************************************************/
-
void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( Width() )
rInf.DrawViewOpt( *this, POR_TOX );
}
-/*************************************************************************
- * virtual SwIsoToxPortion::HandlePortion()
- *************************************************************************/
-
void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString;
diff --git a/sw/source/core/text/portox.hxx b/sw/source/core/text/portox.hxx
index 9d86686a5a07..6f05325a6ec6 100644
--- a/sw/source/core/text/portox.hxx
+++ b/sw/source/core/text/portox.hxx
@@ -22,10 +22,6 @@
#include "portxt.hxx"
-/*************************************************************************
- * class SwToxPortion
- *************************************************************************/
-
class SwToxPortion : public SwTxtPortion
{
public:
@@ -34,10 +30,6 @@ public:
OUTPUT_OPERATOR_OVERRIDE
};
-/*************************************************************************
- * class SwIsoToxPortion
- *************************************************************************/
-
class SwIsoToxPortion : public SwToxPortion
{
KSHORT nViewWidth;
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index a379e4c2bcfd..420403e6ef7d 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -45,12 +45,8 @@ using namespace ::sw::mark;
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n::ScriptType;
-/*************************************************************************
- * lcl_AddSpace
- * Returns for how many characters an extra space has to be added
- * (for justified alignment).
- *************************************************************************/
-
+// Returns for how many characters an extra space has to be added
+// (for justified alignment).
static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
const SwLinePortion& rPor )
{
@@ -212,20 +208,12 @@ static sal_Int32 lcl_AddSpace( const SwTxtSizeInfo &rInf, const OUString* pStr,
return nCnt;
}
-/*************************************************************************
- * class SwTxtPortion
- *************************************************************************/
-
SwTxtPortion::SwTxtPortion( const SwLinePortion &rPortion )
: SwLinePortion( rPortion )
{
SetWhichPor( POR_TXT );
}
-/*************************************************************************
- * SwTxtPortion::BreakCut()
- *************************************************************************/
-
void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
{
// The word/char is larger than the line
@@ -271,10 +259,6 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess )
}
}
-/*************************************************************************
- * SwTxtPortion::BreakUnderflow()
- *************************************************************************/
-
void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf )
{
Truncate();
@@ -285,10 +269,6 @@ void SwTxtPortion::BreakUnderflow( SwTxtFormatInfo &rInf )
rInf.SetUnderflow( this );
}
- /*************************************************************************
- * SwTxtPortion::_Format()
- *************************************************************************/
-
static bool lcl_HasContent( const SwFldPortion& rFld, SwTxtFormatInfo &rInf )
{
OUString aTxt;
@@ -453,10 +433,6 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwTxtPortion::Format()
- *************************************************************************/
-
bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
{
if( rInf.X() > rInf.Width() || (!GetLen() && !InExpGrp()) )
@@ -476,10 +452,6 @@ bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
return _Format( rInf );
}
-/*************************************************************************
- * virtual SwTxtPortion::FormatEOL()
- *************************************************************************/
-
// Format end of line
// 5083: We can have awkward cases e.g.:
// "from {Santa}"
@@ -488,7 +460,6 @@ bool SwTxtPortion::Format( SwTxtFormatInfo &rInf )
// with the MarginPortion.
// rInf.nIdx points to the next word, nIdx-1 is the portion's last char
-
void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
if( ( !GetPortion() || ( GetPortion()->IsKernPortion() &&
@@ -520,20 +491,13 @@ void SwTxtPortion::FormatEOL( SwTxtFormatInfo &rInf )
}
}
-/*************************************************************************
- * virtual SwTxtPortion::GetCrsrOfst()
- *************************************************************************/
sal_Int32 SwTxtPortion::GetCrsrOfst( const KSHORT nOfst ) const
{
OSL_ENSURE( !this, "SwTxtPortion::GetCrsrOfst: don't use this method!" );
return SwLinePortion::GetCrsrOfst( nOfst );
}
-/*************************************************************************
- * virtual SwTxtPortion::GetTxtSize()
- *************************************************************************/
// The GetTxtSize() assumes that the own length is correct
-
SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
{
SwPosSize aSize = rInf.GetTxtSize();
@@ -549,9 +513,6 @@ SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
return aSize;
}
-/*************************************************************************
- * virtual SwTxtPortion::Paint()
- *************************************************************************/
void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetTxt()[rInf.GetIdx()])
@@ -590,22 +551,13 @@ void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * virtual SwTxtPortion::GetExpTxt()
- *************************************************************************/
-
bool SwTxtPortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
{
return false;
}
-/*************************************************************************
- * sal_Int32 SwTxtPortion::GetSpaceCnt()
- * long SwTxtPortion::CalcSpacing()
- * Are responsible for the justified paragraph. They calculate the blank
- * count and the resulting added space.
- *************************************************************************/
-
+// Responsible for the justified paragraph. They calculate the blank
+// count and the resulting added space.
sal_Int32 SwTxtPortion::GetSpaceCnt( const SwTxtSizeInfo &rInf,
sal_Int32& rCharCnt ) const
{
@@ -687,10 +639,6 @@ long SwTxtPortion::CalcSpacing( long nSpaceAdd, const SwTxtSizeInfo &rInf ) cons
return nCnt * nSpaceAdd / SPACING_PRECISION_FACTOR;
}
-/*************************************************************************
- * virtual SwTxtPortion::HandlePortion()
- *************************************************************************/
-
void SwTxtPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor(), Height(), Width() );
@@ -819,10 +767,6 @@ bool SwTxtInputFldPortion::ContainsOnlyDummyChars() const
&& mbContainsInputFieldEnd;
}
-/*************************************************************************
- * class SwHolePortion
- *************************************************************************/
-
SwHolePortion::SwHolePortion( const SwTxtPortion &rPor )
: nBlankWidth( 0 )
{
@@ -834,10 +778,6 @@ SwHolePortion::SwHolePortion( const SwTxtPortion &rPor )
SwLinePortion *SwHolePortion::Compress() { return this; }
-/*************************************************************************
- * virtual SwHolePortion::Paint()
- *************************************************************************/
-
void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( !rInf.GetOut() )
@@ -869,19 +809,11 @@ void SwHolePortion::Paint( const SwTxtPaintInfo &rInf ) const
delete pHoleFont;
}
-/*************************************************************************
- * virtual SwHolePortion::Format()
- *************************************************************************/
-
bool SwHolePortion::Format( SwTxtFormatInfo &rInf )
{
return rInf.IsFull() || rInf.X() >= rInf.Width();
}
-/*************************************************************************
- * virtual SwHolePortion::HandlePortion()
- *************************************************************************/
-
void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor() );
diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
index b84dd2a215df..647100ac2d75 100644
--- a/sw/source/core/text/portxt.hxx
+++ b/sw/source/core/text/portxt.hxx
@@ -25,10 +25,6 @@
class SwTxtGuess;
-/*************************************************************************
- * class SwTxtPortion
- *************************************************************************/
-
/// This portion represents a part of the paragraph string.
class SwTxtPortion : public SwLinePortion
{
@@ -76,10 +72,6 @@ private:
bool ContainsOnlyDummyChars() const;
};
-/*************************************************************************
- * class SwHolePortion
- *************************************************************************/
-
class SwHolePortion : public SwLinePortion
{
KSHORT nBlankWidth;
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index e4fb6d16d019..44f1495216bd 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -153,22 +153,18 @@ void SwAttrIter::CtorInitAttrIter( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, S
}
}
-/*************************************************************************
- * SwRedlineItr - The Redline-Iterator
- *
- * The foolowing information/states exist in RedlineIterator:
- *
- * nFirst is the first index of RedlineTbl, which overlaps with the paragraph.
- *
- * nAct is the currently active (if bOn is set) or the next possible index.
- * nStart and nEnd give you the borders of the object within the paragraph.
- *
- * If bOn is set, the font has been manipulated according to it.
- *
- * If nAct is set to COMPLETE_STRING (via Reset()), then currently no
- * Redline is active, nStart and nEnd are invalid.
- *************************************************************************/
-
+// The Redline-Iterator
+// The following information/states exist in RedlineIterator:
+//
+// nFirst is the first index of RedlineTbl, which overlaps with the paragraph.
+//
+// nAct is the currently active (if bOn is set) or the next possible index.
+// nStart and nEnd give you the borders of the object within the paragraph.
+//
+// If bOn is set, the font has been manipulated according to it.
+//
+// If nAct is set to COMPLETE_STRING (via Reset()), then currently no
+// Redline is active, nStart and nEnd are invalid.
SwRedlineItr::SwRedlineItr( const SwTxtNode& rTxtNd, SwFont& rFnt,
SwAttrHandler& rAH, sal_Int32 nRed, bool bShw,
const std::vector<sal_uInt16> *pArr,
diff --git a/sw/source/core/text/txtcache.cxx b/sw/source/core/text/txtcache.cxx
index bb3b6e14452f..7e8a5929a36d 100644
--- a/sw/source/core/text/txtcache.cxx
+++ b/sw/source/core/text/txtcache.cxx
@@ -21,12 +21,6 @@
#include "txtfrm.hxx"
#include "porlay.hxx"
-/*************************************************************************
-|*
-|* SwTxtLine::SwTxtLine(), ~SwTxtLine()
-|*
-|*************************************************************************/
-
SwTxtLine::SwTxtLine( SwTxtFrm *pFrm, SwParaPortion *pNew ) :
SwCacheObj( (void*)pFrm ),
pLine( pNew )
@@ -38,23 +32,11 @@ SwTxtLine::~SwTxtLine()
delete pLine;
}
-/*************************************************************************
-|*
-|* SwTxtLineAccess::NewObj()
-|*
-|*************************************************************************/
-
SwCacheObj *SwTxtLineAccess::NewObj()
{
return new SwTxtLine( (SwTxtFrm*)pOwner );
}
-/*************************************************************************
-|*
-|* SwTxtLineAccess::GetPara()
-|*
-|*************************************************************************/
-
SwParaPortion *SwTxtLineAccess::GetPara()
{
SwTxtLine *pRet;
@@ -70,34 +52,16 @@ SwParaPortion *SwTxtLineAccess::GetPara()
return pRet->GetPara();
}
-/*************************************************************************
-|*
-|* SwTxtLineAccess::SwTxtLineAccess()
-|*
-|*************************************************************************/
-
SwTxtLineAccess::SwTxtLineAccess( const SwTxtFrm *pOwn ) :
SwCacheAccess( *SwTxtFrm::GetTxtCache(), pOwn, pOwn->GetCacheIdx() )
{
}
-/*************************************************************************
-|*
-|* SwTxtLineAccess::IsAvailable
-|*
-|*************************************************************************/
-
bool SwTxtLineAccess::IsAvailable() const
{
return pObj && ((SwTxtLine*)pObj)->GetPara();
}
-/*************************************************************************
-|*
-|* SwTxtFrm::HasPara()
-|*
-|*************************************************************************/
-
bool SwTxtFrm::_HasPara() const
{
SwTxtLine *pTxtLine = (SwTxtLine*)SwTxtFrm::GetTxtCache()->
@@ -113,12 +77,6 @@ bool SwTxtFrm::_HasPara() const
return false;
}
-/*************************************************************************
-|*
-|* SwTxtFrm::GetPara()
-|*
-|*************************************************************************/
-
SwParaPortion *SwTxtFrm::GetPara()
{
if ( GetCacheIdx() != MSHRT_MAX )
@@ -132,12 +90,6 @@ SwParaPortion *SwTxtFrm::GetPara()
return 0;
}
-/*************************************************************************
-|*
-|* SwTxtFrm::ClearPara()
-|*
-|*************************************************************************/
-
void SwTxtFrm::ClearPara()
{
OSL_ENSURE( !IsLocked(), "+SwTxtFrm::ClearPara: this is locked." );
@@ -155,12 +107,6 @@ void SwTxtFrm::ClearPara()
}
}
-/*************************************************************************
-|*
-|* SwTxtFrm::SetPara()
-|*
-|*************************************************************************/
-
void SwTxtFrm::SetPara( SwParaPortion *pNew, bool bDelete )
{
if ( GetCacheIdx() != MSHRT_MAX )
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index a5f2a7f0950a..d08e336bff78 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -41,14 +41,9 @@
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star;
-/*************************************************************************
- * lcl_IsDropFlyInter
- *
- * Calculates if a drop caps portion intersects with a fly
- * The width and height of the drop caps portion are passed as arguments,
- * the position is calculated from the values in rInf
- *************************************************************************/
-
+// Calculates if a drop caps portion intersects with a fly
+// The width and height of the drop caps portion are passed as arguments,
+// the position is calculated from the values in rInf
static bool lcl_IsDropFlyInter( const SwTxtFormatInfo &rInf,
sal_uInt16 nWidth, sal_uInt16 nHeight )
{
@@ -171,13 +166,9 @@ MSHORT SwTxtNode::GetDropLen( MSHORT nWishLen ) const
return i;
}
-/*************************************************************************
- * SwTxtNode::GetDropSize()
- *
- * If a dropcap is found the return value is true otherwise false. The
- * drop cap sizes passed back by reference are font height, drop height
- * and drop descent.
- *************************************************************************/
+// If a dropcap is found the return value is true otherwise false. The
+// drop cap sizes passed back by reference are font height, drop height
+// and drop descent.
bool SwTxtNode::GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const
{
rFontHeight = 0;
@@ -490,13 +481,8 @@ void SwTxtFormatter::CalcDropHeight( const MSHORT nLines )
}
}
-/*************************************************************************
- * SwTxtFormatter::GuessDropHeight()
- *
- * We assume hat the font height doesn't change and that at first there
- * are at least as many lines, as the DropCap-setting claims
- *
- *************************************************************************/
+// We assume hat the font height doesn't change and that at first there
+// are at least as many lines, as the DropCap-setting claims
void SwTxtFormatter::GuessDropHeight( const MSHORT nLines )
{
OSL_ENSURE( nLines, "GuessDropHeight: Give me more Lines!" );
@@ -541,7 +527,7 @@ SwDropPortion *SwTxtFormatter::NewDropPortion( SwTxtFormatInfo &rInf )
pDropPor = new SwDropPortion( GetDropLines(), GetDropHeight(),
GetDropDescent(), pDropFmt->GetDistance() );
else
- pDropPor = new SwDropPortion( 0,0,0,pDropFmt->GetDistance() );
+ pDropPor = new SwDropPortion( 0,0,0,pDropFmt->GetDistance() );
pDropPor->SetLen( nPorLen );
@@ -644,13 +630,8 @@ void SwTxtPainter::PaintDropPortion()
GetInfo().Y( nOldY );
}
-/*************************************************************************
- * class SwDropCapCache
- *
- * Since the calculation of the font size is expensive, this is being
- * channeled through a DropCapCache
- *************************************************************************/
-
+// Since the calculation of the font size is expensive, this is being
+// channeled through a DropCapCache
#define DROP_CACHE_SIZE 10
class SwDropCapCache
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 40be65f212a3..4b9db82590f2 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -51,10 +51,6 @@
#include "reffld.hxx"
#include "flddat.hxx"
-/*************************************************************************
- * SwTxtFormatter::NewFldPortion()
- *************************************************************************/
-
static bool lcl_IsInBody( SwFrm *pFrm )
{
if ( pFrm->IsInDocBody() )
@@ -298,10 +294,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
return pRet;
}
-/*************************************************************************
- * SwTxtFormatter::TryNewNoLengthPortion()
- *************************************************************************/
-
static SwFldPortion * lcl_NewMetaPortion(SwTxtAttr & rHint, const bool bPrefix)
{
::sw::Meta *const pMeta(
@@ -353,10 +345,6 @@ SwTxtFormatter::TryNewNoLengthPortion(SwTxtFormatInfo & rInfo)
return 0;
}
-/*************************************************************************
- * SwTxtFormatter::NewExtraPortion()
- *************************************************************************/
-
SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
{
SwTxtAttr *pHint = GetAttr( rInf.GetIdx() );
@@ -413,10 +401,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
return pRet;
}
-/*************************************************************************
- * SwTxtFormatter::NewNumberPortion()
- *************************************************************************/
-
SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
{
if( rInf.IsNumDone() || rInf.GetTxtStart() != nStart
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index eee6f2c02805..0139fd7df136 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -601,15 +601,10 @@ void SwTxtFrm::HideAndShowObjects()
}
}
-/*************************************************************************
- * SwTxtFrm::FindBrk()
- *
- * Returns the first possible break point in the current line.
- * This method is used in SwTxtFrm::Format() to decide whether the previous
- * line has to be formatted as well.
- * nFound is <= nEndLine.
- *************************************************************************/
-
+// Returns the first possible break point in the current line.
+// This method is used in SwTxtFrm::Format() to decide whether the previous
+// line has to be formatted as well.
+// nFound is <= nEndLine.
sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt,
const sal_Int32 nStart,
const sal_Int32 nEnd ) const
@@ -1747,15 +1742,12 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid,
pPara->SetPrep();
}
-/* --------------------------------------------------
- * Small Helper class:
- * Prepares a test format.
- * The frame is changed in size and position, its SwParaPortion is moved aside
- * and a new one is created.
- * To achieve this, run formatting with bTestFormat flag set.
- * In the destructor the TxtFrm is reset to its original state.
- * --------------------------------------------------*/
-
+// Small Helper class:
+// Prepares a test format.
+// The frame is changed in size and position, its SwParaPortion is moved aside
+// and a new one is created.
+// To achieve this, run formatting with bTestFormat flag set.
+// In the destructor the TxtFrm is reset to its original state.
class SwTestFormat
{
SwTxtFrm *pFrm;
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 182251e758c8..0679d76352ea 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -153,13 +153,8 @@ bool SwTxtFrm::CalcPrepFtnAdjust()
return true;
}
-/*************************************************************************
- * lcl_GetFtnLower()
- *
- * Local helper function. Checks if nLower should be taken as the boundary
- * for the footnote.
- *************************************************************************/
-
+// Local helper function. Checks if nLower should be taken as the boundary
+// for the footnote.
static SwTwips lcl_GetFtnLower( const SwTxtFrm* pFrm, SwTwips nLower )
{
// nLower is an absolute value. It denotes the bottom of the line
@@ -975,9 +970,6 @@ SwNumberPortion *SwTxtFormatter::NewFtnNumPortion( SwTxtFormatInfo &rInf ) const
return pNewPor;
}
-/*************************************************************************
- * SwTxtFormatter::NewErgoSumPortion()
- *************************************************************************/
OUString lcl_GetPageNumber( const SwPageFrm* pPage )
{
OSL_ENSURE( pPage, "GetPageNumber: Homeless TxtFrm" );
@@ -1503,12 +1495,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
pQuo->SetNumber( rErgo );
}
-/*************************************************************************
- * SwParaPortion::UpdateQuoVadis()
- *
- * Wird im SwTxtFrm::Prepare() gerufen
- *************************************************************************/
-
+// Wird im SwTxtFrm::Prepare() gerufen
bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
{
SwLineLayout *pLay = this;
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 67584bc9c59a..491e05044098 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -35,10 +35,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::i18n;
-/*************************************************************************
- * SwTxtFormatInfo::HyphWord()
- *************************************************************************/
-
Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
const OUString &rTxt, const MSHORT nMinTrail )
{
@@ -55,12 +51,7 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
}
-/*************************************************************************
- * SwTxtFrm::Hyphenate
- *
- * Wir formatieren eine Zeile fuer die interaktive Trennung
- *************************************************************************/
-
+// Wir formatieren eine Zeile fuer die interaktive Trennung
bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"swapped frame at SwTxtFrm::Hyphenate" );
@@ -113,11 +104,8 @@ bool SwTxtFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
return bRet;
}
-/*************************************************************************
- * SwTxtFormatter::Hyphenate
- *
- * Wir formatieren eine Zeile fuer die interaktive Trennung
- *************************************************************************/
+// Wir formatieren eine Zeile fuer die interaktive Trennung
+//
// Wir koennen davon ausgehen, dass bereits formatiert wurde.
// Fuer die CeBIT'93 gehen wir den einfachen, sicheren Weg:
// Die Zeile wird einfach neu formatiert, der Hyphenator wird dann
@@ -259,10 +247,6 @@ bool SwTxtFormatter::Hyphenate( SwInterHyphInfo &rHyphInf )
return false;
}
-/*************************************************************************
- * SwTxtPortion::CreateHyphen()
- *************************************************************************/
-
bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
{
Reference< XHyphenatedWord > xHyphWord = rGuess.HyphWord();
@@ -360,30 +344,18 @@ bool SwTxtPortion::CreateHyphen( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess )
return false;
}
-/*************************************************************************
- * virtual SwHyphPortion::GetExpTxt()
- *************************************************************************/
-
bool SwHyphPortion::GetExpTxt( const SwTxtSizeInfo &/*rInf*/, OUString &rTxt ) const
{
rTxt = "-";
return true;
}
-/*************************************************************************
- * virtual SwHyphPortion::HandlePortion()
- *************************************************************************/
-
void SwHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
OUString aString( '-' );
rPH.Special( GetLen(), aString, GetWhichPor() );
}
-/*************************************************************************
- * virtual SwHyphPortion::Format()
- *************************************************************************/
-
bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
{
const SwLinePortion *pLast = rInf.GetLast();
@@ -404,29 +376,17 @@ bool SwHyphPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwHyphStrPortion::GetExpTxt()
- *************************************************************************/
-
bool SwHyphStrPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) const
{
rTxt = aExpand;
return true;
}
-/*************************************************************************
- * virtual SwHyphStrPortion::HandlePortion()
- *************************************************************************/
-
void SwHyphStrPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Special( GetLen(), aExpand, GetWhichPor() );
}
-/*************************************************************************
- * class SwSoftHyphPortion
- *************************************************************************/
-
SwLinePortion *SwSoftHyphPortion::Compress() { return this; }
SwSoftHyphPortion::SwSoftHyphPortion() :
@@ -459,7 +419,6 @@ KSHORT SwSoftHyphPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const
* 3) SoftHyph steht am Zeilenende, ViewOpt aus/an.
* -> immer sichtbar, Nachbarn unveraendert
*/
-
void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
if( Width() )
@@ -469,10 +428,6 @@ void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * virtual SwSoftHyphPortion::Format()
- *************************************************************************/
-
/* Die endgueltige Breite erhalten wir im FormatEOL().
* In der Underflow-Phase stellen wir fest, ob ueberhaupt ein
* alternatives Spelling vorliegt. Wenn ja ...
@@ -488,7 +443,6 @@ void SwSoftHyphPortion::Paint( const SwTxtPaintInfo &rInf ) const
* 3) Underflow() und bFull = true
* 4) {Zuc} ruft Hyphenate => {Zuk}{-}{ker}
*/
-
bool SwSoftHyphPortion::Format( SwTxtFormatInfo &rInf )
{
bool bFull = true;
@@ -544,9 +498,6 @@ bool SwSoftHyphPortion::Format( SwTxtFormatInfo &rInf )
return bFull;
}
-/*************************************************************************
- * virtual SwSoftHyphPortion::FormatEOL()
- *************************************************************************/
// Format end of Line
void SwSoftHyphPortion::FormatEOL( SwTxtFormatInfo &rInf )
@@ -576,15 +527,10 @@ void SwSoftHyphPortion::FormatEOL( SwTxtFormatInfo &rInf )
}
}
-/*************************************************************************
- * virtual SwSoftHyphPortion::GetExpTxt()
- *
- * Wir expandieren:
- * - wenn die Sonderzeichen sichtbar sein sollen
- * - wenn wir am Ende der Zeile stehen.
- * - wenn wir vor einem (echten/emuliertem) Zeilenumbruch stehen
- *************************************************************************/
-
+// Wir expandieren:
+// - wenn die Sonderzeichen sichtbar sein sollen
+// - wenn wir am Ende der Zeile stehen.
+// - wenn wir vor einem (echten/emuliertem) Zeilenumbruch stehen
bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) const
{
if( IsExpand() || ( rInf.OnWin() && rInf.GetOpt().IsSoftHyph() ) ||
@@ -597,10 +543,6 @@ bool SwSoftHyphPortion::GetExpTxt( const SwTxtSizeInfo &rInf, OUString &rTxt ) c
return false;
}
-/*************************************************************************
- * virtual SwSoftHyphPortion::HandlePortion()
- *************************************************************************/
-
void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
{
const OUString aString( '-' );
@@ -610,10 +552,6 @@ void SwSoftHyphPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Special( GetLen(), aString, nWhich );
}
-/*************************************************************************
- * SwSoftHyphStrPortion::Paint
- *************************************************************************/
-
void SwSoftHyphStrPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
// Bug oder feature?:
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index a847d732a296..4e42e23b5950 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -49,10 +49,6 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwLineLayout ) // Lines
IMPL_FIXEDMEMPOOL_NEWDEL( SwHolePortion ) // e.g. Blanks at the line end
IMPL_FIXEDMEMPOOL_NEWDEL( SwTxtPortion ) // Attribute change
-/*************************************************************************
- * _TextInit(), _TextFinit()
- *************************************************************************/
-
// Are ONLY used in init.cxx.
// There we have extern void _TextFinit()
// and extern void _TextInit(...)
diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx
index 2e81b35546d2..a872a1111c9b 100644
--- a/sw/source/core/text/txtpaint.cxx
+++ b/sw/source/core/text/txtpaint.cxx
@@ -21,10 +21,6 @@
#include "swrect.hxx"
#include "rootfrm.hxx"
-/*************************************************************************
- * SwSaveClip::Reset()
- *************************************************************************/
-
void SwSaveClip::Reset()
{
// We recover the old state
@@ -43,10 +39,6 @@ void SwSaveClip::Reset()
}
}
-/*************************************************************************
- * SwSaveClip::_ChgClip()
- *************************************************************************/
-
void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
bool bEnlargeRect )
{
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index 1e67425392ec..f3ef7296f95e 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -23,10 +23,6 @@
class SwRect; // SwSaveClip
#include <txtfrm.hxx>
-/*************************************************************************
- * class SwSaveClip
- *************************************************************************/
-
class SwSaveClip
{
Region aClip;
@@ -61,10 +57,6 @@ inline SwSaveClip::~SwSaveClip()
#ifdef DBG_UTIL
-/*************************************************************************
- * class SwDbgOut
- *************************************************************************/
-
class SwDbgOut
{
protected:
@@ -73,10 +65,6 @@ public:
inline SwDbgOut( OutputDevice* pOutDev, const bool bOn = true );
};
-/*************************************************************************
- * class DbgBrush
- *************************************************************************/
-
class DbgBackColor : public SwDbgOut
{
Color aOldFillColor;
@@ -86,10 +74,6 @@ public:
~DbgBackColor();
};
-/*************************************************************************
- * class DbgRect
- *************************************************************************/
-
class DbgRect : public SwDbgOut
{
public:
@@ -98,10 +82,6 @@ public:
ColorData eColor = COL_LIGHTBLUE );
};
-/*************************************************************************
- * Inline-Implementierung
- *************************************************************************/
-
inline SwDbgOut::SwDbgOut( OutputDevice* pOutDev, const bool bOn )
:pOut( bOn ? pOutDev : 0 )
{ }
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index da1eb3af4952..e1d85ad43fa0 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -36,10 +36,6 @@
#include <porfld.hxx>
#include <boost/scoped_ptr.hpp>
-/*************************************************************************
- * SwLineInfo::GetTabStop()
- *************************************************************************/
-
//#i24363# tab stops relative to indent
/* Return the first tab stop that is > nSearchPos.
* If the tab stop is outside the print area, we
@@ -59,18 +55,11 @@ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos,
return 0;
}
-/*************************************************************************
- * SwLineInfo::NumberOfTabStops()
- *************************************************************************/
-
sal_uInt16 SwLineInfo::NumberOfTabStops() const
{
return pRuler->Count();
}
-/*************************************************************************
- * SwTxtFormatter::NewTabPortion()
- *************************************************************************/
SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto ) const
{
sal_Unicode cFill = 0;
@@ -304,12 +293,7 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
return pTabPor;
}
-/*************************************************************************
- * SwTabPortion::SwTabPortion()
- *************************************************************************/
-
// Die Basisklasse wird erstmal ohne alles initialisiert.
-
SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const sal_Unicode cFillChar, const bool bAutoTab )
: SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar), bAutoTabStop( bAutoTab )
{
@@ -318,10 +302,6 @@ SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const sal_Unicode cFillCh
SetWhichPor( POR_TAB );
}
-/*************************************************************************
- * virtual SwTabPortion::Format()
- *************************************************************************/
-
bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
{
SwTabPortion *pLastTab = rInf.GetLastTab();
@@ -332,20 +312,12 @@ bool SwTabPortion::Format( SwTxtFormatInfo &rInf )
return PreFormat( rInf );
}
-/*************************************************************************
- * virtual SwTabPortion::FormatEOL()
- *************************************************************************/
-
void SwTabPortion::FormatEOL( SwTxtFormatInfo &rInf )
{
if( rInf.GetLastTab() == this && !IsTabLeftPortion() )
PostFormat( rInf );
}
-/*************************************************************************
- * SwTabPortion::PreFormat()
- *************************************************************************/
-
bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
{
OSL_ENSURE( rInf.X() <= GetTabPos(), "SwTabPortion::PreFormat: rush hour" );
@@ -458,10 +430,6 @@ bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf )
}
}
-/*************************************************************************
- * SwTabPortion::PostFormat()
- *************************************************************************/
-
bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
{
const bool bTabOverMargin = rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_OVER_MARGIN);
@@ -530,12 +498,7 @@ bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
return rInf.Width() <= rInf.X();
}
-/*************************************************************************
- * virtual SwTabPortion::Paint()
- *
- * Ex: LineIter::DrawTab()
- *************************************************************************/
-
+// Ex: LineIter::DrawTab()
void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
#if OSL_DEBUG_LEVEL > 1
@@ -625,18 +588,10 @@ void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
}
}
-/*************************************************************************
- * virtual SwAutoTabDecimalPortion::Paint()
- *************************************************************************/
-
void SwAutoTabDecimalPortion::Paint( const SwTxtPaintInfo & ) const
{
}
-/*************************************************************************
- * virtual SwTabPortion::HandlePortion()
- *************************************************************************/
-
void SwTabPortion::HandlePortion( SwPortionHandler& rPH ) const
{
rPH.Text( GetLen(), GetWhichPor(), Height(), Width() );
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index 91f83037797c..2e3213c22ac6 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -54,10 +54,6 @@ inline bool IsNastyFollow( const SwTxtFrm *pFrm )
}
-/*************************************************************************
- * SwTxtFrmBreak::SwTxtFrmBreak()
- *************************************************************************/
-
SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst )
: nRstHeight(nRst), pFrm(pNewFrm)
{
@@ -95,10 +91,6 @@ SwTxtFrmBreak::SwTxtFrmBreak( SwTxtFrm *pNewFrm, const SwTwips nRst )
*
*/
-/*************************************************************************
- * SwTxtFrmBreak::IsInside()
- *************************************************************************/
-
/* BP(22.07.92): Calculation of Widows and Orphans.
* The method returns true if one of the rules matches.
*
@@ -171,10 +163,6 @@ bool SwTxtFrmBreak::IsInside( SwTxtMargin &rLine ) const
return bFit;
}
-/*************************************************************************
- * SwTxtFrmBreak::IsBreakNow()
- *************************************************************************/
-
bool SwTxtFrmBreak::IsBreakNow( SwTxtMargin &rLine )
{
SWAP_IF_SWAPPED( pFrm )
@@ -234,10 +222,6 @@ void SwTxtFrmBreak::SetRstHeight( const SwTxtMargin &rLine )
nRstHeight += rLine.Y() - nOrigin;
}
-/*************************************************************************
- * WidowsAndOrphans::WidowsAndOrphans()
- *************************************************************************/
-
WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
bool bChkKeep )
: SwTxtFrmBreak( pNewFrm, nRst ), nWidLines( 0 ), nOrphLines( 0 )
@@ -314,10 +298,6 @@ WidowsAndOrphans::WidowsAndOrphans( SwTxtFrm *pNewFrm, const SwTwips nRst,
UNDO_SWAP( pFrm )
}
-/*************************************************************************
- * WidowsAndOrphans::FindBreak()
- *************************************************************************/
-
/* The Find*-Methodes do not only search, but adjust the SwTxtMargin to the
* line where the paragraph should have a break and truncate the paragraph there.
* FindBreak()
@@ -370,10 +350,6 @@ bool WidowsAndOrphans::FindBreak( SwTxtFrm *pFrame, SwTxtMargin &rLine,
return bRet;
}
-/*************************************************************************
- * WidowsAndOrphans::FindWidows()
- *************************************************************************/
-
/* FindWidows positions the SwTxtMargin of the Master to the line where to
* break by examining and formatting the Follow.
* Returns true if the Widows-rule matches, that means that the
@@ -504,10 +480,6 @@ bool WidowsAndOrphans::FindWidows( SwTxtFrm *pFrame, SwTxtMargin &rLine )
return true;
}
-/*************************************************************************
- * WidowsAndOrphans::WouldFit()
- *************************************************************************/
-
bool WidowsAndOrphans::WouldFit( SwTxtMargin &rLine, SwTwips &rMaxHeight, bool bTst )
{
// Here it does not matter, if pFrm is swapped or not.