Remove the "optimization" flag
This flag is used by the perl module Excel::Writer::XLSX
This commit is contained in:
@@ -44,7 +44,6 @@ Workbook::Workbook(QObject *parent) :
|
||||
m_window_width = 16095;
|
||||
m_window_height = 9660;
|
||||
|
||||
m_optimization_enabled = false;
|
||||
m_strings_to_numbers_enabled = false;
|
||||
m_activesheet = 0;
|
||||
m_firstsheet = 0;
|
||||
@@ -78,33 +77,6 @@ void Workbook::save(const QString &name)
|
||||
package.createPackage(name);
|
||||
}
|
||||
|
||||
/*!
|
||||
Reduces the amount of data stored in memory so
|
||||
that large files can be written efficiently
|
||||
|
||||
Note, in this mode a row of data is written and
|
||||
then discarded when a cell in a new row is added
|
||||
via one of the worksheet write_() methods. As such
|
||||
data should be written in sequential row order once
|
||||
this mode is on.
|
||||
|
||||
It is used to optimise speed and reduce memory usage.
|
||||
However, these design goals meant that it wasn't easy
|
||||
to implement features that many users requested such as
|
||||
writing formatting and data separately.
|
||||
|
||||
This feature is disabled by default.
|
||||
*/
|
||||
void Workbook::setOptimizationEnabled(bool enable)
|
||||
{
|
||||
m_optimization_enabled = enable;
|
||||
}
|
||||
|
||||
bool Workbook::isOptimizationEnabled() const
|
||||
{
|
||||
return m_optimization_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
Enable the worksheet.write() method to convert strings
|
||||
to numbers, where possible, using float() in order to avoid
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
Format *addFormat();
|
||||
// void addChart();
|
||||
void defineName(const QString &name, const QString &formula);
|
||||
void setOptimizationEnabled(bool enable=true);
|
||||
void setStringsToNumbersEnabled(bool enable=true);
|
||||
|
||||
void save(const QString &name);
|
||||
@@ -60,14 +59,12 @@ private:
|
||||
QList<Worksheet *> worksheets() const;
|
||||
SharedStrings *sharedStrings();
|
||||
Styles *styles();
|
||||
bool isOptimizationEnabled() const;
|
||||
bool isStringsToNumbersEnabled() const;
|
||||
void saveToXmlFile(QIODevice *device);
|
||||
|
||||
SharedStrings *m_sharedStrings;
|
||||
QList<Worksheet *> m_worksheets;
|
||||
Styles *m_styles;
|
||||
bool m_optimization_enabled; //constant_memory
|
||||
bool m_strings_to_numbers_enabled;
|
||||
|
||||
int m_x_window;
|
||||
|
||||
@@ -247,13 +247,6 @@ int Worksheet::checkDimensions(int row, int col, bool ignore_row, bool ignore_co
|
||||
if (row >= m_xls_rowmax || col >= m_xls_colmax)
|
||||
return -1;
|
||||
|
||||
// // In optimization mode we don't change dimensions for rows
|
||||
// // that are already written.
|
||||
// if (!ignore_row && !ignore_col && m_optimization == 1) {
|
||||
// if (row < m_previous_row)
|
||||
// return -1;
|
||||
// }
|
||||
|
||||
if (!ignore_row) {
|
||||
if (row < m_dim_rowmin) m_dim_rowmin = row;
|
||||
if (row > m_dim_rowmax) m_dim_rowmax = row;
|
||||
|
||||
Reference in New Issue
Block a user