Skip to content

Commit

Permalink
fix: XLSX documents with uppercase suffix cannot be parsed
Browse files Browse the repository at this point in the history
When deciding whether to use xls or xlsx format for parsing, the judgment condition ignores capitalization.

Log:
Task: https://pms.uniontech.com/bug-view-295541.html
  • Loading branch information
N0rthHXD authored and deepin-bot[bot] committed Dec 20, 2024
1 parent 6098951 commit c4fe454
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 3rdparty/libs/fileext/excel/excel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @date 02.12.2016 -- 28.01.2018
*/
#include <fstream>
#include <string.h>
#include <pugixml.hpp>

#include "tools.hpp"
Expand Down Expand Up @@ -57,7 +58,7 @@ Excel::Excel(const std::string& fileName, const std::string& extension)
int Excel::convert(bool addStyle, bool extractImages, char mergingMode) {
// Convert file
Book* book = new Book(m_fileName, m_text, false);
if (m_extension == "xlsx") {
if (!strcasecmp(m_extension.c_str(), "xlsx")) {
Xlsx xlsx(book);
xlsx.openWorkbookXlsx();
} else {
Expand Down

0 comments on commit c4fe454

Please sign in to comment.