Translate German comments

This commit is contained in:
Philipp Weissenbacher
2011-11-04 14:46:42 +01:00
committed by Norbert Thiebaud
parent 6f9d6b6c51
commit 869a0f367c
6 changed files with 138 additions and 159 deletions

View File

@@ -81,32 +81,32 @@
#include <swtable.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <swundo.hxx> // fuer die UndoIds
#include <swundo.hxx> // for the UndoIds
#include <UndoCore.hxx>
#include <UndoInsert.hxx>
#include <UndoSplitMove.hxx>
#include <UndoTable.hxx>
#include <pagedesc.hxx> //DTor
#include <pagedesc.hxx> // DTor
#include <breakit.hxx>
#include <ndole.hxx>
#include <ndgrf.hxx>
#include <rolbck.hxx> // Undo-Attr
#include <doctxm.hxx> // fuer die Verzeichnisse
#include <rolbck.hxx> // Undo attr
#include <doctxm.hxx> // for the directories
#include <grfatr.hxx>
#include <poolfmt.hxx> // PoolVorlagen-Id's
#include <mvsave.hxx> // fuer Server-Funktionalitaet
#include <poolfmt.hxx> // pool template ids
#include <mvsave.hxx> // for server functionality
#include <SwGrammarMarkUp.hxx>
#include <scriptinfo.hxx>
#include <acorrect.hxx> // Autokorrektur
#include <mdiexp.hxx> // Statusanzeige
#include <acorrect.hxx> // auto correction
#include <mdiexp.hxx> // status indicator
#include <docstat.hxx>
#include <docary.hxx>
#include <redline.hxx>
#include <fldupde.hxx>
#include <swbaslnk.hxx>
#include <printdata.hxx>
#include <cmdid.h> // fuer den dflt - Printer in SetJob
#include <statstr.hrc> // StatLine-String
#include <cmdid.h> // for the dflt printer in SetJob
#include <statstr.hrc> // StatLine string
#include <comcore.hrc>
#include <SwUndoTOXChange.hxx>
#include <SwUndoFmt.hxx>
@@ -140,11 +140,11 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
// Seiten-Deskriptoren
// Page descriptors
SV_IMPL_PTRARR(SwPageDescs,SwPageDescPtr);
// Verzeichnisse
// Directories
SV_IMPL_PTRARR( SwTOXTypes, SwTOXTypePtr )
// FeldTypen
// Field types
SV_IMPL_PTRARR( SwFldTypes, SwFldTypePtr)
/* IInterface */
@@ -641,7 +641,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup )
if( !pPrt )
{
//Das ItemSet wird vom Sfx geloescht!
//The ItemSet is deleted by Sfx!
SfxItemSet *pSet = new SfxItemSet( GetAttrPool(),
FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER,
SID_HTML_MODE, SID_HTML_MODE,
@@ -690,8 +690,8 @@ void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData )
/* Implementations the next Interface here */
/*
* Dokumenteditieren (Doc-SS) zum Fuellen des Dokuments
* durch den RTF Parser und fuer die EditShell.
* Document editing (Doc-SS) to fill the document
* by the RTF parser and for the EditShell.
*/
void SwDoc::ChgDBData(const SwDBData& rNewData)
{
@@ -710,9 +710,8 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
return false;
{
// BUG 26675: DataChanged vorm loeschen verschicken, dann bekommt
// man noch mit, welche Objecte sich im Bereich befinden.
// Danach koennen sie vor/hinter der Position befinden.
// BUG 26675: Send DataChanged before deleting, so that we notice which objects are in scope.
// After that they can be before/after the position.
SwDataChanged aTmp( this, rPos, 0 );
}
@@ -720,7 +719,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
if (GetIDocumentUndoRedo().DoesUndo())
{
GetIDocumentUndoRedo().ClearRedo();
// einfuegen vom Undo-Object, z.Z. nur beim TextNode
// insert from the Undo object (currently only for TextNode)
if( pNode->IsTxtNode() )
{
pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart );
@@ -728,10 +727,9 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
}
}
//JP 28.01.97: Sonderfall fuer SplitNode am Tabellenanfang:
// steht die am Doc/Fly/Footer/..-Anfang oder direkt
// hinter einer Tabelle, dann fuege davor
// einen Absatz ein
//JP 28.01.97: Special case for SplitNode at table start:
// If it is at the beginning of a Doc/Fly/Footer/... or right at after a table
// then insert a paragraph before it.
if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTxtNode() )
{
sal_uLong nPrevPos = rPos.nNode.GetIndex() - 1;
@@ -748,14 +746,13 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
if( pNd->IsCntntNode() )
{
//JP 30.04.99 Bug 65660:
// ausserhalb des normalen BodyBereiches gibt es keine
// Seitenumbrueche, also ist das hier kein gueltige
// Bedingung fuers einfuegen eines Absatzes
// There are no page breaks outside of the normal body area,
// so this is not a valid condition to insert a paragraph.
if( nPrevPos < GetNodes().GetEndOfExtras().GetIndex() )
pNd = 0;
else
{
// Dann nur, wenn die Tabelle Umbrueche traegt!
// Only if the table has line breaks!
const SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
if( SFX_ITEM_SET != pFrmFmt->GetItemState(RES_PAGEDESC, sal_False) &&
SFX_ITEM_SET != pFrmFmt->GetItemState( RES_BREAK, sal_False ) )
@@ -773,7 +770,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
((SwPosition&)rPos).nNode = pTblNd->GetIndex()-1;
((SwPosition&)rPos).nContent.Assign( pTxtNd, 0 );
// nur im BodyBereich den SeitenUmbruch/-Vorlage umhaengem
// only add page breaks/templates to the body area
if( nPrevPos > GetNodes().GetEndOfExtras().GetIndex() )
{
SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt();
@@ -809,7 +806,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart )
pNode = pNode->SplitCntntNode( rPos );
if (pNode)
{
// verschiebe noch alle Bookmarks/TOXMarks/FlyAtCnt
// move all bookmarks, TOXMarks, FlyAtCnt
if( !aBkmkArr.empty() )
_RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, sal_True );
@@ -835,7 +832,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos )
SwTxtNode * pCurNode = rPos.nNode.GetNode().GetTxtNode();
if( !pCurNode )
{
// dann kann ja einer angelegt werden!
// so then one can be created!
SwNodeIndex aIdx( rPos.nNode, 1 );
pCurNode = GetNodes().MakeTxtNode( aIdx,
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
@@ -876,7 +873,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
const SwPosition& rPos = *rRg.GetPoint();
if( pACEWord ) // Aufnahme in die Autokorrektur
if( pACEWord ) // add to auto correction
{
if( 1 == rStr.Len() && pACEWord->IsDeleted() )
{
@@ -906,7 +903,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
}
}
else
{ // ist Undo und Gruppierung eingeschaltet, ist alles anders !
{ // if Undo and grouping is enabled, everything changes!
SwUndoInsert * pUndo = NULL;
// don't group the start if hints at the start should be expanded
@@ -936,7 +933,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr,
for( xub_StrLen i = 0; i < rStr.Len(); ++i )
{
nInsPos++;
// wenn CanGrouping() sal_True returnt, ist schon alles erledigt
// if CanGrouping() returns sal_True, everything has already been done
if( !pUndo->CanGrouping( rStr.GetChar( i ) ))
{
pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 1, nInsertMode,
@@ -1054,8 +1051,8 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName,
}
/*************************************************************************
|* SwDoc::GetFldType()
|* Beschreibung: liefert den am Doc eingerichteten Feldtypen zurueck
|* SwDoc::GetFldType()
|* Description: returns the field type of the Doc
*************************************************************************/
SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const
{
@@ -1107,12 +1104,9 @@ sal_uInt16 _PostItFld::GetPageNo(
const std::set< sal_Int32 > &rPossiblePages,
/* out */ sal_uInt16& rVirtPgNo, /* out */ sal_uInt16& rLineNo )
{
//Problem: Wenn ein PostItFld in einem Node steht, der von mehr als
//einer Layout-Instanz repraesentiert wird, steht die Frage im Raum,
//ob das PostIt nur ein- oder n-mal gedruck werden soll.
//Wahrscheinlich nur einmal, als Seitennummer soll hier keine Zufaellige
//sondern die des ersten Auftretens des PostIts innerhalb des selektierten
//Bereichs ermittelt werden.
//Problem: If a PostItFld is contained in more than one Node that is represented by more than one layout instance,
//we have to decide whether it should be printed once or n-times.
//Probably only once. For the page number we don't select a random one, but the PostIt's first occurence in the selected area.
rVirtPgNo = 0;
sal_uInt16 nPos = GetCntnt();
SwIterator<SwTxtFrm,SwTxtNode> aIter( GetFld()->GetTxtNode() );
@@ -1144,7 +1138,7 @@ bool lcl_GetPostIts(
if( pFldType->GetDepends() )
{
// Modify-Object gefunden, trage alle Felder ins Array ein
// Found modify object; insert all fields into the array
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
const SwTxtFld* pTxtFld;
for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
@@ -1214,7 +1208,7 @@ static void lcl_FormatPostIt(
pIDCO->SplitNode( *aPam.GetPoint(), false );
aStr = pField->GetPar2();
#if defined( WNT )
// Bei Windows und Co alle CR rausschmeissen
// Throw out all CR in Windows
aStr.EraseAllChars( '\r' );
#endif
pIDCO->InsertString( aPam, aStr );
@@ -1551,10 +1545,9 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
aVec.push_back( 0 );
}
// dann sorge mal dafuer, das alle Seiten in der richtigen
// Reihenfolge stehen:
// make sure that all pages are in correct order
sal_uInt16 nSPg = 0, nEPg = aVec.size(), nStep = 1;
if ( 0 == (nEPg & 1 )) // ungerade gibt es nicht!
if ( 0 == (nEPg & 1 )) // there are no uneven ones!
--nEPg;
if ( !bPrintLeftPages )
@@ -1614,7 +1607,7 @@ void SwDoc::UpdateDocStat()
if( pDocStat->bModified )
{
pDocStat->Reset();
pDocStat->nPara = 0; // Default ist auf 1 !!
pDocStat->nPara = 0; // default is 1!
SwNode* pNd;
for( sal_uLong i = GetNodes().Count(); i; )
@@ -1689,13 +1682,13 @@ void SwDoc::UpdateDocStat()
}
}
// event. Stat. Felder Updaten
// optionally update stat. fields
SwFieldType *pType = GetSysFldType(RES_DOCSTATFLD);
pType->UpdateFlds();
}
}
// Dokument - Info
// Document - info
void SwDoc::DocInfoChgd( )
{
GetSysFldType( RES_DOCINFOFLD )->UpdateFlds();
@@ -1703,7 +1696,7 @@ void SwDoc::DocInfoChgd( )
SetModified();
}
// returne zum Namen die im Doc gesetzte Referenz
// Return the reference in the doc for the name
const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
{
const SfxPoolItem* pItem;
@@ -1722,7 +1715,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const
return 0;
}
// returne die RefMark per Index - fuer Uno
// Return the RefMark per index - for Uno
const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
{
const SfxPoolItem* pItem;
@@ -1746,10 +1739,9 @@ const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const
return pRet;
}
// returne die Namen aller im Doc gesetzten Referenzen
//JP 24.06.96: Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine
// RefMark gesetzt ist
// OS 25.06.96: ab jetzt wird immer die Anzahl der Referenzen returnt
// Return the names of all set references in the Doc
//JP 24.06.96: If the array pointer is 0, then just return whether a RefMark is set in the Doc
// OS 25.06.96: From now on we always return the reference count
sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const
{
const SfxPoolItem* pItem;
@@ -1825,9 +1817,9 @@ void SwDoc::SetModified()
SwLayouter::ClearFrmsNotToWrap( *this );
// #i65250#
SwLayouter::ClearMoveBwdLayoutInfo( *this );
// dem Link wird der Status returnt, wie die Flags waren und werden
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
// We return the status for the link according to the old and new value of the flags
// Bit 0: -> old state
// Bit 1: -> new state
long nCall = mbModified ? 3 : 2;
mbModified = sal_True;
pDocStat->bModified = sal_True;
@@ -1844,9 +1836,9 @@ void SwDoc::SetModified()
void SwDoc::ResetModified()
{
// dem Link wird der Status returnt, wie die Flags waren und werden
// Bit 0: -> alter Zustand
// Bit 1: -> neuer Zustand
// We return the status for the link according to the old and new value of the flags
// Bit 0: -> old state
// Bit 1: -> new state
long nCall = mbModified ? 1 : 0;
mbModified = sal_False;
// If there is already a document statistic, we assume that
@@ -1876,8 +1868,7 @@ void SwDoc::ReRead( SwPaM& rPam, const String& rGrfName,
GetIDocumentUndoRedo().AppendUndo(new SwUndoReRead(rPam, *pGrfNd));
}
// Weil nicht bekannt ist, ob sich die Grafik spiegeln laesst,
// immer das SpiegelungsAttribut zuruecksetzen
// Because we don't know if we can mirror the graphic, the mirror attribute is always reset
if( RES_MIRROR_GRAPH_DONT != pGrfNd->GetSwAttrSet().
GetMirrorGrf().GetValue() )
pGrfNd->SetAttr( SwMirrorGrf() );
@@ -1934,14 +1925,12 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* )
}
/*************************************************************************
* SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong )
* SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong )
*
* stoesst das Spelling im Idle-Handler wieder an.
* Wird bInvalid als sal_True uebergeben, so werden zusaetzlich die WrongListen
* an allen Nodes invalidiert und auf allen Seiten das SpellInvalid-Flag
* gesetzt.
* Mit bOnlyWrong kann man dann steuern, ob nur die Bereiche mit falschen
* Woertern oder die kompletten Bereiche neu ueberprueft werden muessen.
* Re-triggers spelling in the idle handler.
* If bInvalid is passed with sal_True, the WrongLists in all nodes are invalidated
* and the SpellInvalid flag is set on all pages.
* bOnlyWrong controls whether only the areas with wrong words are checked or the whole area.
************************************************************************/
void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags )
{
@@ -2069,8 +2058,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool
}
}
// loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
// versteckte Bereiche, versteckte Absaetze
// Remove the invisible content from the document e.g. hidden areas, hidden paragraphs
bool SwDoc::RemoveInvisibleContent()
{
sal_Bool bRet = sal_False;
@@ -2157,7 +2145,7 @@ bool SwDoc::RemoveInvisibleContent()
}
{
// dann noch alle versteckten Bereiche loeschen/leeren
// Delete/empty all hidden areas
SwSectionFmts aSectFmts;
SwSectionFmts& rSectFmts = GetSections();
sal_uInt16 n;
@@ -2207,7 +2195,7 @@ bool SwDoc::RemoveInvisibleContent()
pSectNd->StartOfSectionNode()->EndOfSectionIndex() ==
pSectNd->EndOfSectionIndex() + 1 )
{
// nur den Inhalt loeschen
// only delete the content
SwCntntNode* pCNd = GetNodes().GoNext(
&aPam.GetPoint()->nNode );
aPam.GetPoint()->nContent.Assign( pCNd, 0 );
@@ -2221,7 +2209,7 @@ bool SwDoc::RemoveInvisibleContent()
}
else
{
// die gesamte Section loeschen
// delete the whole section
aPam.SetMark();
aPam.GetPoint()->nNode = *pSectNd->EndOfSectionNode();
DelFullPara( aPam );
@@ -2446,10 +2434,10 @@ bool SwDoc::EmbedAllLinks()
while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks, rLnkMgr ) ) )
{
::sfx2::SvBaseLinkRef xLink = pLnk;
// dem Link sagen, das er aufgeloest wird!
// Tell the link that it's being destroyed!
xLink->Closed();
// falls einer vergessen hat sich auszutragen
// if one forgot to remove itself
if( xLink.Is() )
rLnkMgr.Remove( xLink );
@@ -2477,7 +2465,7 @@ sal_Bool SwDoc::IsInsTblAlignNum() const
return SW_MOD()->IsInsTblAlignNum(get(IDocumentSettingAccess::HTML_MODE));
}
// setze das InsertDB als Tabelle Undo auf:
// Set up the InsertDB as Undo table
void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable )
{
if( bIsTable )

View File

@@ -101,7 +101,7 @@ sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs
if( pRet && SbxNULL < pRetValue->GetType() &&
SbxVOID != pRetValue->GetType() )
// gueltiger Wert, also setzen
// valid value, so set it
*pRet = pRetValue->GetString();
}
break;
@@ -147,7 +147,7 @@ sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs
sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
sal_Bool bCheckPtr, SbxArray* pArgs, const Link* )
{
if( !pDocShell ) // ohne DocShell geht das nicht!
if( !pDocShell ) // we can't do that without a DocShell!
return 0;
sal_uInt16 nRet = 0;
@@ -163,7 +163,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) )
&& rCallEvent.PTR.pINetAttr == pItem )
{
bCheckPtr = sal_False; // als Flag missbrauchen
bCheckPtr = sal_False; // misuse as a flag
break;
}
}
@@ -179,7 +179,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
{
sal_uInt16 nPos = GetSpzFrmFmts()->GetPos( pFmt );
if( USHRT_MAX != nPos )
bCheckPtr = sal_False; // als Flag missbrauchen
bCheckPtr = sal_False; // misuse as a flag
}
if( !bCheckPtr )
pTbl = &pFmt->GetMacro().GetMacroTable();
@@ -200,7 +200,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve
for( nPos = pIMap->GetIMapObjectCount(); nPos; )
if( pIMapObj == pIMap->GetIMapObject( --nPos ))
{
bCheckPtr = sal_False; // als Flag missbrauchen
bCheckPtr = sal_False; // misuse as a flag
break;
}
}

