Patch level : 12.01 nopatch

Files correlati     :
Commento            :
L'esportazione in excel esportava solo i campi che avevano una intestazione
This commit is contained in:
Alessandro Bonazzi 2023-04-12 09:06:35 +02:00
parent 0a574908e5
commit f56d66acc5
2 changed files with 10 additions and 2 deletions

View File

@ -2386,7 +2386,7 @@ void TTabulator::split(int s0, int e0, int s1, int e1)
add(min(s0,s1), max(e0,e1));
}
bool TTabulator::find_column(int column, int width, int &idx, int& col) const
bool TTabulator::find_column(int column, int width, int &idx, int& col, bool force) const
{
int start = column;
int end = column + width - 1;
@ -2404,6 +2404,13 @@ bool TTabulator::find_column(int column, int width, int &idx, int& col) const
idx = t;
col = ti.column();
}
}
if (force && idx < 0)
{
((TTabulator *) this)->add_field(column, width);
idx = items();
col = column;
}
return idx >= 0;
}

View File

@ -780,9 +780,10 @@ protected:
void split(int s0, int e0, int s1, int e1);
public:
int items() const { return _tab.items(); }
void add_field(int column, int width);
void sort();
bool find_column(int column, int width, int &idx, int& col) const;
bool find_column(int column, int width, int &idx, int& col, bool force = false) const;
bool empty() const;
};