Kaydet (Commit) 849d5d99 authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Noel Grandin

tdf#96099 Remove some trivial std::vector typedefs in sc

Change-Id: Ie54a5ba0af989eabc71781674180a042f4be8bdb
Reviewed-on: https://gerrit.libreoffice.org/55949
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 817e3054
...@@ -277,8 +277,7 @@ ScfPropSetHelper::ScfPropSetHelper( const sal_Char* const* ppcPropNames ) : ...@@ -277,8 +277,7 @@ ScfPropSetHelper::ScfPropSetHelper( const sal_Char* const* ppcPropNames ) :
// create OUStrings from ASCII property names // create OUStrings from ASCII property names
typedef ::std::pair< OUString, size_t > IndexedOUString; typedef ::std::pair< OUString, size_t > IndexedOUString;
typedef ::std::vector< IndexedOUString > IndexedOUStringVec; std::vector<IndexedOUString> aPropNameVec;
IndexedOUStringVec aPropNameVec;
for( size_t nVecIdx = 0; *ppcPropNames; ++ppcPropNames, ++nVecIdx ) for( size_t nVecIdx = 0; *ppcPropNames; ++ppcPropNames, ++nVecIdx )
{ {
OUString aPropName = OUString::createFromAscii( *ppcPropNames ); OUString aPropName = OUString::createFromAscii( *ppcPropNames );
...@@ -296,8 +295,8 @@ ScfPropSetHelper::ScfPropSetHelper( const sal_Char* const* ppcPropNames ) : ...@@ -296,8 +295,8 @@ ScfPropSetHelper::ScfPropSetHelper( const sal_Char* const* ppcPropNames ) :
// fill the property name sequence and store original sort order // fill the property name sequence and store original sort order
sal_Int32 nSeqIdx = 0; sal_Int32 nSeqIdx = 0;
for( IndexedOUStringVec::const_iterator aIt = aPropNameVec.begin(), for( auto aIt = aPropNameVec.cbegin(), aEnd = aPropNameVec.cend();
aEnd = aPropNameVec.end(); aIt != aEnd; ++aIt, ++nSeqIdx ) aIt != aEnd; ++aIt, ++nSeqIdx )
{ {
maNameSeq[ nSeqIdx ] = aIt->first; maNameSeq[ nSeqIdx ] = aIt->first;
maNameOrder[ aIt->second ] = nSeqIdx; maNameOrder[ aIt->second ] = nSeqIdx;
......
...@@ -97,11 +97,8 @@ private: ...@@ -97,11 +97,8 @@ private:
void addErrorCode( sal_uInt8 nErrorCode, const OUString& rErrorCode ); void addErrorCode( sal_uInt8 nErrorCode, const OUString& rErrorCode );
private: private:
typedef ::std::vector< double > DoubleVector; std::vector<double> maCoeffs; /// Coefficients for unit conversion.
typedef ::std::map< OUString, sal_uInt8 > OoxErrorCodeMap; std::map<OUString, sal_uInt8> maOoxErrCodes; /// Maps error code strings to BIFF error constants.
DoubleVector maCoeffs; /// Coefficients for unit conversion.
OoxErrorCodeMap maOoxErrCodes; /// Maps error code strings to BIFF error constants.
sal_Int32 mnNullDate; /// Nulldate of this workbook (number of days since 0000-01-01). sal_Int32 mnNullDate; /// Nulldate of this workbook (number of days since 0000-01-01).
}; };
......
...@@ -80,9 +80,8 @@ public: ...@@ -80,9 +80,8 @@ public:
private: private:
bool mbEnabled; bool mbEnabled;
typedef ::std::vector< bool > BoolVec;
/** array of flags corresponding to each entry in the XclTracerDetails table. */ /** array of flags corresponding to each entry in the XclTracerDetails table. */
BoolVec maFirstTimes; std::vector<bool> maFirstTimes;
}; };
#endif #endif
......
...@@ -537,11 +537,9 @@ protected: ...@@ -537,11 +537,9 @@ protected:
bool mbSpecialTokens; /// True = special handling for tExp and tTbl tokens, false = exit with error. bool mbSpecialTokens; /// True = special handling for tExp and tTbl tokens, false = exit with error.
private: private:
typedef ::std::vector< size_t > SizeTypeVector;
ApiTokenVector maTokenStorage; /// Raw unordered token storage. ApiTokenVector maTokenStorage; /// Raw unordered token storage.
SizeTypeVector maTokenIndexes; /// Indexes into maTokenStorage. std::vector<size_t> maTokenIndexes; /// Indexes into maTokenStorage.
SizeTypeVector maOperandSizeStack; /// Stack with token sizes per operand. std::vector<size_t> maOperandSizeStack; /// Stack with token sizes per operand.
WhiteSpaceVec maLeadingSpaces; /// List of whitespaces before next token. WhiteSpaceVec maLeadingSpaces; /// List of whitespaces before next token.
WhiteSpaceVec maOpeningSpaces; /// List of whitespaces before opening parenthesis. WhiteSpaceVec maOpeningSpaces; /// List of whitespaces before opening parenthesis.
WhiteSpaceVec maClosingSpaces; /// List of whitespaces before closing parenthesis. WhiteSpaceVec maClosingSpaces; /// List of whitespaces before closing parenthesis.
...@@ -621,7 +619,7 @@ ApiTokenSequence FormulaParserImpl::finalizeImport() ...@@ -621,7 +619,7 @@ ApiTokenSequence FormulaParserImpl::finalizeImport()
if( aTokens.hasElements() ) if( aTokens.hasElements() )
{ {
ApiToken* pToken = aTokens.getArray(); ApiToken* pToken = aTokens.getArray();
for( SizeTypeVector::const_iterator aIt = maTokenIndexes.begin(), aEnd = maTokenIndexes.end(); aIt != aEnd; ++aIt, ++pToken ) for( auto aIt = maTokenIndexes.cbegin(), aEnd = maTokenIndexes.cend(); aIt != aEnd; ++aIt, ++pToken )
*pToken = maTokenStorage[ *aIt ]; *pToken = maTokenStorage[ *aIt ];
} }
return finalizeTokenArray( aTokens ); return finalizeTokenArray( aTokens );
...@@ -716,8 +714,8 @@ ApiToken& FormulaParserImpl::getOperandToken( size_t nOpIndex, size_t nTokenInde ...@@ -716,8 +714,8 @@ ApiToken& FormulaParserImpl::getOperandToken( size_t nOpIndex, size_t nTokenInde
{ {
SAL_WARN_IF( getOperandSize( nOpIndex ) <= nTokenIndex, "sc.filter", SAL_WARN_IF( getOperandSize( nOpIndex ) <= nTokenIndex, "sc.filter",
"FormulaParserImpl::getOperandToken - invalid parameters" ); "FormulaParserImpl::getOperandToken - invalid parameters" );
SizeTypeVector::const_iterator aIndexIt = maTokenIndexes.end(); auto aIndexIt = maTokenIndexes.cend();
for( SizeTypeVector::const_iterator aEnd = maOperandSizeStack.end(), aIt = aEnd - 1 + nOpIndex; aIt != aEnd; ++aIt ) for( auto aEnd = maOperandSizeStack.cend(), aIt = aEnd - 1 + nOpIndex; aIt != aEnd; ++aIt )
aIndexIt -= *aIt; aIndexIt -= *aIt;
return maTokenStorage[ *(aIndexIt + nTokenIndex) ]; return maTokenStorage[ *(aIndexIt + nTokenIndex) ];
} }
......
...@@ -656,12 +656,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie ...@@ -656,12 +656,10 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
if( !xDPGrouping.is() ) return OUString(); if( !xDPGrouping.is() ) return OUString();
// map the group item indexes from maGroupItems to all item indexes from maDiscreteItems // map the group item indexes from maGroupItems to all item indexes from maDiscreteItems
typedef ::std::vector< sal_Int32 > GroupItemList; std::vector< std::vector<sal_Int32> > aItemMap( maGroupItems.size() );
typedef ::std::vector< GroupItemList > GroupItemMap;
GroupItemMap aItemMap( maGroupItems.size() );
for( IndexVector::const_iterator aBeg = maDiscreteItems.begin(), aIt = aBeg, aEnd = maDiscreteItems.end(); aIt != aEnd; ++aIt ) for( IndexVector::const_iterator aBeg = maDiscreteItems.begin(), aIt = aBeg, aEnd = maDiscreteItems.end(); aIt != aEnd; ++aIt )
{ {
if( GroupItemList* pItems = ContainerHelper::getVectorElementAccess( aItemMap, *aIt ) ) if( std::vector<sal_Int32>* pItems = ContainerHelper::getVectorElementAccess( aItemMap, *aIt ) )
{ {
if ( const PivotCacheItem* pItem = rBaseCacheField.getCacheItems().getCacheItem( aIt - aBeg ) ) if ( const PivotCacheItem* pItem = rBaseCacheField.getCacheItems().getCacheItem( aIt - aBeg ) )
{ {
...@@ -675,7 +673,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie ...@@ -675,7 +673,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
// process all groups // process all groups
Reference< XDataPilotField > xDPGroupField; Reference< XDataPilotField > xDPGroupField;
for( GroupItemMap::iterator aBeg = aItemMap.begin(), aIt = aBeg, aEnd = aItemMap.end(); aIt != aEnd; ++aIt ) for( auto aBeg = aItemMap.begin(), aIt = aBeg, aEnd = aItemMap.end(); aIt != aEnd; ++aIt )
{ {
SAL_WARN_IF( aIt->empty(), "sc", "PivotCacheField::createParentGroupField - item/group should not be empty" ); SAL_WARN_IF( aIt->empty(), "sc", "PivotCacheField::createParentGroupField - item/group should not be empty" );
if( !aIt->empty() ) if( !aIt->empty() )
...@@ -688,7 +686,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie ...@@ -688,7 +686,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
names as they are already grouped is used here to resolve the names as they are already grouped is used here to resolve the
item names. */ item names. */
::std::vector< OUString > aMembers; ::std::vector< OUString > aMembers;
for( GroupItemList::iterator aBeg2 = aIt->begin(), aIt2 = aBeg2, aEnd2 = aIt->end(); aIt2 != aEnd2; ++aIt2 ) for( auto aBeg2 = aIt->begin(), aIt2 = aBeg2, aEnd2 = aIt->end(); aIt2 != aEnd2; ++aIt2 )
if( const PivotCacheGroupItem* pName = ContainerHelper::getVectorElement( orItemNames, *aIt2 ) ) if( const PivotCacheGroupItem* pName = ContainerHelper::getVectorElement( orItemNames, *aIt2 ) )
if( ::std::find( aMembers.begin(), aMembers.end(), pName->maGroupName ) == aMembers.end() ) if( ::std::find( aMembers.begin(), aMembers.end(), pName->maGroupName ) == aMembers.end() )
aMembers.push_back( pName->maGroupName ); aMembers.push_back( pName->maGroupName );
...@@ -756,7 +754,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie ...@@ -756,7 +754,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
aPropSet.setProperty( PROP_GroupInfo, aGroupInfo ); aPropSet.setProperty( PROP_GroupInfo, aGroupInfo );
} }
// replace original item names in passed vector with group name // replace original item names in passed vector with group name
for( GroupItemList::iterator aIt2 = aIt->begin(), aEnd2 = aIt->end(); aIt2 != aEnd2; ++aIt2 ) for( auto aIt2 = aIt->begin(), aEnd2 = aIt->end(); aIt2 != aEnd2; ++aIt2 )
if( PivotCacheGroupItem* pName = ContainerHelper::getVectorElementAccess( orItemNames, *aIt2 ) ) if( PivotCacheGroupItem* pName = ContainerHelper::getVectorElementAccess( orItemNames, *aIt2 ) )
pName->maGroupName = aGroupName; pName->maGroupName = aGroupName;
} }
......
...@@ -215,14 +215,14 @@ util::DateTime UnitConverter::calcDateTimeFromSerial( double fSerial ) const ...@@ -215,14 +215,14 @@ util::DateTime UnitConverter::calcDateTimeFromSerial( double fSerial ) const
sal_uInt8 UnitConverter::calcBiffErrorCode( const OUString& rErrorCode ) const sal_uInt8 UnitConverter::calcBiffErrorCode( const OUString& rErrorCode ) const
{ {
OoxErrorCodeMap::const_iterator aIt = maOoxErrCodes.find( rErrorCode ); auto aIt = maOoxErrCodes.find( rErrorCode );
return (aIt == maOoxErrCodes.end()) ? BIFF_ERR_NA : aIt->second; return (aIt == maOoxErrCodes.end()) ? BIFF_ERR_NA : aIt->second;
} }
OUString UnitConverter::calcErrorString( sal_uInt8 nErrorCode ) const OUString UnitConverter::calcErrorString( sal_uInt8 nErrorCode ) const
{ {
OoxErrorCodeMap::const_iterator iFail( maOoxErrCodes.end()); auto iFail( maOoxErrCodes.cend());
for (OoxErrorCodeMap::const_iterator aIt( maOoxErrCodes.begin()); aIt != maOoxErrCodes.end(); ++aIt) for (auto aIt( maOoxErrCodes.cbegin()); aIt != maOoxErrCodes.cend(); ++aIt)
{ {
if (aIt->second == nErrorCode) if (aIt->second == nErrorCode)
return aIt->first; return aIt->first;
......
...@@ -28,7 +28,7 @@ bool ScCsvSplits::Insert( sal_Int32 nPos ) ...@@ -28,7 +28,7 @@ bool ScCsvSplits::Insert( sal_Int32 nPos )
if (nPos < 0) if (nPos < 0)
return false; return false;
const iterator aIter = ::std::lower_bound( maVec.begin(), maVec.end(), nPos ); const auto aIter = ::std::lower_bound( maVec.begin(), maVec.end(), nPos );
if (aIter != maVec.end() && *aIter == nPos) if (aIter != maVec.end() && *aIter == nPos)
return false; return false;
...@@ -70,7 +70,7 @@ bool ScCsvSplits::HasSplit( sal_Int32 nPos ) const ...@@ -70,7 +70,7 @@ bool ScCsvSplits::HasSplit( sal_Int32 nPos ) const
sal_uInt32 ScCsvSplits::GetIndex( sal_Int32 nPos ) const sal_uInt32 ScCsvSplits::GetIndex( sal_Int32 nPos ) const
{ {
const_iterator aIter = ::std::lower_bound( maVec.begin(), maVec.end(), nPos ); auto aIter = ::std::lower_bound( maVec.cbegin(), maVec.cend(), nPos );
return GetIterIndex( ((aIter != maVec.end()) && (*aIter == nPos)) ? aIter : maVec.end() ); return GetIterIndex( ((aIter != maVec.end()) && (*aIter == nPos)) ? aIter : maVec.end() );
} }
......
...@@ -39,15 +39,13 @@ enum ScConflictAction ...@@ -39,15 +39,13 @@ enum ScConflictAction
SC_CONFLICT_ACTION_KEEP_OTHER SC_CONFLICT_ACTION_KEEP_OTHER
}; };
typedef ::std::vector< sal_uLong > ScChangeActionList;
// struct ScConflictsListEntry // struct ScConflictsListEntry
struct ScConflictsListEntry struct ScConflictsListEntry
{ {
ScConflictAction meConflictAction; ScConflictAction meConflictAction;
ScChangeActionList maSharedActions; std::vector<sal_uLong> maSharedActions;
ScChangeActionList maOwnActions; std::vector<sal_uLong> maOwnActions;
bool HasSharedAction( sal_uLong nSharedAction ) const; bool HasSharedAction( sal_uLong nSharedAction ) const;
bool HasOwnAction( sal_uLong nOwnAction ) const; bool HasOwnAction( sal_uLong nOwnAction ) const;
...@@ -60,7 +58,7 @@ typedef ::std::vector< ScConflictsListEntry > ScConflictsList; ...@@ -60,7 +58,7 @@ typedef ::std::vector< ScConflictsListEntry > ScConflictsList;
class ScConflictsListHelper class ScConflictsListHelper
{ {
private: private:
static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap ); static void Transform_Impl( std::vector<sal_uLong>& rActionList, ScChangeActionMergeMap* pMergeMap );
public: public:
static bool HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction ); static bool HasOwnAction( ScConflictsList& rConflictsList, sal_uLong nOwnAction );
...@@ -86,7 +84,7 @@ private: ...@@ -86,7 +84,7 @@ private:
static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 ); static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 );
ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const; ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const;
ScConflictsListEntry* GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions ); ScConflictsListEntry* GetEntry( sal_uLong nSharedAction, const std::vector<sal_uLong>& rOwnActions );
public: public:
ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared, ScConflictsFinder( ScChangeTrack* pTrack, sal_uLong nStartShared, sal_uLong nEndShared,
......
...@@ -34,7 +34,6 @@ class ScCsvSplits ...@@ -34,7 +34,6 @@ class ScCsvSplits
{ {
private: private:
typedef ::std::vector< sal_Int32 > ScSplitVector; typedef ::std::vector< sal_Int32 > ScSplitVector;
typedef ScSplitVector::iterator iterator;
typedef ScSplitVector::const_iterator const_iterator; typedef ScSplitVector::const_iterator const_iterator;
ScSplitVector maVec; /// The split containter. ScSplitVector maVec; /// The split containter.
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const
{ {
ScChangeActionList::const_iterator aEnd = maSharedActions.end(); auto aEnd = maSharedActions.cend();
for ( ScChangeActionList::const_iterator aItr = maSharedActions.begin(); aItr != aEnd; ++aItr ) for ( auto aItr = maSharedActions.cbegin(); aItr != aEnd; ++aItr )
{ {
if ( *aItr == nSharedAction ) if ( *aItr == nSharedAction )
{ {
...@@ -43,8 +43,8 @@ bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const ...@@ -43,8 +43,8 @@ bool ScConflictsListEntry::HasSharedAction( sal_uLong nSharedAction ) const
bool ScConflictsListEntry::HasOwnAction( sal_uLong nOwnAction ) const bool ScConflictsListEntry::HasOwnAction( sal_uLong nOwnAction ) const
{ {
ScChangeActionList::const_iterator aEnd = maOwnActions.end(); auto aEnd = maOwnActions.cend();
for ( ScChangeActionList::const_iterator aItr = maOwnActions.begin(); aItr != aEnd; ++aItr ) for ( auto aItr = maOwnActions.cbegin(); aItr != aEnd; ++aItr )
{ {
if ( *aItr == nOwnAction ) if ( *aItr == nOwnAction )
{ {
...@@ -99,14 +99,14 @@ ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList& ...@@ -99,14 +99,14 @@ ScConflictsListEntry* ScConflictsListHelper::GetOwnActionEntry( ScConflictsList&
return nullptr; return nullptr;
} }
void ScConflictsListHelper::Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap ) void ScConflictsListHelper::Transform_Impl( std::vector<sal_uLong>& rActionList, ScChangeActionMergeMap* pMergeMap )
{ {
if ( !pMergeMap ) if ( !pMergeMap )
{ {
return; return;
} }
for ( ScChangeActionList::iterator aItr = rActionList.begin(); aItr != rActionList.end(); ) for ( auto aItr = rActionList.begin(); aItr != rActionList.end(); )
{ {
ScChangeActionMergeMap::iterator aItrMap = pMergeMap->find( *aItr ); ScChangeActionMergeMap::iterator aItrMap = pMergeMap->find( *aItr );
if ( aItrMap != pMergeMap->end() ) if ( aItrMap != pMergeMap->end() )
...@@ -167,8 +167,8 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct ...@@ -167,8 +167,8 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
ScConflictsList::iterator aEnd = mrConflictsList.end(); ScConflictsList::iterator aEnd = mrConflictsList.end();
for ( ScConflictsList::iterator aItr = mrConflictsList.begin(); aItr != aEnd; ++aItr ) for ( ScConflictsList::iterator aItr = mrConflictsList.begin(); aItr != aEnd; ++aItr )
{ {
ScChangeActionList::const_iterator aEndShared = aItr->maSharedActions.end(); auto aEndShared = aItr->maSharedActions.cend();
for ( ScChangeActionList::const_iterator aItrShared = aItr->maSharedActions.begin(); aItrShared != aEndShared; ++aItrShared ) for ( auto aItrShared = aItr->maSharedActions.cbegin(); aItrShared != aEndShared; ++aItrShared )
{ {
if ( DoActionsIntersect( mpTrack->GetAction( *aItrShared ), pAction ) ) if ( DoActionsIntersect( mpTrack->GetAction( *aItrShared ), pAction ) )
{ {
...@@ -176,8 +176,8 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct ...@@ -176,8 +176,8 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
} }
} }
ScChangeActionList::const_iterator aEndOwn = aItr->maOwnActions.end(); auto aEndOwn = aItr->maOwnActions.cend();
for ( ScChangeActionList::const_iterator aItrOwn = aItr->maOwnActions.begin(); aItrOwn != aEndOwn; ++aItrOwn ) for ( auto aItrOwn = aItr->maOwnActions.cbegin(); aItrOwn != aEndOwn; ++aItrOwn )
{ {
if ( DoActionsIntersect( mpTrack->GetAction( *aItrOwn ), pAction ) ) if ( DoActionsIntersect( mpTrack->GetAction( *aItrOwn ), pAction ) )
{ {
...@@ -189,7 +189,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct ...@@ -189,7 +189,7 @@ ScConflictsListEntry* ScConflictsFinder::GetIntersectingEntry( const ScChangeAct
return nullptr; return nullptr;
} }
ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const ScChangeActionList& rOwnActions ) ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, const std::vector<sal_uLong>& rOwnActions )
{ {
// try to get a list entry which already contains the shared action // try to get a list entry which already contains the shared action
ScConflictsListEntry* pEntry = ScConflictsListHelper::GetSharedActionEntry( mrConflictsList, nSharedAction ); ScConflictsListEntry* pEntry = ScConflictsListHelper::GetSharedActionEntry( mrConflictsList, nSharedAction );
...@@ -209,8 +209,8 @@ ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, cons ...@@ -209,8 +209,8 @@ ScConflictsListEntry* ScConflictsFinder::GetEntry( sal_uLong nSharedAction, cons
// try to get a list entry for which any of the own actions intersects with // try to get a list entry for which any of the own actions intersects with
// any other action of this entry // any other action of this entry
ScChangeActionList::const_iterator aEnd = rOwnActions.end(); auto aEnd = rOwnActions.cend();
for ( ScChangeActionList::const_iterator aItr = rOwnActions.begin(); aItr != aEnd; ++aItr ) for ( auto aItr = rOwnActions.cbegin(); aItr != aEnd; ++aItr )
{ {
pEntry = GetIntersectingEntry( mpTrack->GetAction( *aItr ) ); pEntry = GetIntersectingEntry( mpTrack->GetAction( *aItr ) );
if ( pEntry ) if ( pEntry )
...@@ -239,7 +239,7 @@ bool ScConflictsFinder::Find() ...@@ -239,7 +239,7 @@ bool ScConflictsFinder::Find()
ScChangeAction* pSharedAction = mpTrack->GetAction( mnStartShared ); ScChangeAction* pSharedAction = mpTrack->GetAction( mnStartShared );
while ( pSharedAction && pSharedAction->GetActionNumber() <= mnEndShared ) while ( pSharedAction && pSharedAction->GetActionNumber() <= mnEndShared )
{ {
ScChangeActionList aOwnActions; std::vector<sal_uLong> aOwnActions;
ScChangeAction* pOwnAction = mpTrack->GetAction( mnStartOwn ); ScChangeAction* pOwnAction = mpTrack->GetAction( mnStartOwn );
while ( pOwnAction && pOwnAction->GetActionNumber() <= mnEndOwn ) while ( pOwnAction && pOwnAction->GetActionNumber() <= mnEndOwn )
{ {
...@@ -253,8 +253,8 @@ bool ScConflictsFinder::Find() ...@@ -253,8 +253,8 @@ bool ScConflictsFinder::Find()
if ( aOwnActions.size() ) if ( aOwnActions.size() )
{ {
ScConflictsListEntry* pEntry = GetEntry( pSharedAction->GetActionNumber(), aOwnActions ); ScConflictsListEntry* pEntry = GetEntry( pSharedAction->GetActionNumber(), aOwnActions );
ScChangeActionList::iterator aEnd = aOwnActions.end(); auto aEnd = aOwnActions.end();
for ( ScChangeActionList::iterator aItr = aOwnActions.begin(); aItr != aEnd; ++aItr ) for ( auto aItr = aOwnActions.begin(); aItr != aEnd; ++aItr )
{ {
if ( pEntry && !ScConflictsListHelper::HasOwnAction( mrConflictsList, *aItr ) ) if ( pEntry && !ScConflictsListHelper::HasOwnAction( mrConflictsList, *aItr ) )
{ {
...@@ -674,8 +674,8 @@ void ScConflictsDlg::UpdateView() ...@@ -674,8 +674,8 @@ void ScConflictsDlg::UpdateView()
pRootUserData->pData = static_cast< void* >( pConflictEntry ); pRootUserData->pData = static_cast< void* >( pConflictEntry );
SvTreeListEntry* pRootEntry = m_pLbConflicts->InsertEntry( GetConflictString( *aItr ), pRootUserData ); SvTreeListEntry* pRootEntry = m_pLbConflicts->InsertEntry( GetConflictString( *aItr ), pRootUserData );
ScChangeActionList::const_iterator aEndShared = aItr->maSharedActions.end(); auto aEndShared = aItr->maSharedActions.cend();
for ( ScChangeActionList::const_iterator aItrShared = aItr->maSharedActions.begin(); aItrShared != aEndShared; ++aItrShared ) for ( auto aItrShared = aItr->maSharedActions.cbegin(); aItrShared != aEndShared; ++aItrShared )
{ {
ScChangeAction* pAction = mpSharedTrack ? mpSharedTrack->GetAction(*aItrShared) : nullptr; ScChangeAction* pAction = mpSharedTrack ? mpSharedTrack->GetAction(*aItrShared) : nullptr;
if ( pAction ) if ( pAction )
...@@ -695,8 +695,8 @@ void ScConflictsDlg::UpdateView() ...@@ -695,8 +695,8 @@ void ScConflictsDlg::UpdateView()
} }
} }
ScChangeActionList::const_iterator aEndOwn = aItr->maOwnActions.end(); auto aEndOwn = aItr->maOwnActions.cend();
for ( ScChangeActionList::const_iterator aItrOwn = aItr->maOwnActions.begin(); aItrOwn != aEndOwn; ++aItrOwn ) for ( auto aItrOwn = aItr->maOwnActions.cbegin(); aItrOwn != aEndOwn; ++aItrOwn )
{ {
ScChangeAction* pAction = mpOwnTrack ? mpOwnTrack->GetAction(*aItrOwn) : nullptr; ScChangeAction* pAction = mpOwnTrack ? mpOwnTrack->GetAction(*aItrOwn) : nullptr;
if ( pAction ) if ( pAction )
......
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