equal
deleted
inserted
replaced
425 // |
425 // |
426 EXPORT_C void MPXDbCommonUtil::FillInSupportedUIDsL( |
426 EXPORT_C void MPXDbCommonUtil::FillInSupportedUIDsL( |
427 const TArray<TMPXAttribute>& aAttrs, |
427 const TArray<TMPXAttribute>& aAttrs, |
428 RArray<TInt>& aSupportedIds) |
428 RArray<TInt>& aSupportedIds) |
429 { |
429 { |
|
430 CleanupClosePushL(aSupportedIds); |
430 MPX_FUNC("MPXDbCommonUtil::FillInSupportedUIDs"); |
431 MPX_FUNC("MPXDbCommonUtil::FillInSupportedUIDs"); |
431 |
432 |
432 TInt attrCount(aAttrs.Count()); |
433 TInt attrCount(aAttrs.Count()); |
433 for (TInt i = 0; i < attrCount; ++i) |
434 for (TInt i = 0; i < attrCount; ++i) |
434 { |
435 { |
455 else |
456 else |
456 { |
457 { |
457 // ignore attribute |
458 // ignore attribute |
458 } |
459 } |
459 } |
460 } |
|
461 CleanupStack::Pop(); |
460 } |
462 } |
461 |
463 |
462 // ---------------------------------------------------------------------------- |
464 // ---------------------------------------------------------------------------- |
463 // Fill in change event message with the given info |
465 // Fill in change event message with the given info |
464 // ---------------------------------------------------------------------------- |
466 // ---------------------------------------------------------------------------- |
599 const TDesC& aString) |
601 const TDesC& aString) |
600 { |
602 { |
601 MPX_FUNC("MPXDbCommonUtil::ProcessSingleQuotesLC"); |
603 MPX_FUNC("MPXDbCommonUtil::ProcessSingleQuotesLC"); |
602 |
604 |
603 // reserve space for all single quotes (double the size) |
605 // reserve space for all single quotes (double the size) |
|
606 // coverity[incorrect_multiplication] |
|
607 // coverity[buffer_alloc] |
604 HBufC* value = HBufC::NewLC(aString.Length() * 2); |
608 HBufC* value = HBufC::NewLC(aString.Length() * 2); |
605 TPtr valuePtr(value->Des()); |
609 TPtr valuePtr(value->Des()); |
606 |
610 |
607 MPXDbCommonUtil::FindAndReplaceSingleQuote(aString, valuePtr); |
611 MPXDbCommonUtil::FindAndReplaceSingleQuote(aString, valuePtr); |
608 |
612 |
625 MPX_FUNC("MPXDbCommonUtil::ProcessPatternCharsLC"); |
629 MPX_FUNC("MPXDbCommonUtil::ProcessPatternCharsLC"); |
626 |
630 |
627 // reserve space for all percentage signs (triple the size because % should |
631 // reserve space for all percentage signs (triple the size because % should |
628 // be replaced by %%) |
632 // be replaced by %%) |
629 TInt srcLen(aString.Length()); |
633 TInt srcLen(aString.Length()); |
|
634 // coverity[incorrect_multiplication] |
|
635 // coverity[buffer_alloc] |
630 HBufC* targetString = HBufC::NewLC(aString.Length() * 3); |
636 HBufC* targetString = HBufC::NewLC(aString.Length() * 3); |
631 TPtr targetStringPtr(targetString->Des()); |
637 TPtr targetStringPtr(targetString->Des()); |
632 |
638 |
633 TPtrC ch; |
639 TPtrC ch; |
634 for (TInt i = 0; i < srcLen; ++i) |
640 for (TInt i = 0; i < srcLen; ++i) |