Am 27.12.2010 20:12, schrieb Octavio Alvarez:
On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS <TentleXS@web.de> wrote:
Hallo @all,
my name is Pascal and I would like to contribute the following
translated code comments in "writer\sw\source\core\edit\edfmt.cxx". My
native language is german so I hope it's OK that I did the translation.
Do you take requests? :-) I've been trying to work with these files, but
I can't get the sense out of them. I'm putting my hope on the comments
which are currently in German.
sw/source/core/crsr/callnk.cxx
sw/source/core/crsr/viscrs.cxx
I am learning the workflow for contributing, so please excuse me if I
did something wrong. I am glad if you decide to point me to resources
where I can read up on how to contribute more effectively. I am not sure
if I should mention that this code and its comments is contributed under
LGPLv3+ / MPL ... because I just changed the comments ... but of course
it is. (It's just for new code/code-changes, right?)
Also, I would send it as a git patch so the committer can keep your
authorship information. Otherwise, if someone picks your diff up he will
need to apply your diff and create the commit himself and your
authorship information gets lost.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
I hope I did this right.
This should be a patch file for
writer/sw/source/core/edit/edfmt.cxx
writer/sw/source/core/crsr/callnk.cxx
Do I have to name the file differently?
From acd6bac4a5b590deea3017fb675e449810cf7f4c Mon Sep 17 00:00:00 2001
From: Pascal Ullrich <tentlexs@web.de>
Date: Tue, 28 Dec 2010 12:09:53 +0100
Subject: [PATCH] German comments translated to English.
---
sw/source/core/crsr/callnk.cxx | 52 +++++++++++++++++++--------------------
sw/source/core/edit/edfmt.cxx | 8 +++---
2 files changed, 29 insertions(+), 31 deletions(-)
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index ea998fe..4dd5930 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -64,7 +64,7 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh, ULONG nAktNode, xub_StrLen nAktCntnt,
SwCallLink::SwCallLink( SwCrsrShell & rSh )
: rShell( rSh )
{
- // SPoint-Werte vom aktuellen Cursor merken
+ // remember SPoint-values of current cursor
SwPaM* pCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
SwNode& rNd = pCrsr->GetPoint()->nNode.GetNode();
nNode = rNd.GetIndex();
@@ -79,10 +79,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
{
nLeftFrmPos = 0;
- // eine Sonderbehandlung fuer die SwFeShell: diese setzt beim Loeschen
- // der Kopf-/Fusszeile, Fussnoten den Cursor auf NULL (Node + Content)
- // steht der Cursor auf keinem CntntNode, wird sich das im NdType
- // gespeichert.
+ // A special treatment for SwFeShell:
+ // When deleting the header/footer, footnotes SwFeShell sets the
+ // Cursor to NULL (Node + Content).
+ // If the Cursor is not on a CntntNode (ContentNode) this fact gets
+ // saved in NdType.
if( ND_CONTENTNODE & nNdTyp )
nNdTyp = 0;
}
@@ -91,11 +92,11 @@ SwCallLink::SwCallLink( SwCrsrShell & rSh )
SwCallLink::~SwCallLink()
{
- if( !nNdTyp || !rShell.bCallChgLnk ) // siehe ctor
+ if( !nNdTyp || !rShell.bCallChgLnk ) // see ctor
return ;
- // wird ueber Nodes getravellt, Formate ueberpruefen und im neuen
- // Node wieder anmelden
+ // If travelling over Nodes check formats and register them anew at the
+ // new Node.
SwPaM* pCurCrsr = rShell.IsTableMode() ? rShell.GetTblCrs() : rShell.GetCrsr();
SwCntntNode * pCNd = pCurCrsr->GetCntntNode();
if( !pCNd )
@@ -150,17 +151,16 @@ SwCallLink::~SwCallLink()
USHORT nNdWhich = pCNd->GetNodeType();
ULONG nAktNode = pCurCrsr->GetPoint()->nNode.GetIndex();
- // melde die Shell beim akt. Node als abhaengig an, dadurch koennen
- // alle Attribut-Aenderungen ueber den Link weiter gemeldet werden.
+ // Register the Shell as dependent at the current Node. By doing this all
+ // attribute changes can be signaled over the link.
pCNd->Add( &rShell );
if( nNdTyp != nNdWhich || nNode != nAktNode )
{
- /* immer, wenn zwischen Nodes gesprungen wird, kann es
- * vorkommen, das neue Attribute gelten; die Text-Attribute.
- * Es muesste also festgestellt werden, welche Attribute
- * jetzt gelten; das kann auch gleich der Handler machen
- */
+ // Every time a switch between nodes occurs, there is a chance that
+ // new attributes do apply - meaning text-attributes.
+ // So the currently applying attributes would have to be determined.
+ // That can be done in one go by the handler.
rShell.CallChgLnk();
}
else if( !bHasSelection != !(*pCurCrsr->GetPoint() != *pCurCrsr->GetMark()) )
@@ -171,14 +171,14 @@ SwCallLink::~SwCallLink()
else if( rShell.aChgLnk.IsSet() && ND_TEXTNODE == nNdWhich &&
nCntnt != nAktCntnt )
{
- // nur wenn mit Left/right getravellt, dann Text-Hints pruefen
- // und sich nicht der Frame geaendert hat (Spalten!)
+ // If travelling with left/right only and the frame is
+ // unchanged (columns!) then check text hints.
if( nLeftFrmPos == SwCallLink::GetFrm( (SwTxtNode&)*pCNd, nAktCntnt,
!rShell.ActionPend() ) &&
(( nCmp = nCntnt ) + 1 == nAktCntnt || // Right
nCntnt -1 == ( nCmp = nAktCntnt )) ) // Left
{
- if( nCmp == nAktCntnt && pCurCrsr->HasMark() ) // left & Sele
+ if( nCmp == nAktCntnt && pCurCrsr->HasMark() ) // left & select
++nCmp;
if ( ((SwTxtNode*)pCNd)->HasHints() )
{
@@ -194,8 +194,8 @@ SwCallLink::~SwCallLink()
pEnd = pHt->GetEnd();
nStart = *pHt->GetStart();
- // nur Start oder Start und Ende gleich, dann immer
- // beim Ueberlaufen von Start callen
+ // If "only start" or "start and end equal" then call on
+ // every overflow of start.
if( ( !pEnd || ( nStart == *pEnd ) ) &&
( nStart == nCntnt || nStart == nAktCntnt) )
{
@@ -203,9 +203,9 @@ SwCallLink::~SwCallLink()
return;
}
- // hat das Attribut einen Bereich und dieser nicht leer
+ // If the attribute has an area and that area is not empty ...
else if( pEnd && nStart < *pEnd &&
- // dann teste, ob ueber Start/Ende getravellt wurde
+ // ... then test if travelling occurred via start/end.
( nStart == nCmp ||
( pHt->DontExpand() ? nCmp == *pEnd-1
: nCmp == *pEnd ) ))
@@ -230,11 +230,9 @@ SwCallLink::~SwCallLink()
}
}
else
- /* wenn mit Home/End/.. mehr als 1 Zeichen getravellt, dann
- * immer den ChgLnk rufen, denn es kann hier nicht
- * festgestellt werden, was sich geaendert; etwas kann
- * veraendert sein.
- */
+ // If travelling more than one character with home/end/.. then
+ // always call ChgLnk, because it can not be determined here what
+ // has changed. Something may have changed.
rShell.CallChgLnk();
}
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index 016fa4d..1ec3814 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -39,7 +39,7 @@
#include <fchrfmt.hxx>
#include <frmfmt.hxx>
#include <charfmt.hxx>
-#include "ndtxt.hxx" // Fuer GetXXXFmt
+#include "ndtxt.hxx" // for GetXXXFmt
#include "hints.hxx"
/*************************************
@@ -93,7 +93,7 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, BOOL bReset)
{
const SwPosition* pPtPos = pPam->GetPoint();
const SwPosition* pMkPos = pPam->GetMark();
- if( pPtPos->nNode == pMkPos->nNode ) // im selben Node ?
+ if( pPtPos->nNode == pMkPos->nNode ) // in the same node?
{
nStt = pPtPos->nContent.GetIndex();
if( nStt < pMkPos->nContent.GetIndex() )
@@ -155,7 +155,7 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName,
}
//----------------------------------
-// inlines im Product
+// inlines in product
SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId )
@@ -164,7 +164,7 @@ SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( USHORT nId )
}
- // return das geforderte automatische Format - Basis-Klasse !
+ // return the demanded automatic format - base-class !
SwFmt* SwEditShell::GetFmtFromPool( USHORT nId )
{
return GetDoc()->GetFmtFromPool( nId );
--
1.7.3.1.msysgit.0
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.