Kaydet (Commit) 0c45b554 authored tarafından Matthias Freund's avatar Matthias Freund Kaydeden (comit) Thomas Arnhold

fdo#39468 Comment translation GER-ENG

	modified:   sw/source/ui/vba/vbafield.cxx
	modified:   sw/source/ui/wrtsh/wrtsh1.cxx

Change-Id: I503a12e22d03b2b57a818701cdfbe4ecc94d89a1
Reviewed-on: https://gerrit.libreoffice.org/3965Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst d702dd43
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
using namespace ::ooo::vba; using namespace ::ooo::vba;
using namespace ::com::sun::star; 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 ) 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 ); mxTextField.set( xTextField, uno::UNO_QUERY_THROW );
...@@ -69,7 +67,7 @@ SwVbaField::getServiceNames() ...@@ -69,7 +67,7 @@ SwVbaField::getServiceNames()
return aServiceNames; return aServiceNames;
} }
// *** SwVbaReadFieldParams *********************************************** // SwVbaReadFieldParams
// the codes are copied from ww8par5.cxx // the codes are copied from ww8par5.cxx
class SwVbaReadFieldParams class SwVbaReadFieldParams
{ {
...@@ -90,15 +88,12 @@ public: ...@@ -90,15 +88,12 @@ public:
String GetFieldName()const { return aFieldName; } String GetFieldName()const { return aFieldName; }
}; };
SwVbaReadFieldParams::SwVbaReadFieldParams( const String& _rData ) SwVbaReadFieldParams::SwVbaReadFieldParams( const String& _rData )
: aData( _rData ), nLen( _rData.Len() ), nNext( 0 ) : aData( _rData ), nLen( _rData.Len() ), nNext( 0 )
{ {
/* // First search for an opening parenthesis or a space or a quotation mark
erstmal nach einer oeffnenden Klammer oder einer Leerstelle oder einem // or a backslash, so that the field command
Anfuehrungszeichen oder einem Backslash suchen, damit der Feldbefehl // (thus INCLUDEPICTURE or ...) is ignored.
(also INCLUDEPICTURE bzw EINFUeGENGRAFIK bzw ...) ueberlesen wird
*/
while( (nLen > nNext) && (aData.GetChar( nNext ) == ' ') ) while( (nLen > nNext) && (aData.GetChar( nNext ) == ' ') )
++nNext; ++nNext;
...@@ -116,7 +111,6 @@ SwVbaReadFieldParams::SwVbaReadFieldParams( const String& _rData ) ...@@ -116,7 +111,6 @@ SwVbaReadFieldParams::SwVbaReadFieldParams( const String& _rData )
aFieldName = aData.Copy( 0, nFnd ); aFieldName = aData.Copy( 0, nFnd );
} }
SwVbaReadFieldParams::~SwVbaReadFieldParams() SwVbaReadFieldParams::~SwVbaReadFieldParams()
{ {
} }
...@@ -129,11 +123,10 @@ String SwVbaReadFieldParams::GetResult() const ...@@ -129,11 +123,10 @@ String SwVbaReadFieldParams::GetResult() const
: aData.Copy( nFnd, (nSavPtr - nFnd) ); : aData.Copy( nFnd, (nSavPtr - nFnd) );
} }
// ret: -2: NOT a '\' parameter but normal Text // ret: -2: NOT a '\' parameter but normal Text
long SwVbaReadFieldParams::SkipToNextToken() long SwVbaReadFieldParams::SkipToNextToken()
{ {
long nRet = -1; // Ende long nRet = -1; // end
if ( if (
(STRING_NOTFOUND != nNext) && (nLen > nNext) && (STRING_NOTFOUND != nNext) && (nLen > nNext) &&
STRING_NOTFOUND != (nFnd = FindNextStringPiece(nNext)) STRING_NOTFOUND != (nFnd = FindNextStringPiece(nNext))
...@@ -144,7 +137,7 @@ long SwVbaReadFieldParams::SkipToNextToken() ...@@ -144,7 +137,7 @@ long SwVbaReadFieldParams::SkipToNextToken()
if ('\\' == aData.GetChar(nFnd) && '\\' != aData.GetChar(nFnd + 1)) if ('\\' == aData.GetChar(nFnd) && '\\' != aData.GetChar(nFnd + 1))
{ {
nRet = aData.GetChar(++nFnd); nRet = aData.GetChar(++nFnd);
nNext = ++nFnd; // und dahinter setzen nNext = ++nFnd; // and set behind
} }
else else
{ {
...@@ -164,21 +157,20 @@ long SwVbaReadFieldParams::SkipToNextToken() ...@@ -164,21 +157,20 @@ long SwVbaReadFieldParams::SkipToNextToken()
return nRet; return nRet;
} }
// FindNextPara sucht naechsten Backslash-Parameter oder naechste Zeichenkette // FindNextPara is searching for the next Backslash-Parameter or the next string
// bis zum Blank oder naechsten "\" oder zum schliessenden Anfuehrungszeichen // until blank or the next "\" or until the closing quotation mark
// oder zum String-Ende von pStr. // or until the string end of pStr.
//
// Ausgabe ppNext (falls ppNext != 0) Suchbeginn fuer naechsten Parameter bzw. 0
// //
// Returnwert: 0 falls String-Ende erreicht, // Output ppNext (if ppNext != 0) beginning of the search for the next parameter or 0
// 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 SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
{ {
xub_StrLen n = ( STRING_NOTFOUND == nStart ) ? nFnd : nStart; // Anfang xub_StrLen n = ( STRING_NOTFOUND == nStart ) ? nFnd : nStart; // Start
xub_StrLen n2; // Ende xub_StrLen n2; // End
nNext = STRING_NOTFOUND; // Default fuer nicht gefunden nNext = STRING_NOTFOUND; // Default for not found
while( (nLen > n) && (aData.GetChar( n ) == ' ') ) while( (nLen > n) && (aData.GetChar( n ) == ' ') )
++n; ++n;
...@@ -186,36 +178,36 @@ xub_StrLen SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart) ...@@ -186,36 +178,36 @@ xub_StrLen SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
if( nLen == n ) if( nLen == n )
return STRING_NOTFOUND; // String End reached! return STRING_NOTFOUND; // String End reached!
if( (aData.GetChar( n ) == '"') // Anfuehrungszeichen vor Para? if( (aData.GetChar( n ) == '"') // quotation marks are in front of parenthesis?
|| (aData.GetChar( n ) == 0x201c) || (aData.GetChar( n ) == 0x201c)
|| (aData.GetChar( n ) == 132) ) || (aData.GetChar( n ) == 132) )
{ {
n++; // Anfuehrungszeichen ueberlesen n++; // ignore quotation marks
n2 = n; // ab hier nach Ende suchen n2 = n; // From here search for the end
while( (nLen > n2) while( (nLen > n2)
&& (aData.GetChar( n2 ) != '"') && (aData.GetChar( n2 ) != '"')
&& (aData.GetChar( n2 ) != 0x201d) && (aData.GetChar( n2 ) != 0x201d)
&& (aData.GetChar( n2 ) != 147) ) && (aData.GetChar( n2 ) != 147) )
n2++; // Ende d. Paras suchen n2++; // Search for the end of the parenthesis
} }
else // keine Anfuehrungszeichen else // no quotation marks
{ {
n2 = n; // ab hier nach Ende suchen n2 = n; // from here search for the end
while( (nLen > n2) && (aData.GetChar( n2 ) != ' ') ) // Ende d. Paras suchen while( (nLen > n2) && (aData.GetChar( n2 ) != ' ') ) // Search for the end of the parenthesis
{ {
if( aData.GetChar( n2 ) == '\\' ) if( aData.GetChar( n2 ) == '\\' )
{ {
if( aData.GetChar( n2+1 ) == '\\' ) if( aData.GetChar( n2+1 ) == '\\' )
n2 += 2; // Doppel-Backslash -> OK n2 += 2; // double-backslash -> OK
else else
{ {
if( n2 > n ) if( n2 > n )
n2--; n2--;
break; // einfach-Backslash -> Ende break; // single-backslash -> End
} }
} }
else else
n2++; // kein Backslash -> OK n2++; // no backslash -> OK
} }
} }
if( nLen > n2 ) if( nLen > n2 )
...@@ -226,7 +218,7 @@ xub_StrLen SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart) ...@@ -226,7 +218,7 @@ xub_StrLen SwVbaReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
return n; 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 ) 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 )
{ {
......
...@@ -422,8 +422,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName ...@@ -422,8 +422,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
else else
CalcAndSetScale( xObj ); CalcAndSetScale( xObj );
//#50270# Error brauchen wir nicht handeln, das erledigt das //#50270# We don't need to handle error, this is handled by the
//DoVerb in der SfxViewShell //DoVerb in the SfxViewShell
pClient->DoVerb( SVVERB_SHOW ); pClient->DoVerb( SVVERB_SHOW );
// TODO/LATER: set document name - should be done in Client // TODO/LATER: set document name - should be done in Client
...@@ -989,7 +989,7 @@ void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart ) ...@@ -989,7 +989,7 @@ void SwWrtShell::SplitNode( sal_Bool bAutoFmt, sal_Bool bCheckTableStart )
// this indicates a position if it is possible to convert them // this indicates a position if it is possible to convert them
// into a number and less than nMaxRules. // 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& ); // external void SetNumChrFmt( SwWrtShell*, SwNumRules& );
// -> #i40041# // -> #i40041#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment