equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description: smiely engine class |
14 * Description: smiely engine class |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 //#include <streamlogger.h> |
18 #include <AknSmileyUtils.h> |
19 |
|
20 #include "smileymanager.h" |
19 #include "smileymanager.h" |
21 #include "smileymodel.h" |
20 #include "smileymodel.h" |
22 |
21 |
23 const TText KSpace = ' '; |
22 const TText KSpace = ' '; |
24 const TInt KLinkIndexMark = 0x8000; |
23 const TInt KLinkIndexMark = 0x8000; |
203 // CSmileyModel::AddSimleyL |
202 // CSmileyModel::AddSimleyL |
204 // --------------------------------------------------------------------------- |
203 // --------------------------------------------------------------------------- |
205 // |
204 // |
206 void CSmileyModel::AddSimleyL( CSmileyInfo& aInfo ) |
205 void CSmileyModel::AddSimleyL( CSmileyInfo& aInfo ) |
207 { |
206 { |
208 if ( aInfo.iImageInfo.iCode < CSmileyManager::KSmileyCodeMin || |
207 if ( aInfo.iImageInfo.iCode < CAknSmileyManager::KSmileyCodeMin || |
209 aInfo.iImageInfo.iCode > CSmileyManager::KSmileyCodeMax || |
208 aInfo.iImageInfo.iCode > CAknSmileyManager::KSmileyCodeMax || |
210 aInfo.iStrArray.Count() == 0 ) |
209 aInfo.iStrArray.Count() == 0 ) |
211 { |
210 { |
212 return; |
211 return; |
213 } |
212 } |
214 for ( TInt i = 0; i < aInfo.iStrArray.Count(); i++ ) |
213 for ( TInt i = 0; i < aInfo.iStrArray.Count(); i++ ) |
381 { |
380 { |
382 TInt linkIndex( iStrArray[aNodeIndex].iChild & ~KLinkIndexMark ); |
381 TInt linkIndex( iStrArray[aNodeIndex].iChild & ~KLinkIndexMark ); |
383 TInt len( iLinkArray[linkIndex].iStrLength ); |
382 TInt len( iLinkArray[linkIndex].iStrLength ); |
384 TInt imageIndex( iLinkArray[linkIndex].iImageIndex ); |
383 TInt imageIndex( iLinkArray[linkIndex].iImageIndex ); |
385 aText[aDocPos] = iImageInfoArray[imageIndex].iCode; |
384 aText[aDocPos] = iImageInfoArray[imageIndex].iCode; |
386 aText[aDocPos + 1] = CSmileyManager::KCompensateChar; |
385 aText[aDocPos + 1] = CAknSmileyManager::KCompensateChar; |
387 const TInt KThirdIndex = 2; |
386 const TInt KThirdIndex = 2; |
388 for ( TInt i( KThirdIndex ); i < len; i++ ) |
387 for ( TInt i( KThirdIndex ); i < len; i++ ) |
389 { |
388 { |
390 aText[i + aDocPos] = CSmileyManager::KPlaceHolder; |
389 aText[i + aDocPos] = CAknSmileyManager::KPlaceHolder; |
391 } |
390 } |
392 } |
391 } |
393 |
392 |
394 |
393 |
395 ///////////////////////////////////////////////////////////////////////////////////////// |
394 ///////////////////////////////////////////////////////////////////////////////////////// |