date.cpp Allineati giorni della settimana in itow
msksheet.cpp Corretta disabilitazione campi nel dettaglio di uno sheet read-only git-svn-id: svn://10.65.10.50/trunk@2567 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									c02f955b18
								
							
						
					
					
						commit
						12b0841f1a
					
				@ -643,8 +643,7 @@ const char* itow(
 | 
			
		||||
  //       giorno corrispondente a tale cifra (es. 15 = "Lunedi")
 | 
			
		||||
{
 | 
			
		||||
  const char* nomi[7] =
 | 
			
		||||
  { "Lunedi", "Martedi", "Mercoledi",   "Giovedi", "Venerdi",
 | 
			
		||||
    "Sabato", "Domenica" };
 | 
			
		||||
  { "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato", "Domenica" };
 | 
			
		||||
  return nomi[(d-1) % 7];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1496,11 +1496,14 @@ void TSpreadsheet::mask2str(int rec)
 | 
			
		||||
      {       
 | 
			
		||||
        r.add(f.get());       
 | 
			
		||||
#if XVT_OS == XVT_OS_WIN   
 | 
			
		||||
        const int col = id-FIRST_FIELD;
 | 
			
		||||
        if (!_column_disabled[col])
 | 
			
		||||
        if (active())
 | 
			
		||||
        {
 | 
			
		||||
          const bool on = f.enabled();
 | 
			
		||||
          enable_cell(rec, col, on);
 | 
			
		||||
          const int col = id-FIRST_FIELD;
 | 
			
		||||
          if (!_column_disabled[col])
 | 
			
		||||
          {
 | 
			
		||||
            const bool on = f.enabled();
 | 
			
		||||
            enable_cell(rec, col, on);
 | 
			
		||||
          }  
 | 
			
		||||
        }  
 | 
			
		||||
#endif        
 | 
			
		||||
        break;
 | 
			
		||||
@ -1741,7 +1744,7 @@ void TSpreadsheet::str2mask(int riga)
 | 
			
		||||
      const int index = (id % 100)-1;
 | 
			
		||||
      val = r.get(index);
 | 
			
		||||
      f.set(val);
 | 
			
		||||
      const bool on = !cell_disabled(riga, index);
 | 
			
		||||
      const bool on = active() && !cell_disabled(riga, index);
 | 
			
		||||
      if (f.enabled() != on)
 | 
			
		||||
        f.enable(on);
 | 
			
		||||
    }
 | 
			
		||||
@ -1786,17 +1789,6 @@ bool TSpreadsheet::notify(int rec, KEY k)
 | 
			
		||||
  return ok;  
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
HIDDEN void enable_mask_fields(TMask& m, bool on)
 | 
			
		||||
{
 | 
			
		||||
  for (int i = m.fields()-1; i >= 0; i--)
 | 
			
		||||
  {
 | 
			
		||||
    TMask_field& f = m.fld(i);
 | 
			
		||||
    if (f.dlg() >= FIRST_FIELD && f.enabled_default())
 | 
			
		||||
      f.enable(on);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Certified 99%
 | 
			
		||||
#if XVT_OS != XVT_OS_WIN
 | 
			
		||||
KEY TSpreadsheet::edit(int n, KEY tasto)
 | 
			
		||||
@ -1840,13 +1832,7 @@ KEY TSpreadsheet::edit(int n, KEY tasto)
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    if (!active())                                  // Se lo sheet e' read only ...
 | 
			
		||||
      enable_mask_fields(sheet_mask(), FALSE);      // ... disabilita tutti i campi
 | 
			
		||||
    
 | 
			
		||||
    k = sheet_mask().run();                         // Esegue la maschera dello sheet
 | 
			
		||||
    
 | 
			
		||||
    if (!active())                                  // Se lo sheet e' read only ...
 | 
			
		||||
      enable_mask_fields(sheet_mask(), TRUE);       // ... riabilita tutti i campi
 | 
			
		||||
  }  
 | 
			
		||||
    
 | 
			
		||||
  if (active) 
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user