Kaydet (Commit) e7540ede authored tarafından Philipp Riemer's avatar Philipp Riemer Kaydeden (comit) Bjoern Michaelsen

fdo#39468: translate German comments (=> sw/source/core/crsr)

(removed some old internal StarDivision bug-refs)

Conflicts:

	sw/source/core/crsr/findtxt.cxx
	sw/source/core/crsr/pam.cxx

Change-Id: Ib88500bf3cae5f6d8cfccd50769c27819999c5fe
üst 32a254be
...@@ -235,7 +235,7 @@ SwCallLink::~SwCallLink() ...@@ -235,7 +235,7 @@ SwCallLink::~SwCallLink()
0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() ) 0 != ( pFlyFrm = pFrm->FindFlyFrm() ) && !rShell.IsTableMode() )
{ {
const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx(); const SwNodeIndex* pIndex = pFlyFrm->GetFmt()->GetCntnt().GetCntntIdx();
OSL_ENSURE( pIndex, "Fly ohne Cntnt" ); OSL_ENSURE( pIndex, "Fly without Cntnt" );
if (!pIndex) if (!pIndex)
return; return;
......
...@@ -111,7 +111,7 @@ namespace ...@@ -111,7 +111,7 @@ namespace
EndAction(); EndAction();
return pMark; return pMark;
} }
// setzt CurCrsr.SPoint // set CurCrsr.SPoint
bool SwCrsrShell::GotoMark(const ::sw::mark::IMark* const pMark, bool bAtStart) bool SwCrsrShell::GotoMark(const ::sw::mark::IMark* const pMark, bool bAtStart)
{ {
......
This diff is collapsed.
This diff is collapsed.
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
#include <SwRewriter.hxx> #include <SwRewriter.hxx>
#include <comcore.hrc> #include <comcore.hrc>
//------------------ Methoden der CrsrShell --------------------------- /// parameters for a search for FormatCollections
// Parameter fuer das Suchen vom FormatCollections
struct SwFindParaFmtColl : public SwFindParas struct SwFindParaFmtColl : public SwFindParas
{ {
const SwTxtFmtColl *pFmtColl, *pReplColl; const SwTxtFmtColl *pFmtColl, *pReplColl;
...@@ -77,15 +75,12 @@ int SwFindParaFmtColl::IsReplaceMode() const ...@@ -77,15 +75,12 @@ int SwFindParaFmtColl::IsReplaceMode() const
return 0 != pReplColl; return 0 != pReplColl;
} }
/// search for Format-Collections
// Suchen nach Format-Collections
sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl, sal_uLong SwCursor::Find( const SwTxtFmtColl& rFmtColl,
SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel, SwDocPositions nStart, SwDocPositions nEnde, sal_Bool& bCancel,
FindRanges eFndRngs, const SwTxtFmtColl* pReplFmtColl ) FindRanges eFndRngs, const SwTxtFmtColl* pReplFmtColl )
{ {
// OLE-Benachrichtigung abschalten !! // switch off OLE-notifications
SwDoc* pDoc = GetDoc(); SwDoc* pDoc = GetDoc();
Link aLnk( pDoc->GetOle2Link() ); Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() ); pDoc->SetOle2Link( Link() );
......
...@@ -37,7 +37,7 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove, ...@@ -37,7 +37,7 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
sal_Bool bSrchForward = fnMove == fnMoveForward; sal_Bool bSrchForward = fnMove == fnMoveForward;
SwPaM* pPam = MakeRegion( fnMove, pRegion ); SwPaM* pPam = MakeRegion( fnMove, pRegion );
// Wenn am Anfang/Ende, aus dem Node moven // if at beginning/end then move it out of the node
if( bSrchForward if( bSrchForward
? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len() ? pPam->GetPoint()->nContent.GetIndex() == pPam->GetCntntNode()->Len()
: !pPam->GetPoint()->nContent.GetIndex() ) : !pPam->GetPoint()->nContent.GetIndex() )
...@@ -59,18 +59,19 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove, ...@@ -59,18 +59,19 @@ sal_Bool SwPaM::Find( const SwFmt& rFmt, SwMoveFn fnMove,
{ {
if( 0 != ( bFound = (pNode->GetFmtColl() == &rFmt) )) if( 0 != ( bFound = (pNode->GetFmtColl() == &rFmt) ))
{ {
// wurde die FormatCollection gefunden, dann handelt es sich auf // if a FormatCollection is found then it is definitely a SwCntntNode
// jedenfall um einen SwCntntNode !!
// FORWARD: SPoint an das Ende, GetMark zum Anfanf vom Node // FORWARD: SPoint at the end, GetMark at the beginning of the node
// BACKWARD: SPoint zum Anfang, GetMark an das Ende vom Node // BACKWARD: SPoint at the beginning, GetMark at the end of the node
// und immer nach der Logik: inkl. Start, exkl. End !!! // always: incl. start and incl. end
*GetPoint() = *pPam->GetPoint(); *GetPoint() = *pPam->GetPoint();
SetMark(); SetMark();
pNode->MakeEndIndex( &GetPoint()->nContent ); pNode->MakeEndIndex( &GetPoint()->nContent );
GetMark()->nContent = 0; GetMark()->nContent = 0;
if( !bSrchForward ) // rueckwaerts Suche?
Exchange(); // SPoint und GetMark tauschen // if backward search, switch point and mark
if( !bSrchForward )
Exchange();
break; break;
} }
} }
......
...@@ -132,15 +132,14 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart, ...@@ -132,15 +132,14 @@ String& lcl_CleanStr( const SwTxtNode& rNd, xub_StrLen nStart,
case RES_TXTATR_META: case RES_TXTATR_META:
case RES_TXTATR_METAFIELD: case RES_TXTATR_METAFIELD:
{ {
// JP 06.05.98: mit Bug 50100 werden sie als Trenner erwuenscht und nicht // (1998) they are desired as separators and
// mehr zum Wort dazu gehoerend. // belong not any longer to a word.
// MA 23.06.98: mit Bug 51215 sollen sie konsequenterweise auch am // they should also be ignored at a
// Satzanfang und -ende ignoriert werden wenn sie Leer sind. // beginning/end of a sentence if blank. Those are
// Dazu werden sie schlicht entfernt. Fuer den Anfang entfernen // simply removed if first. If at the end, we keep the
// wir sie einfach. // replacement and remove afterwards all at a string's
// Fuer das Ende merken wir uns die Ersetzungen und entferenen // end (might be normal 0x7f).
// hinterher alle am Stringende (koenten ja 'normale' 0x7f drinstehen sal_Bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
sal_Bool bEmpty = RES_TXTATR_FIELD != pHt->Which() ||
!(static_cast<SwTxtFld const*>(pHt) !(static_cast<SwTxtFld const*>(pHt)
->GetFld().GetFld()->ExpandField(true).Len()); ->GetFld().GetFld()->ExpandField(true).Len());
if ( bEmpty && nStart == nAkt ) if ( bEmpty && nStart == nAkt )
...@@ -233,8 +232,7 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes ...@@ -233,8 +232,7 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode; SwNodeIndex& rNdIdx = pPam->GetPoint()->nNode;
SwIndex& rCntntIdx = pPam->GetPoint()->nContent; SwIndex& rCntntIdx = pPam->GetPoint()->nContent;
// Wenn am Anfang/Ende, aus dem Node moven // If a beginning/end, from out of node; stop if empty node
// beim leeren Node nicht weiter
if( bSrchForward if( bSrchForward
? ( rCntntIdx.GetIndex() == pPam->GetCntntNode()->Len() && ? ( rCntntIdx.GetIndex() == pPam->GetCntntNode()->Len() &&
rCntntIdx.GetIndex() ) rCntntIdx.GetIndex() )
...@@ -250,14 +248,9 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes ...@@ -250,14 +248,9 @@ sal_uInt8 SwPaM::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNotes
rCntntIdx.Assign( pNd, nTmpPos ); rCntntIdx.Assign( pNd, nTmpPos );
} }
/* // If bFound is true then the string was found and is between nStart and nEnd
* Ist bFound == sal_True, dann wurde der String gefunden und in
* nStart und nEnde steht der gefundenen String
*/
sal_Bool bFound = sal_False; sal_Bool bFound = sal_False;
/* // start position in text or initial position
* StartPostion im Text oder Anfangsposition
*/
sal_Bool bFirst = sal_True; sal_Bool bFirst = sal_True;
SwCntntNode * pNode; SwCntntNode * pNode;
...@@ -487,15 +480,15 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, ...@@ -487,15 +480,15 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
if( nSearchScript == nCurrScript && if( nSearchScript == nCurrScript &&
(rSTxt.*fnMove->fnSearch)( sCleanStr, &nStart, &nEnde, 0 )) (rSTxt.*fnMove->fnSearch)( sCleanStr, &nStart, &nEnde, 0 ))
{ {
// setze den Bereich richtig // set section correctly
*GetPoint() = *pPam->GetPoint(); *GetPoint() = *pPam->GetPoint();
SetMark(); SetMark();
// Start und Ende wieder korrigieren !! // adjust start and end
if( !aFltArr.empty() ) if( !aFltArr.empty() )
{ {
xub_StrLen n, nNew; xub_StrLen n, nNew;
// bei Rueckwaertssuche die Positionen temp. vertauschen // if backward search, switch positions temporarily
if( !bSrchForward ) { n = nStart; nStart = nEnde; nEnde = n; } if( !bSrchForward ) { n = nStart; nStart = nEnde; nEnde = n; }
for( n = 0, nNew = nStart; for( n = 0, nNew = nStart;
...@@ -509,14 +502,15 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, ...@@ -509,14 +502,15 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
; ;
nEnde = nNew; nEnde = nNew;
// bei Rueckwaertssuche die Positionen temp. vertauschen // if backward search, switch positions temporarily
if( !bSrchForward ) { n = nStart; nStart = nEnde; nEnde = n; } if( !bSrchForward ) { n = nStart; nStart = nEnde; nEnde = n; }
} }
GetMark()->nContent = nStart; // Startposition setzen GetMark()->nContent = nStart;
GetPoint()->nContent = nEnde; GetPoint()->nContent = nEnde;
if( !bSrchForward ) // rueckwaerts Suche? // if backward search, switch point and mark
Exchange(); // Point und Mark tauschen if( !bSrchForward )
Exchange();
bFound = sal_True; bFound = sal_True;
break; break;
} }
...@@ -548,7 +542,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt, ...@@ -548,7 +542,7 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
return bFound; return bFound;
} }
// Parameter fuers Suchen und Ersetzen von Text /// parameters for search and replace in text
struct SwFindParaText : public SwFindParas struct SwFindParaText : public SwFindParas
{ {
const SearchOptions& rSearchOpt; const SearchOptions& rSearchOpt;
...@@ -578,14 +572,13 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, ...@@ -578,14 +572,13 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
sal_Bool bFnd = (sal_Bool)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly ); sal_Bool bFnd = (sal_Bool)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
if( bFnd && bReplace ) // String ersetzen ?? if( bFnd && bReplace ) // replace string
{ {
// Replace-Methode vom SwDoc benutzen // use replace method in SwDoc
const bool bRegExp(SearchAlgorithms_REGEXP == rSearchOpt.algorithmType); const bool bRegExp(SearchAlgorithms_REGEXP == rSearchOpt.algorithmType);
SwIndex& rSttCntIdx = pCrsr->Start()->nContent; SwIndex& rSttCntIdx = pCrsr->Start()->nContent;
xub_StrLen nSttCnt = rSttCntIdx.GetIndex(); xub_StrLen nSttCnt = rSttCntIdx.GetIndex();
// damit die Region auch verschoben wird, in den Shell-Cursr-Ring // add to shell-cursor-ring so that the regions will be moved enventually
// mit aufnehmen !!
Ring *pPrev(0); Ring *pPrev(0);
if( bRegExp ) if( bRegExp )
{ {
...@@ -602,7 +595,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, ...@@ -602,7 +595,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
if( bRegExp ) if( bRegExp )
{ {
// und die Region wieder herausnehmen: // and remove region again
Ring *p, *pNext = (Ring*)pRegion; Ring *p, *pNext = (Ring*)pRegion;
do { do {
p = pNext; p = pNext;
...@@ -628,7 +621,7 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNot ...@@ -628,7 +621,7 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNot
sal_Bool& bCancel, sal_Bool& bCancel,
FindRanges eFndRngs, int bReplace ) FindRanges eFndRngs, int bReplace )
{ {
// OLE-Benachrichtigung abschalten !! // switch off OLE-notifications
SwDoc* pDoc = GetDoc(); SwDoc* pDoc = GetDoc();
Link aLnk( pDoc->GetOle2Link() ); Link aLnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() ); pDoc->SetOle2Link( Link() );
......
This diff is collapsed.
...@@ -62,7 +62,7 @@ SwWhichSection fnSectionNext = &GoNextSection; ...@@ -62,7 +62,7 @@ SwWhichSection fnSectionNext = &GoNextSection;
SwPosSection fnSectionStart = &aFwrd; SwPosSection fnSectionStart = &aFwrd;
SwPosSection fnSectionEnd = &aBwrd; SwPosSection fnSectionEnd = &aBwrd;
// Travelling in Tabellen // Travelling in tables
sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); sal_Bool GotoPrevTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); sal_Bool GotoCurrTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly ); sal_Bool GotoNextTable( SwPaM&, SwPosTable, sal_Bool bInReadOnly );
...@@ -73,7 +73,7 @@ SwWhichTable fnTableNext = &GotoNextTable; ...@@ -73,7 +73,7 @@ SwWhichTable fnTableNext = &GotoNextTable;
SwPosTable fnTableStart = &aFwrd; SwPosTable fnTableStart = &aFwrd;
SwPosTable fnTableEnd = &aBwrd; SwPosTable fnTableEnd = &aBwrd;
// Travelling in Bereichen // Travelling in regions
sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); sal_Bool GotoPrevRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); sal_Bool GotoCurrRegion( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly ); sal_Bool GotoCurrRegionAndSkip( SwPaM&, SwPosRegion, sal_Bool bInReadOnly );
......
This diff is collapsed.
...@@ -90,7 +90,7 @@ sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol ...@@ -90,7 +90,7 @@ sal_Bool SwCrsrShell::MoveColumn( SwWhichColumn fnWhichCol, SwPosColumn fnPosCol
if( pCnt ) if( pCnt )
{ {
SET_CURR_SHELL( this ); SET_CURR_SHELL( this );
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen SwCallLink aLk( *this ); // watch Crsr-Moves; call Link if needed
SwCrsrSaveState aSaveState( *pCurCrsr ); SwCrsrSaveState aSaveState( *pCurCrsr );
pCnt->Calc(); // ??? pCnt->Calc(); // ???
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr ) sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
{ {
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, SwCallLink aLk( *this ); // watch Crsr-Moves
SwCursor* pCrsr = getShellCrsr( true ); SwCursor* pCrsr = getShellCrsr( true );
sal_Bool bRet = (pCrsr->*fnCrsr)(); sal_Bool bRet = (pCrsr->*fnCrsr)();
if( bRet ) if( bRet )
...@@ -48,7 +48,7 @@ sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr ) ...@@ -48,7 +48,7 @@ sal_Bool SwCrsrShell::CallCrsrFN( FNCrsr fnCrsr )
sal_Bool SwCursor::GotoFtnTxt() sal_Bool SwCursor::GotoFtnTxt()
{ {
// springe aus dem Content zur Fussnote // jump from content to footnote
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode(); SwTxtNode* pTxtNd = GetPoint()->nNode.GetNode().GetTxtNode();
...@@ -124,11 +124,11 @@ sal_Bool SwCrsrShell::GotoFtnTxt() ...@@ -124,11 +124,11 @@ sal_Bool SwCrsrShell::GotoFtnTxt()
sal_Bool SwCursor::GotoFtnAnchor() sal_Bool SwCursor::GotoFtnAnchor()
{ {
// springe aus der Fussnote zum Anker // jump from footnote to anchor
const SwNode* pSttNd = GetNode()->FindFootnoteStartNode(); const SwNode* pSttNd = GetNode()->FindFootnoteStartNode();
if( pSttNd ) if( pSttNd )
{ {
// durchsuche alle Fussnoten im Dokument nach diesem StartIndex // search in all footnotes in document for this StartIndex
const SwTxtFtn* pTxtFtn; const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pSttNd->GetDoc()->GetFtnIdxs(); const SwFtnIdxs& rFtnArr = pSttNd->GetDoc()->GetFtnIdxs();
for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n ) for( sal_uInt16 n = 0; n < rFtnArr.Count(); ++n )
...@@ -151,12 +151,12 @@ sal_Bool SwCursor::GotoFtnAnchor() ...@@ -151,12 +151,12 @@ sal_Bool SwCursor::GotoFtnAnchor()
sal_Bool SwCrsrShell::GotoFtnAnchor() sal_Bool SwCrsrShell::GotoFtnAnchor()
{ {
// springe aus der Fussnote zum Anker // jump from footnote to anchor
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, SwCallLink aLk( *this ); // watch Crsr-Moves
sal_Bool bRet = pCurCrsr->GotoFtnAnchor(); sal_Bool bRet = pCurCrsr->GotoFtnAnchor();
if( bRet ) if( bRet )
{ {
// BUG 5996: Tabellen-Kopfzeile sonderbehandeln // special treatment for table header row
pCurCrsr->GetPtPos() = Point(); pCurCrsr->GetPtPos() = Point();
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY ); SwCrsrShell::READONLY );
...@@ -183,15 +183,14 @@ sal_Bool SwCursor::GotoNextFtnAnchor() ...@@ -183,15 +183,14 @@ sal_Bool SwCursor::GotoNextFtnAnchor()
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos )) if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ))
{ {
// es gibt eine Fussnote mit dem Index, suche also die // there is a footnote with this index, so search also for the next one
// naechstgelegene
if( nPos < rFtnArr.Count() ) if( nPos < rFtnArr.Count() )
{ {
sal_uLong nNdPos = GetPoint()->nNode.GetIndex(); sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex(); xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ]; pTxtFtn = rFtnArr[ nPos ];
// suche vorewaerts zur naechsten // search forwards
if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) ) if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
{ {
pTxtFtn = 0; pTxtFtn = 0;
...@@ -199,13 +198,13 @@ sal_Bool SwCursor::GotoNextFtnAnchor() ...@@ -199,13 +198,13 @@ sal_Bool SwCursor::GotoNextFtnAnchor()
{ {
pTxtFtn = rFtnArr[ nPos ]; pTxtFtn = rFtnArr[ nPos ];
if( !CmpLE( *pTxtFtn, nNdPos, nCntPos ) ) if( !CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
break; // gefunden break; // found
pTxtFtn = 0; pTxtFtn = 0;
} }
} }
else if( nPos ) else if( nPos )
{ {
// suche rueckwaerts zur vorherigen // search backwards
pTxtFtn = 0; pTxtFtn = 0;
while( nPos ) while( nPos )
{ {
...@@ -213,7 +212,7 @@ sal_Bool SwCursor::GotoNextFtnAnchor() ...@@ -213,7 +212,7 @@ sal_Bool SwCursor::GotoNextFtnAnchor()
if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) ) if( CmpLE( *pTxtFtn, nNdPos, nCntPos ) )
{ {
pTxtFtn = rFtnArr[ ++nPos ]; pTxtFtn = rFtnArr[ ++nPos ];
break; // gefunden break; // found
} }
} }
} }
...@@ -243,13 +242,12 @@ sal_Bool SwCursor::GotoPrevFtnAnchor() ...@@ -243,13 +242,12 @@ sal_Bool SwCursor::GotoPrevFtnAnchor()
if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ) ) if( rFtnArr.SeekEntry( GetPoint()->nNode, &nPos ) )
{ {
// es gibt eine Fussnote mit dem Index, suche also die // there is a footnote with this index, so search also for the next one
// naechstgelegene
sal_uLong nNdPos = GetPoint()->nNode.GetIndex(); sal_uLong nNdPos = GetPoint()->nNode.GetIndex();
xub_StrLen nCntPos = GetPoint()->nContent.GetIndex(); xub_StrLen nCntPos = GetPoint()->nContent.GetIndex();
pTxtFtn = rFtnArr[ nPos ]; pTxtFtn = rFtnArr[ nPos ];
// suche vorwaerts zur naechsten // search forwards
if( CmpL( *pTxtFtn, nNdPos, nCntPos )) if( CmpL( *pTxtFtn, nNdPos, nCntPos ))
{ {
for( ++nPos; nPos < rFtnArr.Count(); ++nPos ) for( ++nPos; nPos < rFtnArr.Count(); ++nPos )
...@@ -264,13 +262,13 @@ sal_Bool SwCursor::GotoPrevFtnAnchor() ...@@ -264,13 +262,13 @@ sal_Bool SwCursor::GotoPrevFtnAnchor()
} }
else if( nPos ) else if( nPos )
{ {
// suche rueckwaerts zur vorherigen // search backwards
pTxtFtn = 0; pTxtFtn = 0;
while( nPos ) while( nPos )
{ {
pTxtFtn = rFtnArr[ --nPos ]; pTxtFtn = rFtnArr[ --nPos ];
if( CmpL( *pTxtFtn, nNdPos, nCntPos )) if( CmpL( *pTxtFtn, nNdPos, nCntPos ))
break; // gefunden break; // found
pTxtFtn = 0; pTxtFtn = 0;
} }
} }
...@@ -303,9 +301,7 @@ sal_Bool SwCrsrShell::GotoPrevFtnAnchor() ...@@ -303,9 +301,7 @@ sal_Bool SwCrsrShell::GotoPrevFtnAnchor()
return CallCrsrFN( &SwCursor::GotoPrevFtnAnchor ); return CallCrsrFN( &SwCursor::GotoPrevFtnAnchor );
} }
// springe aus dem Rahmen zum Anker /// jump from border to anchor
sal_Bool SwCrsrShell::GotoFlyAnchor() sal_Bool SwCrsrShell::GotoFlyAnchor()
{ {
SET_CURR_SHELL( this ); SET_CURR_SHELL( this );
...@@ -314,13 +310,13 @@ sal_Bool SwCrsrShell::GotoFlyAnchor() ...@@ -314,13 +310,13 @@ sal_Bool SwCrsrShell::GotoFlyAnchor()
pFrm = pFrm->GetUpper(); pFrm = pFrm->GetUpper();
} while( pFrm && !pFrm->IsFlyFrm() ); } while( pFrm && !pFrm->IsFlyFrm() );
if( !pFrm ) // ist kein FlyFrame if( !pFrm ) // no FlyFrame
return sal_False; return sal_False;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, SwCallLink aLk( *this ); // watch Crsr-Moves
SwCrsrSaveState aSaveState( *pCurCrsr ); SwCrsrSaveState aSaveState( *pCurCrsr );
// springe in den BodyFrame, der am naechsten vom Fly liegt // jump in BodyFrame closest to FlyFrame
SwRect aTmpRect( aCharRect ); SwRect aTmpRect( aCharRect );
if( !pFrm->Frm().IsInside( aTmpRect )) if( !pFrm->Frm().IsInside( aTmpRect ))
aTmpRect = pFrm->Frm(); aTmpRect = pFrm->Frm();
......
...@@ -42,13 +42,13 @@ sal_Bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, ...@@ -42,13 +42,13 @@ sal_Bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
0 == ( pNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) ) 0 == ( pNd = aIdx.GetNode().StartOfSectionNode()->GetSectionNode()) )
aIdx--; aIdx--;
if( pNd ) // gibt einen weiteren SectionNode ? if( pNd ) // is there another section node?
{ {
if( pNd->GetSection().IsHiddenFlag() || if( pNd->GetSection().IsHiddenFlag() ||
( !bInReadOnly && ( !bInReadOnly &&
pNd->GetSection().IsProtectFlag() )) pNd->GetSection().IsProtectFlag() ))
{ {
// geschuetzte/versteckte ueberspringen wir // skip protected or hidden ones
aIdx.Assign( *pNd, - 1 ); aIdx.Assign( *pNd, - 1 );
} }
else if( fnPosRegion == fnMoveForward ) else if( fnPosRegion == fnMoveForward )
...@@ -98,13 +98,13 @@ sal_Bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, ...@@ -98,13 +98,13 @@ sal_Bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
0 == ( pNd = aIdx.GetNode().GetSectionNode()) ) 0 == ( pNd = aIdx.GetNode().GetSectionNode()) )
aIdx++; aIdx++;
if( pNd ) // gibt einen weiteren SectionNode ? if( pNd ) // is there another section node?
{ {
if( pNd->GetSection().IsHiddenFlag() || if( pNd->GetSection().IsHiddenFlag() ||
( !bInReadOnly && ( !bInReadOnly &&
pNd->GetSection().IsProtectFlag() )) pNd->GetSection().IsProtectFlag() ))
{ {
// geschuetzte/versteckte ueberspringen wir // skip protected or hidden ones
aIdx.Assign( *pNd->EndOfSectionNode(), +1 ); aIdx.Assign( *pNd->EndOfSectionNode(), +1 );
} }
else if( fnPosRegion == fnMoveForward ) else if( fnPosRegion == fnMoveForward )
...@@ -186,7 +186,7 @@ sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, ...@@ -186,7 +186,7 @@ sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
do { do {
SwCntntNode* pCNd; SwCntntNode* pCNd;
if( bMoveBackward ) // ans Ende vom Bereich if( bMoveBackward ) // to the end of the section
{ {
SwNodeIndex aIdx( *pNd->EndOfSectionNode() ); SwNodeIndex aIdx( *pNd->EndOfSectionNode() );
pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly ); pCNd = pNd->GetNodes().GoPrevSection( &aIdx, sal_True, !bInReadOnly );
...@@ -208,10 +208,10 @@ sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, ...@@ -208,10 +208,10 @@ sal_Bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion,
if( &pPos->nNode.GetNode() != pCurrNd || if( &pPos->nNode.GetNode() != pCurrNd ||
pPos->nContent.GetIndex() != nCurrCnt ) pPos->nContent.GetIndex() != nCurrCnt )
// es gab eine Veraenderung // there was a change
return sal_True; return sal_True;
// dann versuche mal den "Parent" dieser Section // try also the parent of this section
SwSection* pParent = pNd->GetSection().GetParent(); SwSection* pParent = pNd->GetSection().GetParent();
pNd = pParent ? pParent->GetFmt()->GetSectionNode() : 0; pNd = pParent ? pParent->GetFmt()->GetSectionNode() : 0;
} while( pNd ); } while( pNd );
...@@ -232,7 +232,7 @@ sal_Bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosReg ...@@ -232,7 +232,7 @@ sal_Bool SwCursor::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosReg
sal_Bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion ) sal_Bool SwCrsrShell::MoveRegion( SwWhichRegion fnWhichRegion, SwPosRegion fnPosRegion )
{ {
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, evt. Link callen SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed
sal_Bool bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion ); sal_Bool bRet = !pTblCrsr && pCurCrsr->MoveRegion( fnWhichRegion, fnPosRegion );
if( bRet ) if( bRet )
UpdateCrsr(); UpdateCrsr();
...@@ -254,7 +254,7 @@ sal_Bool SwCursor::GotoRegion( const String& rName ) ...@@ -254,7 +254,7 @@ sal_Bool SwCursor::GotoRegion( const String& rName )
0 != ( pIdx = pFmt->GetCntnt().GetCntntIdx() ) && 0 != ( pIdx = pFmt->GetCntnt().GetCntntIdx() ) &&
pIdx->GetNode().GetNodes().IsDocNodes() ) pIdx->GetNode().GetNodes().IsDocNodes() )
{ {
// ein Bereich im normalen NodesArr // area in normal nodes array
SwCrsrSaveState aSaveState( *this ); SwCrsrSaveState aSaveState( *this );
GetPoint()->nNode = *pIdx; GetPoint()->nNode = *pIdx;
...@@ -267,11 +267,11 @@ sal_Bool SwCursor::GotoRegion( const String& rName ) ...@@ -267,11 +267,11 @@ sal_Bool SwCursor::GotoRegion( const String& rName )
sal_Bool SwCrsrShell::GotoRegion( const String& rName ) sal_Bool SwCrsrShell::GotoRegion( const String& rName )
{ {
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen, SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed
sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName ); sal_Bool bRet = !pTblCrsr && pCurCrsr->GotoRegion( rName );
if( bRet ) if( bRet )
UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE | UpdateCrsr( SwCrsrShell::SCROLLWIN | SwCrsrShell::CHKRANGE |
SwCrsrShell::READONLY ); // und den akt. Updaten SwCrsrShell::READONLY );
return bRet; return bRet;
} }
......
This diff is collapsed.
...@@ -49,23 +49,23 @@ SwUnoCrsr::~SwUnoCrsr() ...@@ -49,23 +49,23 @@ SwUnoCrsr::~SwUnoCrsr()
SwDoc* pDoc = GetDoc(); SwDoc* pDoc = GetDoc();
if( !pDoc->IsInDtor() ) if( !pDoc->IsInDtor() )
{ {
// dann muss der Cursor aus dem Array ausgetragen werden // then remove cursor from array
SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl(); SwUnoCrsrTbl& rTbl = (SwUnoCrsrTbl&)pDoc->GetUnoCrsrTbl();
sal_uInt16 nDelPos = rTbl.GetPos( this ); sal_uInt16 nDelPos = rTbl.GetPos( this );
if( USHRT_MAX != nDelPos ) if( USHRT_MAX != nDelPos )
rTbl.Remove( nDelPos ); rTbl.Remove( nDelPos );
else { else {
OSL_ENSURE( !this, "UNO Cursor nicht mehr im Array" ); OSL_ENSURE( !this, "UNO cursor not anymore in array" );
} }
} }
// den gesamten Ring loeschen! // delete the whole ring
while( GetNext() != this ) while( GetNext() != this )
{ {
Ring* pNxt = GetNext(); Ring* pNxt = GetNext();
pNxt->MoveTo( 0 ); // ausketten pNxt->MoveTo( 0 ); // remove from chain
delete pNxt; // und loeschen delete pNxt; // and delete
} }
} }
...@@ -211,7 +211,7 @@ SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos) ...@@ -211,7 +211,7 @@ SwUnoTableCrsr::SwUnoTableCrsr(const SwPosition& rPos)
SwUnoTableCrsr::~SwUnoTableCrsr() SwUnoTableCrsr::~SwUnoTableCrsr()
{ {
while( aTblSel.GetNext() != &aTblSel ) while( aTblSel.GetNext() != &aTblSel )
delete aTblSel.GetNext(); // und loeschen delete aTblSel.GetNext();
} }
sal_Bool SwUnoTableCrsr::IsSelOvr( int eFlags ) sal_Bool SwUnoTableCrsr::IsSelOvr( int eFlags )
......
...@@ -143,7 +143,7 @@ void SwVisCrsr::Hide() ...@@ -143,7 +143,7 @@ void SwVisCrsr::Hide()
void SwVisCrsr::Timeout() void SwVisCrsr::Timeout()
{ {
OSL_ENSURE( !bIsDragCrsr, "Timer vorher abschalten" ); OSL_ENSURE( !bIsDragCrsr, "stop timer before" );
if( bIsVisible ) if( bIsVisible )
{ {
if ( !pCrsrShell->GetWin() ) // SwFrmFmt::GetGraphic suspends Win temporarily! if ( !pCrsrShell->GetWin() ) // SwFrmFmt::GetGraphic suspends Win temporarily!
...@@ -674,7 +674,7 @@ void SwShellTableCrsr::FillRects() ...@@ -674,7 +674,7 @@ void SwShellTableCrsr::FillRects()
while( pFrm && !pFrm->IsCellFrm() ) while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper(); pFrm = pFrm->GetUpper();
OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" ); OSL_ENSURE( pFrm, "Node not in a table" );
while ( pFrm ) while ( pFrm )
{ {
...@@ -709,7 +709,7 @@ sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const ...@@ -709,7 +709,7 @@ sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetPtPos() ); SwFrm* pFrm = pCNd->getLayoutFrm( GetShell()->GetLayout(), &GetPtPos() );
while( pFrm && !pFrm->IsCellFrm() ) while( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper(); pFrm = pFrm->GetUpper();
OSL_ENSURE( pFrm, "Node nicht in einer Tabelle" ); OSL_ENSURE( pFrm, "Node not in a table" );
if( pFrm && pFrm->Frm().IsInside( rPt ) ) if( pFrm && pFrm->Frm().IsInside( rPt ) )
return sal_True; return sal_True;
} }
......
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