mirror of
https://github.com/QtExcel/QXlsx.git
synced 2025-01-30 05:02:52 +08:00
Merge pull request #254 from xuyouqiao2005/master
fix that sometimes can not read sheet info - merged to alpha branch
This commit is contained in:
commit
4be4d1d505
@ -278,7 +278,14 @@ bool DocumentPrivate::loadPackage(QIODevice *device)
|
||||
//If the .rel file exists, load it.
|
||||
if (zipReader.filePaths().contains(rel_path))
|
||||
sheet->relationships()->loadFromXmlData(zipReader.fileData(rel_path));
|
||||
sheet->loadFromXmlData(zipReader.fileData(sheet->filePath()));
|
||||
|
||||
if (strFilePath.startsWith(QStringLiteral("xl/xl/")) &&
|
||||
!zipReader.filePaths().contains(strFilePath) &&
|
||||
zipReader.filePaths().contains(strFilePath.mid(3))) {
|
||||
sheet->loadFromXmlData(zipReader.fileData(strFilePath.mid(3)));
|
||||
} else {
|
||||
sheet->loadFromXmlData(zipReader.fileData(strFilePath));
|
||||
}
|
||||
}
|
||||
|
||||
//load external links
|
||||
|
Loading…
x
Reference in New Issue
Block a user