Patch level :
Files correlati : agalib Ricompilazione Demo : [ ] Commento : Nuovi tracciati per FE Aggiunta possibilita'di spostare righe dello sheet coi relativi attributi git-svn-id: svn://10.65.10.50/branches/R_10_00@22462 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e88723e1bb
commit
7439d8e351
@ -12,16 +12,13 @@ DEFFLD(TIPOCF)
|
||||
DEFFLD(CODCF)
|
||||
DEFFLD(OCFPI)
|
||||
|
||||
// Key 3 = NUMREG
|
||||
DEFFLD(NUMREG) // Can be null
|
||||
|
||||
// Flags
|
||||
DEFFLD(FORZATURA)
|
||||
DEFFLD(IGNORA)
|
||||
|
||||
// Content fields
|
||||
DEFFLD(DATAREG)
|
||||
DEFFLD(NUMFATT)
|
||||
DEFFLD(NUMDOC)
|
||||
DEFFLD(MODPAG)
|
||||
DEFFLD(IMPORTO)
|
||||
DEFFLD(IMPOSTA)
|
||||
|
@ -49,8 +49,8 @@
|
||||
#define MOV_LIQDIFF "LIQDIFF"
|
||||
#define MOV_MODPAG "MODPAG"
|
||||
#define MOV_CONTRATTO "CONTRATTO"
|
||||
#define MOV_DATAFATT "DATAFATT"
|
||||
#define MOV_NUMFATT "NUMFATT"
|
||||
#define MOV_DATARETT "DATARETT"
|
||||
#define MOV_NUMRETT "NUMRETT"
|
||||
#define MOV_ANNOFE "ANNOFE"
|
||||
#define MOV_CONTSEP "CONTSEP"
|
||||
|
||||
|
@ -316,6 +316,9 @@ public:
|
||||
void swap_columns(const int fromid, const int toid) const;
|
||||
// @cmember Permette di invertire la posizione di due righe
|
||||
void swap_rows(const int fromindex, const int toindex);
|
||||
// @cmember Sposta la riga fromindex alla posizione toindex
|
||||
void move_row(const int fromindex, const int toindex);
|
||||
|
||||
|
||||
// @cmember L'utente ha salvato la disposizione delle colonne?
|
||||
bool user_saved_columns_order() const;
|
||||
@ -2226,10 +2229,28 @@ void TSpreadsheet::swap_columns(const int fromid, const int toid) const
|
||||
|
||||
void TSpreadsheet::swap_rows( const int fromindex, const int toindex)
|
||||
{
|
||||
_str.swap(fromindex, toindex);
|
||||
_property.swap(fromindex, toindex);
|
||||
if (fromindex != toindex)
|
||||
{
|
||||
_str.swap(fromindex, toindex);
|
||||
_property.swap(fromindex, toindex);
|
||||
}
|
||||
}
|
||||
|
||||
void TSpreadsheet::move_row(const int fromindex, const int toindex)
|
||||
{
|
||||
if (fromindex != toindex)
|
||||
{
|
||||
TObject* r = _str.remove(fromindex);
|
||||
_str.insert(r, toindex, true);
|
||||
_str.pack();
|
||||
|
||||
TObject* p = _property.remove(fromindex);
|
||||
_property.insert(p, toindex, true);
|
||||
_property.pack();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int TSpreadsheet::set_line_number_width(int digits)
|
||||
{
|
||||
const int old = ROW_NUMBER_WIDTH;
|
||||
@ -3026,6 +3047,12 @@ void TSheet_field::swap_rows( const int fromindex, const int toindex)
|
||||
s->swap_rows(fromindex, toindex);
|
||||
}
|
||||
|
||||
void TSheet_field::move_row(const int fromindex, const int toindex) const
|
||||
{
|
||||
TSpreadsheet* s = (TSpreadsheet*)_ctl;
|
||||
s->move_row(fromindex, toindex);
|
||||
}
|
||||
|
||||
static int default_rows_compare(TSheet_field &s, int i, int j)
|
||||
{
|
||||
TToken_string &s1 = s.row(i);
|
||||
|
@ -231,7 +231,8 @@ public:
|
||||
bool row_enabled(int row);
|
||||
// @cmember Permette di invertire la posizione di due righe
|
||||
void swap_rows( const int fromindex, const int toindex ) ;
|
||||
|
||||
void move_row(const int fromindex, const int toindex) const;
|
||||
|
||||
// @cmember Permette di ordinare le righe dello sheet
|
||||
void sort(ROWS_COMPARE_FUNCTION = NULL);
|
||||
|
||||
|
@ -428,7 +428,7 @@ int TFile_info::close()
|
||||
if (_ref_count > 0)
|
||||
{
|
||||
_ref_count--;
|
||||
if (_ref_count == 0 || (_exclusive && _ref_count < 2))
|
||||
if (_ref_count == 0 || _exclusive)
|
||||
{
|
||||
if (is_open())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user