View File

@@ -578,7 +578,7 @@ namespace sw { namespace mark
{
vector<const_iterator_t> vMarksToDelete;
bool isSortingNeeded = false;
// copy all bookmarks in the move area to a vector storing all position data as offset
// copy all bookmarks in the move area to a vector storing all position data as offsets
// reassignment is performed after the move
for(iterator_t ppMark = m_vMarks.begin();
ppMark != m_vMarks.end();
@@ -899,19 +899,19 @@ namespace sw { namespace mark
namespace
{
// Aufbau vom Array: 2 longs,
// 1. Long enthaelt Type und Position im DocArray,
// 2. die ContentPosition
// Array structure: 2 longs,
// 1st long contains the type and position in the DocArray,
// 2nd long contains the ContentPosition
//
// CntntType --
// 0x8000 = Bookmark Pos1
// 0x8001 = Bookmark Pos2
// 0x2000 = Absatzgebundener Rahmen
// 0x2001 = Auto-Absatzgebundener Rahmen, der umgehaengt werden soll
// 0x2000 = Paragraph bound frame
// 0x2001 = Auto paragraph bound frame, which should be attached
// 0x1000 = Redline Mark
// 0x1001 = Redline Point
// 0x0800 = Crsr aus der CrsrShell Mark
// 0x0801 = Crsr aus der CrsrShell Point
// 0x0800 = Crsr from the CrsrShell Mark
// 0x0801 = Crsr from the CrsrShell Point
// 0x0400 = UnoCrsr Mark
// 0x0401 = UnoCrsr Point
//
@@ -997,7 +997,7 @@ namespace
const SwPaM& rPam, _SwSaveTypeCountContent& rSave,
sal_Bool bChkSelDirection )
{
// SelektionsRichtung beachten
// Respect direction of selection
bool bBound1IsStart = !bChkSelDirection ? sal_True :
( *rPam.GetPoint() < *rPam.GetMark()
? rPam.GetPoint() == &rPam.GetBound()
@@ -1172,13 +1172,12 @@ void _DelBookmarks(
pDoc->getIDocumentMarkAccess()->deleteMarks(rStt, rEnd, pSaveBkmk, pSttIdx, pEndIdx);
// kopiere alle Redlines, die im Move Bereich stehen in ein
// Array, das alle Angaben auf die Position als Offset speichert.
// Die neue Zuordung erfolgt nach dem Moven.
// Copy all red lines which are in the move area into an array, which holds all position information as offset.
// Assignement happens after moving.
SwRedlineTbl& rTbl = (SwRedlineTbl&)pDoc->GetRedlineTbl();
for(sal_uInt16 nCnt = 0; nCnt < rTbl.Count(); ++nCnt )
{
// liegt auf der Position ??
// Is at position?
SwRedline* pRedl = rTbl[ nCnt ];
SwPosition *pRStt = &pRedl->GetBound(sal_True),
@@ -1314,7 +1313,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
}
}
// 4. Absatzgebundene Objekte
// 4. Paragraph bound objects
{
SwCntntNode *pNode = pDoc->GetNodes()[nNode]->GetCntntNode();
if( pNode )
@@ -1326,7 +1325,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
if( bViaDoc )
pFrm = NULL;
#endif
if( pFrm ) // gibt es ein Layout? Dann ist etwas billiger...
if( pFrm ) // Do we have a layout? Then it's a bit cheaper ...
{
if( pFrm->GetDrawObjs() )
{
@@ -1370,7 +1369,7 @@ void _SaveCntntIdx(SwDoc* pDoc,
}
}
}
else // Schade, kein Layout, dann ist es eben etwas teurer...
else // No layout, so it's a bit more expensive ...
{
for( aSave.SetCount( pDoc->GetSpzFrmFmts()->Count() );
aSave.GetCount() ; )

View File

@@ -72,30 +72,30 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
const SwTableBox* pSttBox, *pEndBox;
if( 2 < rSelection.Len() )
{
// spitze Klammern am Anfang & Ende enfernen
// Remove brackets at the beginning and from the end
String sBox( rSelection );
if( '<' == sBox.GetChar( 0 ) ) sBox.Erase( 0, 1 );
if( '>' == sBox.GetChar( sBox.Len()-1 ) ) sBox.Erase( sBox.Len()-1 );
xub_StrLen nTrenner = sBox.Search( ':' );
OSL_ENSURE( STRING_NOTFOUND != nTrenner, "keine gueltige Selektion" );
xub_StrLen nSeperator = sBox.Search( ':' );
OSL_ENSURE( STRING_NOTFOUND != nSeperator, "no valid selection" );
pSttBox = GetTblBox( sBox.Copy( 0, nTrenner ));
pEndBox = GetTblBox( sBox.Copy( nTrenner+1 ));
pSttBox = GetTblBox( sBox.Copy( 0, nSeperator ));
pEndBox = GetTblBox( sBox.Copy( nSeperator+1 ));
}
else
{
const SwTableLines* pLns = &GetTabLines();
pSttBox = (*pLns)[ 0 ]->GetTabBoxes()[ 0 ];
while( !pSttBox->GetSttNd() )
// bis zur Content Box!
// Until the Content Box!
pSttBox = pSttBox->GetTabLines()[ 0 ]->GetTabBoxes()[ 0 ];
const SwTableBoxes* pBoxes = &(*pLns)[ pLns->Count()-1 ]->GetTabBoxes();
pEndBox = (*pBoxes)[ pBoxes->Count()-1 ];
while( !pEndBox->GetSttNd() )
{
// bis zur Content Box!
// Until the Content Box!
pLns = &pEndBox->GetTabLines();
pBoxes = &(*pLns)[ pLns->Count()-1 ]->GetTabBoxes();
pEndBox = (*pBoxes)[ pBoxes->Count()-1 ];

View File

@@ -74,24 +74,21 @@ protected:
vector< CompareLine* > aLines;
sal_uLong nSttLineNum;
// Anfang und Ende beschneiden und alle anderen in das
// LinesArray setzen
// Truncate beginning and end and add all others to the LinesArray
virtual void CheckRanges( CompareData& ) = 0;
public:
CompareData();
virtual ~CompareData();
// gibt es unterschiede?
// Are there differences?
sal_Bool HasDiffs( const CompareData& rData ) const;
// startet das Vergleichen und Erzeugen der Unterschiede zweier
// Dokumente
// Triggers the comparison and creation of two documents
void CompareLines( CompareData& rData );
// lasse die Unterschiede anzeigen - ruft die beiden Methoden
// ShowInsert / ShowDelete. Diese bekommen die Start und EndLine-Nummer
// uebergeben. Die Abbildung auf den tatsaechline Inhalt muss die
// Ableitung uebernehmen!
// Display the differences - calls the methods ShowInsert and ShowDelete.
// These are passed the start and end line number.
// Displaying the actually content is to be handled by the subclass!
sal_uLong ShowDiffs( const CompareData& rData );
virtual void ShowInsert( sal_uLong nStt, sal_uLong nEnd );
@@ -101,13 +98,12 @@ public:
sal_uLong& nStt, sal_uLong& nEnd,
sal_uLong& nThisStt, sal_uLong& nThisEnd );
// Eindeutigen Index fuer eine Line setzen. Gleiche Lines haben den
// selben Index; auch in den anderen CompareData!
// Set non-ambiguous index for a line. Same lines have the same index, even in the other CompareData!
void SetIndex( size_t nLine, size_t nIndex );
size_t GetIndex( size_t nLine ) const
{ return nLine < aLines.size() ? pIndex[ nLine ] : 0; }
// setze/erfrage ob eine Zeile veraendert ist
// Set/get of a line has changed
void SetChanged( size_t nLine, bool bFlag = true );
bool GetChanged( size_t nLine ) const
{
@@ -167,7 +163,7 @@ public:
};
private:
// Suche die verschobenen Lines
// Look for the moved lines
class CompareSequence
{
CompareData &rData1, &rData2;
@@ -260,8 +256,8 @@ sal_uLong CompareData::ShowDiffs( const CompareData& rData )
while( nStt1 < nLen1 && rData.GetChanged( nStt1 )) ++nStt1;
while( nStt2 < nLen2 && GetChanged( nStt2 )) ++nStt2;
// rData ist das Original,
// this ist das, in das die Veraenderungen sollen
// rData is the original,
// this is what should go to the change
if( nSav2 != nStt2 && nSav1 != nStt1 )
CheckForChangesInLine( rData, nSav1, nStt1, nSav2, nStt2 );
@@ -397,7 +393,7 @@ void Hash::CalcHashValue( CompareData& rData )
Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
{
MovedData *pMD1, *pMD2;
// Suche die unterschiedlichen Lines
// Look for the differing lines
{
sal_Char* pDiscard1 = new sal_Char[ rData1.GetLineCount() ];
sal_Char* pDiscard2 = new sal_Char[ rData2.GetLineCount() ];
@@ -407,17 +403,16 @@ Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
memset( pCount1, 0, nDiff * sizeof( sal_uLong ));
memset( pCount2, 0, nDiff * sizeof( sal_uLong ));
// stelle fest, welche Indizies in den CompareData mehrfach vergeben wurden
// find indices in CompareData which have been assigned multiple times
CountDifference( rData1, pCount1 );
CountDifference( rData2, pCount2 );
// alle die jetzt nur einmal vorhanden sind, sind eingefuegt oder
// geloescht worden. Alle die im anderen auch vorhanden sind, sind
// verschoben worden
// All which occur only once now have either been inserted or deleted.
// All which are also contained in the other one have been moved.
SetDiscard( rData1, pDiscard1, pCount2 );
SetDiscard( rData2, pDiscard2, pCount1 );
// die Arrays koennen wir wieder vergessen
// forget the arrays again
delete [] pCount1; delete [] pCount2;
CheckDiscard( rData1.GetLineCount(), pDiscard1 );
@@ -426,7 +421,7 @@ Compare::Compare( sal_uLong nDiff, CompareData& rData1, CompareData& rData2 )
pMD1 = new MovedData( rData1, pDiscard1 );
pMD2 = new MovedData( rData2, pDiscard2 );
// die Arrays koennen wir wieder vergessen
// forget the arrays again
delete [] pDiscard1; delete [] pDiscard2;
}
@@ -455,7 +450,7 @@ void Compare::SetDiscard( const CompareData& rData,
{
sal_uLong nLen = rData.GetLineCount();
// berechne Max in Abhanegigkeit zur LineAnzahl
// calculate Max with respect to the line count
sal_uInt16 nMax = 5;
sal_uLong n;
@@ -610,7 +605,7 @@ Compare::MovedData::~MovedData()
delete [] pLineNum;
}
// Suche die verschobenen Lines
// Find the differing lines
Compare::CompareSequence::CompareSequence(
CompareData& rD1, CompareData& rD2,
const MovedData& rMD1, const MovedData& rMD2 )
@@ -841,7 +836,7 @@ public:
const SwNode& GetEndNode() const;
// fuers Debugging!
// for debugging
String GetText() const;
};
@@ -910,7 +905,7 @@ sal_uLong SwCompareLine::GetHashValue() const
case ND_GRFNODE:
case ND_OLENODE:
// feste Id ? sollte aber nie auftauchen
// Fixed ID? Should never occur ...
break;
}
return nRet;
@@ -1130,11 +1125,10 @@ sal_Bool SwCompareLine::CompareTxtNd( const SwTxtNode& rDstNd,
const SwTxtNode& rSrcNd )
{
sal_Bool bRet = sal_False;
// erstmal ganz einfach!
// Very simple at first
if( rDstNd.GetTxt() == rSrcNd.GetTxt() )
{
// der Text ist gleich, aber sind die "Sonderattribute" (0xFF) auch
// dieselben??
// The text is the same, but are the "special attributes" (0xFF) also the same?
bRet = sal_True;
}
return bRet;
@@ -1173,8 +1167,8 @@ sal_Bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine,
if( nStt || !nDEnd || !nSEnd || nDEnd < rDestNd.GetTxt().Len() ||
nSEnd < rSrcNd.GetTxt().Len() )
{
// jetzt ist zwischen nStt bis nDEnd das neu eingefuegte
// und zwischen nStt und nSEnd das geloeschte
// The newly inserted is now between nStt and nDEnd
// and the deleted is between nStt and nSEnd
SwDoc* pDoc = rDestNd.GetDoc();
SwPaM aPam( rDestNd, nDEnd );
if( nStt != nDEnd )
@@ -1493,7 +1487,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp,
aEmptyStr, 0, 0 );
// zusammenhaengende zusammenfassen
// combine consecutive
if( pTmp->GetNext() != pInsRing )
{
const SwCntntNode* pCNd;
@@ -1509,7 +1503,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
{
if( pTmp->GetNext() == pInsRing )
{
// liegen hintereinander also zusammen fassen
// are consecutive, so combine
rEndStt = *pTmp->Start();
delete pTmp;
pTmp = pInsRing;
@@ -1537,7 +1531,7 @@ void SwCompareData::SetRedlinesToDoc( sal_Bool bUseDocInfo )
}
}
// returnt (?die Anzahl der Unterschiede?) ob etwas unterschiedlich ist
// Returns (the difference count?) if something is different
long SwDoc::CompareDoc( const SwDoc& rDoc )
{
if( &rDoc == this )
@@ -1606,7 +1600,7 @@ _SaveMergeRedlines::_SaveMergeRedlines( const SwNode& rDstNd,
if( nsRedlineType_t::REDLINE_DELETE == pDestRedl->GetType() )
{
// den Bereich als geloescht kennzeichnen
// mark the area as deleted
const SwPosition* pEnd = pStt == rSrcRedl.GetPoint()
? rSrcRedl.GetMark()
: rSrcRedl.GetPoint();
@@ -1626,7 +1620,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
if( nsRedlineType_t::REDLINE_INSERT == pDestRedl->GetType() )
{
// der Teil wurde eingefuegt, also kopiere ihn aus dem SourceDoc
// the part was inserted so copy it from the SourceDoc
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
SwNodeIndex aSaveNd( pDestRedl->GetPoint()->nNode, -1 );
@@ -1657,13 +1651,12 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
else
{
//JP 21.09.98: Bug 55909
// falls im Doc auf gleicher Pos aber schon ein geloeschter oder
// eingefuegter ist, dann muss dieser gesplittet werden!
// If there already is a deleted or inserted one at the same position, we have to split it!
SwPosition* pDStt = pDestRedl->GetMark(),
* pDEnd = pDestRedl->GetPoint();
sal_uInt16 n = 0;
// zur StartPos das erste Redline suchen
// find the first redline for StartPos
if( !pDoc->GetRedline( *pDStt, &n ) && n )
--n;
@@ -1687,7 +1680,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
case POS_INSIDE:
case POS_EQUAL:
delete pDestRedl, pDestRedl = 0;
// break; -> kein break !!!!
// break; -> no break !!!!
case POS_COLLIDE_END:
case POS_BEFORE:
@@ -1715,7 +1708,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
*pDStt = *pREnd;
// dann solle man neu anfangen
// we should start over now
n = USHRT_MAX;
}
break;
@@ -1756,7 +1749,7 @@ sal_uInt16 _SaveMergeRedlines::InsertRedline()
return nIns;
}
// merge zweier Dokumente
// Merge two documents
long SwDoc::MergeDoc( const SwDoc& rDoc )
{
if( &rDoc == this )
@@ -1780,10 +1773,9 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
if( !aD1.HasDiffs( aD0 ) )
{
// jetzt wollen wir alle Redlines aus dem SourceDoc zu uns bekommen
// we want to get all redlines from the SourceDoc
// suche alle Insert - Redlines aus dem SourceDoc und bestimme
// deren Position im DestDoc
// look for all insert redlines from the SourceDoc and determine their position in the DestDoc
_SaveMergeRedlines* pRing = 0;
const SwRedlineTbl& rSrcRedlTbl = rSrcDoc.GetRedlineTbl();
sal_uLong nEndOfExtra = rSrcDoc.GetNodes().GetEndOfExtras().GetIndex();
@@ -1799,8 +1791,8 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
const SwNode* pDstNd = GetNodes()[
nMyEndOfExtra + nNd - nEndOfExtra ];
// Position gefunden. Dann muss im DestDoc auch
// in der Line das Redline eingefuegt werden
// Found the positon.
// Then we also have to insert the redline to the line in the DestDoc.
_SaveMergeRedlines* pTmp = new _SaveMergeRedlines(
*pDstNd, *pRedl, pRing );
if( !pRing )
@@ -1810,7 +1802,7 @@ long SwDoc::MergeDoc( const SwDoc& rDoc )
if( pRing )
{
// dann alle ins DestDoc ueber nehmen
// Carry over all into DestDoc
rSrcDoc.SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE));
SetRedlineMode((RedlineMode_t)(

View File

@@ -45,7 +45,7 @@
#include <hints.hxx>
/*
* MACROS um ueber alle CrsrShells zu iterieren
* Macros to iterate over all CrsrShells
*/
#define PCURSH ((SwCrsrShell*)_pStartShell)
#define FOREACHSHELL_START( pEShell ) \
@@ -327,7 +327,7 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
{
getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset);
{ // dann die Redlines korrigieren
{ // fix the Redlines
SwRedlineTbl& rTbl = *pRedlineTbl;
SwPosition aNewPos(rNewPos);
for( sal_uInt16 n = 0; n < rTbl.Count(); ++n )
@@ -344,14 +344,14 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode,
SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const
{
// Layout und OLE-Shells sollten vorhanden sein!
// Layout and OLE shells should be available
if( pCurrentView )
{
ViewShell *pSh = pCurrentView, *pVSh = pSh;
if( ppSh )
*ppSh = pSh;
// wir suchen uns eine EditShell, falls diese existiert
// look for an EditShell (if it exists)
do {
if( pSh->IsA( TYPE( SwEditShell ) ) )
return (SwEditShell*)pSh;