Translate German comments and delete unnecessary blank lines

This commit is contained in:
Philipp Riemer
2012-05-30 15:27:46 +02:00
committed by Tor Lillqvist
parent 80ded1ec85
commit 2c1e35ecc2
4 changed files with 159 additions and 251 deletions

View File

@@ -26,21 +26,15 @@
*
************************************************************************/
#include "doc.hxx"
#include "swundo.hxx" // fuer die UndoIds
#include "swundo.hxx"
#include "pam.hxx"
#include "ndtxt.hxx"
#include <UndoCore.hxx>
#include "rolbck.hxx"
//--------------------------------------------------
SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
SwFmtColl* pColl,
const bool bReset,
@@ -57,13 +51,11 @@ SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
aFmtName = pColl->GetName();
}
SwUndoFmtColl::~SwUndoFmtColl()
{
delete pHistory;
}
void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
{
// restore old values
@@ -74,7 +66,6 @@ void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
AddUndoRedoPaM(rContext);
}
void SwUndoFmtColl::RedoImpl(::sw::UndoRedoContext & rContext)
{
SwPaM & rPam = AddUndoRedoPaM(rContext);
@@ -89,8 +80,8 @@ void SwUndoFmtColl::RepeatImpl(::sw::RepeatContext & rContext)
void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM)
{
// es kann nur eine TextFmtColl auf einen Bereich angewendet werden,
// also erfrage auch nur in dem Array
// Only one TextFrmColl can be applied to a section, thus request only in
// this array.
sal_uInt16 const nPos = rDoc.GetTxtFmtColls()->GetPos(
(SwTxtFmtColl*)pFmtColl );
// does the format still exist?

View File

@@ -26,11 +26,9 @@
*
************************************************************************/
#include <UndoSort.hxx>
#include <doc.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <swundo.hxx>
#include <pam.hxx>
#include <swtable.hxx>
#include <ndtxt.hxx>
@@ -41,24 +39,20 @@
#include <redline.hxx>
#include <node2lay.hxx>
/*--------------------------------------------------------------------
Beschreibung: Undo fuers Sorting
Description: Undo for Sorting
--------------------------------------------------------------------*/
SwSortUndoElement::~SwSortUndoElement()
{
// sind String Pointer gespeichert ??
if( 0xffffffff != SORT_TXT_TBL.TXT.nKenn )
// are there string pointers saved?
if( 0xffffffff != SORT_TXT_TBL.TXT.nKenn ) // Kenn(ung) = identifier
{
delete SORT_TXT_TBL.TBL.pSource;
delete SORT_TXT_TBL.TBL.pTarget;
}
}
SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
: SwUndo(UNDO_SORT_TXT), SwUndRng(rRg), pUndoTblAttr( 0 ),
pRedlData( 0 )
@@ -91,7 +85,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
SwDoc & rDoc = rContext.GetDoc();
if(pSortOpt->bTable)
{
// Undo Tabelle
// Undo for Table
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
if( pUndoTblAttr )
@@ -116,11 +110,11 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
const SwTableBox* pTarget = rTbl.GetTblBox(
*aSortList[i].SORT_TXT_TBL.TBL.pTarget );
// zurueckverschieben
// move back
MoveCell(&rDoc, pTarget, pSource,
USHRT_MAX != aMovedList.GetPos(pSource) );
// schon Verschobenen in der Liste merken
// store moved entry in list
aMovedList.push_back(pTarget);
}
@@ -132,13 +126,12 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
}
else
{
// Undo Text
// Undo for Text
SwPaM & rPam( AddUndoRedoPaM(rContext) );
RemoveIdxFromRange(rPam, true);
// fuer die sorted Positions einen Index anlegen.
// JP 25.11.97: Die IndexList muss aber nach SourcePosition
// aufsteigend sortiert aufgebaut werden
// create index for (sorted) positions
// The IndexList must be created based on (asc.) sorted SourcePosition.
SwUndoSortList aIdxList;
sal_uInt16 i;
@@ -159,7 +152,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
rDoc.MoveNodeRange(aRg, aIdx,
IDocumentContentOperations::DOC_MOVEDEFAULT);
}
// Indixes loeschen
// delete indices
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
delete *it;
aIdxList.clear();
@@ -173,7 +166,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
if(pSortOpt->bTable)
{
// Redo bei Tabelle
// Redo for Table
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
SwTableNode* pTblNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
@@ -193,10 +186,10 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
const SwTableBox* pTarget = rTbl.GetTblBox(
(const String&) *aSortList[i].SORT_TXT_TBL.TBL.pTarget );
// zurueckverschieben
// move back
MoveCell(&rDoc, pSource, pTarget,
USHRT_MAX != aMovedList.GetPos( pTarget ) );
// schon Verschobenen in der Liste merken
// store moved entry in list
aMovedList.push_back( pSource );
}
@@ -222,7 +215,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
sal_uInt16 i;
for( i = 0; i < aSortList.size(); ++i)
{ // aktuelle Pos ist die Ausgangslage
{ // current position is starting point
SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(),
aSortList[i].SORT_TXT_TBL.TXT.nSource);
aIdxList.insert( aIdxList.begin() + i, pIdx );
@@ -235,7 +228,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
rDoc.MoveNodeRange(aRg, aIdx,
IDocumentContentOperations::DOC_MOVEDEFAULT);
}
// Indixes loeschen
// delete indices
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
delete *it;
aIdxList.clear();
@@ -273,5 +266,4 @@ void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
aSortList.push_back( pEle );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -26,14 +26,12 @@
*
************************************************************************/
#include <UndoSplitMove.hxx>
#include "doc.hxx"
#include "pam.hxx"
#include "swtable.hxx"
#include "ndtxt.hxx"
#include "swundo.hxx" // fuer die UndoIds
#include "swundo.hxx"
#include <editeng/brkitem.hxx>
#include <fmtpdsc.hxx>
#include <frmfmt.hxx>
@@ -43,12 +41,9 @@
#include "docary.hxx"
#include <IShellCursorSupplier.hxx>
//------------------------------------------------------------------
// SPLITNODE
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
sal_Bool bChkTable )
: SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ),
@@ -56,7 +51,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
bTblFlag( sal_False ), bChkTblStt( bChkTable )
{
SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
OSL_ENSURE( pTxtNd, "nur beim TextNode rufen!" );
OSL_ENSURE( pTxtNd, "only for TextNode" );
if( pTxtNd->GetpSwpHints() )
{
pHistory = new SwHistory;
@@ -65,7 +60,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
if( !pHistory->Count() )
DELETEZ( pHistory );
}
// Redline beachten
// consider Redline
if( pDoc->IsRedlineOn() )
{
pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->GetRedlineAuthor() );
@@ -88,7 +83,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
rPam.DeleteMark();
if( bTblFlag )
{
// dann wurde direkt vor der akt. Tabelle ein TextNode eingefuegt.
// than a TextNode was added directly before the current table
SwNodeIndex& rIdx = rPam.GetPoint()->nNode;
rIdx = nNode;
SwTxtNode* pTNd;
@@ -97,7 +92,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
if( pCurrNd->IsCntntNode() && pTblNd &&
0 != ( pTNd = pDoc->GetNodes()[ pTblNd->GetIndex()-1 ]->GetTxtNode() ))
{
// verschiebe die BreakAttribute noch
// move break attributes
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
const SfxItemSet* pNdSet = pTNd->GetpSwAttrSet();
if( pNdSet )
@@ -112,7 +107,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
pTableFmt->SetFmtAttr( *pItem );
}
// dann loesche den wieder
// than delete it again
SwNodeIndex aDelNd( *pTblNd, -1 );
rPam.GetPoint()->nContent.Assign( (SwCntntNode*)pCurrNd, 0 );
RemoveIdxRel( aDelNd.GetIndex(), *rPam.GetPoint() );
@@ -154,7 +149,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
}
}
// setze noch den Cursor auf den Undo-Bereich
// also set the cursor onto undo section
rPam.DeleteMark();
rPam.GetPoint()->nNode = nNode;
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nCntnt );

File diff suppressed because it is too large Load Diff