Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3965
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/65/3965/1
fdo#39468 Comment translation GER-ENG
modified: sw/source/ui/vba/vbafield.cxx
modified: sw/source/ui/wrtsh/wrtsh1.cxx
Change-Id: I503a12e22d03b2b57a818701cdfbe4ecc94d89a1
---
M sw/source/ui/vba/vbafield.cxx
M sw/source/ui/wrtsh/wrtsh1.cxx
2 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index df729ad..02fce66 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -32,8 +32,6 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-// *** SwVbaField ***********************************************
-
SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const
uno::Reference< uno::XComponentContext >& rContext, const css::uno::Reference<
css::text::XTextDocument >& rDocument, const uno::Reference< css::text::XTextField >& xTextField)
throw ( uno::RuntimeException ) : SwVbaField_BASE( rParent, rContext ), mxTextDocument( rDocument )
{
mxTextField.set( xTextField, uno::UNO_QUERY_THROW );
@@ -69,7 +67,7 @@
return aServiceNames;
}
-// *** SwVbaReadFieldParams ***********************************************
+// SwVbaReadFieldParams
// the codes are copied from ww8par5.cxx
class SwVbaReadFieldParams
{
@@ -90,15 +88,15 @@
String GetFieldName()const { return aFieldName; }
};
-
SwVbaReadFieldParams::SwVbaReadFieldParams( const String& _rData )
: aData( _rData ), nLen( _rData.Len() ), nNext( 0 )
{
- /*
+ // First search for an opening parenthesis or a space or a quotation mark
+ // or a backslash, so that the field command
+ // (thus INCLUDEPICTURE or INSERTGRAPHIC or ...) is ignored.
erstmal nach einer oeffnenden Klammer oder einer Leerstelle oder einem
Anfuehrungszeichen oder einem Backslash suchen, damit der Feldbefehl
(also INCLUDEPICTURE bzw EINFUeGENGRAFIK bzw ...) ueberlesen wird
- */
while( (nLen > nNext) && (aData.GetChar( nNext ) == ' ') )
++nNext;
@@ -116,7 +114,6 @@
aFieldName = aData.Copy( 0, nFnd );
}
-
SwVbaReadFieldParams::~SwVbaReadFieldParams()
{
}
@@ -129,11 +126,10 @@
: aData.Copy( nFnd, (nSavPtr - nFnd) );
}
-
// ret: -2: NOT a '\' parameter but normal Text
long SwVbaReadFieldParams::SkipToNextToken()
{
- long nRet = -1; // Ende
+ long nRet = -1; // end
if (
(STRING_NOTFOUND != nNext) && (nLen > nNext) &&
STRING_NOTFOUND != (nFnd = FindNextStringPiece(nNext))
@@ -144,7 +140,7 @@
if ('\\' == aData.GetChar(nFnd) && '\\' != aData.GetChar(nFnd + 1))
{
nRet = aData.GetChar(++nFnd);
- nNext = ++nFnd; // und dahinter setzen
+ nNext = ++nFnd; // and set behind
}
else
{
@@ -164,21 +160,20 @@
return nRet;
}
-// FindNextPara sucht naechsten Backslash-Parameter oder naechste Zeichenkette
-// bis zum Blank oder naechsten "\" oder zum schliessenden Anfuehrungszeichen
-// oder zum String-Ende von pStr.
+// FindNextPara is searching for the next Backslash-Parameter or the next string
+// until blank or the next "\" or until the closing quotation mark
+// or until the string end of pStr.
//
-// Ausgabe ppNext (falls ppNext != 0) Suchbeginn fuer naechsten Parameter bzw. 0
+// Output ppNext (if ppNext != 0) beginning of the search for the next parameter or 0
//
-// Returnwert: 0 falls String-Ende erreicht,
-// ansonsten Anfang des Paramters bzw. der Zeichenkette
-//
+// Return value: 0 if String-End reached, otherwise begin of the paramater or the string
+
xub_StrLen SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
{
- xub_StrLen n = ( STRING_NOTFOUND == nStart ) ? nFnd : nStart; // Anfang
- xub_StrLen n2; // Ende
+ xub_StrLen n = ( STRING_NOTFOUND == nStart ) ? nFnd : nStart; // Start
+ xub_StrLen n2; // End
- nNext = STRING_NOTFOUND; // Default fuer nicht gefunden
+ nNext = STRING_NOTFOUND; // Default for not found
while( (nLen > n) && (aData.GetChar( n ) == ' ') )
++n;
@@ -186,36 +181,36 @@
if( nLen == n )
return STRING_NOTFOUND; // String End reached!
- if( (aData.GetChar( n ) == '"') // Anfuehrungszeichen vor Para?
+ if( (aData.GetChar( n ) == '"') // quotation marks are in front of paranthesis?
|| (aData.GetChar( n ) == 0x201c)
|| (aData.GetChar( n ) == 132) )
{
- n++; // Anfuehrungszeichen ueberlesen
- n2 = n; // ab hier nach Ende suchen
+ n++; // ignore quotation marks
+ n2 = n; // From here search for the end
while( (nLen > n2)
&& (aData.GetChar( n2 ) != '"')
&& (aData.GetChar( n2 ) != 0x201d)
&& (aData.GetChar( n2 ) != 147) )
- n2++; // Ende d. Paras suchen
+ n2++; // Search for the end of the paranthesis
}
- else // keine Anfuehrungszeichen
+ else // no quotation marks
{
n2 = n; // ab hier nach Ende suchen
- while( (nLen > n2) && (aData.GetChar( n2 ) != ' ') ) // Ende d. Paras suchen
+ while( (nLen > n2) && (aData.GetChar( n2 ) != ' ') ) // Search for the end of the
paranthesis
{
if( aData.GetChar( n2 ) == '\\' )
{
if( aData.GetChar( n2+1 ) == '\\' )
- n2 += 2; // Doppel-Backslash -> OK
+ n2 += 2; // double-backslash -> OK
else
{
if( n2 > n )
n2--;
- break; // einfach-Backslash -> Ende
+ break; // single-backslash -> End
}
}
else
- n2++; // kein Backslash -> OK
+ n2++; // no backslash -> OK
}
}
if( nLen > n2 )
@@ -226,7 +221,7 @@
return n;
}
-// *** SwVbaFields ***********************************************
+// SwVbaFields
static uno::Any lcl_createField( const uno::Reference< XHelperInterface >& xParent, const
uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel,
const uno::Any& aSource )
{
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index ac6ef24..3ab8230 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -422,8 +422,8 @@
else
CalcAndSetScale( xObj );
- //#50270# Error brauchen wir nicht handeln, das erledigt das
- //DoVerb in der SfxViewShell
+ //#50270# We don't need to handle error, this is handled by the
+ //DoVerb in the SfxViewShell
pClient->DoVerb( SVVERB_SHOW );
// TODO/LATER: set document name - should be done in Client
@@ -989,7 +989,7 @@
// this indicates a position if it is possible to convert them
// into a number and less than nMaxRules.
-// zum Testen der CharFormate an der Numerierung
+// To test the CharFormats at the numbering
// external void SetNumChrFmt( SwWrtShell*, SwNumRules& );
// -> #i40041#
--
To view, visit https://gerrit.libreoffice.org/3965
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I503a12e22d03b2b57a818701cdfbe4ecc94d89a1
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matthias Freund <matti_lx@yahoo.de>
Context
- [PATCH] fdo#39468 Comment translation GER-ENG · Matthias Freund (via Code Review)
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.