equal
deleted
inserted
replaced
44 #include "BrowserWindow.h" |
44 #include "BrowserWindow.h" |
45 #include "BrowserAppUi.h" |
45 #include "BrowserAppUi.h" |
46 #include <feedattributes.h> |
46 #include <feedattributes.h> |
47 #include <folderattributes.h> |
47 #include <folderattributes.h> |
48 #include <feedsentity.h> |
48 #include <feedsentity.h> |
|
49 #include <BidiText.h> |
49 |
50 |
50 #include "eikon.hrh" |
51 #include "eikon.hrh" |
51 |
52 |
52 |
53 |
53 _LIT(KFeedsSchema, "feeds:"); |
54 _LIT(KFeedsSchema, "feeds:"); |
59 _LIT(KTokenDate, "#Date#"); |
60 _LIT(KTokenDate, "#Date#"); |
60 _LIT(KTokenDescription, "#Description#"); |
61 _LIT(KTokenDescription, "#Description#"); |
61 _LIT(KTokenEnclosure, "#Enclosure#"); |
62 _LIT(KTokenEnclosure, "#Enclosure#"); |
62 _LIT(KTokenShowPrev, "#ShowPrev#"); |
63 _LIT(KTokenShowPrev, "#ShowPrev#"); |
63 _LIT(KTokenShowNext, "#ShowNext#"); |
64 _LIT(KTokenShowNext, "#ShowNext#"); |
64 |
65 _LIT(KTokenTextDir, "#dir#"); |
|
66 _LIT(KLTRTextDir, "\"ltr\""); |
|
67 _LIT(KRTLTextDir, "\"rtl\""); |
65 |
68 |
66 const TInt KDateSize = 30; // Size of Date strings |
69 const TInt KDateSize = 30; // Size of Date strings |
67 const TInt KTimeSize = 30; // Size of Time strings |
70 const TInt KTimeSize = 30; // Size of Time strings |
68 |
71 |
69 |
72 |
954 ucs2Buff->Des().Copy(*iTemplate); |
957 ucs2Buff->Des().Copy(*iTemplate); |
955 |
958 |
956 // Resolve the tokens. |
959 // Resolve the tokens. |
957 TPtr ucs2Ptr(ucs2Buff->Des()); |
960 TPtr ucs2Ptr(ucs2Buff->Des()); |
958 |
961 |
959 // Replace the title tokens. |
962 // Add the text direction information here |
|
963 TBool found(EFalse); |
|
964 TBidiText::TDirectionality dir = TBidiText::TextDirectionality(aTitle, &found); |
|
965 TBuf<5> textDirection; |
|
966 if ( dir == TBidiText::ERightToLeft ) |
|
967 { |
|
968 textDirection.Copy(KRTLTextDir); |
|
969 } |
|
970 else |
|
971 { |
|
972 textDirection.Copy(KLTRTextDir); |
|
973 } |
|
974 |
|
975 // replace the text direction string |
|
976 if ((loc = ucs2Ptr.Find(KTokenTextDir())) != KErrNotFound) |
|
977 { |
|
978 ucs2Ptr.Replace(loc, textDirection.Length(), textDirection); |
|
979 } |
|
980 |
|
981 // Replace the title tokens. |
960 while ((loc = ucs2Ptr.Find(KTokenTitle())) != KErrNotFound) |
982 while ((loc = ucs2Ptr.Find(KTokenTitle())) != KErrNotFound) |
961 { |
983 { |
962 ucs2Ptr.Replace(loc, KTokenTitle().Length(), aTitle); |
984 ucs2Ptr.Replace(loc, KTokenTitle().Length(), aTitle); |
963 } |
985 } |
964 |
986 |