summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/dbtools2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/commontools/dbtools2.cxx')
-rw-r--r--connectivity/source/commontools/dbtools2.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 26b60b23933a..38efeea57598 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -116,10 +116,11 @@ OUString createStandardTypePart(const Reference< XPropertySet >& xColProp,const
}
}
- sal_Int32 nIndex = 0;
- if ( !sAutoIncrementValue.isEmpty() && (nIndex = sTypeName.indexOf(sAutoIncrementValue)) != -1 )
+ if ( !sAutoIncrementValue.isEmpty() )
{
- sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,OUString());
+ sal_Int32 nIndex = sTypeName.indexOf(sAutoIncrementValue);
+ if (nIndex != -1)
+ sTypeName = sTypeName.replaceAt(nIndex,sTypeName.getLength() - nIndex,OUString());
}
if ( (nPrecision > 0 || nScale > 0) && bUseLiteral )