Kaydet (Commit) 7cb8b8c8 authored tarafından Philipp Riemer's avatar Philipp Riemer

work on existing comments in sw/source/core/edit

Change-Id: I32b249971ac6ac540d816c38e00321befb181901
üst ce6cb1db
......@@ -271,13 +271,14 @@ sal_Bool SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const Str
return sal_True;
}
// Return the text of a previous paragraph
// This must not be empty!
// Does this not exists or there are only blankness, then return 0
// The Flag specifies:
// sal_True: that, before the normal insert position
//sal_False: that, in which the corrected word was inserted.
// (Doesn't need to be the same paragraph!!!!)
/** Return the text of a previous paragraph
*
* This must not be empty!
*
* @param bAtNormalPos If <true> before the normal insert position; if <false> in which the
* corrected word was inserted. (Doesn't need to be the same paragraph!)
* @return text or 0, if previous paragraph does not exists or there are only blankness
*/
const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos )
{
const String* pStr = 0;
......
......@@ -47,7 +47,7 @@
#include <pam.hxx>
#include <edimp.hxx>
#include <fesh.hxx>
#include <swundo.hxx> // for the UndoId's
#include <swundo.hxx> // for the UndoIds
#include <poolfmt.hxx>
#include <ndtxt.hxx>
#include <txtfrm.hxx>
......@@ -99,7 +99,7 @@ class SwAutoFormat
SwTxtNode* pAktTxtNd; // the current TextNode
SwTxtFrm* pAktTxtFrm; // frame of the current TextNode
CharClass* pCharClass; // Character classification
sal_uLong nEndNdIdx; // for the percentage-display
sal_uLong nEndNdIdx; // for the percentage-display
LanguageType eCharClassLang;
sal_uInt16 nLastHeadLvl, nLastCalcHeadLvl;
......@@ -182,7 +182,7 @@ class SwAutoFormat
sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, xub_StrLen& rPos,
String* pPreFix = 0, String* pPostFix = 0,
String* pNumTypes = 0 ) const;
// get the FORMATED TextFrame
/// get the FORMATED TextFrame
SwTxtFrm* GetFrm( const SwTxtNode& rTxtNd ) const;
void BuildIndent();
......@@ -196,15 +196,15 @@ class SwAutoFormat
bool HasBreakAttr( const SwTxtNode& ) const;
void DeleteSel( SwPaM& rPam );
bool DeleteAktNxtPara( const String& rNxtPara );
// delete in the node start and/or end
/// delete in the node start and/or end
void DeleteAktPara( bool bStart = true, bool nEnd = true );
void DelEmptyLine( bool bTstNextPara = true );
// when using multiline paragraphs delete the "left" and/or
// "right" margins
/// when using multiline paragraphs delete the "left" and/or
/// "right" margins
void DelMoreLinesBlanks( bool bWithLineBreaks = false );
// delete the previous paragraph
/// delete the previous paragraph
void DelPrevPara();
// execute AutoCorrect on current TextNode
/// execute AutoCorrect on current TextNode
void AutoCorrect( xub_StrLen nSttPos = 0 );
bool CanJoin( const SwTxtNode* pTxtNd ) const
......@@ -218,7 +218,7 @@ class SwAutoFormat
!HasBreakAttr( *pTxtNd );
}
// is a dot at the end ??
/// is a dot at the end ??
bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const;
bool DoUnderline();
......@@ -281,7 +281,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
case STR_AUTOFMTREDL_SET_NUMBULET:
case STR_AUTOFMTREDL_DEL_MORELINES:
// AutoCorrect-Actions
// AutoCorrect actions
case STR_AUTOFMTREDL_USE_REPLACE:
case STR_AUTOFMTREDL_CPTL_STT_WORD:
case STR_AUTOFMTREDL_CPTL_STT_SENT:
......@@ -308,7 +308,7 @@ String SwAutoFormat::GoNextPara()
{
SwNode* pNewNd = 0;
do {
//has to be checed twice before and after incrementation
// has to be checked twice before and after incrementation
if( aNdIdx.GetIndex() >= aEndNdIdx.GetIndex() )
{
bEnde = true;
......@@ -772,7 +772,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
sal_uInt16 nStart = 0;
sal_uInt8 nDigitLvl = 0, nDigitCnt = 0;
//count number of parenthesis to assure a sensible order is found
// count number of parenthesis to assure a sensible order is found
sal_uInt16 nOpeningParentheses = 0;
sal_uInt16 nClosingParentheses = 0;
......@@ -823,7 +823,7 @@ sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos,
// Roman numbers are "mdclxvi". Since we want to start numbering with c or d more often,
// convert first to characters and later to roman numbers if needed.
#ifdef WITH_ALPHANUM_AS_NUMFMT
//detection of 'c' and 'd' a ROMAN numbering should not be done here
// detection of 'c' and 'd' a ROMAN numbering should not be done here
if( 256 > cLow &&( (eScan & (LOWER_ROMAN|UPPER_ROMAN))
? strchr( "mdclxvi", cLow )
: strchr( "mlxvi", cLow ) ))
......
......@@ -28,7 +28,7 @@
/**
/*
* hard formatting (Attribute)
*/
......@@ -87,9 +87,7 @@ void SwEditShell::GCAttr()
FOREACHPAM_END()
}
// Set the attribute as new default attribute in the document.
/// Set the attribute as new default attribute in the document.
void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint )
{
// 7502: Action-Parenthesis
......@@ -98,8 +96,7 @@ void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint )
EndAllAction();
}
// Inquire the Default Attribut in this document.
/// request the default attribute in this document.
const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const
{
return GetDoc()->GetDefault( nFmtHint );
......
......@@ -47,7 +47,7 @@
#include <algorithm>
/**
/*
* hard Formatting (Attributes)
*/
......@@ -327,7 +327,7 @@ bool SwEditShell::HasFtns( bool bEndNotes ) const
}
// Give a List of all footnotes and their beginning texts
/// Give a List of all footnotes and their beginning texts
sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
{
rList.Clear();
......@@ -368,7 +368,7 @@ sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes )
}
// Adjust left margin via object bar (similar to adjustment of numerations).
/// Adjust left margin via object bar (similar to adjustment of numerations).
bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const
{
bool bRet = true;
......@@ -525,7 +525,7 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
}
// returns the scripttpye of the selection
/// returns the script type of the selection
sal_uInt16 SwEditShell::GetScriptType() const
{
sal_uInt16 nRet = 0;
......
......@@ -150,7 +150,7 @@ SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId )
}
// return the demanded automatic format - base-class !
/// return the requested automatic format - base-class !
SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId )
{
return GetDoc()->GetFmtFromPool( nId );
......
......@@ -491,7 +491,7 @@ sal_uInt16 SwEditShell::GetRefMarks( std::vector<OUString>* pStrings ) const
String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const
{
/**
/*
* pb: made changes for #i74939#
*
* always return a string even though there is a selection
......@@ -806,14 +806,14 @@ void SwEditShell::SetNumberingRestart()
{
StartAllAction();
Push();
//iterate over all text contents - body, frames, header, footer, footnote text
// iterate over all text contents - body, frames, header, footer, footnote text
SwPaM* pCrsr = GetCrsr();
for(sal_uInt16 i = 0; i < 2; i++)
{
if(!i)
MakeFindRange(DOCPOS_START, DOCPOS_END, pCrsr); //body content
MakeFindRange(DOCPOS_START, DOCPOS_END, pCrsr); // body content
else
MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); //extra content
MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); // extra content
SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End();
sal_uLong nCurrNd = pSttPos->nNode.GetIndex();
sal_uLong nEndNd = pEndPos->nNode.GetIndex();
......@@ -821,7 +821,7 @@ void SwEditShell::SetNumberingRestart()
{
SwCntntFrm* pCntFrm;
bool bGoOn = true;
//iterate over all paragraphs
// iterate over all paragraphs
while( bGoOn )
{
SwNode* pNd = GetDoc()->GetNodes()[ nCurrNd ];
......@@ -830,13 +830,13 @@ void SwEditShell::SetNumberingRestart()
case ND_TEXTNODE:
if( 0 != ( pCntFrm = ((SwTxtNode*)pNd)->getLayoutFrm( GetLayout() )) )
{
//jump over hidden frames - ignore protection!
// skip hidden frames - ignore protection!
if( !((SwTxtFrm*)pCntFrm)->IsHiddenNow() )
{
//if the node is numbered and the starting value of the numbering equals the
//start value of the numbering rule then set this value as hard starting value
// if the node is numbered and the starting value of the numbering equals the
// start value of the numbering rule then set this value as hard starting value
//get the node num
// get the node num
// OD 2005-11-09
SwTxtNode* pTxtNd( static_cast<SwTxtNode*>(pNd) );
SwNumRule* pNumRule( pTxtNd->GetNumRule() );
......@@ -848,7 +848,7 @@ void SwEditShell::SetNumberingRestart()
pTxtNd->GetNum()->GetNumber() ==
pNumRule->Get( static_cast<sal_uInt16>(pTxtNd->GetActualListLevel()) ).GetStart() )
{
//now set a the start value as attribute
// now set a the start value as attribute
SwPosition aCurrentNode(*pNd);
GetDoc()->SetNumRuleStart( aCurrentNode, sal_True );
}
......@@ -856,7 +856,7 @@ void SwEditShell::SetNumberingRestart()
}
break;
case ND_SECTIONNODE:
// jump over hidden sections - ignore protection!
// skip hidden sections - ignore protection!
if(((SwSectionNode*)pNd)->GetSection().IsHidden() )
nCurrNd = pNd->EndOfSectionIndex();
break;
......
This diff is collapsed.
......@@ -178,8 +178,7 @@ sal_Bool SwEditShell::SelectionHasNumber() const
{
bResult = pTxtNd->HasNumber();
// --> OD 2005-10-26 #b6340308#
// special case: outline numbered, not counted paragraph
// #b6340308# special case: outline numbered, not counted paragraph
if ( bResult &&
pTxtNd->GetNumRule() == GetDoc()->GetOutlineNumRule() &&
!pTxtNd->IsCountedInList() )
......@@ -189,7 +188,6 @@ sal_Bool SwEditShell::SelectionHasNumber() const
if (bResult==sal_False) {
break;
}
// <--
}
}
}
......@@ -199,7 +197,8 @@ sal_Bool SwEditShell::SelectionHasNumber() const
return bResult;
}
//Sym3_879 add a new function to determine number on/off status
// add a new function to determine number on/off status
sal_Bool SwEditShell::SelectionHasBullet() const
{
sal_Bool bResult = HasBullet();
......
......@@ -122,8 +122,10 @@ void SwEditShell::UpdateRedlineAttr()
}
}
// Search the Redline of this data and return the Pos of the Array
// return USHRT_MAX if not present
/** Search the Redline of the data given
*
* @return Returns the Pos of the Array, or USHRT_MAX if not present
*/
sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const
{
const SwRedlineTbl& rTbl = GetDoc()->GetRedlineTbl();
......
......@@ -78,10 +78,9 @@ const SwSection* SwEditShell::GetCurrSection() const
return GetDoc()->GetCurrSection( *GetCrsr()->GetPoint() );
}
/**
* SwEditShell::GetAnySection delivers the responsible area
* of the columns, in footnotes it may not be the
* area within the footnote.
/** Deliver the responsible area of the columns.
*
* In footnotes it may not be the area within the footnote.
*/
const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pPt ) const
......@@ -254,9 +253,10 @@ void SwEditShell::_SetSectionAttr( SwSectionFmt& rSectFmt,
EndAllAction();
}
// search inside the cursor selection for full selected sections.
// if any part of section in the selection return 0.
// if more than one in the selection return the count
/** Search inside the cursor selection for full selected sections.
*
* @return If any part of section in the selection return 0, if more than one return the count.
*/
sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
{
sal_uInt16 nRet = 0;
......@@ -298,8 +298,8 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const
}
/**
* Find the suitable node for a special insert (alt-enter).
/** Find the suitable node for a special insert (alt-enter).
*
* This should enable inserting text before/after sections and tables.
*
* A node is found if:
......@@ -407,8 +407,7 @@ bool SwEditShell::CanSpecialInsert() const
return NULL != lcl_SpecialInsertNode( GetCrsr()->GetPoint() );
}
/** check whether a node cen be special-inserted (alt-Enter), and do so. Return
/** check whether a node can be special-inserted (alt-Enter), and do so. Return
whether insertion was possible.
*/
bool SwEditShell::DoSpecialInsert()
......
......@@ -103,9 +103,8 @@ const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts
GetDoc()->SplitNode( *pPos, false );
}
/* If called from a shell the adjust item is propagated
from pPos to the new content nodes in the table.
*/
// If called from a shell the adjust item is propagated
// from pPos to the new content nodes in the table.
const SwTable *pTable = GetDoc()->InsertTable( rInsTblOpts, *pPos,
nRows, nCols,
eAdj, pTAFmt,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment