Kaydet (Commit) 93c73174 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS dba30beta (1.11.14); FILE MERGED

2008/04/21 10:00:36 oj 1.11.14.1: #i88524# check index
üst 1d6b0179
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmlprmap.cxx,v $
* $Revision: 1.11 $
* $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
......@@ -177,17 +177,20 @@ const sal_Int32 XMLPropertySetMapper::GetEntryIndex(
sal_Int32 nEntries = GetEntryCount();
sal_Int32 nIndex= nStartAt == - 1? 0 : nStartAt+1;
do
if ( nEntries )
{
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( (!nPropType || nPropType == rEntry.GetPropType()) &&
rEntry.nXMLNameSpace == nNamespace &&
rStrName == rEntry.sXMLAttributeName )
return nIndex;
else
nIndex++;
} while( nIndex<nEntries );
do
{
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( (!nPropType || nPropType == rEntry.GetPropType()) &&
rEntry.nXMLNameSpace == nNamespace &&
rStrName == rEntry.sXMLAttributeName )
return nIndex;
else
nIndex++;
} while( nIndex<nEntries );
}
return -1;
}
......@@ -220,17 +223,20 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex(
sal_Int32 XMLPropertySetMapper::FindEntryIndex( const sal_Int16 nContextId ) const
{
sal_Int32 nIndex = 0;
sal_Int32 nEntries = GetEntryCount();
const sal_Int32 nEntries = GetEntryCount();
do
if ( nEntries )
{
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( rEntry.nContextId == nContextId )
return nIndex;
else
nIndex++;
do
{
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( rEntry.nContextId == nContextId )
return nIndex;
else
nIndex++;
} while( nIndex < nEntries );
} while( nIndex < nEntries );
}
return -1;
}
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