summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2012-07-09 03:30:54 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-07-09 19:19:54 +0200
commit5d15480cea118dab711669db9417ddd6a6e348d4 (patch)
treebbadf12ab709dc3da813fc84215efb9355775ecb
parente7540edefe1cf5b7f52ddb9b7b4824479da9234b (diff)
adjusted existing comments (in sw/source/core/crsr/)
(modulo some added class header comments) Change-Id: I0ff7b7a09f45d57da663ab098217587ffe3e24da
-rw-r--r--sw/source/core/crsr/BlockCursor.hxx2
-rw-r--r--sw/source/core/crsr/IBlockCursor.hxx55
-rw-r--r--sw/source/core/crsr/bookmrk.cxx9
-rw-r--r--sw/source/core/crsr/callnk.cxx2
-rw-r--r--sw/source/core/crsr/crbm.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx108
-rw-r--r--sw/source/core/crsr/crstrvl.cxx14
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx25
-rw-r--r--sw/source/core/crsr/pam.cxx9
-rw-r--r--sw/source/core/crsr/swcrsr.cxx44
-rw-r--r--sw/source/core/crsr/trvlcol.cxx2
-rw-r--r--sw/source/core/crsr/trvltbl.cxx40
-rw-r--r--sw/source/core/crsr/viscrs.cxx46
14 files changed, 167 insertions, 195 deletions
diff --git a/sw/source/core/crsr/BlockCursor.hxx b/sw/source/core/crsr/BlockCursor.hxx
index 6bf4703ca04c..1bea5c594b8f 100644
--- a/sw/source/core/crsr/BlockCursor.hxx
+++ b/sw/source/core/crsr/BlockCursor.hxx
@@ -25,6 +25,6 @@ struct SwPosition;
IBlockCursor *createBlockCursor(const SwCrsrShell& rCrsrSh, const SwPosition &rPos);
-#endif //_BLOCKURSOR_HXX
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/IBlockCursor.hxx b/sw/source/core/crsr/IBlockCursor.hxx
index 5f4b5354217d..4f51b54d68f1 100644
--- a/sw/source/core/crsr/IBlockCursor.hxx
+++ b/sw/source/core/crsr/IBlockCursor.hxx
@@ -34,55 +34,54 @@ class Point;
class IBlockCursor
{
public:
-/** Access to the shell cursor
+ /** Access to the shell cursor
- @return SwShellCrsr& which represents the start and end position of the
- current block selection
-*/
+ @return SwShellCrsr& which represents the start and end position of the
+ current block selection
+ */
virtual SwShellCrsr& getShellCrsr() = 0;
-/** Defines the starting vertex of the block selection
+ /** Defines the starting vertex of the block selection
- @param rPt
- rPt should contain the document coordinates of the mouse cursor when
- the block selection starts (MouseButtonDown)
-*/
+ @param rPt
+ rPt should contain the document coordinates of the mouse cursor when
+ the block selection starts (MouseButtonDown)
+ */
virtual void setStartPoint( const Point &rPt ) = 0;
-/** Defines the ending vertex of the block selection
+ /** Defines the ending vertex of the block selection
- @param rPt
- rPt should contain the document coordinates of the mouse cursor when
- the block selection has started and the mouse has been moved (MouseMove)
-*/
+ @param rPt
+ rPt should contain the document coordinates of the mouse cursor when
+ the block selection has started and the mouse has been moved (MouseMove)
+ */
virtual void setEndPoint( const Point &rPt ) = 0;
-/** The document coordinates where the block selection has been started
+ /** The document coordinates where the block selection has been started
- @return 0, if no start point has been set
-*/
+ @return 0, if no start point has been set
+ */
virtual const Point* getStartPoint() const = 0;
-/** The document coordinates where the block selection ends (at the moment)
+ /** The document coordinates where the block selection ends (at the moment)
- @return 0, if no end point has been set
-*/
+ @return 0, if no end point has been set
+ */
virtual const Point* getEndPoint() const = 0;
-/** Deletion of the mouse created rectangle
+ /** Deletion of the mouse created rectangle
- When start and end points exist, the block cursor depends on this. If the
- cursor is moved by cursor keys (e.g. up/down, home/end) the mouse rectangle
- is obsolet and has to be deleted.
-*/
+ When start and end points exist, the block cursor depends on this. If the
+ cursor is moved by cursor keys (e.g. up/down, home/end) the mouse rectangle
+ is obsolet and has to be deleted.
+ */
virtual void clearPoints() = 0;
-/** Destructor of the block curosr interface
-*/
+ /** Destructor of the block curosr interface */
virtual ~IBlockCursor() {};
};
-#endif // IBLOCKCURSOR_HXX_INCLUDED
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 3b1f76a486b2..7e15633e6a9f 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -178,8 +178,9 @@ namespace sw { namespace mark
}
}
+ // TODO: everything else uses MarkBase::GenerateNewName ?
NavigatorReminder::NavigatorReminder(const SwPaM& rPaM)
- : MarkBase(rPaM, rtl::OUString("__NavigatorReminder__")) //<-- everything else uses MarkBase::GenerateNewName ?
+ : MarkBase(rPaM, rtl::OUString("__NavigatorReminder__"))
{ }
UnoMark::UnoMark(const SwPaM& aPaM)
@@ -265,7 +266,6 @@ namespace sw { namespace mark
uno::Reference< rdf::XMetadatable > Bookmark::MakeUnoObject()
{
- // create new SwXBookmark
SwDoc *const pDoc( GetMarkPos().GetDoc() );
OSL_ENSURE(pDoc, "Bookmark::MakeUnoObject: no doc?");
const uno::Reference< rdf::XMetadatable> xMeta(
@@ -273,7 +273,6 @@ namespace sw { namespace mark
return xMeta;
}
-
Fieldmark::Fieldmark(const SwPaM& rPaM)
: MarkBase(rPaM, MarkBase::GenerateNewName(rtl::OUString("__Fieldmark__")))
{
@@ -302,8 +301,8 @@ namespace sw { namespace mark
void Fieldmark::Invalidate( )
{
- // @TODO: Does exist a better solution to trigger a format of the
- // fieldmark portion? If yes, please use it.
+ // TODO: Does exist a better solution to trigger a format of the
+ // fieldmark portion? If yes, please use it.
SwPaM aPaM( this->GetMarkPos(), this->GetOtherMarkPos() );
aPaM.InvalidatePaM();
}
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 66c0b265f851..29ae8cb48fcc 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -120,7 +120,7 @@ void lcl_notifyRow(const SwCntntNode* pNode, SwCrsrShell& rShell)
SwCallLink::~SwCallLink()
{
- if( !nNdTyp || !rShell.bCallChgLnk ) // see ctor
+ if( !nNdTyp || !rShell.bCallChgLnk ) // see ctor
return ;
// If travelling over Nodes check formats and register them anew at the
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 08b80ae8f47a..4fcab6896527 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -59,7 +59,7 @@ namespace
}
}
- // returns true if the Cursor had been rolled back
+ /// returns true if the Cursor had been rolled back
bool RollbackIfIllegal()
{
if(m_pCrsr->IsSelOvr(nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7e4056ea1e6a..4b92dbd5458a 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -59,10 +59,10 @@
#include <scriptinfo.hxx>
#include <globdoc.hxx>
#include <pamtyp.hxx>
-#include <mdiexp.hxx> // ...Percent()
+#include <mdiexp.hxx>
#include <fmteiro.hxx>
-#include <wrong.hxx> // SMARTTAGS
-#include <unotextrange.hxx> // SMARTTAGS
+#include <wrong.hxx>
+#include <unotextrange.hxx>
#include <vcl/svapp.hxx>
#include <numrule.hxx>
#include <IGrammarContact.hxx>
@@ -83,7 +83,6 @@ TYPEINIT2(SwCrsrShell,ViewShell,SwModify);
*/
void CheckRange( SwCursor* );
-//-----------------------------------------------------------------------
/**
* Check if pCurCrsr points into already existing ranges and delete those.
@@ -112,22 +111,20 @@ void CheckRange( SwCursor* pCurCrsr )
else
if( *pStt < *pTmpEnd )
pTmpDel = pTmp;
- /*
- * If Point or Mark is within the Crsr range, we
- * need to remove the old range. Take note that Point does
- * not belong to the range anymore.
- */
+
+ // If Point or Mark is within the Crsr range, we need to remove the old
+ // range. Take note that Point does not belong to the range anymore.
pTmp = (SwPaM*)pTmp->GetNext();
delete pTmpDel; // Remove old range
pTmpDel = 0;
}
}
+// -----------
+// SwCrsrShell
+// -----------
-/**
- Methods of SwCrsrShell
- */
SwPaM * SwCrsrShell::CreateCrsr()
@@ -164,7 +161,7 @@ sal_Bool SwCrsrShell::DestroyCrsr()
if(pCurCrsr->GetNext() == pCurCrsr)
return sal_False;
- SwCallLink aLk( *this ); // watch Crsr-Moves
+ SwCallLink aLk( *this ); // watch Crsr-Moves
SwCursor* pNextCrsr = (SwCursor*)pCurCrsr->GetNext();
delete pCurCrsr;
pCurCrsr = dynamic_cast<SwShellCrsr*>(pNextCrsr);
@@ -206,7 +203,7 @@ SwPaM* SwCrsrShell::GetCrsr( sal_Bool bMakeTblCrsr ) const
{
if( bMakeTblCrsr && pTblCrsr->IsCrsrMovedUpdt() )
{
- //don't re-create 'parked'(?) cursors
+ //don't re-create 'parked' cursors
const SwCntntNode* pCNd;
if( pTblCrsr->GetPoint()->nNode.GetIndex() &&
pTblCrsr->GetMark()->nNode.GetIndex() &&
@@ -243,7 +240,7 @@ void SwCrsrShell::StartAction()
else
nLeftFrmPos = 0;
}
- ViewShell::StartAction(); // to the ViewShell
+ ViewShell::StartAction(); // to the ViewShell
}
@@ -261,8 +258,8 @@ void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
if( 1 == nStartAction )
GetDoc()->UpdateNumRule();
- // Task: 76923: dont show the cursor in the ViewShell::EndAction() - call.
- // Only the UpdateCrsr shows the cursor.
+ // #i76923#: Don't show the cursor in the ViewShell::EndAction() - call.
+ // Only the UpdateCrsr shows the cursor.
sal_Bool bSavSVCrsrVis = bSVCrsrVis;
bSVCrsrVis = sal_False;
@@ -295,7 +292,7 @@ void SwCrsrShell::EndAction( const sal_Bool bIdleEnd )
if( bCallChgLnk && bChgCallFlag && aChgLnk.IsSet() )
{
aChgLnk.Call( this );
- bChgCallFlag = sal_False; // reset flag
+ bChgCallFlag = sal_False; // reset flag
}
}
return;
@@ -363,20 +360,16 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
if( pBlockCrsr )
pBlockCrsr->clearPoints();
- //
// 1. CASE: Cursor is in front of label. A move to the right
// will simply reset the bInFrontOfLabel flag:
- //
SwShellCrsr* pShellCrsr = getShellCrsr( true );
if ( !bLeft && pShellCrsr->IsInFrontOfLabel() )
{
SetInFrontOfLabel( sal_False );
bRet = sal_True;
}
- //
// 2. CASE: Cursor is at beginning of numbered paragraph. A move
// to the left will simply set the bInFrontOfLabel flag:
- //
else if ( bLeft && 0 == pShellCrsr->GetPoint()->nContent.GetIndex() &&
!pShellCrsr->IsInFrontOfLabel() && !pShellCrsr->HasMark() &&
0 != ( pTxtNd = pShellCrsr->GetNode()->GetTxtNode() ) &&
@@ -385,9 +378,7 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
SetInFrontOfLabel( sal_True );
bRet = sal_True;
}
- //
// 3. CASE: Regular cursor move. Reset the bInFrontOfLabel flag:
- //
else
{
const sal_Bool bSkipHidden = !GetViewOptions()->IsShowHiddenChar();
@@ -684,7 +675,7 @@ int SwCrsrShell::SetCrsr( const Point &rLPt, sal_Bool bOnlyText, bool bBlock )
// same table column and not in header/footer -> back
return bRet;
- // Toggle the Header/Footer mode if needed
+ // toggle the header/footer mode if needed
bool bInHeaderFooter = pFrm && ( pFrm->IsHeaderFrm() || pFrm->IsFooterFrm() );
if ( bInHeaderFooter != IsHeaderFooterEdit() )
ToggleHeaderFooterEdit();
@@ -1262,7 +1253,7 @@ static void lcl_CheckHiddenSection( SwNodeIndex& rIdx )
}
}
-// Try to set the cursor to the next visible content node.
+/// Try to set the cursor to the next visible content node.
static void lcl_CheckHiddenPara( SwPosition& rPos )
{
SwNodeIndex aTmp( rPos.nNode );
@@ -1280,7 +1271,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos )
rPos = SwPosition( aTmp, SwIndex( pTxtNd, 0 ) );
}
-// #i27301# - helper class, which notifies the accessibility about invalid text
+// #i27301# - helper class that notifies the accessibility about invalid text
// selections in its destructor
class SwNotifyAccAboutInvalidTextSelections
{
@@ -1304,7 +1295,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
ClearUpCrsrs();
// In a BasicAction the cursor must be updated, e.g. to create the
- // TableCursor. EndAction now calls UpdateCrsr!
+ // TableCursor. EndAction now calls UpdateCrsr!
if( ActionPend() && BasicActionPend() )
{
if ( eFlags & SwCrsrShell::READONLY )
@@ -1359,8 +1350,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
Point aTmpMk( pITmpCrsr->GetMkPos() );
SwPosition* pPos = pITmpCrsr->GetPoint();
- // JP 30.04.99: Bug 65475
- // if Point/Mark in hidden sections, move them out
+ // Bug 65475 (1999) - if Point/Mark in hidden sections, move them out
lcl_CheckHiddenSection( pPos->nNode );
lcl_CheckHiddenSection( pITmpCrsr->GetMark()->nNode );
@@ -1456,7 +1446,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
(void) bResult; // non-debug: unused
}
- pVisCrsr->Hide(); // always hide visible Cursor
+ pVisCrsr->Hide(); // always hide visible Cursor
// scroll Cursor to visible area
if( (eFlags & SwCrsrShell::SCROLLWIN) &&
(HasSelection() || eFlags & SwCrsrShell::READONLY ||
@@ -1486,7 +1476,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
aCrsrHeight.X() = 0;
aCrsrHeight.Y() = aTmpState.aRealHeight.Y() < 0 ?
-aCharRect.Width() : aCharRect.Height();
- pVisCrsr->Show(); // show again
+ pVisCrsr->Show(); // show again
}
eMvState = MV_NONE; // state for cursor travelling - GetCrsrOfst
if( pTblFrm && Imp()->IsAccessible() )
@@ -1506,7 +1496,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
delete pTblCrsr, pTblCrsr = 0;
}
- pVisCrsr->Hide(); // always hide visible Cursor
+ pVisCrsr->Hide(); // always hide visible Cursor
// are we perhaps in a protected / hidden Section ?
{
@@ -1522,7 +1512,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
if( !FindValidCntntNode( !HasDrawView() ||
0 == Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount()))
{
- // everything protected / hidden -> special Mode
+ // everything protected/hidden -> special mode
if( bAllProtect && !IsReadOnlyAvailable() &&
pSectNd->GetSection().IsProtectFlag() )
bChgState = sal_False;
@@ -1654,7 +1644,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
CallChgLnk(); // notify UI!
}
bAllProtect = sal_False;
- bAgainst = sal_True; // look for the right Frm again
+ bAgainst = sal_True; // look for the right Frm again
}
}
} while( bAgainst );
@@ -1759,7 +1749,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
}
}
- eMvState = MV_NONE; // state for cursor tavelling - GetCrsrOfst
+ eMvState = MV_NONE; // state for cursor tavelling - GetCrsrOfst
if( pFrm && Imp()->IsAccessible() )
Imp()->InvalidateAccessibleCursorPosition( pFrm );
@@ -1784,7 +1774,7 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd )
}
if( bSVCrsrVis )
- pVisCrsr->Show(); // show again
+ pVisCrsr->Show(); // show again
}
void SwCrsrShell::RefreshBlockCursor()
@@ -2537,7 +2527,6 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx )
delete pNew;
}
-//=========================================================================
/** Copy constructor
@@ -2884,8 +2873,7 @@ sal_Bool SwCrsrShell::FindValidCntntNode( sal_Bool bOnlyText )
sal_Bool SwCrsrShell::IsCrsrReadonly() const
{
if ( GetViewOptions()->IsReadonly() ||
- // Formular view
- GetViewOptions()->IsFormView() )
+ GetViewOptions()->IsFormView() /* Formular view */ )
{
SwFrm *pFrm = GetCurrFrm( sal_False );
const SwFlyFrm* pFly;
@@ -3002,10 +2990,8 @@ sal_Bool SwCrsrShell::IsInRightToLeftText( const Point* pPt ) const
return FRMDIR_VERT_TOP_LEFT == nDir || FRMDIR_HORI_RIGHT_TOP == nDir;
}
-//
-// If the current cursor position is inside a hidden range, the hidden range
-// is selected:
-//
+/// If the current cursor position is inside a hidden range, the hidden range
+/// is selected.
bool SwCrsrShell::SelectHiddenRange()
{
bool bRet = false;
@@ -3160,10 +3146,8 @@ void SwCrsrShell::ClearUpCrsrs()
SwPaM * pTmpCrsr;
bool bChanged = false;
- /*
- For all entries in the ring except the start entry delete the
- entry if it is invalid.
- */
+ // For all entries in the ring except the start entry delete the entry if
+ // it is invalid.
while (pCrsr != pStartCrsr)
{
pTmpCrsr = (SwPaM *) pCrsr->GetNext();
@@ -3193,11 +3177,9 @@ void SwCrsrShell::ClearUpCrsrs()
aNodes.GoNext( &aIdx );
if( pNode == NULL || lcl_NodeContext( *pNode ) != pStart )
{
- /*
- If the start entry of the ring is invalid replace it with a
- cursor pointing to the beginning of the first content node in
- the document.
- */
+ // If the start entry of the ring is invalid replace it with a
+ // cursor pointing to the beginning of the first content node in the
+ // document.
aIdx = (*(aNodes.GetEndOfContent().StartOfSectionNode()));
pNode = aNodes.GoNext( &aIdx );
}
@@ -3214,10 +3196,8 @@ void SwCrsrShell::ClearUpCrsrs()
bChanged = true;
}
- /*
- If at least one of the cursors in the ring have been deleted or
- replaced, remove the table cursor.
- */
+ // If at least one of the cursors in the ring have been deleted or replaced,
+ // remove the table cursor.
if (pTblCrsr != NULL && bChanged)
TblCrsrToCursor();
}
@@ -3381,11 +3361,10 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex();
Pop(sal_False);
- // make sure the selection build later from the
- // data below does not include footnotes and other
- // "in word" character to the left and right in order
- // to preserve those. Therefore count those "in words"
- // in order to modify the selection accordingly.
+ // make sure the selection build later from the data below does not
+ // include footnotes and other "in word" character to the left and
+ // right in order to preserve those. Therefore count those "in
+ // words" in order to modify the selection accordingly.
const sal_Unicode* pChar = aText.GetBuffer();
xub_StrLen nLeft = 0;
while (pChar && *pChar++ == CH_TXTATR_INWORD)
@@ -3400,9 +3379,10 @@ void SwCrsrShell::GetSmartTagTerm( const Point& rPt, SwRect& rSelectRect,
*pCrsr->GetPoint() = aPos;
pCrsr->SetMark();
ExtendSelection( sal_True, nLen - nLeft - nRight );
- //no determine the rectangle in the current line
+ // do not determine the rectangle in the current line
xub_StrLen nWordStart = (nBegin + nLeft) < nLineStart ? nLineStart : nBegin + nLeft;
- //take one less than the line end - otherwise the next line would be calculated
+ // take one less than the line end - otherwise the next line would
+ // be calculated
xub_StrLen nWordEnd = (nBegin + nLen - nLeft - nRight) > nLineEnd ? nLineEnd : (nBegin + nLen - nLeft - nRight);
Push();
pCrsr->DeleteMark();
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 955e50bbedf5..8c833899bd60 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -42,7 +42,7 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <fldbas.hxx>
-#include <swtable.hxx> // SwTxtFld
+#include <swtable.hxx>
#include <docary.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
@@ -58,7 +58,7 @@
#include <docfld.hxx>
#include <expfld.hxx>
#include <reffld.hxx>
-#include <flddat.hxx> // SwTxtFld
+#include <flddat.hxx>
#include <cellatr.hxx>
#include <swundo.hxx>
#include <redline.hxx>
@@ -906,11 +906,11 @@ sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
if( bWithChildren )
{
- const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end.zhaojianwei
+ const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;
for( ++nEndPos; nEndPos < rOutlNds.Count(); ++nEndPos )
{
pEndNd = rOutlNds[ nEndPos ];
- const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
+ const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;
if( nNxtLevel <= nLevel )
break; // EndPos is now on the next one
}
@@ -2127,7 +2127,7 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
SET_CURR_SHELL( this );
SwCallLink aLk( *this );
- // find a text attribute ?
+ // found a text attribute ?
if( pFndAttr )
{
SwCrsrSaveState aSaveState( *pCurCrsr );
@@ -2144,7 +2144,7 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
bRet = sal_True;
}
}
- // find a draw object ?
+ // found a draw object ?
else if( RES_DRAWFRMFMT == pFndFmt->Which() )
{
const SdrObject* pSObj = pFndFmt->FindSdrObject();
@@ -2152,7 +2152,7 @@ sal_Bool SwCrsrShell::SelectNxtPrvHyperlink( sal_Bool bNext )
MakeSelVisible();
bRet = sal_True;
}
- else // then is it a fly
+ else // then is it a fly
{
SwFlyFrm* pFly = pFndFmt->GetFrm(&aPt, sal_False );
if( pFly )
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index eb05b4902e56..e3118fac53db 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -120,7 +120,7 @@ void lcl_SetAttrPam( SwPaM & rPam, xub_StrLen nStart, const xub_StrLen* pEnde,
SwCntntNode* pCNd = rPam.GetCntntNode();
rPam.GetPoint()->nContent.Assign( pCNd, nStart );
- rPam.SetMark(); // Point == GetMark
+ rPam.SetMark(); // Point == GetMark
// Point points to end of search area or end of attribute
if( pEnde )
@@ -1114,7 +1114,7 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
pSTxt = new utl::TextSearch( aTmp );
}
- // todo/mba: searching for attributes in Outliner text?!
+ // TODO: searching for attributes in Outliner text?!
sal_Bool bSearchInNotes = sal_False;
// continue search in correct section (pTextRegion)
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index cc5f2e130cda..5f2eb4cf13ef 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -121,7 +121,6 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
const SwTxtAttr* pHt = (*pHts)[n];
if ( pHt->HasDummyChar() && (nStt >= nStart) )
{
- //JP 17.05.00: Task 75806 ask for ">=" and not for ">"
switch( pHt->Which() )
{
case RES_TXTATR_FLYCNT:
@@ -263,7 +262,7 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
sal_Bool bChkParaEnd = bRegSearch && 1 == rSearchOpt.searchString.getLength() &&
!rSearchOpt.searchString.compareToAscii( "$" );
-// LanguageType eLastLang = 0;
+ // LanguageType eLastLang = 0;
while( 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ) ))
{
if( pNode->IsTxtNode() )
@@ -276,11 +275,12 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
nStart = rCntntIdx.GetIndex();
/* #i80135# */
- // if there are SwPostItFields inside our current node text, we split the text into seperate pieces
- // and search for text inside the pieces as well as inside the fields
+ // if there are SwPostItFields inside our current node text, we
+ // split the text into seperate pieces and search for text inside
+ // the pieces as well as inside the fields
const SwpHints *pHts = ((SwTxtNode*)pNode)->GetpSwpHints();
- // count postitfields by looping over all fields
+ // count PostItFields by looping over all fields
xub_StrLen aNumberPostits = 0;
xub_StrLen aIgnore = 0;
if (pHts && bSearchInNotes)
@@ -392,7 +392,8 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
}
else
{
- // if there is no SwPostItField inside or searching inside notes is disabled, we search the whole length just like before
+ // if there is no SwPostItField inside or searching inside notes
+ // is disabled, we search the whole length just like before
bFound = DoSearch(rSearchOpt,rSTxt,fnMove,bSrchForward,bRegSearch,bChkEmptyPara,bChkParaEnd,
nStart,nEnde,nTxtLen, pNode,pPam);
}
@@ -415,7 +416,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
String sCleanStr;
std::vector<sal_uLong> aFltArr;
LanguageType eLastLang = 0;
- // if the search string contains a soft hypen, we don't strip them from the text:
+ // if the search string contains a soft hypen,
+ // we don't strip them from the text:
bool bRemoveSoftHyphens = true;
if ( bRegSearch )
{
@@ -452,9 +454,9 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
while ( (bSrchForward && nStart < nStringEnd) ||
(! bSrchForward && nStart > nStringEnd) )
{
- // SearchAlgorithms_APPROXIMATE works on a per word base
- // so we have to provide the text searcher with the correct
- // locale, because it uses the breakiterator
+ // SearchAlgorithms_APPROXIMATE works on a per word base so we have to
+ // provide the text searcher with the correct locale, because it uses
+ // the break-iterator
if ( pScriptIter )
{
nEnde = pScriptIter->GetScriptChgPos();
@@ -514,9 +516,8 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
bFound = sal_True;
break;
}
-
nStart = nEnde;
- } // end of script while
+ }
delete pScriptIter;
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 1010cdd3a903..e1eef0996b12 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -331,7 +331,6 @@ SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, sal_Bool bChk )
return pNd;
}
-// ----------------------------------------------------------------------
SwPaM::SwPaM( const SwPosition& rPos, SwPaM* pRing )
: Ring( pRing )
@@ -803,7 +802,6 @@ SwCntntNode* GetNode( SwPaM & rPam, sal_Bool& rbFirst, SwMoveFn fnMove,
return pNd;
}
-// ----------------------------------------------------------------------
void GoStartDoc( SwPosition * pPos )
{
@@ -1043,10 +1041,9 @@ String SwPaM::GetTxt() const
SwNodeIndex aNodeIndex = Start()->nNode;
- /* The first node can be the end node. A first end node must be
- handled, too. There fore do ... while and no incrementing of
- aNodeIndex in the first pass.
- */
+ // The first node can be already the end node.
+ // A first end node must be handled, too. Therefore do-while and no
+ // incrementing of aNodeIndex in the first pass.
bool bFirst = true;
do
{
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index a3e98d3db1ac..6e1098363318 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -54,10 +54,9 @@
#include <breakit.hxx>
#include <crsskip.hxx>
#include <vcl/msgbox.hxx>
-#include <mdiexp.hxx> // ...Percent()
-#include <statstr.hrc> // ResId fuer Statusleiste
-#include <redline.hxx> // SwRedline
-
+#include <mdiexp.hxx>
+#include <statstr.hrc>
+#include <redline.hxx>
using namespace ::com::sun::star::i18n;
@@ -337,7 +336,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
if( pFrm && pFrm->IsValid() && 0 == pFrm->Frm().Height() &&
0 != ( nsSwCursorSelOverFlags::SELOVER_CHANGEPOS & eFlags ) )
{
- // skip to the next / prev valid paragraph with a layout
+ // skip to the next/prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
int bGoNxt = pSavePos->nNode < rPtIdx.GetIndex();
while( 0 != ( pFrm = ( bGoNxt ? pFrm->GetNextCntntFrm()
@@ -345,8 +344,8 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
0 == pFrm->Frm().Height() )
;
- // #i72394# skip to prev /next valid paragraph
- // with a layout in case the first search did not succeed:
+ // #i72394# skip to prev/next valid paragraph with a layout in case
+ // the first search did not succeed:
if( !pFrm )
{
bGoNxt = !bGoNxt;
@@ -361,7 +360,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
SwCntntNode* pCNd;
if( pFrm && 0 != (pCNd = (SwCntntNode*)pFrm->GetNode()) )
{
- // set this cntntNode as new position
+ // set this CntntNode as new position
rPtIdx = *pCNd;
pNd = pCNd;
@@ -465,7 +464,7 @@ sal_Bool SwCursor::IsSelOvr( int eFlags )
::CheckNodesRange( GetMark()->nNode,
GetPoint()->nNode, sal_True ))
{
- // TABLE IN TABLE
+ // table in table
const SwTableNode* pOuterTableNd = pMyNd->FindTableNode();
if ( pOuterTableNd )
pMyNd = pOuterTableNd;
@@ -723,7 +722,7 @@ sal_uLong lcl_FindSelection( SwFindParas& rParas, SwCursor* pCurCrsr,
int bSrchBkwrd = fnMove == fnMoveBackward, bEnde = sal_False;
SwPaM *pTmpCrsr = pCurCrsr, *pSaveCrsr = pCurCrsr;
- // only create progress-bar for ShellCrsr
+ // only create progress bar for ShellCrsr
bool bIsUnoCrsr = 0 != dynamic_cast<SwUnoCrsr*>(pCurCrsr);
_PercentHdl* pPHdl = 0;
sal_uInt16 nCrsrCnt = 0;
@@ -945,7 +944,7 @@ sal_uLong SwCursor::FindAll( SwFindParas& rParas,
// put cursor as copy of current into ring
// chaining points always to first created, so forward
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- std::auto_ptr< SwCursor > pSav( Create( this ) ); // save the current cursor
+ std::auto_ptr< SwCursor > pSav( Create( this ) ); // save the current cursor
SAL_WNODEPRECATED_DECLARATIONS_POP
// if already outside of body text search from this position or start at
@@ -1335,7 +1334,7 @@ sal_Bool SwCursor::SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, con
// set the cursor to the layout position
Point aPt( *pPt );
pLayout->GetCrsrOfst( GetPoint(), aPt );
- } //swmod 071107//swmod 071225
+ } //swmod 071107 //swmod 071225
const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
if( pTxtNd && pBreakIt->GetBreakIter().is() )
@@ -1392,7 +1391,6 @@ sal_Bool SwCursor::SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, con
return bRet;
}
-//-----------------------------------------------------------------------------
static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
{
@@ -1619,9 +1617,9 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
break;
// If we were located inside a covered cell but our position has been
- // corrected, we check if the last move has moved the cursor to a different
- // table cell. In this case we set the cursor to the stored covered position
- // and redo the move:
+ // corrected, we check if the last move has moved the cursor to a
+ // different table cell. In this case we set the cursor to the stored
+ // covered position and redo the move:
if ( mnRowSpanOffset )
{
const SwNode* pOldTabBoxSttNode = aOldNodeIdx.GetNode().FindTableBoxStartNode();
@@ -1795,10 +1793,10 @@ sal_Bool SwCursor::UpDown( sal_Bool bUp, sal_uInt16 nCnt,
if ( bAdjustTableCrsr && !bUp )
{
- // Special case: We have a table cursor but the start box
- // has more than one paragraph. If we want to go down, we have to
- // set the point to the last frame in the table box. This is
- // only necessary if we do not already have a table selection
+ // Special case: We have a table cursor but the start box has more
+ // than one paragraph. If we want to go down, we have to set the
+ // point to the last frame in the table box. This is only necessary
+ // if we do not already have a table selection
const SwStartNode* pTblNd = GetNode( sal_True )->FindTableBoxStartNode();
OSL_ENSURE( pTblNd, "pTblCrsr without SwTableNode?" );
@@ -2011,13 +2009,13 @@ sal_Bool SwCursor::GotoTblBox( const String& rName )
sal_Bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwPosPara fnPosPara )
{
- //for optimization test something before
+ // for optimization test something before
const SwNode* pNd = &GetPoint()->nNode.GetNode();
bool bShortCut = false;
if ( fnWhichPara == fnParaCurr )
{
// #i41048#
- // If fnWhichPara == fnParaCurr, (*fnWhichPara)( *this, fnPosPara )
+ // If fnWhichPara == fnParaCurr then (*fnWhichPara)( *this, fnPosPara )
// can already move the cursor to a different text node. In this case
// we better check if IsSelOvr().
const SwCntntNode* pCntntNd = pNd->GetCntntNode();
@@ -2131,7 +2129,7 @@ sal_Bool lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, sal_uI
SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
{
- if( bChg ) // ???
+ if( bChg )
{
if( bParked )
{
diff --git a/sw/source/core/crsr/trvlcol.cxx b/sw/source/core/crsr/trvlcol.cxx
index c2e6133aa53f..262ab7b87230 100644
--- a/sw/source/core/crsr/trvlcol.cxx
+++ b/sw/source/core/crsr/trvlcol.cxx
@@ -93,7 +93,7 @@ sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol
SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
SwCrsrSaveState aSaveState( *pCurCrsr );
- pCnt->Calc(); // ???
+ pCnt->Calc();
Point aPt( pCnt->Frm().Pos() + pCnt->Prt().Pos() );
if( fnPosCol == GetColumnEnd )
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 90ba1d727c3a..2defc1b7d224 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -223,8 +223,10 @@ sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
}
else
{
- pStt = aCells[ bVert ? (bRow ? 0 : 3) : (bRow ? 2 : 1) ]->GetTabBox(); // will become point of table cursor
- pEnd = aCells[ bVert ? (bRow ? 3 : 0) : (bRow ? 1 : 2) ]->GetTabBox(); // will become mark of table cursor
+ // will become point of table cursor
+ pStt = aCells[ bVert ? (bRow ? 0 : 3) : (bRow ? 2 : 1) ]->GetTabBox();
+ // will become mark of table cursor
+ pEnd = aCells[ bVert ? (bRow ? 3 : 0) : (bRow ? 1 : 2) ]->GetTabBox();
}
}
@@ -280,8 +282,8 @@ sal_Bool SwCrsrShell::SelTbl()
pTblCrsr->GetPoint()->nNode = *pTblNd;
pTblCrsr->Move( fnMoveForward, fnGoCntnt );
pTblCrsr->SetMark();
- // set MkPos 'close' to the master table, otherwise we might get problems with the
- // repeated headlines check in UpdateCrsr():
+ // set MkPos 'close' to the master table, otherwise we might get problems
+ // with the repeated headlines check in UpdateCrsr():
pTblCrsr->GetMkPos() = pMasterTabFrm->IsVertical() ? pMasterTabFrm->Frm().TopRight() : pMasterTabFrm->Frm().TopLeft();
pTblCrsr->GetPoint()->nNode = *pTblNd->EndOfSectionNode();
pTblCrsr->Move( fnMoveBackward, fnGoCntnt );
@@ -344,15 +346,19 @@ sal_Bool SwCrsrShell::SelTblBox()
return sal_True;
}
-// return the next non-protected cell inside a table
-// rIdx - is on a table node
-// return:
-// true - Idx points to content in a suitable cell
-// false - could not find a suitable cell
+// TODO: provide documentation
+/** get the next non-protected cell inside a table
+
+ @param[in,out] rIdx is on a table node
+ @param bInReadOnly ???
+
+ @return <false> if no suitable cell could be found, otherwise <rIdx> points
+ to content in a suitable cell and <true> is returned.
+*/
bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
// check protected cells
- SwNodeIndex aTmp( rIdx, 2 ); // TableNode + StartNode
+ SwNodeIndex aTmp( rIdx, 2 ); // TableNode + StartNode
// the resulting cell should be in that table:
const SwTableNode* pTblNd = rIdx.GetNode().GetTableNode();
@@ -427,10 +433,10 @@ bool lcl_FindNextCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
return true;
}
-// comments see lcl_FindNextCell
+/// see lcl_FindNextCell()
bool lcl_FindPrevCell( SwNodeIndex& rIdx, sal_Bool bInReadOnly )
{
- SwNodeIndex aTmp( rIdx, -2 ); // TableNode + EndNode
+ SwNodeIndex aTmp( rIdx, -2 ); // TableNode + EndNode
const SwNode* pTableEndNode = &rIdx.GetNode();
const SwTableNode* pTblNd = pTableEndNode->StartOfSectionNode()->GetTableNode();
@@ -496,9 +502,8 @@ sal_Bool GotoPrevTable( SwPaM& rCurCrsr, SwPosTable fnPosTbl,
SwTableNode* pTblNd = aIdx.GetNode().FindTableNode();
if( pTblNd )
{
- // #i26532#: If we are inside a table, we may not go backward
- // to the table start node, because we would miss any tables
- // inside this table.
+ // #i26532#: If we are inside a table, we may not go backward to the
+ // table start node, because we would miss any tables inside this table.
SwTableNode* pInnerTblNd = 0;
SwNodeIndex aTmpIdx( aIdx );
while( aTmpIdx.GetIndex() &&
@@ -713,9 +718,8 @@ sal_Bool SwCrsrShell::IsTblComplexForChart()
{
sal_Bool bRet = sal_False;
- StartAction(); // IsTblComplexForChart() may trigger table formatting
- // we better do that inside an action
-
+ // Here we may trigger table formatting so we better do that inside an action
+ StartAction();
const SwTableNode* pTNd = pCurCrsr->GetPoint()->nNode.GetNode().FindTableNode();
if( pTNd )
{
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index a7e2aa62b1d8..95a55210cc77 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -38,13 +38,13 @@
#include <viewimp.hxx>
#include <dview.hxx>
#include <rootfrm.hxx>
-#include <txtfrm.hxx> // SwTxtFrm
+#include <txtfrm.hxx>
#include <docary.hxx>
#include <extinput.hxx>
#include <ndtxt.hxx>
#include <scriptinfo.hxx>
-#include <mdiexp.hxx> // GetSearchDialog
-#include <comcore.hrc> // ResId for query when (switching to?) Search & Replace
+#include <mdiexp.hxx>
+#include <comcore.hrc>
#include <svx/sdr/overlay/overlaymanager.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -73,7 +73,7 @@ SwVisCrsr::SwVisCrsr( const SwCrsrShell * pCShell )
#ifdef SW_CRSR_TIMER
bTimerOn = sal_True;
- SetTimeout( 50 ); // 50 millisecond delay
+ SetTimeout( 50 ); // 50 millisecond delay
#endif
}
@@ -83,7 +83,7 @@ SwVisCrsr::~SwVisCrsr()
{
#ifdef SW_CRSR_TIMER
if( bTimerOn )
- Stop(); // stop timer
+ Stop(); // stop timer
#endif
if( bIsVisible && aTxtCrsr.IsVisible() )
@@ -106,11 +106,11 @@ void SwVisCrsr::Show()
#ifdef SW_CRSR_TIMER
{
if( bTimerOn )
- Start(); // start timer
+ Start(); // start timer
else
{
if( IsActive() )
- Stop(); // stop timer
+ Stop(); // stop timer
_SetPosAndShow();
}
@@ -131,7 +131,7 @@ void SwVisCrsr::Hide()
#ifdef SW_CRSR_TIMER
if( IsActive() )
- Stop(); // stop timer
+ Stop(); // stop timer
#endif
if( aTxtCrsr.IsVisible() ) // Shouldn't the flags be in effect?
@@ -164,7 +164,7 @@ sal_Bool SwVisCrsr::ChgTimerFlag( sal_Bool bFlag )
bOld = bTimerOn;
if( !bFlag && bIsVisible && IsActive() )
{
- Stop(); // stop timer
+ Stop(); // stop timer
_SetPosAndShow();
}
bTimerOn = bFlag;
@@ -263,7 +263,6 @@ void SwVisCrsr::_SetPosAndShow()
}
}
-//////////////////////////////////////////////////////////////////////////////
SwSelPaintRects::SwSelPaintRects( const SwCrsrShell& rCSh )
: SwRects( 0 ),
@@ -347,9 +346,9 @@ void SwSelPaintRects::Show()
if (xTargetOverlay.is())
{
- // #i97672# get the system's highlight color and limit it to the maximum
- // allowed luminance. This is needed to react on too bright highlight colors
- // which would otherwise vive a bad visualisation.
+ // #i97672# get the system's highlight color and limit it to the
+ // maximum allowed luminance. This is needed to react on too bright
+ // highlight colors which would otherwise vive a bad visualisation.
const OutputDevice *pOut = Application::GetDefaultDevice();
Color aHighlight(pOut->GetSettings().GetStyleSettings().GetHighlightColor());
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
@@ -394,12 +393,10 @@ void SwSelPaintRects::Invalidate( const SwRect& rRect )
SwRects::Remove( 0, nSz );
SwRects::Insert( &aReg, 0 );
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// If the selection is to the right or at the bottom, outside the
// visible area, it is never aligned on one pixel at the right/bottom.
// This has to be determined here and if that is the case the
// rectangle has to be expanded.
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if( GetShell()->bVisPortChgd && 0 != ( nSz = Count()) )
{
SwSelPaintRects::Get1PixelInLogic( *GetShell() );
@@ -503,9 +500,8 @@ void SwShellCrsr::Show()
} while( this != ( pTmp = dynamic_cast<SwShellCrsr*>(pTmp->GetNext()) ) );
}
-
- // This rectangle gets painted anew, therefore the SSelection in this
- // area is invalid.
+// This rectangle gets painted anew, therefore the SSelection in this
+// area is invalid.
void SwShellCrsr::Invalidate( const SwRect& rRect )
{
SwShellCrsr * pTmp = this;
@@ -515,7 +511,7 @@ void SwShellCrsr::Invalidate( const SwRect& rRect )
pTmp->SwSelPaintRects::Invalidate( rRect );
// skip any non SwShellCrsr objects in the ring
- // (see:SwAutoFormat::DeleteSel()
+ // see also: SwAutoFormat::DeleteSel()
Ring* pTmpRing = pTmp;
pTmp = 0;
do
@@ -570,7 +566,7 @@ short SwShellCrsr::MaxReplaceArived()
for( nActCnt = aArr[n]; nActCnt--; )
pSh->StartAction();
pSh = (ViewShell*)pSh->GetNext();
- } //swmod 071107//swmod 071225
+ } //swmod 071107 //swmod 071225
}
else
// otherwise from the Basic, and than switch to RET_YES
@@ -590,7 +586,7 @@ sal_Bool SwShellCrsr::UpDown( sal_Bool bUp, sal_uInt16 nCnt )
&GetPtPos(), GetShell()->GetUpDownX() );
}
-// TRUE: The cursor can be set to the position.
+// if <true> than the cursor can be set to the position.
sal_Bool SwShellCrsr::IsAtValidPos( sal_Bool bPoint ) const
{
if( GetShell() && ( GetShell()->IsAllProtect() ||
@@ -640,8 +636,7 @@ void SwShellTableCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
void SwShellTableCrsr::FillRects()
{
- // Calculate the new rectangles.
- // JP 16.01.98: If the cursor is still "parked" do nothing!!
+ // Calculate the new rectangles. If the cursor is still "parked" do nothing
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
return;
@@ -656,7 +651,7 @@ void SwShellTableCrsr::FillRects()
SwNodeIndex aIdx( *pSttNd );
SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
- // TABLE IN TABLE
+ // table in table
// (see also lcl_FindTopLevelTable in unoobj2.cxx for a different
// version to do this)
const SwTableNode* pCurTblNd = pCNd->FindTableNode();
@@ -692,8 +687,7 @@ void SwShellTableCrsr::FillRects()
// Check if the SPoint is within the Table-SSelection.
sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
- // Calculate the new rectangles.
- // JP 16.01.98: If the cursor is still "parked" do nothing!!
+ // Calculate the new rectangles. If the cursor is still "parked" do nothing
if( !aSelBoxes.Count() || bParked ||
!GetPoint()->nNode.GetIndex() )
return sal_False;