Translate German comments and delete unnecessary blank lines
This commit is contained in:
committed by
Tor Lillqvist
parent
80ded1ec85
commit
2c1e35ecc2
@@ -26,21 +26,15 @@
|
|||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "doc.hxx"
|
#include "doc.hxx"
|
||||||
#include "swundo.hxx" // fuer die UndoIds
|
#include "swundo.hxx"
|
||||||
#include "pam.hxx"
|
#include "pam.hxx"
|
||||||
#include "ndtxt.hxx"
|
#include "ndtxt.hxx"
|
||||||
|
|
||||||
#include <UndoCore.hxx>
|
#include <UndoCore.hxx>
|
||||||
#include "rolbck.hxx"
|
#include "rolbck.hxx"
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
|
SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
|
||||||
SwFmtColl* pColl,
|
SwFmtColl* pColl,
|
||||||
const bool bReset,
|
const bool bReset,
|
||||||
@@ -57,13 +51,11 @@ SwUndoFmtColl::SwUndoFmtColl( const SwPaM& rRange,
|
|||||||
aFmtName = pColl->GetName();
|
aFmtName = pColl->GetName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SwUndoFmtColl::~SwUndoFmtColl()
|
SwUndoFmtColl::~SwUndoFmtColl()
|
||||||
{
|
{
|
||||||
delete pHistory;
|
delete pHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
|
void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
|
||||||
{
|
{
|
||||||
// restore old values
|
// restore old values
|
||||||
@@ -74,7 +66,6 @@ void SwUndoFmtColl::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
AddUndoRedoPaM(rContext);
|
AddUndoRedoPaM(rContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SwUndoFmtColl::RedoImpl(::sw::UndoRedoContext & rContext)
|
void SwUndoFmtColl::RedoImpl(::sw::UndoRedoContext & rContext)
|
||||||
{
|
{
|
||||||
SwPaM & rPam = AddUndoRedoPaM(rContext);
|
SwPaM & rPam = AddUndoRedoPaM(rContext);
|
||||||
@@ -89,8 +80,8 @@ void SwUndoFmtColl::RepeatImpl(::sw::RepeatContext & rContext)
|
|||||||
|
|
||||||
void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM)
|
void SwUndoFmtColl::DoSetFmtColl(SwDoc & rDoc, SwPaM & rPaM)
|
||||||
{
|
{
|
||||||
// es kann nur eine TextFmtColl auf einen Bereich angewendet werden,
|
// Only one TextFrmColl can be applied to a section, thus request only in
|
||||||
// also erfrage auch nur in dem Array
|
// this array.
|
||||||
sal_uInt16 const nPos = rDoc.GetTxtFmtColls()->GetPos(
|
sal_uInt16 const nPos = rDoc.GetTxtFmtColls()->GetPos(
|
||||||
(SwTxtFmtColl*)pFmtColl );
|
(SwTxtFmtColl*)pFmtColl );
|
||||||
// does the format still exist?
|
// does the format still exist?
|
||||||
|
@@ -26,11 +26,9 @@
|
|||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <UndoSort.hxx>
|
#include <UndoSort.hxx>
|
||||||
|
|
||||||
#include <doc.hxx>
|
#include <doc.hxx>
|
||||||
#include <swundo.hxx> // fuer die UndoIds
|
#include <swundo.hxx>
|
||||||
#include <pam.hxx>
|
#include <pam.hxx>
|
||||||
#include <swtable.hxx>
|
#include <swtable.hxx>
|
||||||
#include <ndtxt.hxx>
|
#include <ndtxt.hxx>
|
||||||
@@ -41,24 +39,20 @@
|
|||||||
#include <redline.hxx>
|
#include <redline.hxx>
|
||||||
#include <node2lay.hxx>
|
#include <node2lay.hxx>
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Beschreibung: Undo fuers Sorting
|
Description: Undo for Sorting
|
||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SwSortUndoElement::~SwSortUndoElement()
|
SwSortUndoElement::~SwSortUndoElement()
|
||||||
{
|
{
|
||||||
// sind String Pointer gespeichert ??
|
// are there string pointers saved?
|
||||||
if( 0xffffffff != SORT_TXT_TBL.TXT.nKenn )
|
if( 0xffffffff != SORT_TXT_TBL.TXT.nKenn ) // Kenn(ung) = identifier
|
||||||
{
|
{
|
||||||
delete SORT_TXT_TBL.TBL.pSource;
|
delete SORT_TXT_TBL.TBL.pSource;
|
||||||
delete SORT_TXT_TBL.TBL.pTarget;
|
delete SORT_TXT_TBL.TBL.pTarget;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
|
SwUndoSort::SwUndoSort(const SwPaM& rRg, const SwSortOptions& rOpt)
|
||||||
: SwUndo(UNDO_SORT_TXT), SwUndRng(rRg), pUndoTblAttr( 0 ),
|
: SwUndo(UNDO_SORT_TXT), SwUndRng(rRg), pUndoTblAttr( 0 ),
|
||||||
pRedlData( 0 )
|
pRedlData( 0 )
|
||||||
@@ -91,7 +85,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
SwDoc & rDoc = rContext.GetDoc();
|
SwDoc & rDoc = rContext.GetDoc();
|
||||||
if(pSortOpt->bTable)
|
if(pSortOpt->bTable)
|
||||||
{
|
{
|
||||||
// Undo Tabelle
|
// Undo for Table
|
||||||
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
|
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
|
||||||
|
|
||||||
if( pUndoTblAttr )
|
if( pUndoTblAttr )
|
||||||
@@ -116,11 +110,11 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
const SwTableBox* pTarget = rTbl.GetTblBox(
|
const SwTableBox* pTarget = rTbl.GetTblBox(
|
||||||
*aSortList[i].SORT_TXT_TBL.TBL.pTarget );
|
*aSortList[i].SORT_TXT_TBL.TBL.pTarget );
|
||||||
|
|
||||||
// zurueckverschieben
|
// move back
|
||||||
MoveCell(&rDoc, pTarget, pSource,
|
MoveCell(&rDoc, pTarget, pSource,
|
||||||
USHRT_MAX != aMovedList.GetPos(pSource) );
|
USHRT_MAX != aMovedList.GetPos(pSource) );
|
||||||
|
|
||||||
// schon Verschobenen in der Liste merken
|
// store moved entry in list
|
||||||
aMovedList.push_back(pTarget);
|
aMovedList.push_back(pTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,13 +126,12 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Undo Text
|
// Undo for Text
|
||||||
SwPaM & rPam( AddUndoRedoPaM(rContext) );
|
SwPaM & rPam( AddUndoRedoPaM(rContext) );
|
||||||
RemoveIdxFromRange(rPam, true);
|
RemoveIdxFromRange(rPam, true);
|
||||||
|
|
||||||
// fuer die sorted Positions einen Index anlegen.
|
// create index for (sorted) positions
|
||||||
// JP 25.11.97: Die IndexList muss aber nach SourcePosition
|
// The IndexList must be created based on (asc.) sorted SourcePosition.
|
||||||
// aufsteigend sortiert aufgebaut werden
|
|
||||||
SwUndoSortList aIdxList;
|
SwUndoSortList aIdxList;
|
||||||
sal_uInt16 i;
|
sal_uInt16 i;
|
||||||
|
|
||||||
@@ -159,7 +152,7 @@ void SwUndoSort::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
rDoc.MoveNodeRange(aRg, aIdx,
|
rDoc.MoveNodeRange(aRg, aIdx,
|
||||||
IDocumentContentOperations::DOC_MOVEDEFAULT);
|
IDocumentContentOperations::DOC_MOVEDEFAULT);
|
||||||
}
|
}
|
||||||
// Indixes loeschen
|
// delete indices
|
||||||
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
|
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
|
||||||
delete *it;
|
delete *it;
|
||||||
aIdxList.clear();
|
aIdxList.clear();
|
||||||
@@ -173,7 +166,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
|
|
||||||
if(pSortOpt->bTable)
|
if(pSortOpt->bTable)
|
||||||
{
|
{
|
||||||
// Redo bei Tabelle
|
// Redo for Table
|
||||||
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
|
RemoveIdxFromSection( rDoc, nSttNode, &nEndNode );
|
||||||
|
|
||||||
SwTableNode* pTblNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
|
SwTableNode* pTblNd = rDoc.GetNodes()[ nTblNd ]->GetTableNode();
|
||||||
@@ -193,10 +186,10 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
const SwTableBox* pTarget = rTbl.GetTblBox(
|
const SwTableBox* pTarget = rTbl.GetTblBox(
|
||||||
(const String&) *aSortList[i].SORT_TXT_TBL.TBL.pTarget );
|
(const String&) *aSortList[i].SORT_TXT_TBL.TBL.pTarget );
|
||||||
|
|
||||||
// zurueckverschieben
|
// move back
|
||||||
MoveCell(&rDoc, pSource, pTarget,
|
MoveCell(&rDoc, pSource, pTarget,
|
||||||
USHRT_MAX != aMovedList.GetPos( pTarget ) );
|
USHRT_MAX != aMovedList.GetPos( pTarget ) );
|
||||||
// schon Verschobenen in der Liste merken
|
// store moved entry in list
|
||||||
aMovedList.push_back( pSource );
|
aMovedList.push_back( pSource );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,7 +215,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
sal_uInt16 i;
|
sal_uInt16 i;
|
||||||
|
|
||||||
for( i = 0; i < aSortList.size(); ++i)
|
for( i = 0; i < aSortList.size(); ++i)
|
||||||
{ // aktuelle Pos ist die Ausgangslage
|
{ // current position is starting point
|
||||||
SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(),
|
SwNodeIndex* pIdx = new SwNodeIndex( rDoc.GetNodes(),
|
||||||
aSortList[i].SORT_TXT_TBL.TXT.nSource);
|
aSortList[i].SORT_TXT_TBL.TXT.nSource);
|
||||||
aIdxList.insert( aIdxList.begin() + i, pIdx );
|
aIdxList.insert( aIdxList.begin() + i, pIdx );
|
||||||
@@ -235,7 +228,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
rDoc.MoveNodeRange(aRg, aIdx,
|
rDoc.MoveNodeRange(aRg, aIdx,
|
||||||
IDocumentContentOperations::DOC_MOVEDEFAULT);
|
IDocumentContentOperations::DOC_MOVEDEFAULT);
|
||||||
}
|
}
|
||||||
// Indixes loeschen
|
// delete indices
|
||||||
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
|
for(SwUndoSortList::const_iterator it = aIdxList.begin(); it != aIdxList.end(); ++it)
|
||||||
delete *it;
|
delete *it;
|
||||||
aIdxList.clear();
|
aIdxList.clear();
|
||||||
@@ -273,5 +266,4 @@ void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
|
|||||||
aSortList.push_back( pEle );
|
aSortList.push_back( pEle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -26,14 +26,12 @@
|
|||||||
*
|
*
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#include <UndoSplitMove.hxx>
|
#include <UndoSplitMove.hxx>
|
||||||
|
|
||||||
#include "doc.hxx"
|
#include "doc.hxx"
|
||||||
#include "pam.hxx"
|
#include "pam.hxx"
|
||||||
#include "swtable.hxx"
|
#include "swtable.hxx"
|
||||||
#include "ndtxt.hxx"
|
#include "ndtxt.hxx"
|
||||||
#include "swundo.hxx" // fuer die UndoIds
|
#include "swundo.hxx"
|
||||||
#include <editeng/brkitem.hxx>
|
#include <editeng/brkitem.hxx>
|
||||||
#include <fmtpdsc.hxx>
|
#include <fmtpdsc.hxx>
|
||||||
#include <frmfmt.hxx>
|
#include <frmfmt.hxx>
|
||||||
@@ -43,12 +41,9 @@
|
|||||||
#include "docary.hxx"
|
#include "docary.hxx"
|
||||||
#include <IShellCursorSupplier.hxx>
|
#include <IShellCursorSupplier.hxx>
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
// SPLITNODE
|
// SPLITNODE
|
||||||
|
|
||||||
|
|
||||||
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
|
SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
|
||||||
sal_Bool bChkTable )
|
sal_Bool bChkTable )
|
||||||
: SwUndo( UNDO_SPLITNODE ), pHistory( 0 ), pRedlData( 0 ), nNode( rPos.nNode.GetIndex() ),
|
: 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 )
|
bTblFlag( sal_False ), bChkTblStt( bChkTable )
|
||||||
{
|
{
|
||||||
SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
|
SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode();
|
||||||
OSL_ENSURE( pTxtNd, "nur beim TextNode rufen!" );
|
OSL_ENSURE( pTxtNd, "only for TextNode" );
|
||||||
if( pTxtNd->GetpSwpHints() )
|
if( pTxtNd->GetpSwpHints() )
|
||||||
{
|
{
|
||||||
pHistory = new SwHistory;
|
pHistory = new SwHistory;
|
||||||
@@ -65,7 +60,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos,
|
|||||||
if( !pHistory->Count() )
|
if( !pHistory->Count() )
|
||||||
DELETEZ( pHistory );
|
DELETEZ( pHistory );
|
||||||
}
|
}
|
||||||
// Redline beachten
|
// consider Redline
|
||||||
if( pDoc->IsRedlineOn() )
|
if( pDoc->IsRedlineOn() )
|
||||||
{
|
{
|
||||||
pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->GetRedlineAuthor() );
|
pRedlData = new SwRedlineData( nsRedlineType_t::REDLINE_INSERT, pDoc->GetRedlineAuthor() );
|
||||||
@@ -88,7 +83,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
rPam.DeleteMark();
|
rPam.DeleteMark();
|
||||||
if( bTblFlag )
|
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;
|
SwNodeIndex& rIdx = rPam.GetPoint()->nNode;
|
||||||
rIdx = nNode;
|
rIdx = nNode;
|
||||||
SwTxtNode* pTNd;
|
SwTxtNode* pTNd;
|
||||||
@@ -97,7 +92,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
if( pCurrNd->IsCntntNode() && pTblNd &&
|
if( pCurrNd->IsCntntNode() && pTblNd &&
|
||||||
0 != ( pTNd = pDoc->GetNodes()[ pTblNd->GetIndex()-1 ]->GetTxtNode() ))
|
0 != ( pTNd = pDoc->GetNodes()[ pTblNd->GetIndex()-1 ]->GetTxtNode() ))
|
||||||
{
|
{
|
||||||
// verschiebe die BreakAttribute noch
|
// move break attributes
|
||||||
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
|
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
|
||||||
const SfxItemSet* pNdSet = pTNd->GetpSwAttrSet();
|
const SfxItemSet* pNdSet = pTNd->GetpSwAttrSet();
|
||||||
if( pNdSet )
|
if( pNdSet )
|
||||||
@@ -112,7 +107,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext)
|
|||||||
pTableFmt->SetFmtAttr( *pItem );
|
pTableFmt->SetFmtAttr( *pItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
// dann loesche den wieder
|
// than delete it again
|
||||||
SwNodeIndex aDelNd( *pTblNd, -1 );
|
SwNodeIndex aDelNd( *pTblNd, -1 );
|
||||||
rPam.GetPoint()->nContent.Assign( (SwCntntNode*)pCurrNd, 0 );
|
rPam.GetPoint()->nContent.Assign( (SwCntntNode*)pCurrNd, 0 );
|
||||||
RemoveIdxRel( aDelNd.GetIndex(), *rPam.GetPoint() );
|
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.DeleteMark();
|
||||||
rPam.GetPoint()->nNode = nNode;
|
rPam.GetPoint()->nNode = nNode;
|
||||||
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nCntnt );
|
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nCntnt );
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user