[Libreoffice-commits] .: 4 commits - sw/source
Tor Lillqvist
tml at kemper.freedesktop.org
Mon May 28 06:34:31 PDT 2012
sw/source/core/undo/unmove.cxx | 30 +++++++++++++++---------------
sw/source/core/undo/unovwr.cxx | 28 +++++++++++++---------------
sw/source/core/undo/unredln.cxx | 23 +++++++++++------------
sw/source/core/undo/unsect.cxx | 32 ++++++++++++++++----------------
4 files changed, 55 insertions(+), 58 deletions(-)
New commits:
commit e03dcdbb4c2b7bf784bd639e27f91d88ca15c703
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sun May 27 09:16:44 2012 +0200
Translate German comments in sw/source/core/undo/unsect.cxx
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index eec3490..11a7701 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -33,7 +33,7 @@
#include <fmtcntnt.hxx>
#include <doc.hxx>
#include <docary.hxx>
-#include <swundo.hxx> // fuer die UndoIds
+#include <swundo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
@@ -50,9 +50,9 @@
SfxItemSet* lcl_GetAttrSet( const SwSection& rSect )
{
- // Attribute des Formate sichern (Spalten, Farbe, ... )
- // Cntnt- und Protect- Items interessieren nicht (stehen schon in der
- // Section), muessen also entfernen werden
+ // save attributes of the format (columns, color, ...)
+ // Cntnt and Protect items are not interesting since they are already
+ // stored in Section, thus delete them.
SfxItemSet* pAttr = 0;
if( rSect.GetFmt() )
{
@@ -133,18 +133,18 @@ void SwUndoInsSection::UndoImpl(::sw::UndoRedoContext & rContext)
if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ))
rDoc.DeleteRedline( *pNd, true, USHRT_MAX );
- // lag keine Selektion vor ??
+ // no selection?
SwNodeIndex aIdx( *pNd );
if( ( !nEndNode && STRING_MAXLEN == nEndCntnt ) ||
( nSttNode == nEndNode && nSttCntnt == nEndCntnt ))
- // loesche einfach alle Nodes
+ // delete simply all nodes
rDoc.GetNodes().Delete( aIdx, pNd->EndOfSectionIndex() -
aIdx.GetIndex() );
else
- // einfach das Format loeschen, der Rest erfolgt automatisch
+ // just delete format, rest happens automatically
rDoc.DelSectionFmt( pNd->GetSection().GetFmt() );
- // muessen wir noch zusammenfassen ?
+ // do we need to consolidate?
if (m_bSplitAtStart)
{
Join( rDoc, nSttNode );
@@ -210,12 +210,12 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & rContext)
if( pUpdateTOX )
{
- // Formatierung anstossen
+ // initiate formatting
SwEditShell* pESh = rDoc.GetEditShell();
if( pESh )
pESh->CalcLayout();
- // Seitennummern eintragen
+ // insert page numbers
((SwTOXBaseSection*)pUpdateTOX)->UpdatePageNum();
}
}
@@ -239,7 +239,7 @@ void SwUndoInsSection::Join( SwDoc& rDoc, sal_uLong nNode )
{
SwNodeIndex aIdx( rDoc.GetNodes(), nNode );
SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
- OSL_ENSURE( pTxtNd, "wo ist mein TextNode?" );
+ OSL_ENSURE( pTxtNd, "Where is my TextNode?" );
{
RemoveIdxRel( nNode + 1, SwPosition( aIdx,
@@ -388,8 +388,8 @@ void SwUndoDelSection::RedoImpl(::sw::UndoRedoContext & rContext)
SwSectionNode *const pNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
- OSL_ENSURE( pNd, "wo ist mein SectionNode?" );
- // einfach das Format loeschen, der Rest erfolgt automatisch
+ OSL_ENSURE( pNd, "Where is my SectionNode?" );
+ // just delete format, rest happens automatically
rDoc.DelSectionFmt( pNd->GetSection().GetFmt() );
}
@@ -444,7 +444,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
SwSectionNode *const pSectNd =
rDoc.GetNodes()[ m_nStartNode ]->GetSectionNode();
- OSL_ENSURE( pSectNd, "wo ist mein SectionNode?" );
+ OSL_ENSURE( pSectNd, "Where is my SectionNode?" );
SwSection& rNdSect = pSectNd->GetSection();
SwFmt* pFmt = rNdSect.GetFmt();
@@ -452,7 +452,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
SfxItemSet* pCur = ::lcl_GetAttrSet( rNdSect );
if (m_pAttrSet.get())
{
- // das Content- und Protect-Item muss bestehen bleiben
+ // The Content and Protect items must persist
const SfxPoolItem* pItem;
m_pAttrSet->Put( pFmt->GetFmtAttr( RES_CNTNT ));
if( SFX_ITEM_SET == pFmt->GetItemState( RES_PROTECT, sal_True, &pItem ))
@@ -465,7 +465,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
}
else
{
- // dann muessen die alten entfernt werden
+ // than the old ones need to be deleted
pFmt->ResetFmtAttr( RES_FRMATR_BEGIN, RES_BREAK );
pFmt->ResetFmtAttr( RES_HEADER, RES_OPAQUE );
pFmt->ResetFmtAttr( RES_SURROUND, RES_FRMATR_END-1 );
commit 66528fc701b8598620b5d7f02508bf7fa0c0b8dc
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sun May 27 08:59:34 2012 +0200
Translate German comments in sw/source/core/undo/unredln.cxx
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 6b721d7..c6241c8 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -32,7 +32,7 @@
#include <hintids.hxx>
#include <unotools/charclass.hxx>
#include <doc.hxx>
-#include <swundo.hxx> // fuer die UndoIds
+#include <swundo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
@@ -52,7 +52,7 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
pRedlData( 0 ), pRedlSaveData( 0 ), nUserId( nUsrId ),
bHiddenRedlines( sal_False )
{
- // Redline beachten
+ // mind the Redline
SwDoc& rDoc = *rRange.GetDoc();
if( rDoc.IsRedlineOn() )
{
@@ -77,8 +77,8 @@ SwUndoRedline::SwUndoRedline( SwUndoId nUsrId, const SwPaM& rRange )
else
{
bHiddenRedlines = HasHiddenRedlines( *pRedlSaveData );
- if( bHiddenRedlines ) // dann muessen die NodeIndizies
- { // vom SwUndRng korrigiert werden
+ if( bHiddenRedlines ) // then the NodeIndices of SwUndRng need to be corrected
+ {
nEndExtra -= rDoc.GetNodes().GetEndOfExtras().GetIndex();
nSttNode -= nEndExtra;
nEndNode -= nEndExtra;
@@ -255,15 +255,14 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) )
{
- // die beiden Redline Objecte suchen und diese dann anzeigen lassen,
- // damit die Nodes wieder uebereinstimmen!
- // das Geloeschte ist versteckt, also suche das INSERT
- // Redline Object. Dahinter steht das Geloeschte
+ // Search both Redline objects and make them visible to make the nodes
+ // consistent again. The 'delete' one is hidden, thus search for the
+ // 'insert' Redline object. The former is located directly after the latter.
sal_uInt16 nFnd = rDoc.GetRedlinePos(
*rDoc.GetNodes()[ nSttNode + 1 ],
nsRedlineType_t::REDLINE_INSERT );
OSL_ENSURE( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
- "kein Insert Object gefunden" );
+ "could not find an Insert object" );
++nFnd;
rDoc.GetRedlineTbl()[nFnd]->Show( 1 );
}
@@ -394,7 +393,7 @@ SwUndoCompDoc::SwUndoCompDoc( const SwPaM& rRg, sal_Bool bIns )
SwUndoCompDoc::SwUndoCompDoc( const SwRedline& rRedl )
: SwUndo( UNDO_COMPAREDOC ), SwUndRng( rRedl ), pRedlData( 0 ),
pUnDel( 0 ), pUnDel2( 0 ), pRedlSaveData( 0 ),
- // fuers MergeDoc wird aber der jeweils umgekehrte Zweig benoetigt!
+ // for MergeDoc the corresponding inverse is needed
bInsert( nsRedlineType_t::REDLINE_DELETE == rRedl.GetType() )
{
SwDoc* pDoc = (SwDoc*)rRedl.GetDoc();
@@ -424,7 +423,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
if( !bInsert )
{
- // die Redlines loeschen
+ // delete Redlines
RedlineMode_t eOld = pDoc->GetRedlineMode();
pDoc->SetRedlineMode_intern((RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON));
@@ -432,7 +431,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->SetRedlineMode_intern( eOld );
- //per definition Point is end (in SwUndRng!)
+ // per definition Point is end (in SwUndRng!)
SwCntntNode* pCSttNd = pPam->GetCntntNode( sal_False );
SwCntntNode* pCEndNd = pPam->GetCntntNode( sal_True );
commit d767476a82a7cef1d71983a946e3b74efbf415fb
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sat May 26 22:59:44 2012 +0200
Translate German comments in sw/source/core/undo/unovwr.cxx
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 562ebbb..17e8c7f 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -39,7 +39,7 @@
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IShellCursorSupplier.hxx>
-#include <swundo.hxx> // fuer die UndoIds
+#include <swundo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
@@ -78,11 +78,11 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos,
nSttCntnt = rPos.nContent.GetIndex();
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
- OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
+ OSL_ENSURE( pTxtNd, "Overwrite not in a TextNode?" );
bInsChar = sal_True;
xub_StrLen nTxtNdLen = pTxtNd->GetTxt().Len();
- if( nSttCntnt < nTxtNdLen ) // kein reines Einfuegen ?
+ if( nSttCntnt < nTxtNdLen ) // no pure insert?
{
aDelStr.Insert( pTxtNd->GetTxt().GetChar( nSttCntnt ) );
if( !pHistory )
@@ -119,14 +119,14 @@ SwUndoOverwrite::~SwUndoOverwrite()
sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
sal_Unicode cIns )
{
-/// ?? was ist mit nur eingefuegten Charaktern ???
+// What is with only inserted characters?
- // es kann nur das Loeschen von einzelnen char's zusammengefasst werden
+ // Only deletion of single chars can be combined.
if( rPos.nNode != nSttNode || !aInsStr.Len() ||
( !bGroup && aInsStr.Len() != 1 ))
return sal_False;
- // ist der Node ueberhaupt ein TextNode?
+ // Is the node a TextNode at all?
SwTxtNode * pDelTxtNd = rPos.nNode.GetNode().GetTxtNode();
if( !pDelTxtNd ||
( pDelTxtNd->GetTxt().Len() != rPos.nContent.GetIndex() &&
@@ -135,7 +135,7 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
CharClass& rCC = GetAppCharClass();
- // befrage das einzufuegende Charakter
+ // ask the char that should be inserted
if (( CH_TXTATR_BREAKWORD == cIns || CH_TXTATR_INWORD == cIns ) ||
rCC.isLetterNumeric( String( cIns ), 0 ) !=
rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) )
@@ -160,8 +160,7 @@ sal_Bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
pDoc->DeleteRedline( aPam, false, USHRT_MAX );
}
- // Ok, die beiden 'Overwrites' koennen zusammen gefasst werden, also
- // 'verschiebe' das enstprechende Zeichen
+ // both 'overwrites' can be combined so 'move' the corresponding character
if( !bInsChar )
{
if( rPos.nContent.GetIndex() < pDelTxtNd->GetTxt().Len() )
@@ -203,7 +202,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
pAktPam->DeleteMark();
pAktPam->GetPoint()->nNode = nSttNode;
SwTxtNode* pTxtNd = pAktPam->GetNode()->GetTxtNode();
- OSL_ENSURE( pTxtNd, "Overwrite nicht im TextNode?" );
+ OSL_ENSURE( pTxtNd, "Overwrite not in a TextNode?" );
SwIndex& rIdx = pAktPam->GetPoint()->nContent;
rIdx.Assign( pTxtNd, nSttCntnt );
@@ -215,8 +214,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->SetAutoCorrExceptWord( 0 );
}
- // wurde nicht nur ueberschieben sondern auch geinsertet, so loesche
- // den Ueberhang
+ // If there was not only a overwrite but also an insert, delete the surplus
if( aInsStr.Len() > aDelStr.Len() )
{
rIdx += aDelStr.Len();
@@ -235,7 +233,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
rIdx++;
for( xub_StrLen n = 0; n < aDelStr.Len(); n++ )
{
- // einzeln, damit die Attribute stehen bleiben !!!
+ // do it individually, to keep the attributes!
*pTmpStr = aDelStr.GetChar( n );
pTxtNd->InsertText( aTmpStr, rIdx /*???, SETATTR_NOTXTATRCHR*/ );
rIdx -= 2;
@@ -304,7 +302,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
for( xub_StrLen n = 0; n < aInsStr.Len(); n++ )
{
- // einzeln, damit die Attribute stehen bleiben !!!
+ // do it individually, to keep the attributes!
pTxtNd->InsertText( aInsStr.GetChar( n ), rIdx,
IDocumentContentOperations::INS_EMPTYEXPAND );
if( n < aDelStr.Len() )
@@ -316,7 +314,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
}
pTxtNd->SetIgnoreDontExpand( bOldExpFlg );
- // alte Anfangs-Position vom UndoNodes-Array zurueckholen
+ // get back old start position from UndoNodes array
if( pHistory )
pHistory->SetTmpEnd( pHistory->Count() );
if( pAktPam->GetMark()->nContent.GetIndex() != nSttCntnt )
commit bba3c5885c47150cafa39b94bcb00aac823e5fe3
Author: Philipp Riemer <ruderphilipp at gmail.com>
Date: Sat May 26 22:34:37 2012 +0200
Translate German comments in sw/source/core/undo/unmove.cxx
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index d9d73c6..8bc5923 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -32,7 +32,7 @@
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
-#include <swundo.hxx> // fuer die UndoIds
+#include <swundo.hxx>
#include <ndtxt.hxx>
#include <UndoCore.hxx>
#include <rolbck.hxx>
@@ -48,7 +48,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos )
{
bMoveRange = bJoinNext = bJoinPrev = sal_False;
- // StartNode vorm loeschen von Fussnoten besorgen!
+ // get StartNode from footnotes before delete!
SwDoc* pDoc = rRange.GetDoc();
SwTxtNode* pTxtNd = pDoc->GetNodes()[ nSttNode ]->GetTxtNode();
SwTxtNode* pEndTxtNd = pDoc->GetNodes()[ nEndNode ]->GetTxtNode();
@@ -116,11 +116,11 @@ SwUndoMove::SwUndoMove( SwDoc* pDoc, const SwNodeRange& rRg,
// DelFtn( rRange );
- // wird aus dem CntntBereich in den Sonderbereich verschoben ?
+ // is the current move from CntntArea into the special section?
sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt && rRg.aStart.GetIndex() > nCntntStt )
{
- // loesche alle Fussnoten. Diese sind dort nicht erwuenscht.
+ // delete all footnotes since they are undesired there
SwPosition aPtPos( rRg.aEnd );
SwCntntNode* pCNd = rRg.aEnd.GetNode().GetCntntNode();
if( pCNd )
@@ -191,14 +191,14 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
{
SwDoc *const pDoc = & rContext.GetDoc();
- // Block, damit aus diesem gesprungen werden kann
+ // Block so that we can jump out of it
do {
- // erzeuge aus den Werten die Insert-Position und den Bereich
+ // create index position and section based on the existing values
SwNodeIndex aIdx( pDoc->GetNodes(), nDestSttNode );
if( bMoveRange )
{
- // nur ein Move mit SwRange
+ // only a move with SwRange
SwNodeRange aRg( aIdx, aIdx );
aRg.aEnd = nDestEndNode;
aIdx = nInsPosNode;
@@ -227,7 +227,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
if( pCNd->IsTxtNode() && ((SwTxtNode*)pCNd)->GetpSwpHints() )
((SwTxtNode*)pCNd)->ClearSwpHintsArr( false );
- // an der InsertPos erstmal alle Attribute entfernen,
+ // first delete all attributes at InsertPos
const bool bSuccess = pDoc->MoveRange( aPam, aPos, (bMoveRedlines)
? IDocumentContentOperations::DOC_MOVEREDLINES
: IDocumentContentOperations::DOC_MOVEDEFAULT );
@@ -239,7 +239,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
// pDoc->ResetAttr( aPam, sal_False );
if( aPam.GetNode()->IsCntntNode() )
aPam.GetNode()->GetCntntNode()->ResetAllAttr();
- // der Pam wird jetzt aufgegeben.
+ // the Pam will be dropped now
}
SwTxtNode* pTxtNd = aIdx.GetNode().GetTxtNode();
@@ -249,13 +249,13 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
RemoveIdxRel( aIdx.GetIndex() + 1, SwPosition( aIdx,
SwIndex( pTxtNd, pTxtNd->GetTxt().Len() ) ) );
}
- // sind keine Pams mehr im naechsten TextNode
+ // Are there any Pams in the next TextNode?
pTxtNd->JoinNext();
}
if( bJoinPrev && pTxtNd->CanJoinPrev( &aIdx ) )
{
- // ?? sind keine Pams mehr im naechsten TextNode ??
+ // Are there any Pams in the next TextNode?
pTxtNd = aIdx.GetNode().GetTxtNode();
{
RemoveIdxRel( aIdx.GetIndex() + 1, SwPosition( aIdx,
@@ -274,7 +274,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext)
pHistory->SetTmpEnd( pHistory->Count() );
}
- // setze noch den Cursor auf den Undo-Bereich
+ // set the cursor onto Undo area
if( !bMoveRange )
{
AddUndoRedoPaM(rContext);
@@ -292,7 +292,7 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
if( bMoveRange )
{
- // nur ein Move mit SwRange
+ // only a move with SwRange
SwNodeRange aRg( rNds, nSttNode, rNds, nEndNode );
rDoc.MoveNodeRange( aRg, aIdx, (bMoveRedlines)
? IDocumentContentOperations::DOC_MOVEREDLINES
@@ -337,13 +337,13 @@ void SwUndoMove::RedoImpl(::sw::UndoRedoContext & rContext)
void SwUndoMove::DelFtn( const SwPaM& rRange )
{
- // wird aus dem CntntBereich in den Sonderbereich verschoben ?
+ // is the current move from CntntArea into the special section?
SwDoc* pDoc = rRange.GetDoc();
sal_uLong nCntntStt = pDoc->GetNodes().GetEndOfAutotext().GetIndex();
if( nMvDestNode < nCntntStt &&
rRange.GetPoint()->nNode.GetIndex() >= nCntntStt )
{
- // loesche alle Fussnoten. Diese sind dort nicht erwuenscht.
+ // delete all footnotes since they are undesired there
DelCntntIndex( *rRange.GetMark(), *rRange.GetPoint(),
nsDelCntntType::DELCNT_FTN );
More information about the Libreoffice-commits
mailing list