qt
This commit is contained in:
parent
7a9d316625
commit
18c2b148d0
BIN
Compass/Compass.zip
Normal file
BIN
Compass/Compass.zip
Normal file
Binary file not shown.
|
|
@ -205,11 +205,11 @@ QVariant Cell::readValue() const
|
|||
// */
|
||||
}
|
||||
|
||||
if (hasFormula()) {
|
||||
QString formulaString = this->formula().formulaText();
|
||||
ret = formulaString;
|
||||
return ret; // return formula string
|
||||
}
|
||||
// if (hasFormula()) {
|
||||
// QString formulaString = this->formula().formulaText();
|
||||
// ret = formulaString;
|
||||
// return ret; // return formula string
|
||||
// }
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2057,10 +2057,9 @@ double Worksheet::rowHeight(int row)
|
|||
const int min_col = d->dimension.isValid() ? d->dimension.firstColumn() : 1;
|
||||
|
||||
auto it = d->rowsInfo.constFind(row);
|
||||
if (d->checkDimensions(row, min_col, false, true) || it == d->rowsInfo.constEnd()) {
|
||||
if(d->checkDimensions(row, min_col, false, true) || it == d->rowsInfo.constEnd() ||(*it)->height==0) {
|
||||
return d->sheetFormatProps.defaultRowHeight; // return default on invalid row
|
||||
}
|
||||
|
||||
return (*it)->height;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include <QProcess>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include "windows.h"
|
||||
|
||||
#define ToStr QString::number
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ inline void OpenCMD(const QStringList &arguments) {
|
|||
|
||||
template <typename Func>
|
||||
inline QThread *ThreadStart(Func &&f) {
|
||||
QThread* thread = QThread::create(f);
|
||||
auto thread = QThread::create(f);
|
||||
QObject::connect(thread, &QThread::finished, thread, &QThread::deleteLater);
|
||||
thread->start();
|
||||
return thread;
|
||||
|
|
|
|||
|
|
@ -508,6 +508,7 @@ bool ETable::save(const QString &pageDir) {
|
|||
int ETable::read(QXlsx::Worksheet *sheet) {
|
||||
int rowCnt, colCnt;
|
||||
auto cells = sheet->getFullCells(&rowCnt, &colCnt);
|
||||
qDebug()<<"rowCnt colCnt"<<rowCnt<<colCnt;
|
||||
auto dimension = sheet->dimension();
|
||||
if(dimension.rowCount() > rowCnt) rowCnt = dimension.rowCount();
|
||||
if(dimension.columnCount() > colCnt) colCnt = dimension.columnCount();
|
||||
|
|
@ -517,7 +518,7 @@ int ETable::read(QXlsx::Worksheet *sheet) {
|
|||
for(int c=0; c<colCnt; c++) table->setColumnWidth(c, sheet->columnWidth(c+1) * 7.2);
|
||||
for(auto &cell : cells) {
|
||||
auto fmt = cell.cell->format();
|
||||
auto item = new QTableWidgetItem(cell.cell->value().toString());
|
||||
auto item = new QTableWidgetItem(cell.cell->readValue().toString());
|
||||
auto ft = fmt.font();
|
||||
ft.setStyleStrategy(QFont::NoAntialias);
|
||||
item->setFont(ft);
|
||||
|
|
@ -535,7 +536,7 @@ int ETable::read(QXlsx::Worksheet *sheet) {
|
|||
else if(va==QXlsx::Format::AlignBottom) vAlign = Qt::AlignBottom;
|
||||
item->setTextAlignment(hAlign | vAlign);
|
||||
table->setItem(cell.row-1, cell.col-1, item);
|
||||
qDebug()<<cell.row<<cell.col<<cell.cell->cellType()<<fmt.font()<<fmt.fontSize()<<fmt.fontColor()<<fmt.patternBackgroundColor()<<"va"<<va;
|
||||
if(cell.row<=12 && cell.col<=12) qDebug()<<cell.row<<cell.col<<cell.cell->cellType()<<fmt.font()<<fmt.fontSize()<<fmt.fontColor()<<fmt.patternBackgroundColor()<<"va"<<va;
|
||||
//cell.cell->cellType();
|
||||
}
|
||||
auto mergeds = sheet->mergedCells();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ EVideo *EVideo::create(const JObj &ele, PageListItem *pageItem, EBase *multiWin)
|
|||
dur = round(dur*0.000001);
|
||||
auto ins = new EVideo(dir, name, widget["pathRaw"].toString(), widget["fileRaw"].toString(), img, pageItem, multiWin);
|
||||
ins->setBaseAttr(ele);
|
||||
if(ins->_duration < 4) ins->_duration = dur;
|
||||
if(ins->_duration < 4 && ins->_duration < dur*0.125) ins->_duration = dur;
|
||||
ins->vol = ele["vol"].toInt(100);
|
||||
ins->useSW = ele["useSW"].toBool();
|
||||
ins->isPreSplit = ele["isPreSplit"].toBool();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user