translated German comments
Change-Id: Id893ba9e4a145856be1f091293eecbf757fb423d
This commit is contained in:
@@ -512,8 +512,8 @@ void lcl_GetColumnTypes(
|
|||||||
OUString aFieldName;
|
OUString aFieldName;
|
||||||
OUString aString;
|
OUString aString;
|
||||||
|
|
||||||
// Feldname[,Type[,Width[,Prec]]]
|
// Fieldname[,Type[,Width[,Prec]]]
|
||||||
// Typ etc.: L; D; C[,W]; N[,W[,P]]
|
// Type etc.: L; D; C[,W]; N[,W[,P]]
|
||||||
if ( bHasFieldNames )
|
if ( bHasFieldNames )
|
||||||
{
|
{
|
||||||
aString = pDoc->GetString(nCol, nFirstRow, nTab);
|
aString = pDoc->GetString(nCol, nFirstRow, nTab);
|
||||||
@@ -570,11 +570,12 @@ void lcl_GetColumnTypes(
|
|||||||
else
|
else
|
||||||
aFieldName = aString;
|
aFieldName = aString;
|
||||||
|
|
||||||
// Feldnamen pruefen und ggbf. gueltigen Feldnamen erzeugen.
|
// Check field name and generate valid field name if necessary.
|
||||||
// Erstes Zeichen muss Buchstabe sein,
|
// First character has to be alphabetical, subsequent characters
|
||||||
// weitere nur alphanumerisch und Unterstrich erlaubt,
|
// have to be alphanumerical or underscore.
|
||||||
// "_DBASELOCK" ist reserviert (obsolet weil erstes Zeichen kein Buchstabe),
|
// "_DBASELOCK" is reserved (obsolete because first character is
|
||||||
// keine doppelten Namen.
|
// not alphabetical).
|
||||||
|
// No duplicated names.
|
||||||
if ( !IsAsciiAlpha( aFieldName[0] ) )
|
if ( !IsAsciiAlpha( aFieldName[0] ) )
|
||||||
aFieldName = "N" + aFieldName;
|
aFieldName = "N" + aFieldName;
|
||||||
OUString aTmpStr;
|
OUString aTmpStr;
|
||||||
@@ -591,7 +592,7 @@ void lcl_GetColumnTypes(
|
|||||||
aFieldName = aFieldName.copy(0, 10);
|
aFieldName = aFieldName.copy(0, 10);
|
||||||
|
|
||||||
if (!aFieldNames.insert(aFieldName).second)
|
if (!aFieldNames.insert(aFieldName).second)
|
||||||
{ // doppelter Feldname, numerisch erweitern
|
{ // Duplicated field name, append numeric suffix.
|
||||||
sal_uInt16 nSub = 1;
|
sal_uInt16 nSub = 1;
|
||||||
OUString aFixPart( aFieldName );
|
OUString aFixPart( aFieldName );
|
||||||
do
|
do
|
||||||
@@ -611,7 +612,7 @@ void lcl_GetColumnTypes(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !bTypeDefined )
|
if ( !bTypeDefined )
|
||||||
{ // Feldtyp
|
{ // Field type.
|
||||||
ScRefCellValue aCell;
|
ScRefCellValue aCell;
|
||||||
aCell.assign(*pDoc, ScAddress(nCol, nFirstDataRow, nTab));
|
aCell.assign(*pDoc, ScAddress(nCol, nFirstDataRow, nTab));
|
||||||
if (aCell.isEmpty() || aCell.hasString())
|
if (aCell.isEmpty() || aCell.hasString())
|
||||||
@@ -641,31 +642,31 @@ void lcl_GetColumnTypes(
|
|||||||
}
|
}
|
||||||
bool bSdbLenAdjusted = false;
|
bool bSdbLenAdjusted = false;
|
||||||
bool bSdbLenBad = false;
|
bool bSdbLenBad = false;
|
||||||
// Feldlaenge
|
// Field length.
|
||||||
if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen )
|
if ( nDbType == sdbc::DataType::VARCHAR && !nFieldLen )
|
||||||
{ // maximale Feldbreite bestimmen
|
{ // Determine maximum field width.
|
||||||
nFieldLen = pDoc->GetMaxStringLen( nTab, nCol, nFirstDataRow,
|
nFieldLen = pDoc->GetMaxStringLen( nTab, nCol, nFirstDataRow,
|
||||||
nLastRow, eCharSet );
|
nLastRow, eCharSet );
|
||||||
if ( nFieldLen == 0 )
|
if ( nFieldLen == 0 )
|
||||||
nFieldLen = 1;
|
nFieldLen = 1;
|
||||||
}
|
}
|
||||||
else if ( nDbType == sdbc::DataType::DECIMAL )
|
else if ( nDbType == sdbc::DataType::DECIMAL )
|
||||||
{ // maximale Feldbreite und Nachkommastellen bestimmen
|
{ // Determine maximum field width and precision.
|
||||||
sal_Int32 nLen;
|
sal_Int32 nLen;
|
||||||
sal_uInt16 nPrec;
|
sal_uInt16 nPrec;
|
||||||
nLen = pDoc->GetMaxNumberStringLen( nPrec, nTab, nCol,
|
nLen = pDoc->GetMaxNumberStringLen( nPrec, nTab, nCol,
|
||||||
nFirstDataRow, nLastRow );
|
nFirstDataRow, nLastRow );
|
||||||
// dBaseIII Limit Nachkommastellen: 15
|
// dBaseIII precision limit: 15
|
||||||
if ( nPrecision > 15 )
|
if ( nPrecision > 15 )
|
||||||
nPrecision = 15;
|
nPrecision = 15;
|
||||||
if ( nPrec > 15 )
|
if ( nPrec > 15 )
|
||||||
nPrec = 15;
|
nPrec = 15;
|
||||||
if ( bPrecDefined && nPrecision != nPrec )
|
if ( bPrecDefined && nPrecision != nPrec )
|
||||||
{ // Laenge auf vorgegebene Nachkommastellen anpassen
|
{ // Adjust length to predefined precision.
|
||||||
if ( nPrecision )
|
if ( nPrecision )
|
||||||
nLen = nLen + ( nPrecision - nPrec );
|
nLen = nLen + ( nPrecision - nPrec );
|
||||||
else
|
else
|
||||||
nLen -= nPrec+1; // auch den . mit raus
|
nLen -= nPrec+1; // also remove the decimal separator
|
||||||
}
|
}
|
||||||
if ( nLen > nFieldLen && !bTypeDefined )
|
if ( nLen > nFieldLen && !bTypeDefined )
|
||||||
nFieldLen = nLen;
|
nFieldLen = nLen;
|
||||||
@@ -674,7 +675,7 @@ void lcl_GetColumnTypes(
|
|||||||
if ( nFieldLen == 0 )
|
if ( nFieldLen == 0 )
|
||||||
nFieldLen = 1;
|
nFieldLen = 1;
|
||||||
else if ( nFieldLen > 19 )
|
else if ( nFieldLen > 19 )
|
||||||
nFieldLen = 19; // dBaseIII Limit Feldlaenge numerisch: 19
|
nFieldLen = 19; // dBaseIII numeric field length limit: 19
|
||||||
if ( nPrecision && nFieldLen < nPrecision + 2 )
|
if ( nPrecision && nFieldLen < nPrecision + 2 )
|
||||||
nFieldLen = nPrecision + 2; // 0. muss mit reinpassen
|
nFieldLen = nPrecision + 2; // 0. muss mit reinpassen
|
||||||
// 538 MUST: Sdb internal representation adds 2 to the field length!
|
// 538 MUST: Sdb internal representation adds 2 to the field length!
|
||||||
@@ -689,13 +690,13 @@ void lcl_GetColumnTypes(
|
|||||||
if ( nFieldLen > 254 )
|
if ( nFieldLen > 254 )
|
||||||
{
|
{
|
||||||
if ( nDbType == sdbc::DataType::VARCHAR )
|
if ( nDbType == sdbc::DataType::VARCHAR )
|
||||||
{ // zu lang fuer normales Textfeld => Memofeld
|
{ // Too long for a normal text field => memo field.
|
||||||
nDbType = sdbc::DataType::LONGVARCHAR;
|
nDbType = sdbc::DataType::LONGVARCHAR;
|
||||||
nFieldLen = 10;
|
nFieldLen = 10;
|
||||||
bHasMemo = true;
|
bHasMemo = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nFieldLen = 254; // dumm gelaufen..
|
nFieldLen = 254; // bad luck..
|
||||||
}
|
}
|
||||||
|
|
||||||
pColNames[nField] = aFieldName;
|
pColNames[nField] = aFieldName;
|
||||||
|
Reference in New Issue
Block a user