[PATCH] translated comments
Rob Snelders
programming at ertai.nl
Fri Feb 11 09:19:08 PST 2011
---
connectivity/source/commontools/CommonTools.cxx | 10 +-
connectivity/source/commontools/DateConversion.cxx | 11 +-
.../source/commontools/TSkipDeletedSet.cxx | 2 +-
connectivity/source/commontools/dbtools.cxx | 64 ++++----
connectivity/source/drivers/adabas/BDriver.cxx | 10 +-
connectivity/source/drivers/adabas/Bservices.cxx | 9 +-
connectivity/source/drivers/ado/ADriver.cxx | 2 +-
connectivity/source/drivers/ado/Aservices.cxx | 9 +-
connectivity/source/drivers/ado/Awrapado.cxx | 4 +-
connectivity/source/drivers/calc/Cservices.cxx | 9 +-
connectivity/source/drivers/dbase/DIndex.cxx | 53 +++---
connectivity/source/drivers/dbase/DIndexIter.cxx | 23 ++--
connectivity/source/drivers/dbase/DNoException.cxx | 31 ++--
connectivity/source/drivers/dbase/DTable.cxx | 185 ++++++++++----------
connectivity/source/drivers/dbase/Dservices.cxx | 9 +-
connectivity/source/drivers/dbase/dindexnode.cxx | 191 +++++++++-----------
connectivity/source/drivers/evoab/LFolderList.cxx | 27 ++--
connectivity/source/drivers/evoab/LFolderList.hxx | 6 +-
connectivity/source/drivers/evoab/LNoException.cxx | 54 +++---
connectivity/source/drivers/evoab/LServices.cxx | 9 +-
connectivity/source/drivers/evoab/LTable.cxx | 31 ++--
connectivity/source/drivers/evoab2/NServices.cxx | 9 +-
connectivity/source/drivers/file/FNoException.cxx | 13 +-
.../source/drivers/file/FPreparedStatement.cxx | 27 ++--
connectivity/source/drivers/file/FResultSet.cxx | 108 ++++++------
connectivity/source/drivers/file/FStatement.cxx | 50 +++---
connectivity/source/drivers/file/fanalyzer.cxx | 29 ++--
connectivity/source/drivers/file/fcode.cxx | 12 +-
connectivity/source/drivers/file/fcomp.cxx | 35 ++--
connectivity/source/drivers/file/quotedstring.cxx | 49 +++---
connectivity/source/drivers/flat/ETable.cxx | 28 ++--
connectivity/source/drivers/flat/Eservices.cxx | 9 +-
connectivity/source/drivers/hsqldb/Hservices.cxx | 9 +-
connectivity/source/drivers/jdbc/Array.cxx | 24 ++--
connectivity/source/drivers/jdbc/Blob.cxx | 21 +--
connectivity/source/drivers/jdbc/Boolean.cxx | 2 +-
.../source/drivers/jdbc/CallableStatement.cxx | 32 ++--
connectivity/source/drivers/jdbc/Class.cxx | 4 +-
connectivity/source/drivers/jdbc/Clob.cxx | 20 +-
.../source/drivers/jdbc/DatabaseMetaData.cxx | 27 ++--
connectivity/source/drivers/jdbc/Date.cxx | 2 +-
.../source/drivers/jdbc/DriverPropertyInfo.cxx | 2 +-
connectivity/source/drivers/jdbc/Exception.cxx | 2 +-
connectivity/source/drivers/jdbc/InputStream.cxx | 4 +-
connectivity/source/drivers/jdbc/JBigDecimal.cxx | 12 +-
connectivity/source/drivers/jdbc/JConnection.cxx | 18 +-
connectivity/source/drivers/jdbc/JStatement.cxx | 28 ++--
connectivity/source/drivers/jdbc/Object.cxx | 10 +-
.../source/drivers/jdbc/PreparedStatement.cxx | 44 +++---
connectivity/source/drivers/jdbc/Reader.cxx | 6 +-
connectivity/source/drivers/jdbc/Ref.cxx | 2 +-
connectivity/source/drivers/jdbc/ResultSet.cxx | 60 +++---
linguistic/source/dlistimp.cxx | 7 +-
vbahelper/source/vbahelper/vbaapplicationbase.cxx | 2 +-
54 files changed, 686 insertions(+), 770 deletions(-)
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 89efa4e..5a11802 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -83,8 +83,8 @@ namespace connectivity
else
pWild += pos;
else
- break; // ACHTUNG laeuft unter bestimmten
- // Umstaenden in den nachsten case rein!!
+ break; // WARNING in certain circumstances
+ // it will run in the next case clean!!
case CHAR_WILD:
while ( *pWild == CHAR_WILD )
pWild++;
@@ -310,8 +310,8 @@ sal_Bool isCharOk(sal_Unicode c,const ::rtl::OUString& _rSpecials)
//------------------------------------------------------------------------------
sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{
- // Ueberpruefung auf korrekte Namensgebung im SQL Sinne
- // Dieses ist wichtig fuer Tabellennamen beispielsweise
+ // testing on correct naming in SQL statements
+ // This is important for Tablenames for example
const sal_Unicode* pStr = rName.getStr();
if (*pStr > 127 || isdigit(*pStr))
return sal_False;
@@ -336,7 +336,7 @@ sal_Bool isValidSQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSp
return sal_True;
}
//------------------------------------------------------------------
-// Erzeugt einen neuen Namen falls noetig
+// Creates new names if necessary
::rtl::OUString convertName2SQLName(const ::rtl::OUString& rName,const ::rtl::OUString& _rSpecials)
{
if(isValidSQLName(rName,_rSpecials))
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 406f180..b48358f 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -255,13 +255,13 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
double fValue = 0;
if (rString.getLength())
{
- // Muss der String formatiert werden?
+ // Does the String needs to be formatted?
sal_Int16 nTypeClass = nKeyType & ~NumberFormat::DEFINED;
sal_Bool bTextFormat = nTypeClass == NumberFormat::TEXT;
sal_Int32 nKeyToUse = bTextFormat ? 0 : nKey;
sal_Int16 nRealUsedTypeClass = nTypeClass;
- // bei einem Text-Format muessen wir dem Formatter etwas mehr Freiheiten einraeumen, sonst
- // wirft convertStringToNumber eine NotNumericException
+ // at a Text-Format we must give the formatter some more freedom, without it
+ // The convertStringToNumber will throw a NotNumericException
try
{
fValue = xFormatter->convertStringToNumber(nKeyToUse, rString);
@@ -269,10 +269,9 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
if (nRealUsedKey != nKeyToUse)
nRealUsedTypeClass = getNumberFormatType(xFormatter, nRealUsedKey) & ~NumberFormat::DEFINED;
- // und noch eine Sonderbehandlung, diesmal fuer Prozent-Formate
+ // and again a special treatment, this time for Procent-formats
if ((NumberFormat::NUMBER == nRealUsedTypeClass) && (NumberFormat::PERCENT == nTypeClass))
- { // die Formatierung soll eigentlich als Prozent erfolgen, aber der String stellt nur eine
- // einfache Nummer dar -> anpassen
+ { // The formating sould take place as Procent, but the String provides just one simple number -> Change
::rtl::OUString sExpanded(rString);
static ::rtl::OUString s_sPercentSymbol( RTL_CONSTASCII_USTRINGPARAM( "%" ));
// need a method to add a sal_Unicode to a string, 'til then we use a static string
diff --git a/connectivity/source/commontools/TSkipDeletedSet.cxx b/connectivity/source/commontools/TSkipDeletedSet.cxx
index 005967d..ed4a229 100644
--- a/connectivity/source/commontools/TSkipDeletedSet.cxx
+++ b/connectivity/source/commontools/TSkipDeletedSet.cxx
@@ -139,7 +139,7 @@ sal_Bool OSkipDeletedSet::skipDeleted(IResultSetHelper::Movement _eCursorPositio
bDone = sal_False;
}
- while (bDataFound && !bDone) // solange iterieren bis man auf einem gueltigen Satz ist
+ while (bDataFound && !bDone) // Iterate untill we are at the valid set
{
bDataFound = m_pHelper->move(eDelPosition, 1, _bRetrieveData);
if (_eCursorPosition != IResultSetHelper::RELATIVE)
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 111a0ec..3b587bd 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -956,7 +956,7 @@ void qualifiedNameComponents(const Reference< XDatabaseMetaData >& _rxConnMetaDa
}
else
{
- // Katalogname am Ende
+ // Cataloguename at the end
sal_Int32 nIndex = sName.lastIndexOf(sSeparator);
if (-1 != nIndex)
{
@@ -1014,7 +1014,7 @@ try
if ( !xOldProps.is() || !xNewProps.is() )
return;
- // kopieren wir erst mal alle Props, die in Quelle und Ziel vorhanden sind und identische Beschreibungen haben
+ // First we copy all the Props, that are available in source and target and have the same discription
Reference< XPropertySetInfo> xOldInfo( xOldProps->getPropertySetInfo());
Reference< XPropertySetInfo> xNewInfo( xNewProps->getPropertySetInfo());
@@ -1048,13 +1048,13 @@ try
&& (!pOldProps[i].Name.equals(sPropLabelControl))
)
{
- // binaere Suche
+ // binary search
Property* pResult = ::std::lower_bound(pNewProps, pNewProps + nNewLen,pOldProps[i].Name, ::comphelper::PropertyStringLessFunctor());
if ( pResult
&& ( pResult != pNewProps + nNewLen && pResult->Name == pOldProps[i].Name )
&& ( (pResult->Attributes & PropertyAttribute::READONLY) == 0 )
&& ( pResult->Type.equals(pOldProps[i].Type)) )
- { // Attribute stimmen ueberein und Property ist nicht read-only
+ { // Attributes concur and the property is not read-only
try
{
xNewProps->setPropertyValue(pResult->Name, xOldProps->getPropertyValue(pResult->Name));
@@ -1073,8 +1073,7 @@ try
}
}
-
- // fuer formatierte Felder (entweder alt oder neu) haben wir ein paar Sonderbehandlungen
+ // for formated folders (as wel old as new) we have soms special treatments
Reference< XServiceInfo > xSI( xOldProps, UNO_QUERY );
sal_Bool bOldIsFormatted = xSI.is() && xSI->supportsService( sFormattedServiceName );
xSI = Reference< XServiceInfo >( xNewProps, UNO_QUERY );
@@ -1084,13 +1083,13 @@ try
return; // nothing to do
if (bOldIsFormatted && bNewIsFormatted)
- // nein, wenn beide formatierte Felder sind, dann machen wir keinerlei Konvertierungen
- // Das geht zu weit ;)
+ // no, when both are formated folders, then we make no conversions
+ // That's going to far ;)
return;
if (bOldIsFormatted)
{
- // aus dem eingestellten Format ein paar Properties rausziehen und zum neuen Set durchschleifen
+ // pull from the selected format some Properties and in put them in the new Set
Any aFormatKey( xOldProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FORMATKEY)) );
if (aFormatKey.hasValue())
{
@@ -1104,8 +1103,7 @@ try
{
Any aVal( xFormat->getPropertyValue(sPropCurrencySymbol) );
if (aVal.hasValue() && hasProperty(sPropCurrencySymbol, xNewProps))
- // (wenn die Quelle das nicht gesetzt hat, dann auch nicht kopieren, um den
- // Default-Wert nicht zu ueberschreiben
+ // When the Source hasn't set it, then don't copy it, so we don´t overwrite the Default-value
xNewProps->setPropertyValue(sPropCurrencySymbol, aVal);
}
if (hasProperty(sPropDecimals, xFormat) && hasProperty(sPropDecimals, xNewProps))
@@ -1113,10 +1111,10 @@ try
}
}
- // eine eventuelle-Min-Max-Konvertierung
+ // a eventual Min-Max-Conversion
Any aEffectiveMin( xOldProps->getPropertyValue(sPropEffectiveMin) );
if (aEffectiveMin.hasValue())
- { // im Gegensatz zu ValueMin kann EffectiveMin void sein
+ { // Unlike the ValueMin the EffectiveMin can be void
if (hasProperty(sPropValueMin, xNewProps))
{
OSL_ENSURE(aEffectiveMin.getValueType().getTypeClass() == TypeClass_DOUBLE,
@@ -1135,59 +1133,59 @@ try
}
}
- // dann koennen wir noch Default-Werte konvertieren und uebernehmen
+ // then we can still convert and copy the Default-value
Any aEffectiveDefault( xOldProps->getPropertyValue(sPropEffectiveDefault) );
if (aEffectiveDefault.hasValue())
{
sal_Bool bIsString = aEffectiveDefault.getValueType().getTypeClass() == TypeClass_STRING;
OSL_ENSURE(bIsString || aEffectiveDefault.getValueType().getTypeClass() == TypeClass_DOUBLE,
"TransferFormComponentProperties : invalid property type !");
- // die Effective-Properties sollten immer void oder string oder double sein ....
+ // The Effective-Properties will always be void or string or double ....
if (hasProperty(sPropDefaultDate, xNewProps) && !bIsString)
- { // (einen ::rtl::OUString in ein Datum zu konvertieren muss nicht immer klappen, denn das ganze kann ja an
- // eine Textspalte gebunden gewesen sein, aber mit einem double koennen wir was anfangen)
+ { // (to convert a ::rtl::OUString in a Date will not always succeed, because it is bound to text-columns,
+ // but we can do something with a double)
Date aDate = DBTypeConversion::toDate(getDouble(aEffectiveDefault));
xNewProps->setPropertyValue(sPropDefaultDate, makeAny(aDate));
}
if (hasProperty(sPropDefaultTime, xNewProps) && !bIsString)
- { // voellig analog mit Zeit
+ { // Fully analog with time
Time aTime = DBTypeConversion::toTime(getDouble(aEffectiveDefault));
xNewProps->setPropertyValue(sPropDefaultTime, makeAny(aTime));
}
if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), xNewProps) && !bIsString)
- { // hier koennen wir einfach das double durchreichen
+ { // Here we can simply give the double
xNewProps->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), aEffectiveDefault);
}
if (hasProperty(sPropDefaultText, xNewProps) && bIsString)
- { // und hier den ::rtl::OUString
+ { // and here the ::rtl::OUString
xNewProps->setPropertyValue(sPropDefaultText, aEffectiveDefault);
}
- // nyi: die Uebersetzung zwischen doubles und ::rtl::OUString wuerde noch mehr Moeglichkeien eroeffnen
+ // nyi: The translation between doubles and ::rtl::OUString can give more possible anwers
}
}
- // die andere Richtung : das neu Control soll formatiert sein
+ // The other direction: the new Control will be formatted
if (bNewIsFormatted)
{
- // zuerst die Formatierung
- // einen Supplier koennen wir nicht setzen, also muss das neue Set schon einen mitbringen
+ // first the formatting
+ // we can't set a Supplier, so the new Set must bring one in
Reference< XNumberFormatsSupplier> xSupplier;
xNewProps->getPropertyValue(sPropFormatsSupplier) >>= xSupplier;
if (xSupplier.is())
{
Reference< XNumberFormats> xFormats(xSupplier->getNumberFormats());
- // Dezimal-Stellen
+ // Set Decimal
sal_Int16 nDecimals = 2;
if (hasProperty(sPropDecimalAccuracy, xOldProps))
xOldProps->getPropertyValue(sPropDecimalAccuracy) >>= nDecimals;
- // Grund-Format (je nach ClassId des alten Sets)
+ // Ground-Format (depending on the ClassId of the old Set)
sal_Int32 nBaseKey = 0;
if (hasProperty(sPropClassId, xOldProps))
{
@@ -1213,21 +1211,21 @@ try
}
}
- // damit koennen wir ein neues Format basteln ...
+ // With this we can generate a new format ...
::rtl::OUString sNewFormat = xFormats->generateFormat(nBaseKey, _rLocale, sal_False, sal_False, nDecimals, 0);
- // kein Tausender-Trennzeichen, negative Zahlen nicht in Rot, keine fuehrenden Nullen
+ // No thousands seperator, negative number are not in red, no leading zeros
- // ... und zum FormatsSupplier hinzufuegen (wenn noetig)
+ // ... and add at FormatsSupplier (when needed)
sal_Int32 nKey = xFormats->queryKey(sNewFormat, _rLocale, sal_False);
if (nKey == (sal_Int32)-1)
- { // noch nicht vorhanden in meinem Formatter ...
+ { // not added yet in my Formatter ...
nKey = xFormats->addNew(sNewFormat, _rLocale);
}
xNewProps->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FORMATKEY), makeAny((sal_Int32)nKey));
}
- // min-/max-Werte
+ // min-/max-Value
Any aNewMin, aNewMax;
if (hasProperty(sPropValueMin, xOldProps))
aNewMin = xOldProps->getPropertyValue(sPropValueMin);
@@ -1236,7 +1234,7 @@ try
xNewProps->setPropertyValue(sPropEffectiveMin, aNewMin);
xNewProps->setPropertyValue(sPropEffectiveMax, aNewMax);
- // Default-Wert
+ // Default-Value
Any aNewDefault;
if (hasProperty(sPropDefaultDate, xOldProps))
{
@@ -1252,7 +1250,7 @@ try
aNewDefault <<= DBTypeConversion::toDouble(*(Time*)aTime.getValue());
}
- // double oder ::rtl::OUString werden direkt uebernommen
+ // double or ::rtl::OUString will be directly copied
if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE), xOldProps))
aNewDefault = xOldProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DEFAULTVALUE));
if (hasProperty(sPropDefaultText, xOldProps))
diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx
index 25f554f..6708bf9 100644
--- a/connectivity/source/drivers/adabas/BDriver.cxx
+++ b/connectivity/source/drivers/adabas/BDriver.cxx
@@ -525,23 +525,23 @@ void SAL_CALL ODriver::dropCatalog( const ::rtl::OUString& /*catalogName*/, cons
::dbtools::throwFeatureNotImplementedException( "!XDropCatalog::dropCatalog", *this );
}
//-----------------------------------------------------------------------------
-// ODBC Environment (gemeinsam fuer alle Connections):
+// ODBC Environment (general for all Connections):
SQLHANDLE ODriver::EnvironmentHandle(::rtl::OUString &_rPath)
{
- // Ist (fuer diese Instanz) bereits ein Environment erzeugt worden?
+ // Is (for this Instance) already a Environment created?
if (!m_pDriverHandle)
{
SQLHANDLE h = SQL_NULL_HANDLE;
- // Environment allozieren
+ // allocate Environment
- // ODBC-DLL jetzt laden:
+ // load ODBC-DLL now:
if (! LoadLibrary_ADABAS(_rPath))
return SQL_NULL_HANDLE;
if (N3SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&h) != SQL_SUCCESS)
return SQL_NULL_HANDLE;
- // In globaler Struktur merken ...
+ // Save in global Structure...
m_pDriverHandle = h;
SQLRETURN nError = N3SQLSetEnvAttr(h, SQL_ATTR_ODBC_VERSION,(SQLPOINTER) SQL_OV_ODBC3, SQL_IS_INTEGER);
OSL_UNUSED( nError );
diff --git a/connectivity/source/drivers/adabas/Bservices.cxx b/connectivity/source/drivers/adabas/Bservices.cxx
index 2857166..03c51a0 100644
--- a/connectivity/source/drivers/adabas/Bservices.cxx
+++ b/connectivity/source/drivers/adabas/Bservices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -113,7 +109,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx
index d87baa5..8562195 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -236,7 +236,7 @@ void ADOS::ThrowException(ADOConnection* _pAdoCon,const Reference< XInterface >&
pErrors->AddRef( );
- // alle aufgelaufenen Fehler auslesen und ausgeben
+ // read all noted errors and issue them
sal_Int32 nLen;
pErrors->get_Count(&nLen);
if (nLen)
diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx
index 5ae486b..a39fa22 100644
--- a/connectivity/source/drivers/ado/Aservices.cxx
+++ b/connectivity/source/drivers/ado/Aservices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, that must be exported from the model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -72,7 +69,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -112,7 +108,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index aec997e..29e43ce 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -409,7 +409,7 @@ CommandTypeEnum WpADOCommand::get_CommandType( ) const
return eNum;
}
-// gibt den Namen des Feldes zur"ueck
+// gives the names of the folders back
::rtl::OUString WpADOCommand::GetName() const
{
OSL_ENSURE(pInterface,"Interface is null!");
@@ -514,7 +514,7 @@ sal_Int32 WpADOField::GetDefinedSize() const
return nDefinedSize;
}
-// gibt den Namen des Feldes zur"ueck
+// gives the names of the folders back
::rtl::OUString WpADOField::GetName() const
{
OSL_ENSURE(pInterface,"Interface is null!");
diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx
index 482cd0d..cefa576 100644
--- a/connectivity/source/drivers/calc/Cservices.cxx
+++ b/connectivity/source/drivers/calc/Cservices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -113,7 +109,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 866c77f..db5c00c 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -189,8 +189,8 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp,
BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue)
{
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
- // Sucht ein bestimmten Wert im Index
- // Wenn der Index Unique ist, interssiert der Key nicht, sonst ja
+ // Search a specific value in Index
+ // When the Index is unique, the key doesn't matter
try
{
if (m_aHeader.db_keytype == 0)
@@ -218,8 +218,8 @@ BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
- // Sucht ein bestimmten Wert im Index
- // Wenn der Index Unique ist, interssiert der Key nicht, sonst ja
+ // Search a specific value in Index
+ // When the Index is unique, the key doesn't matter
ONDXKey aKey;
return ConvertToKey(&aKey, nRec, rValue) && getRoot()->Find(aKey);
}
@@ -231,14 +231,14 @@ BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue)
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
ONDXKey aKey;
- // Existiert der Wert bereits
- // Find immer verwenden um das aktuelle Blatt zu bestimmen
+ // Does the value already exisists
+ // Find always uses to determen the actual sheet
if (!ConvertToKey(&aKey, nRec, rValue) || (getRoot()->Find(aKey) && isUnique()))
return FALSE;
ONDXNode aNewNode(aKey);
- // einfuegen in das aktuelle Blatt
+ // insert in the current sheet
if (!m_aCurLeaf.Is())
return FALSE;
@@ -266,15 +266,15 @@ BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue)
{
openIndexFile();
OSL_ENSURE(m_pFileStream,"FileStream is not opened!");
- // Existiert der Wert bereits
- // Find immer verwenden um das aktuelle Blatt zu bestimmen
+ // Does the value already exisists
+ // Find always uses to determen the actual sheet
ONDXKey aKey;
if (!ConvertToKey(&aKey, nRec, rValue) || !getRoot()->Find(aKey))
return FALSE;
ONDXNode aNewNode(aKey);
- // einfuegen in das aktuelle Blatt
+ // insert in the current sheet
if (!m_aCurLeaf.Is())
return FALSE;
#if OSL_DEBUG_LEVEL > 1
@@ -292,7 +292,7 @@ void ODbaseIndex::Collect(ONDXPage* pPage)
//------------------------------------------------------------------
void ODbaseIndex::Release(BOOL bSave)
{
- // Freigeben der Indexressourcen
+ // Release the Index-recources
m_bUseCollector = FALSE;
if (m_aCurLeaf.Is())
@@ -301,19 +301,19 @@ void ODbaseIndex::Release(BOOL bSave)
m_aCurLeaf.Clear();
}
- // Wurzel freigeben
+ // Release the root
if (m_aRoot.Is())
{
m_aRoot->Release(bSave);
m_aRoot.Clear();
}
- // alle Referenzen freigeben, bevor der FileStream geschlossen wird
+ // Release all references, before the FileStream will be closed
for (ULONG i = 0; i < m_aCollector.size(); i++)
m_aCollector[i]->QueryDelete();
m_aCollector.clear();
- // Header modifiziert ?
+ // Header modified?
if (bSave && (m_aHeader.db_rootpage != m_nRootPage ||
m_aHeader.db_pagecount != m_nPageCount))
{
@@ -386,7 +386,7 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, ODbaseIndex& rInd
//------------------------------------------------------------------
void ODbaseIndex::createINFEntry()
{
- // inf Datei abgleichen
+ // synchronize inf-file
String sEntry = m_Name;
sEntry += String::CreateFromAscii(".ndx");
@@ -432,8 +432,7 @@ BOOL ODbaseIndex::DropImpl()
m_pTable->getConnection()->throwGenericSQLException(STR_COULD_NOT_DELETE_INDEX,*m_pTable);
}
- // InfDatei abgleichen
-
+ // synchronize inf-file
::rtl::OUString sCfgFile(m_pTable->getConnection()->getURL());
sCfgFile += OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_DELIMITER);
sCfgFile += m_pTable->getName();
@@ -453,7 +452,7 @@ BOOL ODbaseIndex::DropImpl()
// delete entries from the inf file
for (USHORT nKey = 0; nKey < nKeyCnt; nKey++)
{
- // Verweist der Key auf ein Indexfile?...
+ // References the Key to a Index-file?...
aKeyName = aInfFile.GetKeyName( nKey );
if (aKeyName.Copy(0,3) == "NDX")
{
@@ -477,7 +476,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const ::
//------------------------------------------------------------------
BOOL ODbaseIndex::CreateImpl()
{
- // Anlegen des Index
+ // Create the Index
const ::rtl::OUString sFile = getCompletePath();
if(UCBContentHelper::Exists(sFile))
{
@@ -487,13 +486,13 @@ BOOL ODbaseIndex::CreateImpl()
) );
::dbtools::throwGenericSQLException( sError, *this );
}
- // Index ist nur einstufig
+ // Index is just a stage
if (m_pColumns->getCount() > 1)
m_pTable->getConnection()->throwGenericSQLException(STR_ONL_ONE_COLUMN_PER_INDEX,*this);
Reference<XFastPropertySet> xCol(m_pColumns->getByIndex(0),UNO_QUERY);
- // ist die Spalte schon indiziert ?
+ // is the Column already indexed?
if ( !xCol.is() )
::dbtools::throwFunctionSequenceException(*this);
@@ -512,7 +511,7 @@ BOOL ODbaseIndex::CreateImpl()
m_pFileStream->SetBufferSize(PAGE_SIZE);
m_pFileStream->SetFiller('\0');
- // Zunaechst muss das Ergebnis sortiert sein
+ // first must the Guest be sorted
utl::SharedUNOComponent<XStatement> xStmt;
utl::SharedUNOComponent<XResultSet> xSet;
String aName;
@@ -548,7 +547,7 @@ BOOL ODbaseIndex::CreateImpl()
impl_killFileAndthrowError_throw(STR_COULD_NOT_CREATE_INDEX,sFile);
}
- // Setzen der Headerinfo
+ // Set the Headerinfo
memset(&m_aHeader,0,sizeof(m_aHeader));
sal_Int32 nType = 0;
::rtl::Reference<OSQLColumns> aCols = m_pTable->getTableColumns();
@@ -572,9 +571,7 @@ BOOL ODbaseIndex::CreateImpl()
m_aHeader.db_unique = m_IsUnique ? 1: 0;
m_aHeader.db_keyrec = m_aHeader.db_keylen + 8;
- // modifizierung am Header werden ueber Unterschiede zw. HeaderInfo und nRootPage
- // bzw. nPageCout erkannt
-
+ // modifies of the Header means the HeaderInfo and nRootPage, or nPageCount are changed
m_nRootPage = 1;
m_nPageCount = 2;
@@ -600,11 +597,11 @@ BOOL ODbaseIndex::CreateImpl()
ORowSetValue atmpValue=ORowSetValue();
ONDXKey aKey(atmpValue, nType, 0);
ONDXKey aInsertKey(atmpValue, nType, 0);
- // Erzeugen der Indexstruktur
+ // Create the Index-structure
while (xSet->next())
{
ORowSetValue aValue(m_aHeader.db_keytype ? ORowSetValue(xRow->getDouble(1)) : ORowSetValue(xRow->getString(1)));
- // ueberpruefen auf doppelten eintrag
+ // checking for double-entries
if (m_IsUnique && m_nCurNode != NODE_NOTFOUND)
{
aKey.setValue(aValue);
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index 965196f..3fbf8f4 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -69,7 +69,7 @@ ULONG OIndexIterator::Find(BOOL bFirst)
if (!m_pOperator)
{
- // Vorbereitung , auf kleinstes Element positionieren
+ // Preperation, position on the smallest Element
if (bFirst)
{
ONDXPage* pPage = m_aRoot;
@@ -97,18 +97,17 @@ ULONG OIndexIterator::Find(BOOL bFirst)
//------------------------------------------------------------------
ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
{
- // sucht den vorgegeben key
- // Besonderheit: gelangt der Algorithmus ans Ende
- // wird immer die aktuelle Seite und die Knotenposition vermerkt
- // auf die die Bedingung <= zutrifft
- // dieses findet beim Insert besondere Beachtung
+ // searches a given key
+ // Speicality: At the end of the algorithm it will give
+ // the actual Page an the position of the Node, where the
+ // condition (<=) applies at insert special attention.
// ONDXIndex* m_pIndex = GetNDXIndex();
OOp_COMPARE aTempOp(SQLFilterOperator::GREATER);
USHORT i = 0;
if (pPage->IsLeaf())
{
- // im blatt wird die eigentliche Operation ausgefuehrt, sonst die temp. (>)
+ // in the sheet will the actual Operation run, without that temp. (>)
while (i < pPage->Count() && !m_pOperator->operate(&((*pPage)[i]).GetKey(),&rKey))
i++;
}
@@ -120,7 +119,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
ONDXKey* pFoundKey = NULL;
if (!pPage->IsLeaf())
{
- // weiter absteigen
+ // raise further
ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_pIndex)
: ((*pPage)[i-1]).GetChild(m_pIndex, pPage);
pFoundKey = aPage.Is() ? GetFirstKey(aPage, rKey) : NULL;
@@ -149,7 +148,7 @@ ULONG OIndexIterator::GetCompare(BOOL bFirst)
if (bFirst)
{
- // Vorbereitung , auf kleinstes Element positionieren
+ // Preperation, position on the smallest element
ONDXPage* pPage = m_aRoot;
switch (ePredicateType)
{
@@ -278,7 +277,7 @@ ONDXKey* OIndexIterator::GetNextKey()
if (m_aCurLeaf.Is() && ((++m_nCurNode) >= m_aCurLeaf->Count()))
{
ONDXPage* pPage = m_aCurLeaf;
- // naechste Seite suchen
+ // search closest page
while (pPage)
{
ONDXPage* pParentPage = pPage->GetParent();
@@ -286,7 +285,7 @@ ONDXKey* OIndexIterator::GetNextKey()
{
USHORT nPos = pParentPage->Search(pPage);
if (nPos != pParentPage->Count() - 1)
- { // Seite gefunden
+ { // found page
pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage);
break;
}
@@ -294,7 +293,7 @@ ONDXKey* OIndexIterator::GetNextKey()
pPage = pParentPage;
}
- // jetzt wieder zum Blatt
+ // now go on with sheet
while (pPage && !pPage->IsLeaf())
pPage = pPage->GetChild(m_pIndex);
diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx
index 55c06f2..3446dcd 100644
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ b/connectivity/source/drivers/dbase/DNoException.cxx
@@ -47,7 +47,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::seekRow" );
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // Prepare positioning:
OSL_ENSURE(m_pFileStream,"ODbaseTable::seekRow: FileStream is NULL!");
sal_uInt32 nNumberOfRecords = (sal_uInt32)m_aHeader.db_anz;
@@ -118,7 +118,7 @@ Error:
m_nFilePos = 0;
break;
case IResultSetHelper::BOOKMARK:
- m_nFilePos = nTempPos; // vorherige Position
+ m_nFilePos = nTempPos; // last Position
}
return sal_False;
@@ -135,12 +135,12 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
switch (m_aMemoHeader.db_typ)
{
- case MemodBaseIII: // dBase III-Memofeld, endet mit Ctrl-Z
+ case MemodBaseIII: // dBase III-Memofeld, ends with Ctrl-Z
{
const char cEOF = (char) 0x1a;
ByteString aBStr;
static char aBuf[514];
- aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen
+ aBuf[512] = 0; // without it can be random
BOOL bReady = sal_False;
do
@@ -162,7 +162,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
} break;
case MemoFoxPro:
- case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
+ case MemodBaseIV: // dBase IV-Memofeld with the length discribed
{
char sHeader[4];
m_pMemoStream->Read(sHeader,4);
@@ -224,7 +224,7 @@ void ODbaseTable::AllocBuffer()
m_pBuffer = NULL;
}
- // Falls noch kein Puffer vorhanden: allozieren:
+ // When no Buffer available: allocate:
if (m_pBuffer == NULL && nSize)
{
m_nBufferSize = nSize;
@@ -237,7 +237,7 @@ BOOL ODbaseTable::WriteBuffer()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::WriteBuffer" );
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
- // Auf gewuenschten Record positionieren:
+ // Position on the wished record:
long nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
m_pFileStream->Seek(nPos);
return m_pFileStream->Write((char*) m_pBuffer, m_aHeader.db_slng) > 0;
@@ -257,7 +257,7 @@ sal_Int32 ODbaseTable::getCurrentLastPos() const
void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXNode::Read" );
- rStream >> aKey.nRecord; // schluessel
+ rStream >> aKey.nRecord; // key
if (rIndex.getHeader().db_keytype)
{
@@ -292,9 +292,9 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXNode::Write" );
const ODbaseIndex& rIndex = rPage.GetIndex();
if (!rIndex.isUnique() || rPage.IsLeaf())
- rStream << (sal_uInt32)aKey.nRecord; // schluessel
+ rStream << (sal_uInt32)aKey.nRecord; // key
else
- rStream << (sal_uInt32)0; // schluessel
+ rStream << (sal_uInt32)0; // key
if (rIndex.getHeader().db_keytype) // double
{
@@ -373,7 +373,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
eResult = (m > n) ? COMPARE_GREATER : (n == m) ? COMPARE_EQUAL : COMPARE_LESS;
}
- // Record vergleich, wenn Index !Unique
+ // Record compare, when Index !Unique
if (eResult == COMPARE_EQUAL && nRecord && rKey.nRecord)
eResult = (nRecord > rKey.nRecord) ? COMPARE_GREATER :
(nRecord == rKey.nRecord) ? COMPARE_EQUAL : COMPARE_LESS;
@@ -457,7 +457,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
//------------------------------------------------------------------
SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage)
{
- // Seite existiert noch nicht
+ // Page isn't important yet
ULONG nSize = (rPage.GetPagePos() + 1) * 512;
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
{
@@ -547,7 +547,7 @@ BOOL ONDXPage::IsFull() const
USHORT ONDXPage::Search(const ONDXKey& rSearch)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ONDXPage::Search" );
- // binare Suche spaeter
+ // furtheron a binary search
USHORT i = 0xFFFF;
while (++i < Count())
if ((*this)[i].GetKey() == rSearch)
@@ -565,12 +565,11 @@ USHORT ONDXPage::Search(const ONDXPage* pPage)
if (((*this)[i]).GetChild() == pPage)
break;
- // wenn nicht gefunden, dann wird davon ausgegangen, dass die Seite selbst
- // auf die Page zeigt
+ // when not found, then we assume, that the Page shows itself on the page
return (i < Count()) ? i : NODE_NOTFOUND;
}
// -----------------------------------------------------------------------------
-// laeuft rekursiv
+// runs recursive
void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
ONDXKey& rReplace)
{
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 901da8c..fc54874 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -205,7 +205,7 @@ void ODbaseTable::readHeader()
OSL_ENSURE(m_pFileStream,"No Stream available!");
if(!m_pFileStream)
return;
- m_pFileStream->RefreshBuffer(); // sicherstellen, dass die Kopfinformationen tatsaechlich neu gelesen werden
+ m_pFileStream->RefreshBuffer(); // Make sure, that the Header-information actually is read again
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
BYTE nType=0;
@@ -229,14 +229,14 @@ void ODbaseTable::readHeader()
if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
throwInvalidDbaseFormat();
- if ( ( ( m_aHeader.db_kopf - 1 ) / 32 - 1 ) <= 0 ) // anzahl felder
+ if ( ( ( m_aHeader.db_kopf - 1 ) / 32 - 1 ) <= 0 ) // number of fields
{
// no dbase file
throwInvalidDbaseFormat();
}
else
{
- // Konsistenzpruefung des Header:
+ // Consistency-check of the header:
m_aHeader.db_typ = (DBFType)nType;
switch (m_aHeader.db_typ)
{
@@ -306,7 +306,7 @@ void ODbaseTable::fillColumns()
m_aPrecisions.clear();
m_aScales.clear();
- // Anzahl Felder:
+ // Number of Fields:
const sal_Int32 nFieldCount = (m_aHeader.db_kopf - 1) / 32 - 1;
OSL_ENSURE(nFieldCount,"No columns in table!");
@@ -357,10 +357,10 @@ OSL_TRACE("column type: %c",aDBFColumn.db_typ);
aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMERIC"));
eType = DataType::DECIMAL;
- // Bei numerischen Feldern werden zwei Zeichen mehr geschrieben, als die Precision der Spaltenbeschreibung eigentlich
- // angibt, um Platz fuer das eventuelle Vorzeichen und das Komma zu haben. Das muss ich jetzt aber wieder rausrechnen.
+ // at numeric fields two charachers more are written, then the precision of the column description prediscribes,
+ // to keep room for the possible sign and the comma. That I'll need to calculate again.
nPrecision = SvDbaseConverter::ConvertPrecisionToOdbc(nPrecision,aDBFColumn.db_dez);
- // leider gilt das eben Gesagte nicht fuer aeltere Versionen ....
+ // This is not true for older Versions ....
break;
case 'L':
eType = DataType::BIT;
@@ -506,17 +506,17 @@ void ODbaseTable::construct()
readHeader();
if (HasMemoFields())
{
- // Memo-Dateinamen bilden (.DBT):
- // nyi: Unschoen fuer Unix und Mac!
+ // Create Memo-Filenames (.DBT):
+ // nyi: Ugly for Unix and Mac!
if ( m_aHeader.db_typ == FoxProMemo || VisualFoxPro == m_aHeader.db_typ || VisualFoxProAuto == m_aHeader.db_typ ) // foxpro uses another extension
aURL.SetExtension(String::CreateFromAscii("fpt"));
else
aURL.SetExtension(String::CreateFromAscii("dbt"));
- // Wenn die Memodatei nicht gefunden wird, werden die Daten trotzdem angezeigt
- // allerdings koennen keine Updates durchgefuehrt werden
- // jedoch die Operation wird ausgefuehrt
+ // When the Memo-file isn't found, the Data will still show,
+ // However Updates can't be done
+ // but the Operation is executed
m_pMemoStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYWRITE);
if ( !m_pMemoStream )
{
@@ -533,19 +533,19 @@ void ODbaseTable::construct()
if ( m_aHeader.db_anz == 0 && ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng) > 0) // seems to be empty or someone wrote bullshit into the dbase file
m_aHeader.db_anz = ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng);
- // Buffersize abhaengig von der Filegroesse
+ // Buffersize is dependent on the file-size
m_pFileStream->SetBufferSize(nFileSize > 1000000 ? 32768 :
nFileSize > 100000 ? 16384 :
nFileSize > 10000 ? 4096 : 1024);
if (m_pMemoStream)
{
- // Puffer genau auf Laenge eines Satzes stellen
+ // set the Buffer at the exact length of a sentence
m_pMemoStream->Seek(STREAM_SEEK_TO_END);
nFileSize = m_pMemoStream->Tell();
m_pMemoStream->Seek(STREAM_SEEK_TO_BEGIN);
- // Buffersize abhaengig von der Filegroesse
+ // Buffersize is dependent on the file-size
m_pMemoStream->SetBufferSize(nFileSize > 1000000 ? 32768 :
nFileSize > 100000 ? 16384 :
nFileSize > 10000 ? 4096 :
@@ -560,23 +560,22 @@ BOOL ODbaseTable::ReadMemoHeader()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::ReadMemoHeader" );
m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
- m_pMemoStream->RefreshBuffer(); // sicherstellen das die Kopfinformationen tatsaechlich neu gelesen werden
+ m_pMemoStream->RefreshBuffer(); // make sure that the header-information is actually read again
m_pMemoStream->Seek(0L);
(*m_pMemoStream) >> m_aMemoHeader.db_next;
switch (m_aHeader.db_typ)
{
- case dBaseIIIMemo: // dBase III: feste Blockgroesse
+ case dBaseIIIMemo: // dBase III: fixed block-size
case dBaseIVMemo:
- // manchmal wird aber auch dBase3 dBase4 Memo zugeordnet
+ // often also dBase3 dBase4 memo are assosiated
m_pMemoStream->Seek(20L);
(*m_pMemoStream) >> m_aMemoHeader.db_size;
- if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 steht auch fuer dBase 3
+ if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size != 512) // 1 is also for dBase 3
m_aMemoHeader.db_typ = MemodBaseIV;
else if (m_aMemoHeader.db_size > 1 && m_aMemoHeader.db_size == 512)
{
- // nun gibt es noch manche Dateien, die verwenden eine Groessenangabe,
- // sind aber dennoch dBase Dateien
+ // now it still can be many files, that have a size, it are dBase-files however
char sHeader[4];
m_pMemoStream->Seek(m_aMemoHeader.db_size);
m_pMemoStream->Read(sHeader,4);
@@ -686,9 +685,9 @@ void ODbaseTable::refreshIndexes()
for (USHORT nKey = 0; nKey < nKeyCnt; nKey++)
{
- // Verweist der Key auf ein Indexfile?...
+ // Refences the Key to a Index-file?...
aKeyName = aInfFile.GetKeyName( nKey );
- //...wenn ja, Indexliste der Tabelle hinzufuegen
+ //...if yes, add the Index-List of the table
if (aKeyName.Copy(0,3) == ByteString("NDX") )
{
aIndexName = aInfFile.ReadKey(aKeyName);
@@ -786,12 +785,12 @@ sal_Int64 ODbaseTable::getSomething( const Sequence< sal_Int8 > & rId ) throw (R
sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, sal_Bool _bUseTableDefs,sal_Bool bRetrieveData)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::fetchRow" );
- // Einlesen der Daten
+ // Read the data
BOOL bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? TRUE : sal_False;
// only read the bookmark
- // Satz als geloescht markieren
+ // Mark Sentence as read now
_rRow->setDeleted(bIsCurRecordDeleted);
*(_rRow->get())[0] = m_nFilePos;
@@ -799,13 +798,13 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
return TRUE;
sal_Size nByteOffset = 1;
- // Felder:
+ // Fields:
OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
const sal_Size nCount = _rRow->get().size();
for (sal_Size i = 1; aIter != aEnd && nByteOffset <= m_nBufferSize && i < nCount;++aIter, i++)
{
- // Laengen je nach Datentyp:
+ // Lengths depending on Data-type:
sal_Int32 nLen = 0;
sal_Int32 nType = 0;
if(_bUseTableDefs)
@@ -834,7 +833,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
nLen = SvDbaseConverter::ConvertPrecisionToDbase(nLen,m_aScales[i-1]);
else
nLen = SvDbaseConverter::ConvertPrecisionToDbase(nLen,getINT32((*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE))));
- break; // das Vorzeichen und das Komma
+ break; // the sign and the comma
case DataType::BINARY:
case DataType::OTHER:
@@ -842,10 +841,10 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
continue;
}
- // Ist die Variable ueberhaupt gebunden?
+ // Is the Variable bound?
if ( !(_rRow->get())[i]->isBound() )
{
- // Nein - naechstes Feld.
+ // No - next field.
nByteOffset += nLen;
OSL_ENSURE( nByteOffset <= m_nBufferSize ,"ByteOffset > m_nBufferSize!");
continue;
@@ -900,7 +899,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
else if ( DataType::DOUBLE == nType )
{
double d = 0.0;
- if (getBOOL((*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
+ if (getBOOL((*aIter)->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is specially treated
{
sal_Int64 nValue = 0;
memcpy(&nValue, pData, nLen);
@@ -920,7 +919,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
else
{
sal_Int32 nPos1 = -1, nPos2 = -1;
- // Falls Nul-Zeichen im String enthalten sind, in Blanks umwandeln!
+ // If Nul-signs are in the String, then convert them to blanks!
for (sal_Int32 k = 0; k < nLen; k++)
{
if (pData[k] == '\0')
@@ -941,7 +940,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
{
// Empty string. Skip it.
nByteOffset += nLen;
- (_rRow->get())[i]->setNull(); // keine Werte -> fertig
+ (_rRow->get())[i]->setNull(); // no Value -> done
continue;
}
@@ -984,8 +983,8 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s
case DataType::BINARY:
case DataType::LONGVARCHAR:
{
- const long nBlockNo = aStr.toInt32(); // Blocknummer lesen
- if (nBlockNo > 0 && m_pMemoStream) // Daten aus Memo-Datei lesen, nur wenn
+ const long nBlockNo = aStr.toInt32(); // read blocknumber
+ if (nBlockNo > 0 && m_pMemoStream) // Read data out the Memo-File, only if
{
if ( !ReadMemo(nBlockNo, (_rRow->get())[i]->get()) )
break;
@@ -1010,7 +1009,7 @@ void ODbaseTable::FileClose()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::FileClose" );
::osl::MutexGuard aGuard(m_aMutex);
- // falls noch nicht alles geschrieben wurde
+ // if not everthing needs to be written yet
if (m_pMemoStream && m_pMemoStream->IsWritable())
m_pMemoStream->Flush();
@@ -1055,7 +1054,7 @@ BOOL ODbaseTable::CreateImpl()
Content aContent(aURL.GetMainURL(INetURLObject::NO_DECODE),Reference<XCommandEnvironment>());
if (aContent.isDocument())
{
- // Hack fuer Bug #30609 , nur wenn das File existiert und die Laenge > 0 gibt es einen Fehler
+ // When the File exists and the length > 0 give a failure
SvStream* pFileStream = createStream_simpleError( aURL.GetMainURL(INetURLObject::NO_DECODE),STREAM_READ);
if (pFileStream && pFileStream->Seek(STREAM_SEEK_TO_END))
@@ -1154,12 +1153,12 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl:
::dbtools::throwGenericSQLException( sError, *this );
}
//------------------------------------------------------------------
-// erzeugt grundsaetzlich dBase IV Datei Format
+// creates in principle dBase IV File-Format
BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::CreateFile" );
bCreateMemo = sal_False;
- Date aDate; // aktuelles Datum
+ Date aDate; // actual date
m_pFileStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC );
@@ -1209,18 +1208,18 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
m_pFileStream->Seek(0L);
(*m_pFileStream) << (BYTE) nDbaseType; // dBase format
- (*m_pFileStream) << (BYTE) (aDate.GetYear() % 100); // aktuelles Datum
+ (*m_pFileStream) << (BYTE) (aDate.GetYear() % 100); // actual date
(*m_pFileStream) << (BYTE) aDate.GetMonth();
(*m_pFileStream) << (BYTE) aDate.GetDay();
- (*m_pFileStream) << 0L; // Anzahl der Datensaetze
- (*m_pFileStream) << (USHORT)((m_pColumns->getCount()+1) * 32 + 1); // Kopfinformationen,
- // pColumns erhaelt immer eine Spalte mehr
- (*m_pFileStream) << (USHORT) 0; // Satzlaenge wird spaeter bestimmt
+ (*m_pFileStream) << 0L; // number of data records
+ (*m_pFileStream) << (USHORT)((m_pColumns->getCount()+1) * 32 + 1); // header-informationen,
+ // pColumns receivs always a column more
+ (*m_pFileStream) << (USHORT) 0; // Sentence-length will be later determent
m_pFileStream->Write(aBuffer, 20);
- USHORT nRecLength = 1; // Laenge 1 fuer deleted flag
+ USHORT nRecLength = 1; // Length 1 for deleted flag
sal_Int32 nMaxFieldLength = m_pConnection->getMetaData()->getMaxColumnNameLength();
::rtl::OUString aName;
const ::rtl::OUString sPropName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME);
@@ -1262,7 +1261,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
cTyp = 'C';
break;
case DataType::DOUBLE:
- if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
+ if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency will be specially treated
cTyp = 'Y';
else
cTyp = 'B';
@@ -1276,7 +1275,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
case DataType::DECIMAL:
case DataType::NUMERIC:
case DataType::REAL:
- cTyp = 'N'; // nur dBase 3 format
+ cTyp = 'N'; // yust dBase 3 format
break;
case DataType::TIMESTAMP:
cTyp = 'T';
@@ -1313,9 +1312,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
{
throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName);
}
- (*m_pFileStream) << (BYTE) Min((unsigned)nPrecision, 255U); //Feldlaenge
+ (*m_pFileStream) << (BYTE) Min((unsigned)nPrecision, 255U); //Fieldlentgh
nRecLength = nRecLength + (USHORT)::std::min((USHORT)nPrecision, (USHORT)255UL);
- (*m_pFileStream) << (BYTE)0; //Nachkommastellen
+ (*m_pFileStream) << (BYTE)0; //After komma positions
break;
case 'F':
case 'N':
@@ -1325,9 +1324,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
{
throwInvalidColumnType(STR_INVALID_PRECISION_SCALE, aName);
}
- if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
+ if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency will be specially treated
{
- (*m_pFileStream) << (BYTE)10; // Standard Laenge
+ (*m_pFileStream) << (BYTE)10; // Standard Length
(*m_pFileStream) << (BYTE)4;
nRecLength += 10;
}
@@ -1373,10 +1372,10 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
aBuffer[0] = 0x00;
}
- (*m_pFileStream) << (BYTE)FIELD_DESCRIPTOR_TERMINATOR; // kopf ende
+ (*m_pFileStream) << (BYTE)FIELD_DESCRIPTOR_TERMINATOR; // header-end
(*m_pFileStream) << (char)DBF_EOL;
m_pFileStream->Seek(10L);
- (*m_pFileStream) << nRecLength; // Satzlaenge nachtraeglich eintragen
+ (*m_pFileStream) << nRecLength; // set Sentence-length later
if (bCreateMemo)
{
@@ -1403,11 +1402,11 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo)
}
//------------------------------------------------------------------
-// erzeugt grundsaetzlich dBase III Datei Format
+// creates in principle dBase III file-format
BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::CreateMemoFile" );
- // Makro zum Filehandling fuers Erzeugen von Tabellen
+ // Makro for Filehandling for creating of Tables
m_pMemoStream = createStream_simpleError( aFile.GetMainURL(INetURLObject::NO_DECODE),STREAM_READWRITE | STREAM_SHARE_DENYWRITE);
if (!m_pMemoStream)
@@ -1428,7 +1427,7 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile)
#endif
m_pMemoStream->Seek(0L);
- (*m_pMemoStream) << long(1); // Zeiger auf ersten freien Block
+ (*m_pMemoStream) << long(1); // Pointer on the first free Block
m_pMemoStream->Flush();
delete m_pMemoStream;
@@ -1471,7 +1470,6 @@ BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFie
aURL.setExtension(String::CreateFromAscii("inf"));
// as the inf file does not necessarily exist, we aren't allowed to use UCBContentHelper::Kill
- // 89711 - 16.07.2001 - frank.schoenheit at sun.com
try
{
::ucbhelper::Content aDeleteContent( aURL.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment > () );
@@ -1508,13 +1506,13 @@ BOOL ODbaseTable::DropImpl()
BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<XIndexAccess>& _xCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::InsertRow" );
- // Buffer mit Leerzeichen fuellen
+ // Buffer with spaces filled
AllocBuffer();
memset(m_pBuffer, 0, m_aHeader.db_slng);
m_pBuffer[0] = ' ';
- // Gesamte neue Row uebernehmen:
- // ... und am Ende als neuen Record hinzufuegen:
+ // Copy new Row completely:
+ // ... and add at the end as new Record:
UINT32 nTempPos = m_nFilePos;
m_nFilePos = (ULONG)m_aHeader.db_anz + 1;
@@ -1533,26 +1531,26 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X
if (!WriteBuffer())
{
- m_pFileStream->SetStreamSize(nFileSize); // alte Groesse restaurieren
+ m_pFileStream->SetStreamSize(nFileSize); // restore old size
if (HasMemoFields() && m_pMemoStream)
- m_pMemoStream->SetStreamSize(nMemoFileSize); // alte Groesse restaurieren
- m_nFilePos = nTempPos; // Fileposition restaurieren
+ m_pMemoStream->SetStreamSize(nMemoFileSize); // restore old size
+ m_nFilePos = nTempPos; // restore File-position
}
else
{
(*m_pFileStream) << (char)DBF_EOL; // write EOL
- // Anzahl Datensaetze im Header erhoehen:
+ // raise number of datasets in the header:
m_pFileStream->Seek( 4L );
(*m_pFileStream) << (m_aHeader.db_anz + 1);
- // beim AppendOnly kein Flush!
+ // when AppendOnly no Flush!
if (bFlush)
m_pFileStream->Flush();
- // bei Erfolg # erhoehen
+ // raise when successfully
m_aHeader.db_anz++;
- *rRow.get()[0] = m_nFilePos; // BOOKmark setzen
+ *rRow.get()[0] = m_nFilePos; // Set Bookmark
m_nFilePos = nTempPos;
}
}
@@ -1566,10 +1564,10 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X
BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::UpdateRow" );
- // Buffer mit Leerzeichen fuellen
+ // fill Buffer with spaces
AllocBuffer();
- // Auf gewuenschten Record positionieren:
+ // position on wished record:
long nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
m_pFileStream->Seek(nPos);
m_pFileStream->Read((char*)m_pBuffer, m_aHeader.db_slng);
@@ -1583,7 +1581,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R
if (!UpdateBuffer(rRow, pOrgRow,_xCols) || !WriteBuffer())
{
if (HasMemoFields() && m_pMemoStream)
- m_pMemoStream->SetStreamSize(nMemoFileSize); // alte Groesse restaurieren
+ m_pMemoStream->SetStreamSize(nMemoFileSize); // restore old size
}
else
{
@@ -1596,9 +1594,8 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R
BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::DeleteRow" );
- // Einfach das Loesch-Flag setzen (egal, ob es schon gesetzt war
- // oder nicht):
- // Auf gewuenschten Record positionieren:
+ // Simply set the Delete-Flag (it doesn't matter if the value was set or not):
+ // Position on wished Record:
long nFilePos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
m_pFileStream->Seek(nFilePos);
@@ -1690,7 +1687,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
return FALSE;
sal_Int32 nByteOffset = 1;
- // Felder aktualisieren:
+ // Update fields:
Reference<XPropertySet> xCol;
Reference<XPropertySet> xIndex;
USHORT i;
@@ -1740,7 +1737,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
if (pIndex->Find(0,*rRow.get()[nPos]))
{
- // es existiert kein eindeutiger Wert
+ // There is no clear value
if ( !aColName.getLength() )
{
m_pColumns->getByIndex(i) >>= xCol;
@@ -1902,7 +1899,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
const double d = rRow.get()[nPos]->getValue();
m_pColumns->getByIndex(i) >>= xCol;
- if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
+ if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is specially treated
{
sal_Int64 nValue = 0;
if ( m_aScales[i] )
@@ -1910,7 +1907,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
else
nValue = (sal_Int64)(d);
memcpy(pData,&nValue,nLen);
- } // if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency wird gesondert behandelt
+ } // if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is specially treated
else
memcpy(pData,&d,nLen);
}
@@ -2018,7 +2015,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const
BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::WriteMemo" );
- // wird die BlockNr 0 vorgegeben, wird der block ans Ende gehaengt
+ // if the BlockNr 0 is given, then the block will be added at the end
ULONG nSize = 0;
::rtl::OString aStr;
::com::sun::star::uno::Sequence<sal_Int8> aValue;
@@ -2034,18 +2031,18 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
nSize = DBTypeConversion::convertUnicodeString( aVariable.getString(), aStr, m_eEncoding );
}
- // Anhaengen oder ueberschreiben
+ // Add and overwrite
BOOL bAppend = rBlockNr == 0;
if (!bAppend)
{
switch (m_aMemoHeader.db_typ)
{
- case MemodBaseIII: // dBase III-Memofeld, endet mit 2 * Ctrl-Z
+ case MemodBaseIII: // dBase III-Memofield, ends with 2 * Ctrl-Z
bAppend = nSize > (512 - 2);
break;
case MemoFoxPro:
- case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
+ case MemodBaseIV: // dBase IV-Memofield with length
{
char sHeader[4];
m_pMemoStream->Seek(rBlockNr * m_aMemoHeader.db_size);
@@ -2064,7 +2061,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
(unsigned char)sHeader[1]) * 256 +
(unsigned char)sHeader[0] - 8;
- // passt die neue Laenge in die belegten Bloecke
+ // fits the new length in the used blocks
ULONG nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0),
nOldUsedBlocks = ((nOldSize + 8) / m_aMemoHeader.db_size) + (((nOldSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0);
bAppend = nUsedBlocks > nOldUsedBlocks;
@@ -2075,7 +2072,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
if (bAppend)
{
ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
- // letzten block auffuellen
+ // fill last block
rBlockNr = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
m_pMemoStream->SetStreamSize(rBlockNr * m_aMemoHeader.db_size);
@@ -2088,7 +2085,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
switch (m_aMemoHeader.db_typ)
{
- case MemodBaseIII: // dBase III-Memofeld, endet mit Ctrl-Z
+ case MemodBaseIII: // dBase III-Memofield, ends with Ctrl-Z
{
const char cEOF = (char) DBF_EOL;
nSize++;
@@ -2096,7 +2093,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
(*m_pMemoStream) << cEOF << cEOF;
} break;
case MemoFoxPro:
- case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
+ case MemodBaseIV: // dBase IV-Memofeld with length
{
if ( MemodBaseIV == m_aMemoHeader.db_typ )
(*m_pMemoStream) << (BYTE)0xFF
@@ -2135,13 +2132,13 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr)
}
- // Schreiben der neuen Blocknummer
+ // Write the new Blocknumber
if (bAppend)
{
ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
m_aMemoHeader.db_next = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
- // Schreiben der neuen Blocknummer
+ // Write the new blocknumber
m_pMemoStream->Seek(0L);
(*m_pMemoStream) << m_aMemoHeader.db_next;
m_pMemoStream->Flush();
@@ -2603,7 +2600,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::seekRow" );
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // prepare positioning:
OSL_ENSURE(m_pFileStream,"ODbaseTable::seekRow: FileStream is NULL!");
sal_uInt32 nNumberOfRecords = (sal_uInt32)m_aHeader.db_anz;
@@ -2674,7 +2671,7 @@ Error:
m_nFilePos = 0;
break;
case IResultSetHelper::BOOKMARK:
- m_nFilePos = nTempPos; // vorherige Position
+ m_nFilePos = nTempPos; // last Position
}
return sal_False;
@@ -2691,12 +2688,12 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
switch (m_aMemoHeader.db_typ)
{
- case MemodBaseIII: // dBase III-Memofeld, endet mit Ctrl-Z
+ case MemodBaseIII: // dBase III-Memofield, ends with Ctrl-Z
{
const char cEOF = (char) DBF_EOL;
ByteString aBStr;
static char aBuf[514];
- aBuf[512] = 0; // sonst kann der Zufall uebel mitspielen
+ aBuf[512] = 0; // without it the we don't know what is in it
BOOL bReady = sal_False;
do
@@ -2718,7 +2715,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable)
} break;
case MemoFoxPro:
- case MemodBaseIV: // dBase IV-Memofeld mit Laengenangabe
+ case MemodBaseIV: // dBase IV-Memofield with length
{
char sHeader[4];
m_pMemoStream->Read(sHeader,4);
@@ -2785,7 +2782,7 @@ void ODbaseTable::AllocBuffer()
m_pBuffer = NULL;
}
- // Falls noch kein Puffer vorhanden: allozieren:
+ // if there is no buffer available: allocate:
if (m_pBuffer == NULL && nSize)
{
m_nBufferSize = nSize;
@@ -2798,7 +2795,7 @@ BOOL ODbaseTable::WriteBuffer()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::WriteBuffer" );
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
- // Auf gewuenschten Record positionieren:
+ // postion on wished record:
long nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
m_pFileStream->Seek(nPos);
return m_pFileStream->Write((char*) m_pBuffer, m_aHeader.db_slng) > 0;
diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx
index 27adb90..96574ae 100644
--- a/connectivity/source/drivers/dbase/Dservices.cxx
+++ b/connectivity/source/drivers/dbase/Dservices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -113,7 +109,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index f769980..8fc615c 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -66,7 +66,6 @@ ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec)
}
}
// -----------------------------------------------------------------------------
-
ONDXKey::ONDXKey(double aVal, UINT32 nRec)
: ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE)
,nRecord(nRec)
@@ -98,7 +97,7 @@ ONDXPage::~ONDXPage()
//------------------------------------------------------------------
void ONDXPage::QueryDelete()
{
- // Ablegen im GarbageCollector
+ // Store in GarbageCollector
if (IsModified() && rIndex.m_pFileStream)
(*rIndex.m_pFileStream) << *this;
@@ -137,7 +136,7 @@ ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex)
//------------------------------------------------------------------
USHORT ONDXPage::FindPos(const ONDXKey& rKey) const
{
- // sucht nach Platz fuer den vorgegeben key auf einer Seite
+ // seaches for the place for the given key in a page
USHORT i = 0;
while (i < nCount && rKey > ((*this)[i]).GetKey())
i++;
@@ -148,11 +147,10 @@ USHORT ONDXPage::FindPos(const ONDXKey& rKey) const
//------------------------------------------------------------------
BOOL ONDXPage::Find(const ONDXKey& rKey)
{
- // sucht den vorgegeben key
- // Besonderheit: gelangt der Algorithmus ans Ende
- // wird immer die aktuelle Seite und die Knotenposition vermerkt
- // auf die die Bedingung <= zutrifft
- // dieses findet beim Insert besondere Beachtung
+ // searches the given key
+ // Speicality: At the end of the algorithm it will give
+ // the actual Page an the position of the Node, where the condition (<=) applies,
+ // at insert special attention.
USHORT i = 0;
while (i < nCount && rKey > ((*this)[i]).GetKey())
i++;
@@ -161,7 +159,7 @@ BOOL ONDXPage::Find(const ONDXKey& rKey)
if (!IsLeaf())
{
- // weiter absteigen
+ // continue adding
ONDXPagePtr aPage = (i==0) ? GetChild(&rIndex) : ((*this)[i-1]).GetChild(&rIndex, this);
bResult = aPage.Is() && aPage->Find(rKey);
}
@@ -183,8 +181,8 @@ BOOL ONDXPage::Find(const ONDXKey& rKey)
//------------------------------------------------------------------
BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
{
- // beim Erzeugen eines Index koennen auch mehrere Knoten eingefuegt werden
- // diese sin dann aufsteigend sortiert
+ // at creating a Index there can be multiple Nodes added,
+ // these are ascending sorted
BOOL bAppend = nRowsLeft > 0;
if (IsFull())
{
@@ -194,17 +192,16 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
aSplitNode = rNode;
else
{
- // merken des letzten Knotens
+ // Save the last Nodes
aSplitNode = (*this)[nCount-1];
if(rNode.GetKey() <= aSplitNode.GetKey())
{
- // und damit habe ich im folgenden praktisch eine Node weniger
+ // and with that I have, in the next statements, practically one Node less
if (IsLeaf() && this == &rIndex.m_aCurLeaf)
{
- // geht davon aus, dass der Knoten, auf dem die Bedingung (<=)
- // zutrifft, als m_nCurNode gesetzt ist
- --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593)
+ // I assume, that the nodes, on the condition (<=) applies, as m_nCurNode is set
+ --nCount; // (otherwise I get u.U. Assertions und GPFs - 60593)
bResult = Insert(rIndex.m_nCurNode + 1, rNode);
}
else // Position unbekannt
@@ -212,11 +209,11 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
USHORT nPos = NODE_NOTFOUND;
while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ;
- --nCount; // (sonst bekomme ich u.U. Assertions und GPFs - 60593)
+ --nCount; // (otherwise I get u.U. Assertions und GPFs - 60593)
bResult = Insert(nPos, rNode);
}
- // konnte der neue Knoten eingefuegt werden
+ // can the new Nodes be added
if (!bResult)
{
nCount++;
@@ -230,10 +227,10 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
sal_uInt32 nNewPagePos = rIndex.GetPageCount();
sal_uInt32 nNewPageCount = nNewPagePos + 1;
- // Herausgeloesten Knoten beim Vater einfuegen
+ // add extracted Nodes to father
if (!HasParent())
{
- // Kein Vater, dann neue Wurzel
+ // No father, then a new root
ONDXPagePtr aNewRoot = rIndex.CreatePage(nNewPagePos + 1);
aNewRoot->SetChild(this);
@@ -242,13 +239,12 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
rIndex.SetPageCount(++nNewPageCount);
}
- // neues blatt erzeugen und Seite aufteilen
+ // add new sheet an devide page
ONDXPagePtr aNewPage = rIndex.CreatePage(nNewPagePos,aParent);
rIndex.SetPageCount(nNewPageCount);
- // wieviele Knoten weren noch eingefuegt
- // kommen noch ausreichend, dann koennen die Seiten bis zum Rand vollgestopft werden
-
+ // how many Nodes where added?
+ // are still sufficient, then we can fill the page to the brim
ONDXNode aInnerNode;
if (!IsLeaf() || nRowsLeft < (sal_uInt32)(rIndex.GetMaxNodes() / 2))
aInnerNode = Split(*aNewPage);
@@ -256,14 +252,14 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
{
aInnerNode = (*this)[nCount - 1];
- // Knoten zeigt auf neue Seite
+ // Nodes show on the new page
aInnerNode.SetChild(aNewPage);
- // innere Knoten haben keine Recordnummer
+ // InnerNodes have nog recordnumbers
if (rIndex.isUnique())
aInnerNode.GetKey().ResetRecord();
- // neue Seite zeigt nun auf Seite des herausgeloesten Knoten
+ // new page shows now on the Page with extracted nodes
if (!IsLeaf())
aNewPage->SetChild(aInnerNode.GetChild());
}
@@ -275,15 +271,15 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft)
rIndex.m_aCurLeaf = aNewPage;
rIndex.m_nCurNode = rIndex.m_aCurLeaf->Count() - 1;
- // Freigeben nicht benoetigter Seiten, danach besteht keine Referenz
- // mehr auf die Seite, danach kann 'this' nicht mehr gueltig sein!!!
+ // free not needed pages, there are no references to those on the page
+ // afterwards 'this' can't be valid!!!
ReleaseFull();
}
- // Einfuegen des herausgeloesten Knotens
+ // Insert extracted nodes
return aTempParent->Insert(aInnerNode);
}
- else // Seite einfach weiter auffuellen
+ else // Fill the page up
{
if (bAppend)
{
@@ -312,7 +308,7 @@ BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode)
if (nCount)
{
++nCount;
- // nach rechts verschieben
+ // shift right
for (USHORT i = std::min((USHORT)(nMaxCount-1), (USHORT)(nCount-1)); nPos < i; --i)
(*this)[i] = (*this)[i-1];
}
@@ -320,7 +316,7 @@ BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode)
if (nCount < nMaxCount)
nCount++;
- // einfuegen an der Position
+ // insert at the position
ONDXNode& rInsertNode = (*this)[nPos];
rInsertNode = rNode;
if (rInsertNode.GetChild().Is())
@@ -343,11 +339,11 @@ BOOL ONDXPage::Append(ONDXNode& rNode)
//------------------------------------------------------------------
void ONDXPage::Release(BOOL bSave)
{
- // freigeben der Pages
+ // free pages
if (aChild.Is())
aChild->Release(bSave);
- // Pointer freigeben
+ // free Pointer
aChild.Clear();
for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++)
@@ -367,8 +363,8 @@ void ONDXPage::ReleaseFull(BOOL bSave)
if (aTempParent.Is())
{
- // Freigeben nicht benoetigter Seiten, danach besteht keine Referenz
- // mehr auf die Seite, danach kann 'this' nicht mehr gueltig sein!!!
+ // Free not needed pages, afterwards there will be no reference anymore to the pages
+ // afterwards 'this' can't be valid anymore!!!
USHORT nParentPos = aTempParent->Search(this);
if (nParentPos != NODE_NOTFOUND)
(*aTempParent)[nParentPos].GetChild().Clear();
@@ -381,40 +377,39 @@ BOOL ONDXPage::Delete(USHORT nNodePos)
{
if (IsLeaf())
{
- // Letztes Element wird geloescht
+ // The last Element will not be deleted
if (nNodePos == (nCount - 1))
{
ONDXNode aNode = (*this)[nNodePos];
- // beim Parent muss nun der KeyValue ausgetauscht werden
+ // at Paren must the KeyValue now be replaced
if (HasParent())
aParent->SearchAndReplace(aNode.GetKey(),
(*this)[nNodePos-1].GetKey());
}
}
- // Loeschen des Knoten
+ // Delete the node
Remove(nNodePos);
- // Unterlauf
+ // Underflow
if (HasParent() && nCount < (rIndex.GetMaxNodes() / 2))
{
- // Feststellen, welcher Knoten auf die Seite zeigt
+ // determen, which Nodes show on the page
USHORT nParentNodePos = aParent->Search(this);
- // letzte Element auf Vaterseite
- // -> zusammenlegen mit vorletzter Seite
+ // last element on parent-side -> merge with secondlast page
if (nParentNodePos == (aParent->Count() - 1))
{
if (!nParentNodePos)
- // zusammenlegen mit linken nachbarn
+ // merge with left-neighbour
Merge(nParentNodePos,aParent->GetChild(&rIndex));
else
Merge(nParentNodePos,(*aParent)[nParentNodePos-1].GetChild(&rIndex,aParent));
}
- // sonst Seite mit naechster Seite zusammenlegen
+ // other page merge with next page
else
{
- // zusammenlegen mit rechten nachbarn
+ // merge with right-neighbour
Merge(nParentNodePos + 1,((*aParent)[nParentNodePos + 1].GetChild(&rIndex,aParent)));
nParentNodePos++;
}
@@ -422,7 +417,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos)
aParent->Delete(nParentNodePos);
}
else if (IsRoot())
- // Sicherstellen das die Position der Wurzel festgehalten wird
+ // make sure that the position of the root is kept
rIndex.SetRootPos(nPagePos);
return TRUE;
}
@@ -432,15 +427,15 @@ BOOL ONDXPage::Delete(USHORT nNodePos)
ONDXNode ONDXPage::Split(ONDXPage& rPage)
{
DBG_ASSERT(IsFull(), "Falsches Splitting");
- /* Aufteilen einer Seite auf zwei
- Blatt:
- Seite 1 behaelt (n - (n/2))
- Seite 2 erhaelt (n/2)
- Knoten n/2 wird dupliziert
- Innerer Knoten:
- Seite 1 behaelt (n+1)/2
- Seite 2 erhaelt (n/2-1)
- Knoten ((n+1)/2 + 1) : wird herausgenommen
+ /* devide one page on 2
+ sheet:
+ Page 1 is (n - (n/2))
+ Page 2 is (n/2)
+ Node n/2 will be duplicated
+ InnerNodes:
+ Page 1 is (n+1)/2
+ Page 2 is (n/2-1)
+ Node ((n+1)/2 + 1) : will be taken out
*/
ONDXNode aResultNode;
if (IsLeaf())
@@ -448,8 +443,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
for (USHORT i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++)
rPage.Insert(j++,(*this)[i]);
- // dieser Knoten enthaelt einen Schluessel der noch einmal im Tree vorkommt
- // und ersetzt werden muss
+ // these nodes contains a key that exists another time in the Tree and must be replaced
ONDXNode aLastNode = (*this)[nCount - 1];
nCount = nCount - (nCount / 2);
aResultNode = (*this)[nCount - 1];
@@ -466,13 +460,13 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage)
aResultNode = (*this)[(nCount + 1) / 2];
nCount = (nCount + 1) / 2;
- // neue Seite zeigt nun auf Seite des herausgeloesten Knoten
+ // niew page shows now on Page with extraced Nodes
rPage.SetChild(aResultNode.GetChild());
}
- // Knoten zeigt auf neue Seite
+ // Nodes show on new page
aResultNode.SetChild(&rPage);
- // innere Knoten haben keine Recordnummer
+ // innerNodes have no record-number
if (rIndex.isUnique())
aResultNode.GetKey().ResetRecord();
bModified = TRUE;
@@ -485,25 +479,25 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
DBG_ASSERT(HasParent(), "kein Vater vorhanden");
DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau");
- /* Zusammenlegen zweier Seiten */
+ /* Merge 2 Pages */
ONDXNode aResultNode;
USHORT nMaxNodes = rIndex.GetMaxNodes(),
nMaxNodes_2 = nMaxNodes / 2;
- // Feststellen ob Seite rechter oder linker Nachbar
- BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, wenn xPage die rechte Seite ist
+ // Make sure if Page is right- or left-neighbour
+ BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, when xPage is the right-page
USHORT nNewCount = (*xPage).Count() + Count();
if (IsLeaf())
{
- // Bedingung fuers zusammenlegen
+ // Condition for merge
if (nNewCount < (nMaxNodes_2 * 2))
{
USHORT nLastNode = bRight ? Count() - 1 : xPage->Count() - 1;
if (bRight)
{
DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife");
- // alle Knoten aus xPage auf den linken Knoten verschieben (anhaengen)
+ // shift all Nodes on xPage to the left Nodes (Append)
while (xPage->Count())
{
Append((*xPage)[0]);
@@ -513,26 +507,24 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
else
{
DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife");
- // xPage ist die linke Page und THIS die rechte
+ // xPage is the left Page an THIS the right one
while (xPage->Count())
{
Insert(0,(*xPage)[xPage->Count()-1]);
xPage->Remove(xPage->Count()-1);
}
- // alte Position von xPage beim Parent mit this ersetzen
+ // replace old Position of xPage at Parent with this
if (nParentNodePos)
(*aParent)[nParentNodePos-1].SetChild(this,aParent);
- else // oder als rechten Knoten setzen
+ else // or set as right page
aParent->SetChild(this);
aParent->SetModified(TRUE);
}
- // Child beziehung beim Vaterknoten aufheben
+ // cancel Child-relationship at parent-node
(*aParent)[nParentNodePos].SetChild();
- // Austauschen des KnotenWertes, nur wenn geaenderte Page
- // die linke ist, ansonsten werde
-
+ // replace the Node-values, only when changed Page is the left one, otherwise value.
if(aParent->IsRoot() && aParent->Count() == 1)
{
(*aParent)[0].SetChild();
@@ -546,47 +538,46 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
aParent->SearchAndReplace((*this)[nLastNode].GetKey(),(*this)[nCount-1].GetKey());
xPage->SetModified(FALSE);
- xPage->ReleaseFull(); // wird nicht mehr benoetigt
+ xPage->ReleaseFull(); // is not needed anymore
}
- // Ausgleichen der Elemente nNewCount >= (nMaxNodes_2 * 2)
+ // balance the Elements nNewCount >= (nMaxNodes_2 * 2)
else
{
if (bRight)
{
- // alle Knoten aus xPage auf den linken Knoten verschieben (anhaengen)
+ // shift all nodes on xPage to the left Nodes (Append)
ONDXNode aReplaceNode = (*this)[nCount - 1];
while (nCount < nMaxNodes_2)
{
Append((*xPage)[0]);
xPage->Remove(0);
}
- // Austauschen des KnotenWertes: Setzt alten letzten Wert durch den letzten von xPage
+ // Replace the Node-Values: Set old last values with the last of xPage
aParent->SearchAndReplace(aReplaceNode.GetKey(),(*this)[nCount-1].GetKey());
}
else
{
- // alle Knoten aus this vor die xPage Knoten einfuegen
+ // paste all Nodes from this as the xPage-nodes
ONDXNode aReplaceNode = (*this)[nCount - 1];
while (xPage->Count() < nMaxNodes_2)
{
xPage->Insert(0,(*this)[nCount-1]);
Remove(nCount-1);
}
- // Austauschen des KnotenWertes
+ // Replace the node-values
aParent->SearchAndReplace(aReplaceNode.GetKey(),(*this)[Count()-1].GetKey());
}
}
}
else // !IsLeaf()
{
- // Bedingung fuers zusammenlegen
+ // Conditions for merge
if (nNewCount < nMaxNodes_2 * 2)
{
if (bRight)
{
DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife");
- // Vaterknoten wird mit integriert
- // erhaelt zunaechst Child von xPage
+ // Parent-node will be integrated with the first Child from xPage
(*aParent)[nParentNodePos].SetChild(xPage->GetChild(),aParent);
Append((*aParent)[nParentNodePos]);
for (USHORT i = 0 ; i < xPage->Count(); i++)
@@ -595,10 +586,9 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
else
{
DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife");
- // Vaterknoten wird mit integriert
- // erhaelt zunaechst Child
- (*aParent)[nParentNodePos].SetChild(GetChild(),aParent); // Parent merkt sich mein Child
- Insert(0,(*aParent)[nParentNodePos]); // Node vom Parent bei mir einfuegen
+ // Parent-node will be integrated with the first child
+ (*aParent)[nParentNodePos].SetChild(GetChild(),aParent); // Parent nodes itself its child
+ Insert(0,(*aParent)[nParentNodePos]); // paste Node of Parent at me
while (xPage->Count())
{
Insert(0,(*xPage)[xPage->Count()-1]);
@@ -612,7 +602,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
aParent->SetChild(this);
}
- // danach wird der Vaterknoten zurueckgesetzt
+ // afterwards parentnode will be placed back
(*aParent)[nParentNodePos].SetChild();
aParent->SetModified(TRUE);
@@ -626,15 +616,15 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
SetModified(TRUE);
}
else if(nParentNodePos)
- // Austauschen des KnotenWertes
- // beim Append wird der Bereich erweitert, beim INsert verweist der alte Knoten von xPage auf this
- // deshalb muss der Knoten auch hier aktualisiert werden
+ // replace the Node-values
+ // at Append the range will be enlarged, at Insert the old nodes from xPage will reference to this
+ // thats why the Nodes must be updated here
aParent->SearchAndReplace((*aParent)[nParentNodePos-1].GetKey(),(*aParent)[nParentNodePos].GetKey());
xPage->SetModified(FALSE);
xPage->ReleaseFull();
}
- // Ausgleichen der Elemente
+ // balance the Elements
else
{
if (bRight)
@@ -673,7 +663,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage)
//------------------------------------------------------------------
void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex)
{
- rStream >> aKey.nRecord; // schluessel
+ rStream >> aKey.nRecord; // key
if (rIndex.getHeader().db_keytype)
{
@@ -707,9 +697,9 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
{
const ODbaseIndex& rIndex = rPage.GetIndex();
if (!rIndex.isUnique() || rPage.IsLeaf())
- rStream << (sal_uInt32)aKey.nRecord; // schluessel
+ rStream << (sal_uInt32)aKey.nRecord; // key
else
- rStream << (sal_uInt32)0; // schluessel
+ rStream << (sal_uInt32)0; // key
if (rIndex.getHeader().db_keytype) // double
{
@@ -785,7 +775,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const
eResult = (m > n) ? COMPARE_GREATER : (n == m) ? COMPARE_EQUAL : COMPARE_LESS;
}
- // Record vergleich, wenn Index !Unique
+ // compare ergleich, when Index !Unique
if (eResult == COMPARE_EQUAL && nRecord && rKey.nRecord)
eResult = (nRecord > rKey.nRecord) ? COMPARE_GREATER :
(nRecord == rKey.nRecord) ? COMPARE_EQUAL : COMPARE_LESS;
@@ -865,7 +855,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
//------------------------------------------------------------------
SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage)
{
- // Seite existiert noch nicht
+ // Page doesn't exist yet
ULONG nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE;
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
{
@@ -952,7 +942,7 @@ BOOL ONDXPage::IsFull() const
//------------------------------------------------------------------
USHORT ONDXPage::Search(const ONDXKey& rSearch)
{
- // binare Suche spaeter
+ // binary search later
USHORT i = NODE_NOTFOUND;
while (++i < Count())
if ((*this)[i].GetKey() == rSearch)
@@ -969,12 +959,11 @@ USHORT ONDXPage::Search(const ONDXPage* pPage)
if (((*this)[i]).GetChild() == pPage)
break;
- // wenn nicht gefunden, dann wird davon ausgegangen, dass die Seite selbst
- // auf die Page zeigt
+ // when not found, then we assume, that the page itself shows on the page
return (i < Count()) ? i : NODE_NOTFOUND;
}
// -----------------------------------------------------------------------------
-// laeuft rekursiv
+// runs recursive
void ONDXPage::SearchAndReplace(const ONDXKey& rSearch,
ONDXKey& rReplace)
{
diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx
index 0017406..acc0ae1 100644
--- a/connectivity/source/drivers/evoab/LFolderList.cxx
+++ b/connectivity/source/drivers/evoab/LFolderList.cxx
@@ -157,7 +157,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
for (xub_StrLen j = 0; j < aField2.Len(); j++)
{
sal_Unicode c = aField2.GetChar(j);
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // Just digits and decimalpoint and Thousands Seperator?
if ((!cDecimalDelimiter || c != cDecimalDelimiter) &&
(!cThousandDelimiter || c != cThousandDelimiter) &&
!aCharClass.isDigit(aField2,j))
@@ -177,12 +177,12 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
bNumeric = FALSE;
if (bNumeric && cThousandDelimiter)
{
- // Ist der Trenner richtig angegeben?
+ // Is the Seperator correctly indicated?
String aValue = aField2.GetToken(0,cDecimalDelimiter);
for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
{
sal_Unicode c = aValue.GetChar(j);
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // Just digits, decimalpoint and Thousands Seperator?
if (c == cThousandDelimiter && j)
continue;
else
@@ -193,7 +193,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
}
}
- // jetzt koennte es noch ein Datumsfeld sein
+ // now it can still be a date-field
if (!bNumeric)
{
try
@@ -246,7 +246,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal
break;
default:
eType = DataType::VARCHAR;
- nPrecision = 0; // nyi: Daten koennen aber laenger sein!
+ nPrecision = 0; // nyi: Dates can be longer!
nScale = 0;
aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
};
@@ -322,7 +322,7 @@ void OEvoabFolderList::construct()
sal_Int32 nSize = m_pFileStream->Tell();
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
- // Buffersize abhaengig von der Filegroesse
+ // Buffersize dependent on the file-size
m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 :
nSize > 100000 ? 16384 :
nSize > 10000 ? 4096 : 1024);
@@ -339,7 +339,7 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols)
(_rRow->get())[0] = m_nFilePos; // the "bookmark"
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // Felder:
+ // Fields:
xub_StrLen nStartPos = 0;
String aStr;
OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
@@ -387,7 +387,7 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols)
} break;
case DataType::DOUBLE:
case DataType::INTEGER:
- case DataType::DECIMAL: // #99178# OJ
+ case DataType::DECIMAL:
case DataType::NUMERIC:
{
sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
@@ -398,23 +398,22 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols)
!cDecimalDelimiter && nType == DataType::INTEGER,
"FalscherTyp");
- // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln:
+ // In Standard-Notation (DecimalPOINT without Thousands-comma) convert:
for (xub_StrLen j = 0; j < aStr.Len(); ++j)
{
if (cDecimalDelimiter && aStr.GetChar(j) == cDecimalDelimiter)
aStrConverted += '.';
else if ( aStr.GetChar(j) == '.' ) // special case, if decimal seperator isn't '.' we have to vut the string after it
- break; // #99189# OJ
+ break;
else if (cThousandDelimiter && aStr.GetChar(j) == cThousandDelimiter)
{
- // weglassen
+ // leave out
}
else
aStrConverted += aStr.GetChar(j) ;
}
double nVal = ::rtl::math::stringToDouble(aStrConverted.GetBuffer(),',','.',NULL,NULL);
- // #99178# OJ
if ( DataType::DECIMAL == nType || DataType::NUMERIC == nType )
(_rRow->get())[i+1] = String::CreateFromDouble(nVal);
else
@@ -423,7 +422,7 @@ sal_Bool OEvoabFolderList::fetchRow(OValueRow _rRow,const OSQLColumns & _rCols)
default:
{
- // Wert als String in Variable der Row uebernehmen
+ // take Value over as String in Row-Varialbe
(_rRow->get())[i+1] = aStr;
}
break;
@@ -443,7 +442,7 @@ sal_Bool OEvoabFolderList::seekRow(IResultSetHelper::Movement eCursorPosition)
return sal_False;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // Prepare positioning:
//OSL_TRACE("OEvoabFolderList::seekRow()::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
switch(eCursorPosition)
diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx
index a7eb508..efe2113 100644
--- a/connectivity/source/drivers/evoab/LFolderList.hxx
+++ b/connectivity/source/drivers/evoab/LFolderList.hxx
@@ -41,8 +41,8 @@ namespace connectivity
namespace evoab
{
//==================================================================
- // Ableitung von String mit ueberladenen GetToken/GetTokenCount-Methoden
- // Speziell fuer FLAT FILE-Format: Strings koennen gequotet sein
+ // Derivative of String with overloading GetToken/GetTokenCount-Methods
+ // Especially for FLAT FILE-Format: String can be qouted
//==================================================================
class OEvoabConnection;
@@ -55,7 +55,7 @@ namespace connectivity
::std::vector<sal_Int32> m_aScales;
QuotedTokenizedString m_aCurrentLine;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > m_xNumberFormatter;
- sal_Int32 m_nFilePos; // aktuelle IResultSetHelper::Movement
+ sal_Int32 m_nFilePos; // actual IResultSetHelper::Movement
SvStream* m_pFileStream;
OEvoabConnection* m_pConnection;
::rtl::Reference<OSQLColumns> m_aColumns;
diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx
index c8578fe..1c4d304 100644
--- a/connectivity/source/drivers/evoab/LNoException.cxx
+++ b/connectivity/source/drivers/evoab/LNoException.cxx
@@ -41,40 +41,40 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel )
return 0;
xub_StrLen nTokCount = 1;
- BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token?
- BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ BOOL bStart = TRUE; // Are we on the fist Characters of the Token?
+ BOOL bInString = FALSE; // Are we within a (cStrDel delimited) String?
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ // Search untill String-end after the first not-concurring charachter
for( xub_StrLen i = 0; i < Len(); i++ )
{
if (bStart)
{
bStart = FALSE;
- // Erstes Zeichen ein String-Delimiter?
+ // First characher a String-Delimiter?
if ((*this).GetChar(i) == cStrDel)
{
- bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings!
- continue; // dieses Zeichen ueberlesen!
+ bInString = TRUE; // then we are within a string!
+ continue; // read next charachter!
}
}
if (bInString) {
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // when now the String-Delimiter-Character is here ...
if ( (*this).GetChar(i) == cStrDel )
{
if ((i+1 < Len()) && ((*this).GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- i++; // kein String-Ende, naechstes Zeichen ueberlesen.
+ // double String-Delimiter-Character:
+ i++; // no String-End, skip next character.
}
else
{
- // String-Ende
+ // String-End
bInString = FALSE;
}
}
} else {
- // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
+ // if the token-sign agrees, then rais TokCount
if ( (*this).GetChar(i) == cTok )
{
nTokCount++;
@@ -94,51 +94,49 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni
xub_StrLen nLen = Len();
if ( nLen )
{
- BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // are we within a (cStrDel delimited) String?
- // Erstes Zeichen ein String-Delimiter?
+ // Is the first charachter a String-Delimiter?
if (bInString )
- ++nStartPos; // dieses Zeichen ueberlesen!
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ ++nStartPos; // skip the character!
+ // Search untill String-end after the first not-concurring charachter
for( xub_StrLen i = nStartPos; i < nLen; ++i )
{
if (bInString)
{
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // when now the String-Delimiter-Character is here ...
if ( (*this).GetChar(i) == cStrDel )
{
if ((i+1 < nLen) && ((*this).GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- ++i; // kein String-Ende, naechstes Zeichen ueberlesen.
-
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ // double String-Delimuiter-Character:
+ ++i; // no String-end, skip next character
+ _rStr += (*this).GetChar(i); // Character must be in Result-String
}
else
{
- // String-Ende
+ // String-End
bInString = FALSE;
}
}
else
{
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ _rStr += (*this).GetChar(i); // Character must be in Result-String
}
}
else
{
- // Stimmt das Tokenzeichen ueberein, dann erhoehe nTok
+ // Does the Token-sign agree, then raise nTok
if ( (*this).GetChar(i) == cTok )
{
- // Vorzeitiger Abbruch der Schleife moeglich, denn
- // wir haben, was wir wollten.
+ // Early termination of loop possible, because we have what we wanted.
nStartPos = i+1;
break;
}
else
{
- _rStr += (*this).GetChar(i); // Zeichen gehoert zum Resultat-String
+ _rStr += (*this).GetChar(i); // Character must be in Result-String
}
}
}
@@ -175,7 +173,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
return sal_False;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // prepare positioning:
//OSL_TRACE("OEvoabTable::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
m_nFilePos = nCurPos;
@@ -310,7 +308,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
if (m_pFileStream->IsEof())
return sal_False;
- m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG)
+ m_nFilePos = m_pFileStream->Tell(); // save Byte-Position in the file (at start of line)
m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
if (m_pFileStream->IsEof())
return sal_False;
diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx
index c8207d5..d82f6ee 100644
--- a/connectivity/source/drivers/evoab/LServices.cxx
+++ b/connectivity/source/drivers/evoab/LServices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -113,7 +109,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx
index 7110533..d18dc58 100644
--- a/connectivity/source/drivers/evoab/LTable.cxx
+++ b/connectivity/source/drivers/evoab/LTable.cxx
@@ -178,7 +178,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
for (xub_StrLen j = 0; j < aField2.Len(); j++)
{
sal_Unicode c = aField2.GetChar(j);
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // just digits, decimalpoints and thousands-seperator
if ((!cDecimalDelimiter || c != cDecimalDelimiter) &&
(!cThousandDelimiter || c != cThousandDelimiter) &&
!aCharClass.isDigit(aField2,j))
@@ -198,12 +198,12 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
bNumeric = FALSE;
if (bNumeric && cThousandDelimiter)
{
- // Ist der Trenner richtig angegeben?
+ // is the seperator correctly mentioned
String aValue = aField2.GetToken(0,cDecimalDelimiter);
for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
{
sal_Unicode c = aValue.GetChar(j);
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // just digits, decimalpoint and thousands-seperator?
if (c == cThousandDelimiter && j)
continue;
else
@@ -214,7 +214,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
}
}
- // jetzt koennte es noch ein Datumsfeld sein
+ // Now it still can be a Date-field
if (!bNumeric)
{
try
@@ -267,7 +267,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
break;
default:
eType = DataType::VARCHAR;
- nPrecision = 0; // nyi: Daten koennen aber laenger sein!
+ nPrecision = 0; // nyi: Data can be longer
nScale = 0;
aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
};
@@ -362,7 +362,7 @@ void OEvoabTable::construct()
sal_Int32 nSize = m_pFileStream->Tell();
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
- // Buffersize abhaengig von der Filegroesse
+ // Buffersize is dependent on the file-size
m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 :
nSize > 100000 ? 16384 :
nSize > 10000 ? 4096 : 1024);
@@ -513,7 +513,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
return TRUE;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
- // Felder:
+ // Fields:
xub_StrLen nStartPos = 0;
String aStr;
OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
@@ -526,7 +526,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
(_rRow->get())[i+1]->setNull();
else
{
- // Laengen je nach Datentyp:
+ // Lengths for each data-type:
sal_Int32 nLen,
nType = 0;
if(bIsTable)
@@ -573,7 +573,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
} break;
case DataType::DOUBLE:
case DataType::INTEGER:
- case DataType::DECIMAL: // #99178# OJ
+ case DataType::DECIMAL:
case DataType::NUMERIC:
{
sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
@@ -584,23 +584,22 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
!cDecimalDelimiter && nType == DataType::INTEGER,
"FalscherTyp");
- // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln:
+ // In Standard-Notation (DecimalPOINT without Thousands-comma) convert:
for (xub_StrLen j = 0; j < aStr.Len(); ++j)
{
if (cDecimalDelimiter && aStr.GetChar(j) == cDecimalDelimiter)
aStrConverted += '.';
else if ( aStr.GetChar(j) == '.' ) // special case, if decimal seperator isn't '.' we have to vut the string after it
- break; // #99189# OJ
+ break;
else if (cThousandDelimiter && aStr.GetChar(j) == cThousandDelimiter)
{
- // weglassen
+ // leave out
}
else
aStrConverted += aStr.GetChar(j) ;
}
double nVal = ::rtl::math::stringToDouble(aStrConverted.GetBuffer(),',','.',NULL,NULL);
- // #99178# OJ
if ( DataType::DECIMAL == nType || DataType::NUMERIC == nType )
*(_rRow->get())[i+1] = ORowSetValue(String::CreateFromDouble(nVal));
else
@@ -609,7 +608,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa
default:
{
- // Wert als String in Variable der Row uebernehmen
+ // Copy Value as String in Row-variable
*(_rRow->get())[i+1] = ORowSetValue(aStr);
}
break;
@@ -718,7 +717,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
return sal_False;
OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection;
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // prepare Positioning:
//OSL_TRACE("OEvoabTable::(before SeekRow,m_pFileStriam Exist)m_aCurrentLine = %d\n", ((OUtoCStr(::rtl::OUString(m_aCurrentLine))) ? (OUtoCStr(::rtl::OUString(m_aCurrentLine))):("NULL")) );
m_nFilePos = nCurPos;
@@ -851,7 +850,7 @@ sal_Bool OEvoabTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In
if (m_pFileStream->IsEof())
return sal_False;
- m_nFilePos = m_pFileStream->Tell(); // Byte-Position in der Datei merken (am ZeilenANFANG)
+ m_nFilePos = m_pFileStream->Tell(); // save Byte-Position in the files (at start of line)
m_pFileStream->ReadByteStringLine(m_aCurrentLine,pConnection->getTextEncoding());
if (m_pFileStream->IsEof())
return sal_False;
diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx
index 4af1c03..9a82bea 100644
--- a/connectivity/source/drivers/evoab2/NServices.cxx
+++ b/connectivity/source/drivers/evoab2/NServices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -114,7 +110,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
uno_Environment ** /*ppEnv*/
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index e092fb5..2bef936 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -89,18 +89,18 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector<
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "OPreparedStatement::scanParameter" );
DBG_ASSERT(pParseNode != NULL,"OResultSet: interner Fehler: ungueltiger ParseNode");
- // Parameter Name-Regel gefunden?
+ // found Parameter Name-Rule?
if (SQL_ISRULE(pParseNode,parameter))
{
DBG_ASSERT(pParseNode->count() >= 1,"OResultSet: Parse Tree fehlerhaft");
DBG_ASSERT(pParseNode->getChild(0)->getNodeType() == SQL_NODE_PUNCTUATION,"OResultSet: Parse Tree fehlerhaft");
_rParaNodes.push_back(pParseNode);
- // Weiterer Abstieg nicht erforderlich
+ // Further descend not nessesary
return;
}
- // Weiter absteigen im Parse Tree
+ // Further descend in Parse Tree
for (UINT32 i = 0; i < pParseNode->count(); i++)
scanParameter(pParseNode->getChild(i),_rParaNodes);
}
@@ -123,11 +123,4 @@ OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
}
// -----------------------------------------------------------------------------
-
-
-
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 700a8b9..d6f0ead 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -491,7 +491,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere
#endif
::rtl::OUString sParameterName;
- // Parameter-Column aufsetzen:
+ // set up Parameter-Column:
sal_Int32 eType = DataType::VARCHAR;
UINT32 nPrecision = 255;
sal_Int32 nScale = 0;
@@ -499,9 +499,9 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere
if (_xCol.is())
{
- // Typ, Precision, Scale ... der angegebenen Column verwenden,
- // denn dieser Column wird der Wert zugewiesen bzw. mit dieser
- // Column wird der Wert verglichen.
+ // Type, Procision, Scale ... use the given Column,
+ // then this Column will get a value assigned or
+ // with this Column will the value be compared.
_xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= eType;
_xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nPrecision;
_xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale;
@@ -573,23 +573,22 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult)
m_pResultSet->setParameterColumns(m_xParamColumns);
m_pResultSet->setParameterRow(m_aParameterRow);
- // Parameter substituieren (AssignValues und Kriterien):
+ // Subsitute Parameter (AssignValues and Criteria):
if (!m_xParamColumns->get().empty())
{
- // Zunaechst AssignValues
- USHORT nParaCount=0; // gibt die aktuelle Anzahl der bisher gesetzen Parameter an
+ // First of AssignValues
+ USHORT nParaCount=0; // gives the actual count of previously set Parameters
- // Nach zu substituierenden Parametern suchen:
- size_t nCount = m_aAssignValues.is() ? m_aAssignValues->get().size() : 1; // 1 ist wichtig fuer die Kriterien
+ // search for Subsituting Parameters:
+ size_t nCount = m_aAssignValues.is() ? m_aAssignValues->get().size() : 1; // 1 is important for the Criteria
for (size_t j = 1; j < nCount; j++)
{
UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j);
if (nParameter == SQL_NO_PARAMETER)
- continue; // dieser AssignValue ist kein Parameter
+ continue; // this AssignValue is no Parameter
- ++nParaCount; // ab hier ist der Parameter gueltig
- // Parameter ersetzen. Wenn Parameter nicht verfuegbar,
- // Value auf NULL setzen.
+ ++nParaCount; // here is the Parameter valid
+ // Replace Parameter. When the Parameter isn't replacable, then set value to NULL
// (*m_aAssignValues)[j] = (*m_aParameterRow)[(UINT16)nParameter];
}
@@ -627,7 +626,7 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN
}
if(nParameter == -1)
nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol);
- // Nr. des Parameters in der Variablen merken:
+ // Save number of parameters in the variable:
SetAssignValue(_sColumnName, String(), TRUE, nParameter);
}
// -----------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 72736cf..a726907 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -75,10 +75,9 @@ using namespace com::sun::star::sdbc;
using namespace com::sun::star::sdbcx;
using namespace com::sun::star::container;
-// Maximale Anzahl von Rows, die mit ORDER BY sortiert durchlaufen werden koennen:
+// Maximal number of Rows, that can be sorted with ORDER BY:
#if defined (WIN)
-#define MAX_KEYSET_SIZE 0x3ff0 // Etwas weniger als ein Segment, damit
- // noch Platz fuer Memory Debug-Informationen
+#define MAX_KEYSET_SIZE 0x3ff0 // Somewhat less as a Segment, So there is still place for Memory-Debug-Information
#else
#define MAX_KEYSET_SIZE 0x40000 // 256K
#endif
@@ -915,7 +914,7 @@ BOOL OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "OResultSet::ExecuteRow" );
OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::ExecuteRow: Analyzer isn't set!");
- // Fuer weitere Fetch-Operationen werden diese Angaben ggf. veraendert ...
+ // For further Fetch-Operations this information may possibly be changed ...
IResultSetHelper::Movement eCursorPosition = eFirstCursorPosition;
INT32 nOffset = nFirstOffset;
@@ -935,7 +934,7 @@ again:
return sal_False;
}
- if (!bEvaluate) // Laeuft keine Auswertung, dann nur Ergebniszeile fuellen
+ if (!bEvaluate) // When no evaluation runs, then just fill the results
{
m_pTable->fetchRow(m_aRow,rTableCols, sal_True,bRetrieveData);
}
@@ -944,10 +943,10 @@ again:
m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction);
if ( (!m_bShowDeleted && m_aEvaluateRow->isDeleted())
- || (bHasRestriction && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// keine Anzeige von geloeschten Saetzen
- !m_pSQLAnalyzer->evaluateRestriction())) // Auswerten der Bedingungen
- { // naechsten Satz auswerten
- // aktuelle Zeile loeschen im Keyset
+ || (bHasRestriction && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// no notification of a deleted Rating
+ !m_pSQLAnalyzer->evaluateRestriction())) // Evaluate the conditions
+ { // Evaluate the next Sentence
+ // delete current lin in Keyset
if (m_pEvaluationKeySet)
{
++m_aEvaluateIter;
@@ -987,13 +986,13 @@ again:
// aStatus.Set(SQL_STAT_NO_DATA_FOUND);
return sal_False;
}
- // Nochmal probieren ...
+ // Try again ...
goto again;
}
}
- // Evaluate darf nur gesetzt sein,
- // wenn der Keyset weiter aufgebaut werden soll
+ // Evaluate can only be set,
+ // when the Keyset will be constructed further
if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount() &&
(m_pFileSet.is() || m_pSortIndex) && bEvaluate)
{
@@ -1014,13 +1013,13 @@ again:
sal_Bool bOK = sal_True;
if (bEvaluate)
{
- // jetzt die eigentliche Ergebniszeile Lesen
+ // read the actual resultset
bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,TRUE);
}
if (bOK)
{
- // Nur die zu aendernden Werte uebergeben:
+ // just give the other values:
if(!m_pTable->UpdateRow(*m_aAssignValues,m_aEvaluateRow, m_xColsIdx))
return sal_False;
}
@@ -1053,9 +1052,9 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT &&
!isCount())
{
- if (!m_pFileSet.is()) // kein Index verfuegbar
+ if (!m_pFileSet.is()) //no Index available
{
- // Normales FETCH
+ // Normal FETCH
ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData);
// now set the bookmark for outside this is the logical pos and not the file pos
@@ -1076,7 +1075,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
m_nRowPos = 0;
break;
case IResultSetHelper::LAST:
- // OSL_ENSURE(IsRowCountFinal(), "Fehler im Keyset!"); // muss eingefroren sein, sonst Fehler beim SQLCursor
+ // OSL_ENSURE(IsRowCountFinal(), "Failure in Keyset!"); // must be frozen, without failer at SQLCursor
m_nRowPos = m_pFileSet->get().size() - 1;
break;
case IResultSetHelper::RELATIVE:
@@ -1091,9 +1090,9 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
}
// OffRange?
- // Der FileCursor ist ausserhalb des gueltigen Bereichs, wenn
+ // The FileCursor is outside of the valid range, when:
// a.) m_nRowPos < 1
- // b.) Ein KeySet besteht und m_nRowPos > m_pFileSet->size()
+ // b.) a KeySet exists and m_nRowPos > m_pFileSet->size()
if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen()
{
// aStatus.Set(SQL_STAT_NO_DATA_FOUND);
@@ -1103,7 +1102,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
{
if (m_nRowPos < (INT32)m_pFileSet->get().size())
{
- // Fetch ueber Index
+ // Fetch Index
ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],FALSE,bRetrieveData);
// now set the bookmark for outside
@@ -1113,9 +1112,9 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
}
}
- else // Index muss weiter aufgebaut werden
+ else // Index must be further broken down
{
- // Zunaechst auf die letzte bekannte Zeile setzen
+ // set first on the last known line
if (!m_pFileSet->get().empty())
{
m_aFileSetIter = m_pFileSet->get().end()-1;
@@ -1123,7 +1122,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
m_pTable->seekRow(IResultSetHelper::BOOKMARK, *m_aFileSetIter, m_nFilePos);
}
sal_Bool bOK = sal_True;
- // Ermitteln der Anzahl weiterer Fetches
+ // Determen the number of further Fetches
while (bOK && m_nRowPos >= (INT32)m_pFileSet->get().size())
{
if (m_pEvaluationKeySet)
@@ -1148,7 +1147,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
if (bOK)
{
- // jetzt nochmal die Ergebnisse lesen
+ // read the results again
m_pTable->fetchRow(m_aRow, *(m_pTable->getTableColumns()), sal_True,bRetrieveData);
// now set the bookmark for outside
@@ -1159,7 +1158,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
}
}
- else if (!m_pFileSet->isFrozen()) // keinen gueltigen Satz gefunden
+ else if (!m_pFileSet->isFrozen()) // no valid sentence found
{
//m_pFileSet->Freeze();
m_pFileSet->setFrozen();
@@ -1175,7 +1174,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
}
else if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && isCount())
{
- // Fetch des COUNT(*)
+ // Fetch the COUNT(*)
switch (eCursorPosition)
{
case IResultSetHelper::NEXT:
@@ -1203,8 +1202,8 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
goto Error;
else if (m_nRowPos == 0)
{
- // COUNT(*) in Ergebnisrow packen
- // (muss die erste und einzige Variable in der Row sein)
+ // set COUNT(*) in resultrow
+ // (must be the first and only variable in the row)
if (m_aRow->get().size() >= 2)
{
*(m_aRow->get())[1] = m_nRowCountResult;
@@ -1221,14 +1220,14 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset,
}
}
else
- // Fetch nur bei SELECT moeglich!
+ // Fetch only at SELECT possible!
return sal_False;
return sal_True;
Error:
- // steht der Cursor vor dem ersten Satz
- // dann wird die position beibehalten
+ // is the Cursor for the first row
+ // then the position will be maintained
if (nTempPos == -1)
m_nRowPos = nTempPos;
else
@@ -1249,11 +1248,11 @@ Error:
m_nRowPos = -1;
break;
case IResultSetHelper::BOOKMARK:
- m_nRowPos = nTempPos; // vorherige Position
+ m_nRowPos = nTempPos; // last Position
}
}
// delete pGuard;
- // rMode = (!bShowDeleted && aStatus.IsSuccessful() && m_aRow->isDeleted()) ? // keine Anzeige von geloeschten Saetzen
+ // rMode = (!bShowDeleted && aStatus.IsSuccessful() && m_aRow->isDeleted()) ? // no indicator for delete rates
// OCursor::SQL_MOD_INVALID : OCursor::SQL_MOD_NONE;
return sal_False;
}
@@ -1263,8 +1262,8 @@ void OResultSet::sortRows()
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen at sun.com", "OResultSet::sortRows" );
if (!m_pSQLAnalyzer->hasRestriction() && m_aOrderbyColumnNumber.size() == 1)
{
- // Ist nur ein Feld fuer die Sortierung angegeben
- // Und diese Feld ist indiziert, dann den Index ausnutzen
+ // is just one field for the sorting given
+ // and this field is indexed, then de Index will be exploit
Reference<XIndexesSupplier> xIndexSup;
m_pTable->queryInterface(::getCppuType((const Reference<XIndexesSupplier>*)0)) >>= xIndexSup;
// Reference<XIndexesSupplier> xIndexSup(m_pTable,UNO_QUERY);
@@ -1322,7 +1321,7 @@ void OResultSet::sortRows()
eKeyType[i] = SQL_ORDERBYKEY_DOUBLE;
break;
- // Andere Typen sind nicht implementiert (und damit immer FALSE)
+ // Other types aren't implemented (so they are always FALSE)
default:
eKeyType[i] = SQL_ORDERBYKEY_NONE;
OSL_ASSERT("OFILECursor::Execute: Datentyp nicht implementiert");
@@ -1350,7 +1349,7 @@ void OResultSet::sortRows()
}
}
- // Sortiertes Keyset erzeugen
+ // create sorted Keyset
// DELETEZ(m_pEvaluationKeySet);
m_pEvaluationKeySet = NULL;
m_pFileSet = NULL;
@@ -1358,7 +1357,7 @@ void OResultSet::sortRows()
// if(!bDistinct)
// SetRowCount(pFileSet->count());
DELETEZ(m_pSortIndex);
- // Nun kann ueber den Index sortiert zugegriffen werden.
+ // now can the Index be accessed with sorting.
}
@@ -1398,11 +1397,11 @@ BOOL OResultSet::OpenImpl()
m_nResultSetConcurrency = (m_pTable->isReadOnly() || isCount()) ? ResultSetConcurrency::READ_ONLY : ResultSetConcurrency::UPDATABLE;
- // Neuen Index aufbauen:
+ // brake new Index down:
m_pFileSet = NULL;
// DELETEZ(m_pEvaluationKeySet);
- // An den Anfang positionieren
+ // position at the start
m_nRowPos = -1;
m_nFilePos = 0;
m_nRowCountResult = -1;
@@ -1419,8 +1418,8 @@ BOOL OResultSet::OpenImpl()
lcl_throwError(STR_QUERY_COMPLEX_COUNT,*this);
m_nRowCountResult = 0;
- // Vorlaeufig einfach ueber alle Datensaetze iterieren und
- // dabei die Aktionen bearbeiten (bzw. einfach nur zaehlen):
+ // for now simply iterate over all datasets and
+ // do all actoins (or just count)
{
sal_Bool bOK = sal_True;
if (m_pEvaluationKeySet)
@@ -1447,9 +1446,8 @@ BOOL OResultSet::OpenImpl()
}
}
- // Ergebnis von COUNT(*) in m_nRowCountResult merken.
- // nRowCount, also die Anzahl der Rows in der Ergebnismenge, ist bei dieser
- // Anfrage = 1!
+ // save result of COUNT(*) in m_nRowCountResult.
+ // nRowCount, is the number of Rows in the result, and is at this request = 1!
m_pEvaluationKeySet = NULL;
// DELETEZ(m_pEvaluationKeySet);
}
@@ -1489,9 +1487,8 @@ BOOL OResultSet::OpenImpl()
m_pFileSet = new OKeySet();
if (!m_pSQLAnalyzer->hasRestriction())
- // jetzt kann das Keyset schon gefuellt werden!
- // Aber Achtung: es wird davon ausgegangen, das die FilePositionen als Folge 1..n
- // abgelegt werden!
+ // now can the Keyset be filled!
+ // But be carefull: It is assumed, that the FilePosition will be stored as followed 1..n
{
if ( m_nLastVisitedPos > 0)
m_pFileSet->get().reserve( m_nLastVisitedPos );
@@ -1501,7 +1498,7 @@ BOOL OResultSet::OpenImpl()
}
OSL_ENSURE(m_pFileSet.is(),"Kein KeySet vorhanden! :-(");
- if(bDistinct && m_pFileSet.is()) // sicher ist sicher
+ if(bDistinct && m_pFileSet.is()) // when we know for sure
{
OValueRow aSearchRow = new OValueVector(m_aRow->get().size());
OValueRefVector::Vector::iterator aRowIter = m_aRow->get().begin();
@@ -1586,10 +1583,10 @@ BOOL OResultSet::OpenImpl()
case SQL_STATEMENT_UPDATE:
case SQL_STATEMENT_DELETE:
- // waehrend der Bearbeitung die Anzahl der bearbeiteten Rows zaehlen:
+ // count during processing, the number of processed Rows
m_nRowCountResult = 0;
- // Vorlaeufig einfach ueber alle Datensaetze iterieren und
- // dabei die Aktionen bearbeiten (bzw. einfach nur zaehlen):
+ // for now simply iterate over all datasets and
+ // run the actions (or simply only count):
{
sal_Bool bOK = sal_True;
@@ -1617,9 +1614,8 @@ BOOL OResultSet::OpenImpl()
}
}
- // Ergebnis von COUNT(*) in nRowCountResult merken.
- // nRowCount, also die Anzahl der Rows in der Ergebnismenge, ist bei dieser
- // Anfrage = 1!
+ // save score of COUNT(*) in nRowCountResult.
+ // nRowCount, that is the number of rows in the resultset, is at this request = 1!
// DELETEZ(m_pEvaluationKeySet);
m_pEvaluationKeySet = NULL;
}
@@ -1642,7 +1638,7 @@ BOOL OResultSet::OpenImpl()
break;
}
- // FilePos zuruecksetzen
+ // set FilePos back
m_nFilePos = 0;
return sal_True;
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 1ccb031..3cc5ce0 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -430,7 +430,7 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
aColumnName = pColumnRef->getChild(0)->getTokenValue();
else if (pColumnRef->count() == 3)
{
- // Nur die Table Range-Variable darf hier vorkommen:
+ // Just the Table Range-variable may be here:
// if (!(pColumnRef->getChild(0)->getTokenValue() == aTableRange))
// {
// aStatus.Set(SQL_STAT_ERROR,
@@ -450,8 +450,8 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef,
Reference<XColumnLocate> xColLocate(m_xColNames,UNO_QUERY);
if(!xColLocate.is())
return;
- // Alles geprueft und wir haben den Namen der Column.
- // Die wievielte Column ist das?
+ // All tested and we have the names of the Columns.
+ // What number is the Column?
try
{
m_aOrderbyColumnNumber.push_back(xColLocate->findColumn(aColumnName));
@@ -579,7 +579,7 @@ void OStatement_Base::initializeResultSet(OResultSet* _pResult)
_pResult->setSelectRow(m_aSelectRow);
m_pSQLAnalyzer->bindSelectRow(m_aRow);
- m_pEvaluationKeySet = m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Werte im Code des Compilers setzen
+ m_pEvaluationKeySet = m_pSQLAnalyzer->bindEvaluationRow(m_aEvaluateRow); // Set value in the code of the Compilers
_pResult->setEvaluationKeySet(m_pEvaluationKeySet);
}
// -----------------------------------------------------------------------------
@@ -593,11 +593,11 @@ void OStatement_Base::GetAssignValues()
}
if (SQL_ISRULE(m_pParseTree,select_statement))
- // Keine zu setzenden Werte bei SELECT
+ // no translated value at SELECT
return;
else if (SQL_ISRULE(m_pParseTree,insert_statement))
{
- // Row fuer die zu setzenden Werte anlegen (Referenz durch new)
+ // Create Row for translated value (Reference trough new)
if(m_aAssignValues.is())
m_aAssignValues->get().clear();
sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY)->getCount();
@@ -607,7 +607,7 @@ void OStatement_Base::GetAssignValues()
m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER);
- // Liste der Columns-Namen, die in der column_commalist vorkommen (mit ; getrennt):
+ // List of Column-Names, that exist in the column_commalist (with ; seperated):
::std::vector<String> aColumnNameList;
OSL_ENSURE(m_pParseTree->count() >= 4,"OResultSet: Fehler im Parse Tree");
@@ -632,7 +632,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(SQL_ISRULE(pColumnCommalist,column_commalist),"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(pColumnCommalist->count() > 0,"OResultSet: Fehler im Parse Tree");
- // Alle Columns in der column_commalist ...
+ // All Columns in the column_commalist ...
for (sal_uInt32 i = 0; i < pColumnCommalist->count(); i++)
{
OSQLParseNode * pCol = pColumnCommalist->getChild(i);
@@ -643,19 +643,19 @@ void OStatement_Base::GetAssignValues()
if ( aColumnNameList.empty() )
throwFunctionSequenceException(*this);
- // Werte ...
+ // Value ...
OSQLParseNode * pValuesOrQuerySpec = m_pParseTree->getChild(4);
OSL_ENSURE(pValuesOrQuerySpec != NULL,"OResultSet: pValuesOrQuerySpec darf nicht NULL sein!");
OSL_ENSURE(SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec),"OResultSet: ! SQL_ISRULE(pValuesOrQuerySpec,values_or_query_spec)");
OSL_ENSURE(pValuesOrQuerySpec->count() > 0,"OResultSet: pValuesOrQuerySpec->count() <= 0");
- // nur "VALUES" ist erlaubt ...
+ // just "VALUES" is allowed ...
if (! SQL_ISTOKEN(pValuesOrQuerySpec->getChild(0),VALUES))
throwFunctionSequenceException(*this);
OSL_ENSURE(pValuesOrQuerySpec->count() == 4,"OResultSet: pValuesOrQuerySpec->count() != 4");
- // Liste von Werten
+ // Liste of values
OSQLParseNode * pInsertAtomCommalist = pValuesOrQuerySpec->getChild(2);
OSL_ENSURE(pInsertAtomCommalist != NULL,"OResultSet: pInsertAtomCommalist darf nicht NULL sein!");
OSL_ENSURE(pInsertAtomCommalist->count() > 0,"OResultSet: pInsertAtomCommalist <= 0");
@@ -669,7 +669,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(pRow_Value_Const != NULL,"OResultSet: pRow_Value_Const darf nicht NULL sein!");
if(SQL_ISRULE(pRow_Value_Const,parameter))
{
- ParseAssignValues(aColumnNameList,pRow_Value_Const,nIndex++); // kann nur ein Columnname vorhanden sein pro Schleife
+ ParseAssignValues(aColumnNameList,pRow_Value_Const,nIndex++); // can only one Columnname be available per loop
}
else if(pRow_Value_Const->isToken())
ParseAssignValues(aColumnNameList,pRow_Value_Const,static_cast<xub_StrLen>(i));
@@ -703,7 +703,7 @@ void OStatement_Base::GetAssignValues()
OSL_ENSURE(SQL_ISRULE(pAssignmentCommalist,assignment_commalist),"OResultSet: Fehler im Parse Tree");
OSL_ENSURE(pAssignmentCommalist->count() > 0,"OResultSet: pAssignmentCommalist->count() <= 0");
- // Alle Zuweisungen (Kommaliste) bearbeiten ...
+ // work on all assignments (commalist) ...
::std::vector< String> aList(1);
for (sal_uInt32 i = 0; i < pAssignmentCommalist->count(); i++)
{
@@ -745,12 +745,12 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam
pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_INTNUM ||
pRow_Value_Constructor_Elem->getNodeType() == SQL_NODE_APPROXNUM)
{
- // Wert setzen:
+ // set value:
SetAssignValue(aColumnName, pRow_Value_Constructor_Elem->getTokenValue());
}
else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL))
{
- // NULL setzen
+ // set NULL
SetAssignValue(aColumnName, String(), TRUE);
}
else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter))
@@ -771,11 +771,11 @@ void OStatement_Base::SetAssignValue(const String& aColumnName,
Reference<XPropertySet> xCol;
m_xColNames->getByName(aColumnName) >>= xCol;
sal_Int32 nId = Reference<XColumnLocate>(m_xColNames,UNO_QUERY)->findColumn(aColumnName);
- // Kommt diese Column ueberhaupt in der Datei vor?
+ // does this column actually exist in the file?
if (!xCol.is())
{
- // Diese Column gibt es nicht!
+ // This Column doesn't have it!
// aStatus.Set(SQL_STAT_ERROR,
// String::CreateFromAscii("S0022"),
// aStatus.CreateErrorMessage(String(SdbResId(STR_STAT_COLUMN_NOT_FOUND))),
@@ -783,23 +783,23 @@ void OStatement_Base::SetAssignValue(const String& aColumnName,
throwFunctionSequenceException(*this);
}
- // Value an die Row mit den zuzuweisenden Werten binden:
+ // bind that Value on that Row with allocated values:
// const ODbVariantRef& xValue = (*aAssignValues)[pFileColumn->GetId()];
- // Alles geprueft und wir haben den Namen der Column.
- // Jetzt eine Value allozieren, den Wert setzen und die Value an die Row binden.
+ // Everything tested and we have the names of the Columns.
+ // Now allocate one Value, set the value and bind the value to the Row.
if (bSetNull)
(m_aAssignValues->get())[nId]->setNull();
else
{
switch (::comphelper::getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))))
{
- // Kriterium je nach Typ als String oder double in die Variable packen ...
+ // Bundle criteria for each Type as String or double in the variable
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
*(m_aAssignValues->get())[nId] = ORowSetValue(aValue);
- // Zeichensatz ist bereits konvertiert, da ja das gesamte Statement konvertiert wurde
+ //Characterset is already converted, since the entire statement was converted
break;
case DataType::BIT:
@@ -810,7 +810,7 @@ void OStatement_Base::SetAssignValue(const String& aColumnName,
*(m_aAssignValues->get())[nId] = sal_False;
else
{
- // aStatus.Set(SQL_STAT_ERROR); // nyi: genauer!
+ // aStatus.Set(SQL_STAT_ERROR); // nyi: more accurate!
throwFunctionSequenceException(*this);
}
}
@@ -842,8 +842,8 @@ void OStatement_Base::SetAssignValue(const String& aColumnName,
}
}
- // Parameter-Nr. merken (als User Data)
- // SQL_NO_PARAMETER = kein Parameter.
+ // save Parameter-No. (as User Data)
+ // SQL_NO_PARAMETER = no Parameter.
m_aAssignValues->setParameterIndex(nId,nParameter);
if(nParameter != SQL_NO_PARAMETER)
m_aParameterIndexes[nParameter] = nId;
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 773b24b..5e61789 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -115,10 +115,9 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode)
//------------------------------------------------------------------
void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow,OEvaluateSetList& _rEvaluateSetList)
{
- // Zaehlen, wieviele Kriterien
- // wenn nur ein Kriterium, und das entsprechende Feld ist indiziert
- // dann wird der Index verwendet
-
+ // count, how many criteria
+ // when only one criteria, and the corresponding field is indexed
+ // then the index will be used
OEvaluateSet* pEvaluateSet = NULL;
for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter)
@@ -166,10 +165,10 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
::std::vector<sal_Int32>* pKeySet = NULL;
OEvaluateSet* pEvaluateSet = NULL;
- // Keyset erzeugen mit kleinster Liste
+ // create Keyset with smallest list
if(!aEvaluateSetList.empty())
{
- // welche Liste hat den kleinsten count ?
+ // which list has the smallest count?
OEvaluateSetList::iterator i = aEvaluateSetList.begin();
pEvaluateSet = *(i);
for(++i; i != aEvaluateSetList.end();++i)
@@ -188,7 +187,7 @@ void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
(*pKeySet)[k] = j->second;
}
- // alle loeschen
+ // delete all
for(i = aEvaluateSetList.begin(); i != aEvaluateSetList.end();++i)
delete (*i);
}
@@ -203,20 +202,20 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns
OCodeStack aCodeStack;
if (!rCodeList.size())
- return; // kein Praedikat
+ return; // no predicate
if (!rParameterColumns->get().size())
- return; // keine Parameter
+ return; // no Parameter
- // Anlegen von Columns, die eine genauere Beschreibung fuer die enthalten
+ // Create columns, that have a more precise description for the included
::rtl::Reference<OSQLColumns> aNewParamColumns = new OSQLColumns(*rParameterColumns);
- // Anlegen einer Testzeile, wird benoetigt um die Parameter zu beschreiben
+ // Create a Test-line, is needed to describe the parameter
OValueRefRow aParameterRow = new OValueRefVector(rParameterColumns->get().size());
bindParameterRow(aParameterRow);
OValueRefRow aTestRow = new OValueRefVector(Reference< XIndexAccess>(m_aCompiler->getOrigColumns(),UNO_QUERY)->getCount());
- delete bindEvaluationRow(aTestRow); // Binden der Attribute an die Values
+ delete bindEvaluationRow(aTestRow); // Bind the attributes to the values
for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter)
{
@@ -226,10 +225,10 @@ void OSQLAnalyzer::describeParam(::rtl::Reference<OSQLColumns> rParameterColumns
aCodeStack.push(pOperand);
else
{
- if (pOperator->getRequestedOperands() == 2) // bei zwei Operatoren ist es moeglich
- { // einen Parameter weiter zu spezifizieren
+ if (pOperator->getRequestedOperands() == 2) // with two Operatands it is possible
+ { // specify one parameter better
OOperandParam *pParam = PTR_CAST(OOperandParam,aCodeStack.top());
- if (pParam) // Anpassen des ParameterTyps, wenn der linke Operand ein Attribut ist
+ if (pParam) // change the Parameter-types, when the left Operand is a attribute
{
OOperandAttr *pLeft = PTR_CAST(OOperandAttr,*(rCodeList.end() - 2));
if (pLeft)
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 0458563..ab27a38 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -130,7 +130,7 @@ sal_Bool OOperandAttr::isIndexed() const
}
//------------------------------------------------------------------
OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos)
- : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Typ
+ : OOperandRow(static_cast<sal_uInt16>(_nPos), DataType::VARCHAR) // Standard-Type
{
OSL_ENSURE(SQL_ISRULE(pNode,parameter),"Argument ist kein Parameter");
OSL_ENSURE(pNode->count() > 0,"Fehler im Parse Tree");
@@ -146,17 +146,15 @@ OOperandParam::OOperandParam(OSQLParseNode* pNode, sal_Int32 _nPos)
OSL_ASSERT("Fehler im Parse Tree");
}
- // Parameter-Column aufsetzen mit defult typ, kann zu einem spaeteren Zeitpunkt ueber DescribeParameter
- // genauer spezifiziert werden
+ // set up Parameter-Column with default type, can later be specified to a Describe-Parameter
- // Identitaet merken (hier eigentlich nicht erforderlich, aber aus
- // Symmetriegruenden ...)
+ // save Indentity (is here not escpecially nessesary, but for the sake of symmitry
// todo
// OColumn* pColumn = new OFILEColumn(aParameterName,eDBType,255,0,SQL_FLAGS_NULLALLOWED);
// rParamColumns->AddColumn(pColumn);
- // der Wert wird erst kurz vor der Auswertung gesetzt
+ // the value will be set just before the evaluation
}
@@ -343,7 +341,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con
sal_Bool bResult = sal_False;
sal_Int32 eDBType = pLeft->getDBType();
- // Vergleich (je nach Datentyp):
+ // Compare (Depending on Data-type):
switch (eDBType)
{
case DataType::CHAR:
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index 8fc7ac8..0e23c57 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -88,8 +88,8 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
return;
m_nParamCounter = 0;
- // Parse Tree analysieren (je nach Statement-Typ)
- // und Zeiger auf WHERE-Klausel setzen:
+ // analyse Parse Tree (depending on Statement-type)
+ // and set pointer on WHERE-clause:
OSQLParseNode * pWhereClause = NULL;
OSQLParseNode * pOrderbyClause = NULL;
@@ -132,12 +132,12 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
pWhereClause = pSQLParseNode->getChild(3);
}
else
- // Anderes Statement. Keine Selektionskriterien.
+ // Other Statement. no selection-criteria
return;
if (SQL_ISRULE(pWhereClause,where_clause))
{
- // Wenn es aber eine where_clause ist, dann darf sie nicht leer sein:
+ // When it is another where-cluase however, then it is not allowed to be empty:
DBG_ASSERT(pWhereClause->count() == 2,"OFILECursor: Fehler im Parse Tree");
OSQLParseNode * pComparisonPredicate = pWhereClause->getChild(1);
@@ -147,6 +147,7 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
}
else
{
+ // The where-clause is mostly optionally, he can also work with "optional-where-clause".
// Die Where Clause ist meistens optional, d. h. es koennte sich auch
// um "optional_where_clause" handeln.
DBG_ASSERT(SQL_ISRULE(pWhereClause,opt_where_clause),"OPredicateCompiler: Fehler im Parse Tree");
@@ -157,18 +158,18 @@ void OPredicateCompiler::start(OSQLParseNode* pSQLParseNode)
OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
{
OOperand* pOperand = NULL;
- if (pPredicateNode->count() == 3 && // Ausdruck is geklammert
+ if (pPredicateNode->count() == 3 && // Expression is bracketed
SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"(") &&
SQL_ISPUNCTUATION(pPredicateNode->getChild(2),")"))
{
execute(pPredicateNode->getChild(1));
}
else if ((SQL_ISRULE(pPredicateNode,search_condition) || (SQL_ISRULE(pPredicateNode,boolean_term)))
- && // AND/OR-Verknuepfung:
+ && // AND/OR-linkage:
pPredicateNode->count() == 3)
{
- execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs
- execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs
+ execute(pPredicateNode->getChild(0)); // Sidematching on the left side
+ execute(pPredicateNode->getChild(2)); // Sidematching on the right side
if (SQL_ISTOKEN(pPredicateNode->getChild(1),OR)) // OR-Operator
{
@@ -205,8 +206,8 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
}
else if(SQL_ISRULE(pPredicateNode,num_value_exp))
{
- execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs
- execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs
+ execute(pPredicateNode->getChild(0)); // Sidematching on the left side
+ execute(pPredicateNode->getChild(2)); // Sidematching on the right side
if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"+"))
{
m_aCodeList.push_back(new OOp_ADD());
@@ -220,8 +221,8 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
}
else if(SQL_ISRULE(pPredicateNode,term))
{
- execute(pPredicateNode->getChild(0)); // Bearbeiten des linken Zweigs
- execute(pPredicateNode->getChild(2)); // Bearbeiten des rechten Zweigs
+ execute(pPredicateNode->getChild(0)); // Sidematching on the left side
+ execute(pPredicateNode->getChild(2)); // Sidematching on the right side
if (SQL_ISPUNCTUATION(pPredicateNode->getChild(1),"*"))
{
m_aCodeList.push_back(new OOp_MUL());
@@ -234,7 +235,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode)
}
}
else
- pOperand = execute_Operand(pPredicateNode); // jetzt werden nur einfache Operanden verarbeitet
+ pOperand = execute_Operand(pPredicateNode); // now only the simple operand will be changed processed
return pOperand;
}
@@ -465,7 +466,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
pOperand = m_pAnalyzer->createOperandAttr(Reference< XColumnLocate>(m_orgColumns,UNO_QUERY)->findColumn(aColumnName),xCol,m_xIndexes);
}
else
- {// Column existiert nicht im Resultset
+ {// Column doesn't exist in the Result-set
const ::rtl::OUString sError( m_pAnalyzer->getConnection()->getResources().getResourceStringWithSubstitution(
STR_INVALID_COLUMNNAME,
"$columnname$", aColumnName
@@ -495,7 +496,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) thr
else if((pPredicateNode->count() == 2) &&
(SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"+") || SQL_ISPUNCTUATION(pPredicateNode->getChild(0),"-")) &&
pPredicateNode->getChild(1)->getNodeType() == SQL_NODE_INTNUM)
- { // falls -1 bzw. +1 vorhanden ist
+ { // if -1 or +1 is there
::rtl::OUString aValue(pPredicateNode->getChild(0)->getTokenValue());
aValue += pPredicateNode->getChild(1)->getTokenValue();
pOperand = new OOperandConst(*pPredicateNode->getChild(1), aValue);
@@ -561,7 +562,7 @@ sal_Bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
OCodeList::iterator aIter = rCodeList.begin();
if (!(*aIter))
- return sal_True; // kein Praedikat
+ return sal_True; // no Predicate
for(;aIter != rCodeList.end();++aIter)
{
@@ -588,7 +589,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
{
OCodeList::iterator aIter = rCodeList.begin();
if (!(*aIter))
- return ; // kein Praedikat
+ return ; // no Predicate
for(;aIter != rCodeList.end();++aIter)
{
diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index 5847b94..ab5a758 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -45,44 +45,44 @@ namespace connectivity
return 0;
xub_StrLen nTokCount = 1;
- BOOL bStart = TRUE; // Stehen wir auf dem ersten Zeichen im Token?
- BOOL bInString = FALSE; // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ BOOL bStart = TRUE; // Are we on the first sign in the Token?
+ BOOL bInString = FALSE; // Are we WITHIN a (cStrDel delimited) String?
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ // Search for String-end after the first corresponding sign
for( xub_StrLen i = 0; i < nLen; ++i )
{
const sal_Unicode cChar = m_sString.GetChar(i);
if (bStart)
{
bStart = FALSE;
- // Erstes Zeichen ein String-Delimiter?
+ // First sign a String-Delimiter?
if ( cChar == cStrDel )
{
- bInString = TRUE; // dann sind wir jetzt INNERHALB des Strings!
- continue; // dieses Zeichen ueberlesen!
+ bInString = TRUE; // then we are now WITHIN the string!
+ continue; // skip this sign!
}
}
if (bInString)
{
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // when now the String-Delimiter-sign occurs ...
if ( cChar == cStrDel )
{
if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- ++i; // kein String-Ende, naechstes Zeichen ueberlesen.
+ // double String-Delimter-sign:
+ ++i; // no string-end, skip next sign.
}
else
{
- // String-Ende
+ // String-End
bInString = FALSE;
}
}
} // if (bInString)
else
{
- // Stimmt das Tokenzeichen ueberein, dann erhoehe TokCount
+ // corresponds the Token-sign, then raise TokCount
if ( cChar == cTok )
{
++nTokCount;
@@ -103,58 +103,57 @@ namespace connectivity
const xub_StrLen nLen = m_sString.Len();
if ( nLen )
{
- BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // Befinden wir uns INNERHALB eines (cStrDel delimited) String?
+ BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // are we WITHIN a (cStrDel delimited) String?
- // Erstes Zeichen ein String-Delimiter?
+ // First sign a String-Delimiter?
if (bInString )
- ++nStartPos; // dieses Zeichen ueberlesen!
+ ++nStartPos; // skip this sign!
if ( nStartPos >= nLen )
return;
sal_Unicode* pData = _rStr.AllocBuffer( nLen - nStartPos + 1 );
const sal_Unicode* pStart = pData;
- // Suche bis Stringende nach dem ersten nicht uebereinstimmenden Zeichen
+ // Search untill end of string for the first not corresponding sign
for( xub_StrLen i = nStartPos; i < nLen; ++i )
{
const sal_Unicode cChar = m_sString.GetChar(i);
if (bInString)
{
- // Wenn jetzt das String-Delimiter-Zeichen auftritt ...
+ // when now the String-Delimiter-sign occurs ...
if ( cChar == cStrDel )
{
if ((i+1 < nLen) && (m_sString.GetChar(i+1) == cStrDel))
{
- // Verdoppeltes String-Delimiter-Zeichen:
- // kein String-Ende, naechstes Zeichen ueberlesen.
+ // double String Delimiter-sign
+ // no end of string, skip next sign.
++i;
- *pData++ = m_sString.GetChar(i); // Zeichen gehoert zum Resultat-String
+ *pData++ = m_sString.GetChar(i); // sign belongs in Result-String
}
else
{
- // String-Ende
+ //end of String
bInString = FALSE;
*pData = 0;
}
}
else
{
- *pData++ = cChar; // Zeichen gehoert zum Resultat-String
+ *pData++ = cChar; // sign belongs in Result-String
}
}
else
{
- // Stimmt das Tokenzeichen ueberein, dann erhoehe nTok
+ // corresponds the Token-sign then raise nTok
if ( cChar == cTok )
{
- // Vorzeitiger Abbruch der Schleife moeglich, denn
- // wir haben, was wir wollten.
+ // more carefull destruction of loop possible, then we have, is what we want.
nStartPos = i+1;
break;
}
else
{
- *pData++ = cChar; // Zeichen gehoert zum Resultat-String
+ *pData++ = cChar; // sign belongs to Result-String
}
}
} // for( xub_StrLen i = nStartPos; i < nLen; ++i )
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 20b8120..2cb2229 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -185,7 +185,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
for (xub_StrLen j = 0; j < aField2.Len(); j++)
{
const sal_Unicode c = aField2.GetChar(j);
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // just digits, decimal-points and thousands-seperators?
if ( ( !cDecimalDelimiter || c != cDecimalDelimiter ) &&
( !cThousandDelimiter || c != cThousandDelimiter ) &&
!aCharClass.isDigit(aField2,j) &&
@@ -208,12 +208,12 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
bNumeric = FALSE;
if (bNumeric && cThousandDelimiter)
{
- // Ist der Trenner richtig angegeben?
+ // is the seperator correctly given?
const String aValue = aField2.GetToken(0,cDecimalDelimiter);
for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4)
{
const sal_Unicode c = aValue.GetChar(static_cast<sal_uInt16>(j));
- // nur Ziffern und Dezimalpunkt und Tausender-Trennzeichen?
+ // just digits, decimalpoints and thousands-seperators?
if (c == cThousandDelimiter && j)
continue;
else
@@ -224,7 +224,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
}
}
- // jetzt koennte es noch ein Datumsfeld sein
+ // now it still can be a Date-field
if (!bNumeric)
{
try
@@ -288,7 +288,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
break;
default:
eType = DataType::VARCHAR;
- nPrecision = 0; // nyi: Daten koennen aber laenger sein!
+ nPrecision = 0; // nyi: Data can be longer!
nScale = 0;
{
static const ::rtl::OUString s_sVARCHAR(RTL_CONSTASCII_USTRINGPARAM("VARCHAR"));
@@ -381,7 +381,7 @@ void OFlatTable::construct()
sal_Int32 nSize = m_pFileStream->Tell();
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
- // Buffersize abhaengig von der Filegroesse
+ // Buffersize is dependent on the file-size
m_pFileStream->SetBufferSize(nSize > 1000000 ? 32768 :
nSize > 100000 ? 16384 :
nSize > 10000 ? 4096 : 1024);
@@ -543,7 +543,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
OFlatConnection* pConnection = (OFlatConnection*)m_pConnection;
const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter();
const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
- // Felder:
+ // Fields:
xub_StrLen nStartPos = 0;
String aStr;
OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
@@ -558,7 +558,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
(_rRow->get())[i]->setNull();
else
{
- // Laengen je nach Datentyp:
+ // length depending on data-type:
sal_Int32 nLen,
nType = 0;
if(bIsTable)
@@ -601,7 +601,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
} break;
case DataType::DOUBLE:
case DataType::INTEGER:
- case DataType::DECIMAL: // #99178# OJ
+ case DataType::DECIMAL:
case DataType::NUMERIC:
{
@@ -615,7 +615,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
(!cDecimalDelimiter && nType == DataType::INTEGER),
"FalscherTyp");
- // In Standard-Notation (DezimalPUNKT ohne Tausender-Komma) umwandeln:
+ // In Standard-Notation (DecimalPOINT without thousands-comma) converting:
for (xub_StrLen j = 0; j < aStr.Len(); ++j)
{
const sal_Unicode cChar = aStr.GetChar(j);
@@ -623,10 +623,10 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
*pData++ = '.';
//aStrConverted.Append( '.' );
else if ( cChar == '.' ) // special case, if decimal seperator isn't '.' we have to put the string after it
- continue; // #99189# OJ
+ continue;
else if (cThousandDelimiter && cChar == cThousandDelimiter)
{
- // weglassen
+ // leave out
}
else
*pData++ = cChar;
@@ -651,7 +651,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal
default:
{
- // Wert als String in Variable der Row uebernehmen
+ // Copy Value as String in Row-Variable
*(_rRow->get())[i] = ORowSetValue(aStr);
}
break;
@@ -671,7 +671,7 @@ sal_Bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen at sun.com", "OFlatTable::seekRow" );
OSL_ENSURE(m_pFileStream,"OFlatTable::seekRow: FileStream is NULL!");
// ----------------------------------------------------------
- // Positionierung vorbereiten:
+ // Prepare positioning:
m_nFilePos = nCurPos;
switch(eCursorPosition)
diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx
index ab34c9d..e51cf0c 100644
--- a/connectivity/source/drivers/flat/Eservices.cxx
+++ b/connectivity/source/drivers/flat/Eservices.cxx
@@ -50,11 +50,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -73,7 +70,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -113,7 +109,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx
index 70017eb..548c89f 100644
--- a/connectivity/source/drivers/hsqldb/Hservices.cxx
+++ b/connectivity/source/drivers/hsqldb/Hservices.cxx
@@ -51,11 +51,8 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
);
//***************************************************************************************
-//
-// Die vorgeschriebene C-Api muss erfuellt werden!
-// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen.
-//
-
+// The prescribed C-Api must be met!
+// It consists out of three Functions, which must be exported from the Model.
//---------------------------------------------------------------------------------------
void REGISTER_PROVIDER(
const OUString& aServiceImplName,
@@ -74,7 +71,6 @@ void REGISTER_PROVIDER(
xNewKey->createKey(Services[i]);
}
-
//---------------------------------------------------------------------------------------
struct ProviderRequest
{
@@ -114,7 +110,6 @@ struct ProviderRequest
};
//---------------------------------------------------------------------------------------
-
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL
component_getImplementationEnvironment(
const sal_Char **ppEnvTypeName,
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx
index 76f6646..4275689 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -44,7 +44,7 @@ java_sql_Array::~java_sql_Array()
jclass java_sql_Array::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Array");
@@ -72,10 +72,10 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
static const char * cMethodName = "getArray";
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Java-Call absetzen
+ // dismiss Java-Call
(jobjectArray)t.pEnv->CallObjectMethod( object, mID, obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(obj);
} //t.pEnv
return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();
@@ -88,12 +88,12 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
static const char * cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;";
static const char * cMethodName = "getArray";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
(jobjectArray)t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(obj);
}
return ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >();
@@ -103,17 +103,17 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSet";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallObjectMethod( object, mID, obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and cleanup
t.pEnv->DeleteLocalRef(obj);
}
return NULL;
@@ -123,9 +123,9 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Parameter konvertieren
+ // convert parameter
jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * cMethodName = "getResultSetAtIndex";
// Java-Call absetzen
@@ -133,7 +133,7 @@ sal_Int32 SAL_CALL java_sql_Array::getBaseType( ) throw(::com::sun::star::sdbc:
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallObjectMethod( object, mID, index,count,obj);
ThrowSQLException(t.pEnv,*this);
- // und aufraeumen
+ // and cleanup
t.pEnv->DeleteLocalRef(obj);
}
return NULL;
diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx
index d523786..05894b1 100644
--- a/connectivity/source/drivers/jdbc/Blob.cxx
+++ b/connectivity/source/drivers/jdbc/Blob.cxx
@@ -53,7 +53,7 @@ java_sql_Blob::~java_sql_Blob()
jclass java_sql_Blob::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Blob");
return theClass;
@@ -65,10 +65,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "()J";
static const char * cMethodName = "length";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
@@ -82,10 +82,10 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
{
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(JI)[B";
static const char * cMethodName = "getBytes";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jbyteArray out = (jbyteArray)t.pEnv->CallObjectMethod( object, mID,pos,count);
@@ -98,7 +98,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
t.pEnv->DeleteLocalRef(out);
}
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return aSeq;
}
@@ -107,7 +107,7 @@ sal_Int64 SAL_CALL java_sql_Blob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getBinaryStream","()Ljava/io/InputStream;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
}
@@ -117,13 +117,13 @@ sal_Int64 SAL_CALL java_sql_Blob::position( const ::com::sun::star::uno::Sequenc
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "([BI)J";
static const char * cMethodName = "position";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jbyteArray pByteArray = t.pEnv->NewByteArray(pattern.getLength());
t.pEnv->SetByteArrayRegion(pByteArray,0,pattern.getLength(),(jbyte*)pattern.getConstArray());
out = t.pEnv->CallLongMethod( object, mID, pByteArray,start );
@@ -140,7 +140,6 @@ sal_Int64 SAL_CALL java_sql_Blob::positionOfBlob( const ::com::sun::star::uno::R
// the pattern parameter. Since the effort for proper implementation is rather high - we would need
// to translated patter into a byte[] -, we defer this functionality for the moment (hey, it was
// unusable, anyway)
- // 2005-11-15 / #i57457# / frank.schoenheit at sun.com
return 0;
}
diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx
index b69ef1a..4efc5f1 100644
--- a/connectivity/source/drivers/jdbc/Boolean.cxx
+++ b/connectivity/source/drivers/jdbc/Boolean.cxx
@@ -40,7 +40,7 @@ java_lang_Boolean::~java_lang_Boolean()
{}
jclass java_lang_Boolean::st_getMyClass()
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/lang/Boolean");
return theClass;
diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx
index 868e834..40e96ae 100644
--- a/connectivity/source/drivers/jdbc/CallableStatement.cxx
+++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx
@@ -165,7 +165,7 @@ Any SAL_CALL java_sql_CallableStatement::getObject( sal_Int32 columnIndex, const
createStatement(t.pEnv);
static jmethodID mID(NULL);
/*jobject out = */callObjectMethodWithIntArg(t.pEnv,"getObject","(I)Ljava/lang/Object;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return Any(); //out==0 ? 0 : new java_lang_Object( t.pEnv, out );
}
@@ -194,7 +194,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
}
@@ -204,7 +204,7 @@ sal_Int16 SAL_CALL java_sql_CallableStatement::getShort( sal_Int32 columnIndex )
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
}
@@ -217,13 +217,13 @@ void SAL_CALL java_sql_CallableStatement::registerOutParameter( sal_Int32 parame
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(IILjava/lang/String;)V";
static const char * cMethodName = "registerOutParameter";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,typeName));
t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -237,10 +237,10 @@ void SAL_CALL java_sql_CallableStatement::registerNumericOutParameter( sal_Int32
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(III)V";
static const char * cMethodName = "registerOutParameter";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
t.pEnv->CallVoidMethod( object, mID, parameterIndex,sqlType,scale);
@@ -252,7 +252,7 @@ jclass java_sql_CallableStatement::theClass = 0;
jclass java_sql_CallableStatement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/CallableStatement");
return theClass;
@@ -275,7 +275,7 @@ Reference< starsdbc::XArray > SAL_CALL java_sql_CallableStatement::getArray( sal
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
}
@@ -285,7 +285,7 @@ Reference< starsdbc::XClob > SAL_CALL java_sql_CallableStatement::getClob( sal_I
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
}
Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_Int32 columnIndex ) throw(starsdbc::SQLException, RuntimeException)
@@ -294,7 +294,7 @@ Reference< starsdbc::XBlob > SAL_CALL java_sql_CallableStatement::getBlob( sal_I
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
}
@@ -304,7 +304,7 @@ Reference< starsdbc::XRef > SAL_CALL java_sql_CallableStatement::getRef( sal_Int
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
}
// -----------------------------------------------------------------------------
@@ -326,12 +326,12 @@ void java_sql_CallableStatement::createStatement(JNIEnv* /*_pEnv*/)
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
if( t.pEnv && !object ){
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/CallableStatement;";
static const char * cMethodName = "prepareCall";
- // Java-Call absetzen
+ // dismiss Java-Call
jobject out = NULL;
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,m_sSqlStatement));
static jmethodID mID(NULL);
diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx
index e1e6d8d..9428f63 100644
--- a/connectivity/source/drivers/jdbc/Class.cxx
+++ b/connectivity/source/drivers/jdbc/Class.cxx
@@ -44,7 +44,7 @@ java_lang_Class::~java_lang_Class()
jclass java_lang_Class::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/lang/Class");
return theClass;
@@ -61,7 +61,7 @@ java_lang_Class * java_lang_Class::forName( const ::rtl::OUString& _par0 )
out = t.pEnv->FindClass(sClassName);
ThrowSQLException(t.pEnv,0);
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? NULL : new java_lang_Class( t.pEnv, out );
}
diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx
index 69b1e34..a2210f7 100644
--- a/connectivity/source/drivers/jdbc/Clob.cxx
+++ b/connectivity/source/drivers/jdbc/Clob.cxx
@@ -53,7 +53,7 @@ java_sql_Clob::~java_sql_Clob()
jclass java_sql_Clob::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Clob");
return theClass;
@@ -66,10 +66,10 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "()J";
static const char * cMethodName = "length";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID );
@@ -84,17 +84,17 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
::rtl::OUString aStr;
{
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(JI)Ljava/lang/String;";
static const char * cMethodName = "getSubString";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jstring out = (jstring)t.pEnv->CallObjectMethod( object, mID,pos,subStringLength);
ThrowSQLException(t.pEnv,*this);
aStr = JavaString2String(t.pEnv,out);
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return aStr;
}
@@ -105,7 +105,7 @@ sal_Int64 SAL_CALL java_sql_Clob::length( ) throw(::com::sun::star::sdbc::SQLEx
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getCharacterStream","()Ljava/io/Reader;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
}
@@ -117,12 +117,12 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const ::rtl::OUString& searchstr, sa
{
jvalue args[1];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(t.pEnv,searchstr);
- // temporaere Variable initialisieren
+ // initialize temperary Variable
static const char * cSignature = "(Ljava/lang/String;I)J";
static const char * cMethodName = "position";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallLongMethod( object, mID, args[0].l,start );
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index c426e06..02a371e 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -63,7 +63,7 @@ java_sql_DatabaseMetaData::~java_sql_DatabaseMetaData()
jclass java_sql_DatabaseMetaData::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/DatabaseMetaData");
return theClass;
@@ -130,7 +130,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTables(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
OSL_VERIFY_RES( !isExceptionOccurred(t.pEnv,sal_True),"Exception occurred!");
@@ -359,11 +359,11 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[5];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
@@ -371,7 +371,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getIndexInfo(
args[4].z = approximate;
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,args[3].z,args[4].z );
- // und aufraeumen
+ // and clean up
if(catalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -400,17 +400,17 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getBestRowIdentifier
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[3];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schema);
args[2].l = convertwchar_tToJavaString(t.pEnv,table);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[1].l,args[2].l,scope,nullable);
- // und aufraeumen
+ // and cleanup
if(catalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -439,7 +439,6 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
if ( xReturn.is() )
{
// we have to check the result columns for the tables privleges
- // #106324#
Reference< XResultSetMetaDataSupplier > xMetaSup(xReturn,UNO_QUERY);
if ( xMetaSup.is() )
{
@@ -517,11 +516,11 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jvalue args[6];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = primaryCatalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(primaryCatalog)) : 0;
args[1].l = primarySchema.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,primarySchema);
args[2].l = convertwchar_tToJavaString(t.pEnv,primaryTable);
@@ -530,7 +529,7 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getCrossReference(
args[5].l = convertwchar_tToJavaString(t.pEnv,foreignTable);
out = t.pEnv->CallObjectMethod( object, mID, args[0].l,args[2].l,args[2].l,args[3].l,args[4].l,args[5].l );
- // und aufraeumen
+ // and clean up
if(primaryCatalog.hasValue())
t.pEnv->DeleteLocalRef((jstring)args[0].l);
if(args[1].l)
@@ -1432,12 +1431,12 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getUDTs(
static const char * cSignature = "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I)Ljava/sql/ResultSet;";
static const char * cMethodName = "getUDTs";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
jvalue args[4];
- // temporaere Variable initialisieren
+ // initialize temperary Variable
args[0].l = catalog.hasValue() ? convertwchar_tToJavaString(t.pEnv,comphelper::getString(catalog)) : 0;
args[1].l = schemaPattern.toChar() == '%' ? NULL : convertwchar_tToJavaString(t.pEnv,schemaPattern);
args[2].l = convertwchar_tToJavaString(t.pEnv,typeNamePattern);
diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx
index 24c4a7e..bb4e771 100644
--- a/connectivity/source/drivers/jdbc/Date.cxx
+++ b/connectivity/source/drivers/jdbc/Date.cxx
@@ -43,7 +43,7 @@ java_util_Date::~java_util_Date()
jclass java_util_Date::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/util/Date");
return theClass;
diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
index 6c8f028..14a67b7 100644
--- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
@@ -52,7 +52,7 @@ java_sql_DriverPropertyInfo::~java_sql_DriverPropertyInfo()
// --------------------------------------------------------------------------------
jclass java_sql_DriverPropertyInfo::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/DriverPropertyInfo");
return theClass;
diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx
index 682c01a..aa3cd87 100644
--- a/connectivity/source/drivers/jdbc/Exception.cxx
+++ b/connectivity/source/drivers/jdbc/Exception.cxx
@@ -41,7 +41,7 @@ java_lang_Exception::~java_lang_Exception()
jclass java_lang_Exception::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/lang/Exception");
return theClass;
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx
index d1741c7..254aa2d 100644
--- a/connectivity/source/drivers/jdbc/InputStream.cxx
+++ b/connectivity/source/drivers/jdbc/InputStream.cxx
@@ -51,7 +51,7 @@ java_io_InputStream::~java_io_InputStream()
jclass java_io_InputStream::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/io/InputStream");
return theClass;
@@ -92,7 +92,7 @@ sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequen
jbyteArray pByteArray = t.pEnv->NewByteArray(nBytesToRead);
static const char * cSignature = "([BII)I";
static const char * cMethodName = "read";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallIntMethod( object, mID, pByteArray, 0, nBytesToRead );
diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
index 8145138..c331781 100644
--- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx
+++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
@@ -43,7 +43,7 @@ java_math_BigDecimal::~java_math_BigDecimal()
jclass java_math_BigDecimal::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/math/BigDecimal");
return theClass;
@@ -54,8 +54,8 @@ java_math_BigDecimal::java_math_BigDecimal( const ::rtl::OUString& _par0 ): java
SDBThreadAttach t;
if( !t.pEnv )
return;
- // Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // dismiss Java-Call for the Constructor
+ // initialize temperary Variable
static const char * cSignature = "(Ljava/lang/String;)V";
jobject tempObj;
static jmethodID mID(NULL);
@@ -67,7 +67,7 @@ java_math_BigDecimal::java_math_BigDecimal( const ::rtl::OUString& _par0 ): java
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
ThrowSQLException( t.pEnv, NULL );
- // und aufraeumen
+ // and cleanup
}
java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, (jobject)NULL )
@@ -76,7 +76,7 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj
if( !t.pEnv )
return;
// Java-Call fuer den Konstruktor absetzen
- // temporaere Variable initialisieren
+ // dismiss Java-Call for the Constructor
static const char * cSignature = "(D)V";
jobject tempObj;
static jmethodID mID(NULL);
@@ -85,7 +85,7 @@ java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Obj
saveRef( t.pEnv, tempObj );
t.pEnv->DeleteLocalRef( tempObj );
ThrowSQLException( t.pEnv, NULL );
- // und aufraeumen
+ // and cleanup
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index a8ed19c..27e6a79 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -325,7 +325,7 @@ void java_sql_Connection::disposing()
// -------------------------------------------------------------------------
jclass java_sql_Connection::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Connection");
return theClass;
@@ -428,7 +428,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL java_sql_Connecti
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
/*jobject out = */callObjectMethod(t.pEnv,"getTypeMap","()Ljava/util/Map;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return 0;// ? 0 : Map2XNameAccess( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -545,13 +545,13 @@ Reference< XPreparedStatement > SAL_CALL java_sql_Connection::prepareCall( const
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- // temporaere Variable initialisieren
+ // initialise temperary Variable
static const char * cSignature = "(Ljava/lang/String;)Ljava/lang/String;";
static const char * cMethodName = "nativeSQL";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // Convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,sql));
jobject out = t.pEnv->CallObjectMethod( object, mID, str.get() );
@@ -578,7 +578,7 @@ Any SAL_CALL java_sql_Connection::getWarnings( ) throw(SQLException, RuntimeExc
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base(t.pEnv, out);
@@ -819,17 +819,17 @@ sal_Bool java_sql_Connection::construct(const ::rtl::OUString& url,
if ( t.pEnv && m_Driver_theClass && m_pDriverobject )
{
- // temporaere Variable initialisieren
+ // initialize temperary Variable
static const char * cSignature = "(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;";
static const char * cMethodName = "connect";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID = NULL;
if ( !mID )
mID = t.pEnv->GetMethodID( m_Driver_theClass, cMethodName, cSignature );
if ( mID )
{
jvalue args[2];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(t.pEnv,url);
java_util_Properties* pProps = createStringPropertyArray(info);
args[1].l = pProps->getJavaObject();
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index bde7622..96d17f1 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -109,7 +109,7 @@ void SAL_CALL OStatement_BASE2::disposing()
// -------------------------------------------------------------------------
jclass java_sql_Statement_Base::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Statement");
return theClass;
@@ -163,7 +163,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::getGeneratedValues( )
jobject out(0);
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary Variable
try
{
static jmethodID mID(NULL);
@@ -240,13 +240,13 @@ sal_Bool SAL_CALL java_sql_Statement_Base::execute( const ::rtl::OUString& sql )
{
createStatement(t.pEnv);
m_sSqlStatement = sql;
- // temporaere Variable initialisieren
+ // initialize temperary Variable
static const char * cSignature = "(Ljava/lang/String;)Z";
static const char * cMethodName = "execute";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
{
jdbc::ContextClassLoaderScope ccl( t.env(),
@@ -275,13 +275,13 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const ::
{
createStatement(t.pEnv);
m_sSqlStatement = sql;
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(Ljava/lang/String;)Ljava/sql/ResultSet;";
static const char * cMethodName = "executeQuery";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
{
jdbc::ContextClassLoaderScope ccl( t.env(),
@@ -294,7 +294,7 @@ Reference< XResultSet > SAL_CALL java_sql_Statement_Base::executeQuery( const ::
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
}
} //t.pEnv
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
// -------------------------------------------------------------------------
@@ -368,7 +368,7 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL java_sql_Statement_Base
static jmethodID mID(NULL);
jobject out = callResultSetMethod(t.env(),"getResultSet",mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_ResultSet( t.pEnv, out, m_aLogger, *m_pConnection,this );
}
// -------------------------------------------------------------------------
@@ -398,7 +398,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd
createStatement(t.pEnv);
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
@@ -758,7 +758,7 @@ java_sql_Statement::~java_sql_Statement()
jclass java_sql_Statement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Statement");
return theClass;
@@ -771,10 +771,10 @@ void java_sql_Statement::createStatement(JNIEnv* _pEnv)
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
if( _pEnv && !object ){
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(II)Ljava/sql/Statement;";
static const char * cMethodName = "createStatement";
- // Java-Call absetzen
+ // dismiss Java-Call
jobject out = NULL;
static jmethodID mID(NULL);
if ( !mID )
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index 811c2e5..228c1fe 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -104,7 +104,7 @@ void SDBThreadAttach::releaseRef()
}
}
// -----------------------------------------------------------------------------
-// statische Variablen der Klasse:
+// static variables of the class
jclass java_lang_Object::theClass = 0;
jclass java_lang_Object::getMyClass() const
@@ -113,14 +113,14 @@ jclass java_lang_Object::getMyClass() const
theClass = findMyClass("java/lang/Object");
return theClass;
}
-// der eigentliche Konstruktor
+// the actual constructor
java_lang_Object::java_lang_Object(const Reference<XMultiServiceFactory >& _rxFactory)
: m_xFactory(_rxFactory),object( 0 )
{
SDBThreadAttach::addRef();
}
-// der protected-Konstruktor fuer abgeleitete Klassen
+// the protected-constructor for the derrived classes
java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj )
: object( NULL )
{
@@ -155,7 +155,7 @@ void java_lang_Object::clearObject()
clearObject(*t.pEnv);
}
}
-// der protected-Konstruktor fuer abgeleitete Klassen
+// the protected-constructor for the derrived classes
void java_lang_Object::saveRef( JNIEnv * pXEnv, jobject myObj )
{
OSL_ENSURE( myObj, "object in c++ -> Java Wrapper" );
@@ -412,7 +412,7 @@ sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName
// -----------------------------------------------------------------------------
jclass java_lang_Object::findMyClass(const char* _pClassName)
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
SDBThreadAttach t;
jclass tempClass = t.pEnv->FindClass(_pClassName); OSL_ENSURE(tempClass,"Java : FindClass nicht erfolgreich!");
if(!tempClass)
diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
index 21092d5..44e62c5 100644
--- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx
+++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx
@@ -73,7 +73,7 @@ java_sql_PreparedStatement::~java_sql_PreparedStatement()
jclass java_sql_PreparedStatement::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/PreparedStatement");
return theClass;
@@ -129,16 +129,16 @@ void SAL_CALL java_sql_PreparedStatement::setString( sal_Int32 parameterIndex, c
m_aLogger.log( LogLevel::FINER, STR_LOG_STRING_PARAMETER, parameterIndex, x );
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
- { // temporaere Variable initialisieren
+ { // initialize temperary Variable
createStatement(t.pEnv);
static const char * cSignature = "(ILjava/lang/String;)V";
static const char * cMethodName = "setString";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
t.pEnv->CallVoidMethod( object, mID, parameterIndex,str.get());
- // und aufraeumen
+ // and clean up
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
} //t.pEnv
}
@@ -332,10 +332,10 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary Variable
static const char * cSignature = "(ILjava/lang/Object;II)V";
static const char * cMethodName = "setObject";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
@@ -375,7 +375,7 @@ void SAL_CALL java_sql_PreparedStatement::setObjectWithInfo( sal_Int32 parameter
t.pEnv->CallVoidMethod( object, mID, parameterIndex,obj,targetSqlType,scale);
t.pEnv->DeleteLocalRef(obj);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- // und aufraeumen
+ // and clean up
} //mID
} //t.pEnv
}
@@ -430,10 +430,10 @@ void SAL_CALL java_sql_PreparedStatement::setBytes( sal_Int32 parameterIndex, co
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary Variable
static const char * cSignature = "(I[B)V";
static const char * cMethodName = "setBytes";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
jbyteArray pByteArray = t.pEnv->NewByteArray(x.getLength());
@@ -455,10 +455,10 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setCharacterStream";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
Sequence< sal_Int8 > aSeq;
@@ -472,9 +472,9 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
args2[0].l = pByteArray;
args2[1].i = 0;
args2[2].i = actualLength;
- // temporaere Variable initialisieren
+ // initialize temperary variable
const char * cSignatureStream = "([BII)V";
- // Java-Call absetzen
+ // dismiss Java-Call
jclass aClass = t.pEnv->FindClass("java/io/CharArrayInputStream");
static jmethodID mID2 = NULL;
if ( !mID2 )
@@ -484,7 +484,7 @@ void SAL_CALL java_sql_PreparedStatement::setCharacterStream( sal_Int32 paramete
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,actualLength);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(pByteArray);
t.pEnv->DeleteLocalRef(tempObj);
t.pEnv->DeleteLocalRef(aClass);
@@ -502,10 +502,10 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
createStatement(t.pEnv);
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(ILjava/io/InputStream;I)V";
static const char * cMethodName = "setBinaryStream";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
{
@@ -521,9 +521,9 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
args2[1].i = 0;
args2[2].i = (sal_Int32)actualLength;
- // temporaere Variable initialisieren
+ // initialize temperary variable
const char * cSignatureStream = "([BII)V";
- // Java-Call absetzen
+ // dismiss Java-Call
jclass aClass = t.pEnv->FindClass("java/io/ByteArrayInputStream");
static jmethodID mID2 = NULL;
if ( !mID2 )
@@ -532,7 +532,7 @@ void SAL_CALL java_sql_PreparedStatement::setBinaryStream( sal_Int32 parameterIn
if(mID2)
tempObj = t.pEnv->NewObjectA( aClass, mID2, args2 );
t.pEnv->CallVoidMethod( object, mID, parameterIndex,tempObj,(sal_Int32)actualLength);
- // und aufraeumen
+ // and clean up
t.pEnv->DeleteLocalRef(pByteArray);
t.pEnv->DeleteLocalRef(tempObj);
t.pEnv->DeleteLocalRef(aClass);
@@ -630,14 +630,14 @@ void java_sql_PreparedStatement::createStatement(JNIEnv* _pEnv)
checkDisposed(java_sql_Statement_BASE::rBHelper.bDisposed);
if( !object && _pEnv ){
- // temporaere Variable initialisieren
+ // initialize temperary variable
static const char * cSignature = "(Ljava/lang/String;II)Ljava/sql/PreparedStatement;";
static const char * cMethodName = "prepareStatement";
jvalue args[1];
- // Parameter konvertieren
+ // convert Parameter
args[0].l = convertwchar_tToJavaString(_pEnv,m_sSqlStatement);
- // Java-Call absetzen
+ // dismiss Java-Call
jobject out = NULL;
static jmethodID mID(NULL);
if ( !mID )
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index 6bf9bf9..5f0114b 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -49,7 +49,7 @@ java_io_Reader::~java_io_Reader()
jclass java_io_Reader::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/io/Reader");
return theClass;
@@ -74,7 +74,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::Not
{
static const char * cSignature = "()Z";
static const char * cMethodName = "available";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallBooleanMethod( object, mID);
@@ -99,7 +99,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( ::com::sun::star::uno::Sequence< s
jcharArray pCharArray = t.pEnv->NewCharArray(nBytesToRead);
static const char * cSignature = "([CII)I";
static const char * cMethodName = "read";
- // Java-Call absetzen
+ // dismiss Java-Call
static jmethodID mID(NULL);
obtainMethodId(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallIntMethod( object, mID, pCharArray, 0, nBytesToRead );
diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx
index 82a4aa4..9194e21 100644
--- a/connectivity/source/drivers/jdbc/Ref.cxx
+++ b/connectivity/source/drivers/jdbc/Ref.cxx
@@ -48,7 +48,7 @@ java_sql_Ref::~java_sql_Ref()
jclass java_sql_Ref::getMyClass() const
{
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/Ref");
return theClass;
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 91a67cd..a39cb92 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -104,7 +104,7 @@ java_sql_ResultSet::~java_sql_ResultSet()
jclass java_sql_ResultSet::getMyClass() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "jdbc", "Ocke.Janssen at sun.com", "java_sql_ResultSet::getMyClass" );
- // die Klasse muss nur einmal geholt werden, daher statisch
+ // the class must be fetched once, after that static
if( !theClass )
theClass = findMyClass("java/sql/ResultSet");
return theClass;
@@ -161,7 +161,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBinaryStream","(I)Ljava/io/InputStream;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_InputStream( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -172,7 +172,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL java_sql_ResultSet::get
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getCharacterStream","(I)Ljava/io/Reader;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_io_Reader( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -218,7 +218,7 @@ Sequence< sal_Int8 > SAL_CALL java_sql_ResultSet::getBytes( sal_Int32 columnInde
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getDate","(I)Ljava/sql/Date;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Date> (java_sql_Date( t.pEnv, out )) : ::com::sun::star::util::Date();
}
// -------------------------------------------------------------------------
@@ -283,7 +283,7 @@ Reference< XArray > SAL_CALL java_sql_ResultSet::getArray( sal_Int32 columnIndex
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getArray","(I)Ljava/sql/Array;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Array( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -294,7 +294,7 @@ Reference< XClob > SAL_CALL java_sql_ResultSet::getClob( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getClob","(I)Ljava/sql/Clob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Clob( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -304,7 +304,7 @@ Reference< XBlob > SAL_CALL java_sql_ResultSet::getBlob( sal_Int32 columnIndex )
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getBlob","(I)Ljava/sql/Blob;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Blob( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -316,7 +316,7 @@ Reference< XRef > SAL_CALL java_sql_ResultSet::getRef( sal_Int32 columnIndex ) t
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getRef","(I)Ljava/sql/Ref;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out==0 ? 0 : new java_sql_Ref( t.pEnv, out );
}
// -------------------------------------------------------------------------
@@ -329,11 +329,11 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
jvalue args[2];
- // Parameter konvertieren
+ // convert Parameter
args[0].i = (sal_Int32)columnIndex;
args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary Variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -346,7 +346,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
out = t.pEnv->CallObjectMethodA( object, mID, args);
t.pEnv->DeleteLocalRef((jstring)args[1].l);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
- // und aufraeumen
+ // and clean up
if ( out )
{
if ( t.pEnv->IsInstanceOf(out,java_lang_String::st_getMyClass()) )
@@ -408,7 +408,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTime","(I)Ljava/sql/Time;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::Time> (java_sql_Time( t.pEnv, out )) : ::com::sun::star::util::Time();
}
// -------------------------------------------------------------------------
@@ -420,7 +420,7 @@ sal_Int16 SAL_CALL java_sql_ResultSet::getShort( sal_Int32 columnIndex ) throw(S
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
static jmethodID mID(NULL);
jobject out = callObjectMethodWithIntArg(t.pEnv,"getTimestamp","(I)Ljava/sql/Timestamp;", mID, columnIndex);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
return out ? static_cast <com::sun::star::util::DateTime> (java_sql_Timestamp( t.pEnv, out )) : ::com::sun::star::util::DateTime();
}
// -------------------------------------------------------------------------
@@ -578,7 +578,7 @@ void SAL_CALL java_sql_ResultSet::clearWarnings( ) throw(::com::sun::star::sdbc
SDBThreadAttach t;
static jmethodID mID(NULL);
jobject out = callObjectMethod(t.pEnv,"getWarnings","()Ljava/sql/SQLWarning;", mID);
- // ACHTUNG: der Aufrufer wird Eigentuemer des zurueckgelieferten Zeigers !!!
+ // WARNING: the caller becomes the owner of the returned pointer
if( out )
{
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
@@ -706,8 +706,8 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -718,7 +718,7 @@ void SAL_CALL java_sql_ResultSet::updateString( sal_Int32 columnIndex, const ::r
}
{
- // Parameter konvertieren
+ // convert Parameter
jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,x));
t.pEnv->CallVoidMethod( object, mID,columnIndex,str.get());
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -733,8 +733,8 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -747,7 +747,7 @@ void SAL_CALL java_sql_ResultSet::updateBytes( sal_Int32 columnIndex, const ::co
{
jbyteArray aArray = t.pEnv->NewByteArray(x.getLength());
t.pEnv->SetByteArrayRegion(aArray,0,x.getLength(),(jbyte*)x.getConstArray());
- // Parameter konvertieren
+ // convert Parameter
t.pEnv->CallVoidMethod( object, mID,columnIndex,aArray);
t.pEnv->DeleteLocalRef(aArray);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -791,8 +791,8 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -802,7 +802,7 @@ void SAL_CALL java_sql_ResultSet::updateBinaryStream( sal_Int32 columnIndex, con
}
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = createByteInputStream(x,length);
t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -823,8 +823,8 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex,
SDBThreadAttach t;
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -834,7 +834,7 @@ void SAL_CALL java_sql_ResultSet::updateCharacterStream( sal_Int32 columnIndex,
}
{
- // Parameter konvertieren
+ // convert Parameter
jobject obj = createCharArrayReader(x,length);
t.pEnv->CallVoidMethod( object, mID, columnIndex,obj,length);
ThrowLoggedSQLException( m_aLogger, t.pEnv, *this );
@@ -872,8 +872,8 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
{
- // temporaere Variable initialisieren
- // Java-Call absetzen
+ // initialize temperary variable
+ // dismiss Java-Call
static jmethodID mID(NULL);
if ( !mID )
{
@@ -884,7 +884,7 @@ void SAL_CALL java_sql_ResultSet::updateNumericObject( sal_Int32 columnIndex, co
}
{
- // Parameter konvertieren
+ // convert Parameter
double nTemp = 0.0;
::std::auto_ptr<java_math_BigDecimal> pBigDecimal;
if ( x >>= nTemp)
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index aed850b..5f0f65b 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -345,7 +345,7 @@ void DicList::SearchForDictionaries(
if(!::IsVers2OrNewer( aURL, nLang, bNeg ))
{
- // Wenn kein
+ // When no
xub_StrLen nPos = aURL.Search('.');
String aExt(aURL.Copy(nPos + 1));
aExt.ToLowerAscii();
@@ -358,9 +358,8 @@ void DicList::SearchForDictionaries(
continue; // andere Files
}
- // Aufnehmen in die Liste der Dictionaries
- // Wenn existent nicht aufnehmen
- //
+ // Record in the list of Dictoinaries
+ // When it already exists don't record
INT16 nSystemLanguage = MsLangId::getSystemLanguage();
String aTmp1 = ToLower( aURL, nSystemLanguage );
xub_StrLen nPos = aTmp1.SearchBackward( '/' );
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 3dc77cb..33809cb 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -89,7 +89,7 @@ public:
Time aTimeNow;
Date aRefDate( 1,1,1900 );
long nDiffDays = (long)(aDateNow - aRefDate);
- nDiffDays += 2; // Anpassung VisualBasic: 1.Jan.1900 == 2
+ nDiffDays += 2; // Change VisualBasic: 1.Jan.1900 == 2
long nDiffSeconds = aTimeNow.GetHour() * 3600 + aTimeNow.GetMin() * 60 + aTimeNow.GetSec();
return (double)nDiffDays + ((double)nDiffSeconds)/(double)(24*3600);
--
1.7.0.4
--------------020701090603060800040005--
More information about the LibreOffice
mailing list