mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-30 05:02:52 +08:00
testing...
This commit is contained in:
parent
bda5efa027
commit
c7dd7756d8
@ -96,7 +96,8 @@ Cell::Cell(const Cell * const cell):
|
||||
*/
|
||||
Cell::~Cell()
|
||||
{
|
||||
delete d_ptr;
|
||||
if ( NULL != d_ptr )
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -105,6 +106,7 @@ Cell::~Cell()
|
||||
Cell::CellType Cell::cellType() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
return d->cellType;
|
||||
}
|
||||
|
||||
@ -114,6 +116,7 @@ Cell::CellType Cell::cellType() const
|
||||
QVariant Cell::value() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
return d->value;
|
||||
}
|
||||
|
||||
@ -202,6 +205,7 @@ QVariant Cell::readValue() const
|
||||
Format Cell::format() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
return d->format;
|
||||
}
|
||||
|
||||
@ -211,6 +215,7 @@ Format Cell::format() const
|
||||
bool Cell::hasFormula() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
return d->formula.isValid();
|
||||
}
|
||||
|
||||
@ -220,6 +225,7 @@ bool Cell::hasFormula() const
|
||||
CellFormula Cell::formula() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
return d->formula;
|
||||
}
|
||||
|
||||
@ -236,10 +242,6 @@ bool Cell::isDateTime() const
|
||||
bool isValidFormat = d->format.isValid();
|
||||
bool isDateTimeFormat = d->format.isDateTimeFormat();
|
||||
|
||||
// NOTICE: google spreadsheet data is not adoptable.
|
||||
// cell style(10): cellType is SharedStringType. strValue is '1900. 1. 9'.
|
||||
// cell style(12): cellType is SharedStringType. strValue is '1900. 1. 11 AM 12:00:00'.
|
||||
|
||||
if ( cellType == NumberType &&
|
||||
dValue >= 0 &&
|
||||
isValidFormat &&
|
||||
@ -257,8 +259,10 @@ bool Cell::isDateTime() const
|
||||
QDateTime Cell::dateTime() const
|
||||
{
|
||||
Q_D(const Cell);
|
||||
|
||||
if (!isDateTime())
|
||||
return QDateTime();
|
||||
|
||||
return datetimeFromNumber(d->value.toDouble(), d->parent->workbook()->isDate1904());
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user