webengine/osswebengine/WebKit/s60/webview/WebTextFormatMask.cpp
branchRCL_3
changeset 47 e1bea15f9a39
parent 28 d39add9822e2
child 48 79859ed3eea9
equal deleted inserted replaced
46:30342f40acbf 47:e1bea15f9a39
    59 }
    59 }
    60 
    60 
    61 void WebTextFormatMask::buildMaskList(const String& str)
    61 void WebTextFormatMask::buildMaskList(const String& str)
    62 {
    62 {
    63     // *M or *m
    63     // *M or *m
    64     if (str.isEmpty() || str=="*M" || str=="*m") {
    64     if (str.isEmpty() || str=="*m") {
    65         m_acceptAll = true;
    65         m_acceptAll = true;
    66         return;
    66         return;
    67     }
    67     }
    68 
    68 
    69     // parse the string
    69     // parse the string
   219     return NULL;
   219     return NULL;
   220 }
   220 }
   221 
   221 
   222 int WebTextFormatMask::getMultitude()
   222 int WebTextFormatMask::getMultitude()
   223 {
   223 {
       
   224     int length = 0;
   224     int count = 0;
   225     int count = 0;
   225     MaskBase* m = m_masks;
   226     MaskBase* m = m_masks;
   226     while (m) {
   227     while (m) {
   227 
   228          length = m->multitude();
   228         if (m->multitude() == kInfinite){
   229          if (length == kInfinite){
   229             return kInfinite;    
   230              return kInfinite;    
   230         }        
   231          }        
   231         else {
   232          else if(length > 1){
   232             count += m->multitude();           
   233              count += length;
   233         }
   234              break;
   234         m = m->nextMask();                
   235          }
       
   236          else{
       
   237              count += length;           
       
   238          }
       
   239          m = m->nextMask();   
   235     }
   240     }
   236         
   241         
   237     return (count)?count:kInfinite;    
   242     return (count)?count:kInfinite;    
   238 }
   243 }
   239 
   244