diff options
author | Marcus Lange <marcus@apache.org> | 2016-11-10 14:12:56 +0000 |
---|---|---|
committer | Marcus Lange <marcus@apache.org> | 2016-11-10 14:12:56 +0000 |
commit | af0e5f5c14ead7879700f34a1ffbbae5f90ac1b1 (patch) | |
tree | f3c1aa0e285f7215e842644bfa0103909e70efac /sw | |
parent | 8df1c30b7f5e79c2757e7224677f9a487b1bed0a (diff) |
#i39199# Translated comments from German to English
Notes
Notes:
prefer: ed870efe80397042d8f51d2ca7002025ba4e111f
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 167 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 169 |
2 files changed, 160 insertions, 176 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index af9a28f1069e..1a65ca681697 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -73,32 +73,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> // PoolTemplate ID's +#include <mvsave.hxx> // for server functionality #include <SwGrammarMarkUp.hxx> #include <scriptinfo.hxx> -#include <acorrect.hxx> // Autokorrektur -#include <mdiexp.hxx> // Statusanzeige +#include <acorrect.hxx> // AutoCorrect +#include <mdiexp.hxx> // status display #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> @@ -126,11 +126,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 @@ -609,7 +609,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) if( !pPrt ) { - //Das ItemSet wird vom Sfx geloescht! + // the ItemSet will be deleted by Sfx! SfxItemSet *pSet = new SfxItemSet( GetAttrPool(), FN_PARAM_ADDPRINTER, FN_PARAM_ADDPRINTER, SID_HTML_MODE, SID_HTML_MODE, @@ -659,8 +659,8 @@ void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData ) */ /* - * Dokumenteditieren (Doc-SS) zum Fuellen des Dokuments - * durch den RTF Parser und fuer die EditShell. + * Document editing (Doc-SS) to fill the documents + * by the RTF parser and for the EditShell. */ void SwDoc::ChgDBData(const SwDBData& rNewData) { @@ -679,9 +679,9 @@ 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: Sent DataChanged before deletion, then you can + // still notice which objects are in the range. + // After that the objects can be before/after the position. SwDataChanged aTmp( this, rPos, 0 ); } @@ -689,7 +689,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart ) if (GetIDocumentUndoRedo().DoesUndo()) { GetIDocumentUndoRedo().ClearRedo(); - // einfuegen vom Undo-Object, z.Z. nur beim TextNode + // insert the Undo object, currentlx only in TextNode if( pNode->IsTxtNode() ) { pUndo = new SwUndoSplitNode( this, rPos, bChkTableStart ); @@ -697,10 +697,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: + // Are they at Doc/Fly/Footer/..-Start or directly + // behind a table, then insert a paragraph before it if( bChkTableStart && !rPos.nContent.GetIndex() && pNode->IsTxtNode() ) { sal_uLong nPrevPos = rPos.nNode.GetIndex() - 1; @@ -717,14 +716,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 + // Outside of the normal BodyArea there are no page breaks, + // therefore this is no valid condition for inserting a paragraph if( nPrevPos < GetNodes().GetEndOfExtras().GetIndex() ) pNd = 0; else { - // Dann nur, wenn die Tabelle Umbrueche traegt! + // only when the table has 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 ) ) @@ -742,7 +740,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 move the page break/page style inside the BodyArea if( nPrevPos > GetNodes().GetEndOfExtras().GetIndex() ) { SwFrmFmt* pFrmFmt = pTblNd->GetTable().GetFrmFmt(); @@ -778,7 +776,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart ) pNode = pNode->SplitCntntNode( rPos ); if (pNode) { - // verschiebe noch alle Bookmarks/TOXMarks/FlyAtCnt + // now move all Bookmarks/TOXMarks/FlyAtCnt if( aBkmkArr.Count() ) _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, sal_True ); @@ -804,7 +802,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos ) SwTxtNode * pCurNode = rPos.nNode.GetNode().GetTxtNode(); if( !pCurNode ) { - // dann kann ja einer angelegt werden! + // now a node can be created! SwNodeIndex aIdx( rPos.nNode, 1 ); pCurNode = GetNodes().MakeTxtNode( aIdx, GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); @@ -845,7 +843,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr, const SwPosition& rPos = *rRg.GetPoint(); - if( pACEWord ) // Aufnahme in die Autokorrektur + if( pACEWord ) // take it to AutoCorrect { if( 1 == rStr.Len() && pACEWord->IsDeleted() ) { @@ -875,7 +873,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, then all is different! SwUndoInsert * pUndo = NULL; // #111827# // don't group the start if hints at the start should be expanded @@ -907,7 +905,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() is returning sal_True, then all is already done if( !pUndo->CanGrouping( rStr.GetChar( i ) )) { pUndo = new SwUndoInsert( rPos.nNode, nInsPos, 1, nInsertMode, @@ -1035,7 +1033,7 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName, /************************************************************************* |* SwDoc::GetFldType() -|* Beschreibung: liefert den am Doc eingerichteten Feldtypen zurueck +|* Description: delievers the field type back which is arranged at the Doc *************************************************************************/ SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const @@ -1083,12 +1081,11 @@ 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: + // When a PostItFld is in a Node that is represented by more than one layout + // instance, then there is the question, whether the PostIt should be printed + // 1 or n-times. Likely only 1 time. Don't seek a random one as page number + // but the first occurrence of the PostIt within the selected area. rVirtPgNo = 0; sal_uInt16 nPos = GetCntnt(); SwIterator<SwTxtFrm,SwTxtNode> aIter( GetTxtFld()->GetTxtNode() ); @@ -1121,7 +1118,7 @@ bool lcl_GetPostIts( if( pFldType->GetDepends() ) { - // Modify-Object gefunden, trage alle Felder ins Array ein + // Modify object found, insert all fields into the array SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType ); const SwTxtFld* pTxtFld; for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() ) @@ -1275,11 +1272,12 @@ void SwDoc::CalculatePagesForPrinting( DBG_ASSERT( nFirstPageNo, "first page not found! Should not happen!" ); if (nFirstPageNo) { -// HACK: Hier muss von der MultiSelection noch eine akzeptable Moeglichkeit -// geschaffen werden, alle Seiten von Seite x an zu deselektieren. -// Z.B. durch SetTotalRange .... +// Start of HACK: +// Here an acceptable possibility has to be created by the MultiSelection, +// to deselect all pages starting from page x. +// E.g., with SetTotalRange .... -// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), sal_False ); +// aMulti.Select( Range( nLastPageNo+1, SELECTION_MAX ), sal_False ); MultiSelection aTmpMulti( Range( 1, nLastPageNo ) ); long nTmpIdx = aMulti.FirstSelected(); static long nEndOfSelection = SFX_ENDOFSELECTION; @@ -1289,7 +1287,7 @@ void SwDoc::CalculatePagesForPrinting( nTmpIdx = aMulti.NextSelected(); } aMulti = aTmpMulti; -// Ende des HACKs +// End of HACK nPageNo = nFirstPageNo; @@ -1327,13 +1325,10 @@ void SwDoc::CalculatePagesForPrinting( } } - - // // now that we have identified the valid pages for printing according // to the print settings we need to get the PageRange to use and // use both results to get the actual pages to be printed // (post-it settings need to be taken into account later on!) - // // get PageRange value to use OUString aPageRange; @@ -1655,12 +1650,11 @@ void SwDoc::CalculatePagePairsForProspectPrinting( aVec.push_back( 0 ); } - // dann sorge mal dafuer, das alle Seiten in der richtigen - // Reihenfolge stehen: + // now make sure that all pages are in the correct order sal_uInt16 nSPg = 0; sal_uInt32 nEPg = aVec.size(); sal_uInt16 nStep = 1; - if ( 0 == (nEPg & 1 )) // ungerade gibt es nicht! + if ( 0 == (nEPg & 1 )) // there is no odd! --nEPg; if ( !bPrintLeftPages ) @@ -1721,7 +1715,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat ) if( rStat.bModified ) { rStat.Reset(); - rStat.nPara = 0; // Default ist auf 1 !! + rStat.nPara = 0; // default is 1 !! SwNode* pNd; for( sal_uLong i = GetNodes().Count(); i; ) @@ -1795,14 +1789,14 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat ) } } - // event. Stat. Felder Updaten + // if necessary update statistical fields SwFieldType *pType = GetSysFldType(RES_DOCSTATFLD); pType->UpdateFlds(); } } -// Dokument - Info +// Document - Info void SwDoc::DocInfoChgd( ) { @@ -1811,7 +1805,7 @@ void SwDoc::DocInfoChgd( ) SetModified(); } - // returne zum Namen die im Doc gesetzte Referenz + // return the reference that is set in the Doc, together with the name const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const { const SfxPoolItem* pItem; @@ -1830,7 +1824,7 @@ const SwFmtRefMark* SwDoc::GetRefMark( const String& rName ) const return 0; } - // returne die RefMark per Index - fuer Uno + // return the RefMark by Index - for Uno const SwFmtRefMark* SwDoc::GetRefMark( sal_uInt16 nIndex ) const { const SfxPoolItem* pItem; @@ -1854,10 +1848,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 references that are set in the Doc + // JP 24.06.96: If the ArrayPointer is 0 then return only when a RefMark is set in the Doc + // OS 25.06.96: from now on always return the number of the references sal_uInt16 SwDoc::GetRefMarks( SvStringsDtor* pNames ) const { const SfxPoolItem* pItem; @@ -1936,9 +1929,9 @@ void SwDoc::SetModified() // --> OD 2006-05-10 #i65250# SwLayouter::ClearMoveBwdLayoutInfo( *this ); // <-- - // dem Link wird der Status returnt, wie die Flags waren und werden - // Bit 0: -> alter Zustand - // Bit 1: -> neuer Zustand + // return the status to the link, how the flags were and will be + // Bit 0: -> old status + // Bit 1: -> new status long nCall = mbModified ? 3 : 2; mbModified = sal_True; pDocStat->bModified = sal_True; @@ -1955,9 +1948,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 + // return the status to the link, how the flags were and will be + // Bit 0: -> old status + // Bit 1: -> new status long nCall = mbModified ? 1 : 0; mbModified = sal_False; // If there is already a document statistic, we assume that @@ -1988,8 +1981,8 @@ 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 it's not known if the graphic can be mirrored, + // always set back the MirrorAttribute if( RES_MIRROR_GRAPH_DONT != pGrfNd->GetSwAttrSet(). GetMirrorGrf().GetValue() ) pGrfNd->SetAttr( SwMirrorGrf() ); @@ -2049,12 +2042,12 @@ sal_Bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) /************************************************************************* * 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. + * Is activating again the spelling in the Idle handler. + * When bInvalid will be hand over as sal_True, then additionally the WrongLists + * on all Nodes will be invalidated and on all pages the SpellInvalid flag + * will be set. + * With bOnlyWrong you can controll, whether only the areas with wrong words + * or the complete areas have to be checked again. ************************************************************************/ void SwDoc::SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags ) @@ -2184,8 +2177,8 @@ 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 + // don't delete the visible content from the document, like e.g., + // hidden sections, hidden paragraphs bool SwDoc::RemoveInvisibleContent() { sal_Bool bRet = sal_False; @@ -2274,7 +2267,7 @@ bool SwDoc::RemoveInvisibleContent() } { - // dann noch alle versteckten Bereiche loeschen/leeren + // now delete/empty all hidden sections SwSectionFmts aSectFmts; SwSectionFmts& rSectFmts = GetSections(); sal_uInt16 n; @@ -2324,7 +2317,7 @@ bool SwDoc::RemoveInvisibleContent() pSectNd->StartOfSectionNode()->EndOfSectionIndex() == pSectNd->EndOfSectionIndex() + 1 ) { - // nur den Inhalt loeschen + // delete only the content SwCntntNode* pCNd = GetNodes().GoNext( &aPam.GetPoint()->nNode ); aPam.GetPoint()->nContent.Assign( pCNd, 0 ); @@ -2338,7 +2331,7 @@ bool SwDoc::RemoveInvisibleContent() } else { - // die gesamte Section loeschen + // delete the complete section aPam.SetMark(); aPam.GetPoint()->nNode = *pSectNd->EndOfSectionNode(); DelFullPara( aPam ); @@ -2528,7 +2521,7 @@ bool SwDoc::LinksUpdated() const return mbLinksUpdated; } - // embedded alle lokalen Links (Bereiche/Grafiken) + // embed all local links (sections/graphics) ::sfx2::SvBaseLink* lcl_FindNextRemovableLink( const ::sfx2::SvBaseLinks& rLinks, sfx2::LinkManager& rLnkMgr ) { for( sal_uInt16 n = 0; n < rLinks.Count(); ++n ) @@ -2565,10 +2558,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 will be cleared! xLink->Closed(); - // falls einer vergessen hat sich auszutragen + // in the case a link was not deregistered if( xLink.Is() ) rLnkMgr.Remove( xLink ); @@ -2582,7 +2575,7 @@ bool SwDoc::EmbedAllLinks() } /*-------------------------------------------------------------------- - Beschreibung: + Description: --------------------------------------------------------------------*/ sal_Bool SwDoc::IsInsTblFormatNum() const @@ -2596,7 +2589,7 @@ sal_Bool SwDoc::IsInsTblChangeNumFormat() const } /*-------------------------------------------------------------------- - Beschreibung: + Description: --------------------------------------------------------------------*/ sal_Bool SwDoc::IsInsTblAlignNum() const @@ -2604,7 +2597,7 @@ sal_Bool SwDoc::IsInsTblAlignNum() const return SW_MOD()->IsInsTblAlignNum(get(IDocumentSettingAccess::HTML_MODE)); } - // setze das InsertDB als Tabelle Undo auf: + // set the InsertDB as table Undo to: void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, sal_Bool bIsTable ) { if( bIsTable ) diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 0b9757c24ab1..6704f2b11ce8 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -48,8 +48,8 @@ #include <doc.hxx> #include <IDocumentUndoRedo.hxx> #include <docary.hxx> -#include <pagefrm.hxx> //Fuer DelPageDesc -#include <rootfrm.hxx> //Fuer DelPageDesc +#include <pagefrm.hxx> // for DelPageDesc +#include <rootfrm.hxx> // for DelPageDesc #include <ndtxt.hxx> #include <frmtool.hxx> #include <pagedesc.hxx> @@ -90,10 +90,9 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId, const Size aPhysSize = SvxPaperInfo::GetDefaultPaperSize(); aFrmSize.SetSize( aPhysSize ); - //Auf Default-Raender vorbereiten. - //Raender haben eine defaultmaessige Mindestgroesse. - //wenn der Drucker einen groesseren Rand vorgibt, so - //ist mir dass auch recht. + // Prepare for default margins. + // Margins have a default minimum size. + // If the printer gives a larger margin, then it's OK as well. // MIB 06/25/2002, #99397#: The HTML page desc had A4 as page size // always. This has been changed to take the page size from the printer. // Unfortunately, the margins of the HTML page desc are smaller than @@ -108,15 +107,15 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId, } else if( MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() ) { - nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; //2 Zentimeter + nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; //2 centimeters } else { - nMinTop = nMinBottom = 1440; //al la WW: 1Inch + nMinTop = nMinBottom = 1440; //al la WW: 1 Inch nMinLeft = nMinRight = 1800; // 1,25 Inch } - //Raender einstellen. + // set the margins SvxLRSpaceItem aLR( RES_LR_SPACE ); SvxULSpaceItem aUL( RES_UL_SPACE ); @@ -138,8 +137,8 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId, |* |* SwDoc::ChgPageDesc() |* -|* Ersterstellung MA 25. Jan. 93 -|* Letzte Aenderung MA 01. Mar. 95 +|* Created MA 25. Jan. 93 +|* Last change MA 01. Mar. 95 |* |*************************************************************************/ @@ -148,10 +147,10 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, { /////////////// !!!!!!!!!!!!!!!! //JP 03.03.99: -// eigentlich sollte hier das Intersect von ItemSet benutzt werden, aber das -// funktioniert nicht richtig, wenn man unterschiedliche WhichRanges hat. +// Actually the Intersect from ItemSet should be used here but that doesn't +// work correctly when you have different WhichRanges. /////////////// !!!!!!!!!!!!!!!! - //Die interressanten Attribute uebernehmen. + // Take over the interesting attributes. sal_uInt16 __READONLY_DATA aIdArr[] = { RES_FRM_SIZE, RES_UL_SPACE, // [83..86 RES_BACKGROUND, RES_SHADOW, // [99..101 @@ -222,7 +221,7 @@ void lcl_DescSetAttr( const SwFrmFmt &rSource, SwFrmFmt &rDest, } } - // auch Pool-, Hilfe-Id's uebertragen + // transfer also the Pool-, Help-ID's rDest.SetPoolFmtId( rSource.GetPoolFmtId() ); rDest.SetPoolHelpId( rSource.GetPoolHelpId() ); rDest.SetPoolHlpFileId( rSource.GetPoolHlpFileId() ); @@ -243,26 +242,26 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) } ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); - //Als erstes wird ggf. gespiegelt. + // first mirror if necessary if ( rChged.GetUseOn() == nsUseOnPage::PD_MIRROR ) ((SwPageDesc&)rChged).Mirror(); else - //sonst Werte aus Master nach Left uebertragen. + // otherwise transfer the values from Master to Left. ::lcl_DescSetAttr( ((SwPageDesc&)rChged).GetMaster(), ((SwPageDesc&)rChged).GetLeft() ); - //NumType uebernehmen. + // take over NumType. if( rChged.GetNumType().GetNumberingType() != pDesc->GetNumType().GetNumberingType() ) { pDesc->SetNumType( rChged.GetNumType() ); - // JP 30.03.99: Bug 64121 - den Seitennummernfeldern bescheid sagen, - // das sich das Num-Format geaendert hat + // JP 30.03.99: Bug 64121 - tell it to the page number fields + // that the numbering format has changed GetSysFldType( RES_PAGENUMBERFLD )->UpdateFlds(); GetSysFldType( RES_REFPAGEGETFLD )->UpdateFlds(); - // Wenn sich die Numerierungsart geaendert hat, koennte es QuoVadis/ - // ErgoSum-Texte geben, die sich auf eine geaenderte Seite beziehen, - // deshalb werden die Fussnoten invalidiert + // When the numbering type has changed, it's possible that there are QuoVadis/ + // ErgoSum texts, that are referring to a changed page, + // therefore the foot notes will be invalidated SwFtnIdxs& rFtnIdxs = GetFtnIdxs(); for( sal_uInt16 nPos = 0; nPos < rFtnIdxs.Count(); ++nPos ) { @@ -272,18 +271,18 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) } } - //Orientierung uebernehmen + // take over the orientation pDesc->SetLandscape( rChged.GetLandscape() ); // #i46909# no undo if header or footer changed bool bHeaderFooterChanged = false; - //Header abgleichen. + // align header const SwFmtHeader &rHead = rChged.GetMaster().GetHeader(); if (undoGuard.UndoWasEnabled()) { // #i46909# no undo if header or footer changed - // hat sich an den Nodes etwas veraendert ? + // are there changes in the Nodes? const SwFmtHeader &rOldHead = pDesc->GetMaster().GetHeader(); bHeaderFooterChanged |= ( rHead.IsActive() != rOldHead.IsActive() || @@ -292,21 +291,20 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) pDesc->GetMaster().SetFmtAttr( rHead ); if ( rChged.IsHeaderShared() || !rHead.IsActive() ) { - //Left teilt sich den Header mit dem Master. + // Left is sharing the Header with the Master pDesc->GetLeft().SetFmtAttr( pDesc->GetMaster().GetHeader() ); } else if ( rHead.IsActive() ) - { //Left bekommt einen eigenen Header verpasst wenn das Format nicht - //bereits einen hat. - //Wenn er bereits einen hat und dieser auf die gleiche Section - //wie der Rechte zeigt, so muss er einen eigenen bekommen. Der - //Inhalt wird sinnigerweise kopiert. + { // Left get an own Header, when the Format hasn't one already. + // If it has already one and it refers to the same section like the Right, + // then it has to get an own Header. The content will be copied accordingly. + const SwFmtHeader &rLeftHead = pDesc->GetLeft().GetHeader(); if ( !rLeftHead.IsActive() ) { SwFmtHeader aHead( MakeLayoutFmt( RND_STD_HEADERL, 0 ) ); pDesc->GetLeft().SetFmtAttr( aHead ); - //Weitere Attribute (Raender, Umrandung...) uebernehmen. + // take over further attributes (margins, borders ...) ::lcl_DescSetAttr( *rHead.GetHeaderFmt(), *aHead.GetHeaderFmt(), sal_False); } else @@ -321,9 +319,8 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Header", GetDfltFrmFmt() ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); - //Der Bereich auf den das rechte Kopfattribut zeigt wird - //kopiert und der Index auf den StartNode in das linke - //Kopfattribut gehaengt. + // The section that refers to the right head attribute will be copied and + // the index on the StartNode will be attached into the left head attribute. SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() ); SwStartNode* pSttNd = GetNodes().MakeEmptySection( aTmp, SwHeaderStartNode ); SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, @@ -342,12 +339,12 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) } pDesc->ChgHeaderShare( rChged.IsHeaderShared() ); - //Footer abgleichen. + // align footer const SwFmtFooter &rFoot = rChged.GetMaster().GetFooter(); if (undoGuard.UndoWasEnabled()) { // #i46909# no undo if header or footer changed - // hat sich an den Nodes etwas veraendert ? + // are there changes in the Nodes? const SwFmtFooter &rOldFoot = pDesc->GetMaster().GetFooter(); bHeaderFooterChanged |= ( rFoot.IsActive() != rOldFoot.IsActive() || @@ -355,20 +352,18 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) } pDesc->GetMaster().SetFmtAttr( rFoot ); if ( rChged.IsFooterShared() || !rFoot.IsActive() ) - //Left teilt sich den Header mit dem Master. + // Left is sharing the Footer with the Master pDesc->GetLeft().SetFmtAttr( pDesc->GetMaster().GetFooter() ); else if ( rFoot.IsActive() ) - { //Left bekommt einen eigenen Footer verpasst wenn das Format nicht - //bereits einen hat. - //Wenn er bereits einen hat und dieser auf die gleiche Section - //wie der Rechte zeigt, so muss er einen eigenen bekommen. Der - //Inhalt wird sinnigerweise kopiert. + { // Left get an own Footer, when the Format hasn't one already. + // If it has already one and it refers to the same section like the Right, + // then it has to get an own Footer. The content will be copied accordingly. const SwFmtFooter &rLeftFoot = pDesc->GetLeft().GetFooter(); if ( !rLeftFoot.IsActive() ) { SwFmtFooter aFoot( MakeLayoutFmt( RND_STD_FOOTER, 0 ) ); pDesc->GetLeft().SetFmtAttr( aFoot ); - //Weitere Attribute (Raender, Umrandung...) uebernehmen. + // take over further attributes (margins, borders ...) ::lcl_DescSetAttr( *rFoot.GetFooterFmt(), *aFoot.GetFooterFmt(), sal_False); } else @@ -383,9 +378,8 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), "Footer", GetDfltFrmFmt() ); ::lcl_DescSetAttr( *pRight, *pFmt, sal_False ); - //Der Bereich auf den das rechte Kopfattribut zeigt wird - //kopiert und der Index auf den StartNode in das linke - //Kopfattribut gehaengt. + // The section that refers to the right head attribute will be copied and + // the index on the StartNode will be attached into the left head attribute. SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() ); SwStartNode* pSttNd = GetNodes().MakeEmptySection( aTmp, SwFooterStartNode ); SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, @@ -406,11 +400,10 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) if ( pDesc->GetName() != rChged.GetName() ) pDesc->SetName( rChged.GetName() ); - // Dadurch wird ein RegisterChange ausgeloest, wenn notwendig + // this will trigger a RegisterChange if necessary pDesc->SetRegisterFmtColl( rChged.GetRegisterFmtColl() ); - //Wenn sich das UseOn oder der Follow aendern muessen die - //Absaetze das erfahren. + // when UseOn or Follow are changed, then the paragraphs have to know this sal_Bool bUseOn = sal_False; sal_Bool bFollow = sal_False; if ( pDesc->GetUseOn() != rChged.GetUseOn() ) @@ -431,18 +424,17 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) } if ( (bUseOn || bFollow) && pTmpRoot) - //Layot benachrichtigen! + // notify Layot! { std::set<SwRootFrm*> aAllLayouts = GetAllLayouts(); std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllCheckPageDescs));//swmod 080304 } - //Jetzt noch die Seiten-Attribute uebernehmen. + // now take over the page attributes ::lcl_DescSetAttr( rChged.GetMaster(), pDesc->GetMaster() ); ::lcl_DescSetAttr( rChged.GetLeft(), pDesc->GetLeft() ); - //Wenn sich FussnotenInfo veraendert, so werden die Seiten - //angetriggert. + // when FootnotesInfo are changed, then trigger the pages if( !(pDesc->GetFtnInfo() == rChged.GetFtnInfo()) ) { pDesc->SetFtnInfo( rChged.GetFtnInfo() ); @@ -479,10 +471,11 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) |* |* SwDoc::DelPageDesc() |* -|* Beschreibung Alle Descriptoren, deren Follow auf den zu loeschenden -|* zeigen muessen angepasst werden. -|* Ersterstellung MA 25. Jan. 93 -|* Letzte Aenderung JP 04.09.95 +|* Description All descriptors have to be adapted whose Follow +|* refers to the one that has to be deleted. +|* +|* Created MA 25. Jan. 93 +|* Last change JP 04.09.95 |* |*************************************************************************/ @@ -551,8 +544,8 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast ) { - ASSERT( i < aPageDescs.Count(), "PageDescs ueberindiziert." ); - ASSERT( i != 0, "Default Pagedesc loeschen is nicht." ); + ASSERT( i < aPageDescs.Count(), "PageDescs are over-indexed." ); + ASSERT( i != 0, "Default Pagedesc cannot be deleted." ); if ( i == 0 ) return; @@ -583,8 +576,8 @@ void SwDoc::DelPageDesc( sal_uInt16 i, sal_Bool bBroadcast ) |* |* SwDoc::MakePageDesc() |* -|* Ersterstellung MA 25. Jan. 93 -|* Letzte Aenderung MA 20. Aug. 93 +|* Created MA 25. Jan. 93 +|* Last change MA 20. Aug. 93 |* |*************************************************************************/ @@ -606,7 +599,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, else { pNew = new SwPageDesc( rName, GetDfltFrmFmt(), this ); - //Default-Seitenformat einstellen. + // set default page format lcl_DefaultPageFmt( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft() ); SvxFrameDirection aFrameDirection = bRegardLanguage ? @@ -651,15 +644,15 @@ SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) c } /****************************************************************************** - * Methode : void SwDoc::PrtDataChanged() - * Beschreibung: - * Erstellt : OK 27.10.94 10:20 - * Aenderung : MA 26. Mar. 98 + * Method void SwDoc::PrtDataChanged() + * Description + * Created OK 27.10.94 10:20 + * Last change MA 26. Mar. 98 ******************************************************************************/ void SwDoc::PrtDataChanged() { -//!!!!!!!! Bei Aenderungen hier bitte ggf. InJobSetup im Sw3io mitpflegen +//!!!!!!!! In case of changes please look after InJobSetup in Sw3io if necessary // --> FME 2005-01-21 #i41075# ASSERT( get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE) || @@ -727,11 +720,11 @@ void SwDoc::PrtDataChanged() delete pWait; } -//Zur Laufzeit sammeln wir die GlobalNames der Server, die keine -//Benachrichtigung zu Druckerwechseln wuenschen. Dadurch sparen wir -//das Laden vieler Objekte (gluecklicherweise werden obendrein alle -//Fremdobjekte unter einer ID abgebuildet). Init und DeInit vom Array -//ist in init.cxx zu finden. +// At run time collect the GlobalNames of the server that don't want +// to be notified when printer have changed. +// Due to this many objects don't need to be loaded (luckily on top of +// this all alien objects are mapped to a single ID). Init and DeInit +// of the array can be found in init.cxx. extern SvPtrarr *pGlobalOLEExcludeList; void SwDoc::PrtOLENotify( sal_Bool bAll ) @@ -751,11 +744,10 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) } //swmod 071107//swmod 071225 if ( !pShell ) { - //Das hat ohne Shell und damit ohne Client keinen Sinn, weil nur darueber - //die Kommunikation bezueglich der Groessenaenderung implementiert ist. - //Da wir keine Shell haben, merken wir uns diesen unguenstigen - //Zustand am Dokument, dies wird dann beim Erzeugen der ersten Shell - //nachgeholt. + // This doesn't make sense without Shell and therefore without Client because + // communication relating to change in size is implemented only in this way. + // As there is no Shell, note this unfavorable status in the Document, this + // will be catched up when creating the first Shell. mbOLEPrtNotifyPending = sal_True; if ( bAll ) mbAllOLENotify = sal_True; @@ -781,14 +773,13 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) SwOLENode* pOLENd = (*pNodes)[i]; pOLENd->SetOLESizeInvalid( sal_False ); - //Ersteinmal die Infos laden und festellen ob das Teil nicht - //schon in der Exclude-Liste steht + // first load the information and determine whether it is already in the exclude list SvGlobalName aName; svt::EmbeddedObjectRef& xObj = pOLENd->GetOLEObj().GetObject(); if ( xObj.is() ) aName = SvGlobalName( xObj->getClassID() ); - else //Noch nicht geladen + else // not yet loaded { // TODO/LATER: retrieve ClassID of an unloaded object // aName = ???? @@ -805,8 +796,8 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) if ( bFound ) continue; - //Kennen wir nicht, also muss das Objekt geladen werden. - //Wenn es keine Benachrichtigung wuenscht + // not known, therefore the object has to be loaded + // when notification is not requested if ( xObj.is() ) { //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange @@ -816,7 +807,7 @@ void SwDoc::PrtOLENotify( sal_Bool bAll ) if ( pOLENd->GetFrm() ) { xObj->OnDocumentPrinterChanged( pPrt ); - pShell->CalcAndSetScale( xObj );//Client erzeugen lassen. + pShell->CalcAndSetScale( xObj );// create client } else pOLENd->SetOLESizeInvalid( sal_True ); @@ -856,9 +847,9 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) SwOLENode* pOLENd = (*pNodes)[i]; pOLENd->SetOLESizeInvalid( sal_False ); - //Kennen wir nicht, also muss das Objekt geladen werden. - //Wenn es keine Benachrichtigung wuenscht - if( pOLENd->GetOLEObj().GetOleRef().is() ) //Kaputt? + // not known, therefore the object has to be loaded + // when notification is not requested + if( pOLENd->GetOLEObj().GetOleRef().is() ) // broken? { //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange /* @@ -868,7 +859,7 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) if( pOLENd->GetFrm() ) { xRef->OnDocumentPrinterChanged( pPrt ); - pSh->CalcAndSetScale( xRef );//Client erzeugen lassen. + pSh->CalcAndSetScale( xRef );// create client } else pOLENd->SetOLESizeInvalid( sal_True ); |