From 91f3d77b98c1c0e13ef867e27972cb000887f8bb Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 6 Aug 2013 14:55:26 +0200 Subject: tweak comment translations ede5f05c fb3a1bb9 5e04331f fd6089b9 66a1d406 Change-Id: I5077ce5f6182f9193cebaaf63190450d375679dd --- basic/source/classes/sbunoobj.cxx | 48 ++++++++++++++++++------------------- basic/source/sbx/sbxobj.cxx | 31 ++++++++++++------------ basic/source/sbx/sbxstr.cxx | 4 ++-- basic/source/sbx/sbxvalue.cxx | 50 +++++++++++++++++++-------------------- 4 files changed, 65 insertions(+), 68 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 619a9c968266..6b8544b96bbb 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -670,7 +670,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aClassAny ); SbxObjectRef xWrapper = (SbxObject*)pSbUnoObject; - // If the object is invalid deliver zero + // If the object is invalid deliver null if( pSbUnoObject->getUnoAny().getValueType().getTypeClass() == TypeClass_VOID ) { pVar->PutObject( NULL ); @@ -681,7 +681,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) } } break; - // Interfaces and Structs must be wrapped in a SbUnoObject + // Interfaces and Structs must be wrapped in a SbUnoObject case TypeClass_INTERFACE: case TypeClass_STRUCT: case TypeClass_EXCEPTION: @@ -771,7 +771,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue ) } SbxObjectRef xWrapper = (SbxObject*)pSbUnoObject; - // If the object is invalid deliver zero + // If the object is invalid deliver null if( pSbUnoObject->getUnoAny().getValueType().getTypeClass() == TypeClass_VOID ) { pVar->PutObject( NULL ); @@ -887,7 +887,7 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType ) case SbxBYTE: aRetType = ::getCppuType( (sal_Int8*)0 ); break; case SbxUSHORT: aRetType = ::getCppuType( (sal_uInt16*)0 ); break; case SbxULONG: aRetType = ::getCppuType( (sal_uInt32*)0 ); break; - // map machine-dependent ones on hyper for secureness + // map machine-dependent ones to long for consistency case SbxINT: aRetType = ::getCppuType( (sal_Int32*)0 ); break; case SbxUINT: aRetType = ::getCppuType( (sal_uInt32*)0 ); break; default: break; @@ -1252,7 +1252,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty { Reference< XIdlClass > xIdlTargetClass = TypeToIdlClass( rType ); - // zero referenz? + // null reference? if( pVar->IsNull() && eType == TypeClass_INTERFACE ) { Reference< XInterface > xRef; @@ -1302,7 +1302,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty } else { - // zero object -> zero XInterface + // null object -> null XInterface Reference xInt; aRetVal <<= xInt; } @@ -1367,7 +1367,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty { sal_Int32 nSeqSize = nUpper - nLower + 1; - // create the instanz of the required sequence + // create the instance of the required sequence Reference< XIdlClass > xIdlTargetClass = TypeToIdlClass( rType ); xIdlTargetClass->createObject( aRetVal ); Reference< XIdlArray > xArray = xIdlTargetClass->getArray(); @@ -1391,7 +1391,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty try { - // take over to the sequence + // insert in the sequence xArray->set( aRetVal, i, aAnyValue ); } catch( const IllegalArgumentException& ) @@ -1459,7 +1459,7 @@ Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, Property* pUnoProperty break; - // Use for Any the class indipendent converting routine + // for Any use the class independent converting routine case TypeClass_ANY: { aRetVal = sbxToUnoValueImpl( pVar ); @@ -1623,7 +1623,7 @@ OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Referenc OUString aClassName = xClass->getName(); Type aClassType( xClass->getTypeClass(), aClassName.getStr() ); - // checking if the interface is realy supported + // checking if the interface is really supported if( !x->queryInterface( aClassType ).hasValue() ) { aRetStr.appendAscii( " (ERROR: Not really supported!)\n" ); @@ -1935,8 +1935,8 @@ OUString Impl_DumpProperties( SbUnoObject* pUnoObj ) { const Property& rProp = pUnoProps[ i ]; - // By MAYBEVOID convert the type out of Uno newly, - // so that not only SbxEMPTY were outputed. + // For MAYBEVOID freshly convert the type from Uno, + // so not just SbxEMPTY is returned. if( rProp.Attributes & PropertyAttribute::MAYBEVOID ) { eType = unoToSbxType( rProp.Type.getTypeClass() ); @@ -2085,7 +2085,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, // Id == -2: output properties else if( nId == -2 ) // Property ID_DBG_PROPERTIES { - // by now all properties must be established + // now all properties must be created implCreateAll(); OUString aRetStr = Impl_DumpProperties( this ); pVar->PutString( aRetStr ); @@ -2093,7 +2093,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, // Id == -3: output the methods else if( nId == -3 ) // Property ID_DBG_METHODS { - // y now all properties must be established + // now all properties must be created implCreateAll(); OUString aRetStr = Impl_DumpMethods( this ); pVar->PutString( aRetStr ); @@ -2661,8 +2661,8 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) if( bNeedIntrospection ) doIntrospection(); - // New 1999-03-04: Create properties on demand. Therefore search now perIntrospectionAccess, - // if a property or a method of the required name exist + // New 1999-03-04: Create properties on demand. Therefore search now via + // IntrospectionAccess if a property or a method of the required name exist if( !pRes ) { OUString aUName( rName ); @@ -2709,7 +2709,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) pRes = xMethRef; } - // Elsewise nothing would be found it had to be checked, if NameAccess is existent + // If nothing was found check via XNameAccess if( !pRes ) { try @@ -2724,10 +2724,10 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) // ATTENTION: Because of XNameAccess, the variable generated here // may not be included as a fixed property in the object and therefore // won't be stored anywhere. - // If this leads to problems, it has to be created synthetically or - // a class SbUnoNameAccessProperty, whose existence had to be checked - // constantly and which were if necessary thrown away - // if the name was not found anymore. + // If this leads to problems, it has to be created + // synthetically or a class SbUnoNameAccessProperty, + // witch checks the existence on access and which + // is disposed if the name is not found anymore. pRes = new SbxVariable( SbxVARIANT ); unoToSbxValue( pRes, aAny ); } @@ -2841,7 +2841,7 @@ void SbUnoObject::implCreateAll( void ) if( bNeedIntrospection ) doIntrospection(); - // get instrospection + // get introspection Reference< XIntrospectionAccess > xAccess = mxUnoAccess; if( !xAccess.is() || bNativeCOMObject ) { @@ -2928,7 +2928,7 @@ SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName ) if( !xClass.is() ) return NULL; - // Is it realy a struct? + // Is it really a struct? TypeClass eType = xClass->getTypeClass(); if ( ( eType != TypeClass_STRUCT ) && ( eType != TypeClass_EXCEPTION ) ) return NULL; @@ -3973,7 +3973,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet pLib->Call( aMethodName, xSbxArray ); - // get the return value from the Param-Array, if requestet + // get the return value from the Param-Array, if requested if( pRet ) { SbxVariable* pVar = xSbxArray->Get( 0 ); diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 625917eb2fab..ac609287bf74 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -86,7 +86,7 @@ static void CheckParentsOnDelete( SbxObject* pObj, SbxArray* p ) { pObj->EndListening( rRef->GetBroadcaster(), sal_True ); } - // Did the element have more then one reference and still a Listener? + // does the element have more then one reference and still a Listener? if( rRef->GetRefCount() > 1 ) { rRef->SetParent( NULL ); @@ -194,7 +194,7 @@ SbxVariable* SbxObject::FindUserData( sal_uInt32 nData ) SbxObject* pCur = this; while( !pRes && pCur->pParent ) { - // I myself was already searched through! + // I myself was already searched! sal_uInt16 nOwn = pCur->GetFlags(); pCur->ResetFlag( SBX_EXTSEARCH ); // I search already global! @@ -256,9 +256,8 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) pRes = pArray->Find( rName, t ); } } - // ExtendedsSearch in the Object-Array? - // For objects and DontCare is the array of objects already - // searched through + // Extended Search in the Object-Array? + // For objects and DontCare the array of objects has already been searched if( !pRes && ( t == SbxCLASS_METHOD || t == SbxCLASS_PROPERTY ) ) pRes = pObjs->Find( rName, t ); // Search in the parents? @@ -267,7 +266,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) SbxObject* pCur = this; while( !pRes && pCur->pParent ) { - // I myself was already searched through! + // I myself was already searched! sal_uInt16 nOwn = pCur->GetFlags(); pCur->ResetFlag( SBX_EXTSEARCH ); // I search already global! @@ -292,7 +291,7 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) return pRes; } -// Abbreviated version: The parent-string will be searched through +// Abbreviated version: The parent-string will be searched // The whole thing recursive, because Call() might be overloaded // Qualified names are allowed @@ -301,7 +300,7 @@ sal_Bool SbxObject::Call( const OUString& rName, SbxArray* pParam ) SbxVariable* pMeth = FindQualified( rName, SbxCLASS_DONTCARE); if( pMeth && pMeth->ISA(SbxMethod) ) { - // FindQualified() might have been stroked! + // FindQualified() might have struck already! if( pParam ) { pMeth->SetParameters( pParam ); @@ -336,9 +335,9 @@ void SbxObject::SetDfltProperty( const OUString& rName ) SetModified( sal_True ); } -// Search of a already available variable. If she was located, -// the index will be set, elsewise will be delivered the Count of the Array. -// In any case it will be delivered the correct Array. +// Search of an already available variable. If it was located, +// the index will be set, otherwise the Count of the Array will be returned. +// In any case the correct Array will be returned. SbxArray* SbxObject::FindVar( SbxVariable* pVar, sal_uInt16& nArrayIdx ) { @@ -618,8 +617,8 @@ static sal_Bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { - // Help for the read in of old objects: just TRUE back, - // LoadPrivateData() had to set the default status up + // Help for the read in of old objects: just return TRUE, + // LoadPrivateData() has to set the default status up if( !nVer ) { return sal_True; @@ -629,7 +628,7 @@ sal_Bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer ) { return sal_False; } - // If it contains no alien object, insert ourselves + // If it contains no alien object, insert ourselves if( aData.eType == SbxOBJECT && !aData.pObj ) { aData.pObj = this; @@ -734,7 +733,7 @@ OUString SbxObject::GenerateSource( const OUString &rLinePrefix, aSource += aPropName; aSource += " = "; - // Display the property value textual + // convert the property value to text switch ( xProp->GetType() ) { case SbxEMPTY: @@ -750,7 +749,7 @@ OUString SbxObject::GenerateSource( const OUString &rLinePrefix, break; default: - // miscellaneous, such as e.g.numerary directly + // miscellaneous, such as e.g. numbers directly aSource += xProp->GetOUString(); break; } diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index 24175fb1138d..339080ecd352 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -25,7 +25,7 @@ #include // The conversion of an item onto String was handled via the Put-Methods -// of the several data types to avoid double code. +// of the several data types to avoid duplicated code. OUString ImpGetString( const SbxValues* p ) { @@ -98,7 +98,7 @@ OUString ImpGetString( const SbxValues* p ) break; } case SbxERROR: - // Here will be created the String "Error n" + // Here the String "Error n" is generated aRes = SbxRes( STRING_ERRORMSG ); aRes += OUString( p->nUShort ); break; case SbxDATE: diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 3efbdabbb375..5978020c6fde 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -151,13 +151,13 @@ SbxValue& SbxValue::operator=( const SbxValue& r ) // Readout the content of the variables SbxValues aNew; if( IsFixed() ) - // firm: then the type had to match + // then the type has to match aNew.eType = aData.eType; else if( r.IsFixed() ) - // Source firm: take over the type + // Source fixed: copy the type aNew.eType = SbxDataType( r.aData.eType & 0x0FFF ); else - // both variant: then it is equal + // both variant: then don't care aNew.eType = SbxVARIANT; if( r.Get( aNew ) ) Put( aNew ); @@ -252,9 +252,9 @@ SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const // If this is an object and contains itself, // we cannot access on it - // The old condition to set an error - // is not correct, because e.g. a regular variant variable with an object - // could be affected thereof, if another value should be assigned. + // The old condition to set an error is not correct, + // because e.g. a regular variant variable with an object + // could be affected if another value should be assigned. // Therefore with flag. if( bObjInObjError && !pDflt && ((SbxValue*) pObj)->aData.eType == SbxOBJECT && @@ -295,7 +295,7 @@ SbxValue* SbxValue::TheRealValue( sal_Bool bObjInObjError ) const break; } } - // Elsewise guess a SbxValue + // Otherwise guess a SbxValue SbxValue* pVal = PTR_CAST(SbxValue,p->aData.pObj); if( pVal ) p = pVal; @@ -321,8 +321,7 @@ sal_Bool SbxValue::Get( SbxValues& rRes ) const } else { - // If there was asked for an object or a VARIANT, don't search - // the real values + // If an object or a VARIANT is requested, don't search the real values SbxValue* p = (SbxValue*) this; if( rRes.eType != SbxOBJECT && rRes.eType != SbxVARIANT ) p = TheRealValue(); @@ -475,8 +474,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) SetError( SbxERR_NOTIMP ); else { - // If there was asked for an object, don't search - // the real values + // If an object is requested, don't search the real values SbxValue* p = this; if( rVal.eType != SbxOBJECT ) p = TheRealValue( sal_False ); // Don't allow an error here @@ -530,10 +528,10 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) // Delete only the value part! p->SbxValue::Clear(); - // real allocation + // real assignment p->aData.pObj = rVal.pObj; - // if necessary cont in Ref-Count + // if necessary increment Ref-Count if( p->aData.pObj && p->aData.pObj != p ) { if ( p != this ) @@ -577,7 +575,7 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) // From 1996-03-28: // Method to execute a pretreatment of the strings at special types. // In particular necessary for BASIC-IDE, so that -// the output in the Watch-Window can be writen back with PutStringExt, +// the output in the Watch-Window can be written back with PutStringExt, // if Float were declared with ',' as the decimal separator or BOOl // explicit with "TRUE" or "FALSE". // Implementation in ImpConvStringExt (SBXSCAN.CXX) @@ -595,15 +593,15 @@ sal_Bool SbxValue::PutStringExt( const OUString& r ) aRes.eType = SbxSTRING; // Only if really something was converted, take the copy, - // elsewise take the original (Unicode remain) + // otherwise take the original (Unicode remains) sal_Bool bRet; if( ImpConvStringExt( aStr, eTargetType ) ) aRes.pOUString = (OUString*)&aStr; else aRes.pOUString = (OUString*)&r; - // #34939: Set a Fixed-Flag at Strings. which contain a number, and - // if this has a Num-Type, so that the type will not be changed + // #34939: For Strings which contain a number, and if this has a Num-Type, + // set a Fixed flag so that the type will not be changed sal_uInt16 nFlags_ = GetFlags(); if( ( eTargetType >= SbxINTEGER && eTargetType <= SbxCURRENCY ) || ( eTargetType >= SbxCHAR && eTargetType <= SbxUINT ) || @@ -618,8 +616,8 @@ sal_Bool SbxValue::PutStringExt( const OUString& r ) Put( aRes ); bRet = sal_Bool( !IsError() ); - // If it throwed an error with FIXED, set it back - // (UI-Action should not cast an error, but only fail) + // If FIXED resulted in an error, set it back + // (UI-Action should not result in an error, but simply fail) if( !bRet ) ResetError(); @@ -779,7 +777,7 @@ sal_Bool SbxValue::SetType( SbxDataType t ) return sal_True; if( ( t & 0x0FFF ) == SbxVARIANT ) { - // Trial to set the data type to Variant + // Try to set the data type to Variant ResetFlag( SBX_FIXED ); if( IsFixed() ) { @@ -844,7 +842,7 @@ sal_Bool SbxValue::Convert( SbxDataType eTo ) else return sal_True; } - // Converting from zero doesn't work. Once zero, always zero! + // Converting from null doesn't work. Once null, always null! if( aData.eType == SbxNULL ) { SetError( SbxERR_CONVERSION ); return sal_False; @@ -887,7 +885,7 @@ sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) SetError( SbxERR_PROP_READONLY ); else if( !rOp.CanRead() ) SetError( SbxERR_PROP_WRITEONLY ); - // Special rule 1: If one operand is zero, the result is zero + // Special rule 1: If one operand is null, the result is null else if( eThisType == SbxNULL || eOpType == SbxNULL ) SetType( SbxNULL ); // Special rule 2: If the operand is Empty, the result is the 2. operand @@ -895,7 +893,7 @@ sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) && !bVBAInterop ) *this = rOp; - // 1996-2-13: Don't test already before Get upon SbxEMPTY + // 1996-2-13: Don't test for SbxEMPTY before Get else { SbxValues aL, aR; @@ -1263,7 +1261,7 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const } else if( GetType() == SbxEMPTY && rOp.GetType() == SbxEMPTY ) bRes = !bVBAInterop ? sal_True : ( eOp == SbxEQ ? sal_True : sal_False ); - // Special rule 1: If an operand is zero, the result is FALSE + // Special rule 1: If an operand is null, the result is FALSE else if( GetType() == SbxNULL || rOp.GetType() == SbxNULL ) bRes = sal_False; // Special rule 2: If both are variant and one is numeric @@ -1304,7 +1302,7 @@ sal_Bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const } } // From 1995-12-19: If SbxSINGLE participate, then convert to SINGLE, - // elsewise it shows a numeric error + // otherwise it shows a numeric error else if( GetType() == SbxSINGLE || rOp.GetType() == SbxSINGLE ) { aL.eType = aR.eType = SbxSINGLE; @@ -1568,7 +1566,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) case SbxLONG: r << aData.nLong; break; case SbxDATE: - // #49935: Save as double, elsewise an error during the read in + // #49935: Save as double, otherwise an error during the read in ((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE ); write_lenPrefixed_uInt8s_FromOUString(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); ((SbxValue*)this)->aData.eType = (SbxDataType)nType; -- cgit