Kaydet (Commit) f4c300ea authored tarafından Matteo Casalin's avatar Matteo Casalin

Reduce scope by early bail out

Change-Id: Ia4e1763cc4d70197342be4e5caf6d5c14cd34c80
üst b2e6bb75
......@@ -372,15 +372,14 @@ void OWizTypeSelectList::dispose()
bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
{
const sal_Int32 nCount = GetSelectEntryCount();
sal_Int32 j;
for( j = 0; m_bPKey && j < nCount; ++j )
for( sal_Int32 j = 0; m_bPKey && j < nCount; ++j )
{
OFieldDescription* pField = static_cast<OFieldDescription*>(GetEntryData(GetSelectEntryPos(j)));
if(!pField || pField->getTypeInfo()->nSearchType == ColumnSearch::NONE)
break;
return true;
}
return j == nCount;
return false;
}
void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr, sal_uInt16 _nPos, bool _bSet)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment