--- a/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp Tue Jul 06 14:37:10 2010 +0300
+++ b/contentstorage/casrv/calocalizerscanner/src/calocalizerscannerproxy.cpp Wed Aug 18 10:05:49 2010 +0300
@@ -19,7 +19,6 @@
#include <f32file.h>
#include <qtranslator.h>
#include <calocalizationentry.h>
-#include <QLocale>
#include <hbtextresolversymbian.h>
//#include "cainternaltypes.h"
@@ -138,12 +137,19 @@
localizedName = GetLocalizedNameLC( locals[i] );
if( locals[i]->GetAttributeName().Compare( KColumnEnText) == 0
- && !localizedName->Compare(
- GetEntryText( entries, locals[i]->GetRowId() ) ) == 0
+ && localizedName->Compare(
+ GetEntryText( entries, locals[i]->GetRowId() ) ) != 0
||
locals[i]->GetAttributeName().Compare( KColumnEnDescription) == 0
- && !localizedName->Compare(
- GetEntryDescription( entries, locals[i]->GetRowId() ) ) == 0 )
+ && localizedName->Compare(
+ GetEntryDescription( entries, locals[i]->GetRowId() ) ) != 0
+ ||
+ ( locals[i]->GetAttributeName().Compare( KShortName ) == 0
+ || locals[i]->GetAttributeName().Compare( KTitleName ) == 0 )
+ && localizedName->Compare(
+ GetAttributeName( entries,
+ locals[i]->GetRowId(),
+ locals[i]->GetAttributeName() ) ) != 0 )
// translations different than text
{
locals[i]->SetLocalizedStringL( *localizedName );
@@ -247,3 +253,26 @@
}
return KNullDesC();
}
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+const TPtrC CCaLocalizerScannerProxy::GetAttributeName(
+ const RPointerArray<CCaInnerEntry>& aEntries,
+ TInt aId,
+ const TDesC& aAttrName )
+ {
+ TBool notFound( ETrue );
+ TPtrC attrValue;
+ TInt entriesCount = aEntries.Count();
+ for( TInt i=0; i < entriesCount && notFound; i++ )
+ {
+ if( aEntries[i]->GetId() == aId &&
+ aEntries[i]->GetAttributes().Find(aAttrName, attrValue) )
+ {
+ notFound = EFalse;
+ }
+ }
+ return attrValue;
+ }