[Libreoffice] comments translated in writer\sw\source\core\edit\edfmt.cxx
TentleXS
TentleXS at web.de
Mon Dec 27 15:18:16 PST 2010
Am 27.12.2010 20:12, schrieb Octavio Alvarez:
> On Mon, 27 Dec 2010 10:49:19 -0800, TentleXS <TentleXS at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
Thanks for the pointing out to send a patch file. I do not know right
now how
to do that. It would be ok if my authorship information gets lost - for
now :).
Here you have a diff for "sw/source/core/crsr/callnk.cxx". I will work on
"sw/source/core/crsr/viscrs.cxx" next.
<diff>
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>
More information about the LibreOffice
mailing list