1
0
mirror of https://github.com/QtExcel/QXlsx.git synced 2025-01-30 05:02:52 +08:00

append pump tester, using libxlsxwriter data.

This commit is contained in:
Jay Two 2019-10-05 00:18:37 +09:00
parent 406ffa91a3
commit 331c57f4cb
490 changed files with 1813 additions and 5 deletions

23
Pump/ansi.h Normal file
View File

@ -0,0 +1,23 @@
//
#ifndef ANSI_DEF_H
#define ANSI_DEF_H
#include <stdio.h>
#include <stdlib.h>
#include <QtGlobal>
#ifdef Q_OS_WIN
int __write_w32(FILE* fp, const char* buf);
int _fprintf_w32(FILE* fp, const char* format, ...);
int _fputs_w32(FILE* fp, const char* s);
#define ansi_fprintf(...) _fprintf_w32(__VA_ARGS__)
#define ansi_printf(...) _fprintf_w32(stdout, __VA_ARGS__)
#define ansi_fputs(fp, x) _fprintf_w32(fp, x);
#define ansi_puts(x) _fprintf_w32(stdout, x);
#endif
#endif

366
Pump/ansicolor-w32.c Normal file
View File

@ -0,0 +1,366 @@
#include "ansi.h"
// #ifdef _WIN32
#ifdef Q_OS_WIN
#include <windows.h>
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#ifndef FOREGROUND_MASK
# define FOREGROUND_MASK (FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY)
#endif
#ifndef BACKGROUND_MASK
# define BACKGROUND_MASK (BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_INTENSITY)
#endif
int
__write_w32(FILE* fp, const char* buf) {
static WORD attr_olds[2] = {-1, -1}, attr_old;
static int first = 1;
int type;
HANDLE handle = INVALID_HANDLE_VALUE;
WORD attr;
DWORD written, csize;
CONSOLE_CURSOR_INFO cci;
CONSOLE_SCREEN_BUFFER_INFO csbi;
COORD coord;
const char *ptr = buf;
if (fp == stdout) {
type = 0;
} else if (fp == stderr) {
type = 1;
} else {
type = 0;
}
handle = (HANDLE) _get_osfhandle(fileno(fp));
GetConsoleScreenBufferInfo(handle, &csbi);
attr = csbi.wAttributes;
if (attr_olds[type] == (WORD) -1) {
attr_olds[type] = attr;
}
attr_old = attr;
while (*ptr) {
if (*ptr == '\033') {
unsigned char c;
int i, n = 0, m, v[6], w, h;
for (i = 0; i < 6; i++) v[i] = -1;
ptr++;
retry:
if ((c = *ptr++) == 0) break;
if (isdigit(c)) {
if (v[n] == -1) v[n] = c - '0';
else v[n] = v[n] * 10 + c - '0';
goto retry;
}
if (c == '[') {
goto retry;
}
if (c == ';') {
if (++n == 6) break;
goto retry;
}
if (c == '>' || c == '?') {
m = c;
goto retry;
}
switch (c) {
case 'h':
if (m == '?') {
for (i = 0; i <= n; i++) {
switch (v[i]) {
case 3:
GetConsoleScreenBufferInfo(handle, &csbi);
w = csbi.dwSize.X;
h = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
csize = w * (h + 1);
coord.X = 0;
coord.Y = csbi.srWindow.Top;
FillConsoleOutputCharacter(handle, ' ', csize, coord, &written);
FillConsoleOutputAttribute(handle, csbi.wAttributes, csize, coord, &written);
SetConsoleCursorPosition(handle, csbi.dwCursorPosition);
csbi.dwSize.X = 132;
SetConsoleScreenBufferSize(handle, csbi.dwSize);
csbi.srWindow.Right = csbi.srWindow.Left + 131;
SetConsoleWindowInfo(handle, TRUE, &csbi.srWindow);
break;
case 5:
attr =
((attr & FOREGROUND_MASK) << 4) |
((attr & BACKGROUND_MASK) >> 4);
SetConsoleTextAttribute(handle, attr);
break;
case 9:
break;
case 25:
GetConsoleCursorInfo(handle, &cci);
cci.bVisible = TRUE;
SetConsoleCursorInfo(handle, &cci);
break;
case 47:
coord.X = 0;
coord.Y = 0;
SetConsoleCursorPosition(handle, coord);
break;
default:
break;
}
}
} else if (m == '>' && v[0] == 5) {
GetConsoleCursorInfo(handle, &cci);
cci.bVisible = FALSE;
SetConsoleCursorInfo(handle, &cci);
}
break;
case 'l':
if (m == '?') {
for (i = 0; i <= n; i++) {
switch (v[i]) {
case 3:
GetConsoleScreenBufferInfo(handle, &csbi);
w = csbi.dwSize.X;
h = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
csize = w * (h + 1);
coord.X = 0;
coord.Y = csbi.srWindow.Top;
FillConsoleOutputCharacter(handle, ' ', csize, coord, &written);
FillConsoleOutputAttribute(handle, csbi.wAttributes, csize, coord, &written);
SetConsoleCursorPosition(handle, csbi.dwCursorPosition);
csbi.srWindow.Right = csbi.srWindow.Left + 79;
SetConsoleWindowInfo(handle, TRUE, &csbi.srWindow);
csbi.dwSize.X = 80;
SetConsoleScreenBufferSize(handle, csbi.dwSize);
break;
case 5:
attr =
((attr & FOREGROUND_MASK) << 4) |
((attr & BACKGROUND_MASK) >> 4);
SetConsoleTextAttribute(handle, attr);
break;
case 25:
GetConsoleCursorInfo(handle, &cci);
cci.bVisible = FALSE;
SetConsoleCursorInfo(handle, &cci);
break;
default:
break;
}
}
}
else if (m == '>' && v[0] == 5) {
GetConsoleCursorInfo(handle, &cci);
cci.bVisible = TRUE;
SetConsoleCursorInfo(handle, &cci);
}
break;
case 'm':
attr = attr_old;
for (i = 0; i <= n; i++) {
if (v[i] == -1 || v[i] == 0)
attr = attr_olds[type];
else if (v[i] == 1)
attr |= FOREGROUND_INTENSITY;
else if (v[i] == 4)
attr |= FOREGROUND_INTENSITY;
else if (v[i] == 5)
attr |= FOREGROUND_INTENSITY;
else if (v[i] == 7)
attr =
((attr & FOREGROUND_MASK) << 4) |
((attr & BACKGROUND_MASK) >> 4);
else if (v[i] == 10)
; // symbol on
else if (v[i] == 11)
; // symbol off
else if (v[i] == 22)
attr &= ~FOREGROUND_INTENSITY;
else if (v[i] == 24)
attr &= ~FOREGROUND_INTENSITY;
else if (v[i] == 25)
attr &= ~FOREGROUND_INTENSITY;
else if (v[i] == 27)
attr =
((attr & FOREGROUND_MASK) << 4) |
((attr & BACKGROUND_MASK) >> 4);
else if (v[i] >= 30 && v[i] <= 37) {
attr = (attr & BACKGROUND_MASK);
if ((v[i] - 30) & 1)
attr |= FOREGROUND_RED;
if ((v[i] - 30) & 2)
attr |= FOREGROUND_GREEN;
if ((v[i] - 30) & 4)
attr |= FOREGROUND_BLUE;
}
//else if (v[i] == 39)
//attr = (~attr & BACKGROUND_MASK);
else if (v[i] >= 40 && v[i] <= 47) {
attr = (attr & FOREGROUND_MASK);
if ((v[i] - 40) & 1)
attr |= BACKGROUND_RED;
if ((v[i] - 40) & 2)
attr |= BACKGROUND_GREEN;
if ((v[i] - 40) & 4)
attr |= BACKGROUND_BLUE;
}
else if (v[i] >= 90 && v[i] <= 97) {
attr = (attr & BACKGROUND_MASK) | FOREGROUND_INTENSITY;
if ((v[i] - 90) & 1)
attr |= FOREGROUND_RED;
if ((v[i] - 90) & 2)
attr |= FOREGROUND_GREEN;
if ((v[i] - 90) & 4)
attr |= FOREGROUND_BLUE;
}
else if (v[i] >= 100 && v[i] <= 107) {
attr = (attr & FOREGROUND_MASK) | BACKGROUND_INTENSITY;
if ((v[i] - 100) & 1)
attr |= BACKGROUND_RED;
if ((v[i] - 100) & 2)
attr |= BACKGROUND_GREEN;
if ((v[i] - 100) & 4)
attr |= BACKGROUND_BLUE;
}
//else if (v[i] == 49)
//attr = (~attr & FOREGROUND_MASK);
else if (v[i] == 100)
attr = attr_old;
}
SetConsoleTextAttribute(handle, attr);
break;
case 'K':
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
switch (v[0]) {
default:
case 0:
csize = csbi.dwSize.X - coord.X;
break;
case 1:
csize = coord.X;
coord.X = 0;
break;
case 2:
csize = csbi.dwSize.X;
coord.X = 0;
break;
}
FillConsoleOutputCharacter(handle, ' ', csize, coord, &written);
FillConsoleOutputAttribute(handle, csbi.wAttributes, csize, coord, &written);
SetConsoleCursorPosition(handle, csbi.dwCursorPosition);
break;
case 'J':
GetConsoleScreenBufferInfo(handle, &csbi);
w = csbi.dwSize.X;
h = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
coord = csbi.dwCursorPosition;
switch (v[0]) {
default:
case 0:
csize = w * (h - coord.Y) - coord.X;
coord.X = 0;
break;
case 1:
csize = w * coord.Y + coord.X;
coord.X = 0;
coord.Y = csbi.srWindow.Top;
break;
case 2:
csize = w * (h + 1);
coord.X = 0;
coord.Y = csbi.srWindow.Top;
break;
}
FillConsoleOutputCharacter(handle, ' ', csize, coord, &written);
FillConsoleOutputAttribute(handle, csbi.wAttributes, csize, coord, &written);
SetConsoleCursorPosition(handle, csbi.dwCursorPosition);
break;
case 'H':
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
if (v[0] != -1) {
if (v[1] != -1) {
coord.Y = csbi.srWindow.Top + v[0] - 1;
coord.X = v[1] - 1;
} else
coord.X = v[0] - 1;
} else {
coord.X = 0;
coord.Y = csbi.srWindow.Top;
}
if (coord.X < csbi.srWindow.Left)
coord.X = csbi.srWindow.Left;
else if (coord.X > csbi.srWindow.Right)
coord.X = csbi.srWindow.Right;
if (coord.Y < csbi.srWindow.Top)
coord.Y = csbi.srWindow.Top;
else if (coord.Y > csbi.srWindow.Bottom)
coord.Y = csbi.srWindow.Bottom;
SetConsoleCursorPosition(handle, coord);
break;
case 'A': // Move up
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
if (v[0] != -1) coord.Y = coord.Y - v[0];
if (coord.Y < csbi.srWindow.Top) coord.Y = csbi.srWindow.Top;
SetConsoleCursorPosition(handle, coord);
break;
case 'B': // Move down
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
if (v[0] != -1) coord.Y = coord.Y + v[0];
if (coord.Y > csbi.srWindow.Bottom) coord.Y = csbi.srWindow.Bottom;
SetConsoleCursorPosition(handle, coord);
break;
case 'C': // Move forward / right
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
if (v[0] != -1) coord.X = coord.X + v[0];
if (coord.X > csbi.srWindow.Right) coord.X = csbi.srWindow.Right;
SetConsoleCursorPosition(handle, coord);
break;
case 'D': // Move backward / left
GetConsoleScreenBufferInfo(handle, &csbi);
coord = csbi.dwCursorPosition;
if (v[0] != -1) coord.X = coord.X - v[0];
if (coord.X < csbi.srWindow.Left) coord.X = csbi.srWindow.Left;
SetConsoleCursorPosition(handle, coord);
break;
default:
break;
}
} else {
putchar(*ptr);
ptr++;
}
}
return ptr - buf;
}
int
_fprintf_w32(FILE* fp, const char* format, ...) {
va_list args;
int r;
char *buf = NULL;
va_start(args, format);
r = vasprintf(&buf, format, args);
va_end(args);
if (r != -1)
r = __write_w32(fp, buf);
if (buf) free(buf);
return r;
}
int
_fputs_w32(FILE* fp, const char* s) {
int r = __write_w32(fp, s);
r += __write_w32(fp, "\n");
return r;
}
#endif

6
Pump/ansicolor-w32.h Normal file
View File

@ -0,0 +1,6 @@
#ifdef _WIN32
# define fprintf(...) _fprintf_w32(__VA_ARGS__)
# define printf(...) _fprintf_w32(stdout, __VA_ARGS__)
# define fputs(fp, x) _fprintf_w32(fp, x);
# define puts(x) _fprintf_w32(stdout, x);
#endif

127
Pump/colorprintf.h Normal file
View File

@ -0,0 +1,127 @@
/****************************************************************************
* colorprintf v2.0 *
* Copyright (C) 2012 VittGam.net. All Rights Reserved. *
* https://github.com/VittGam/colorprintf *
****************************************************************************
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* "Software"), to deal in the Software without restriction, including *
* without limitation the rights to use, copy, modify, merge, publish, *
* distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to *
* the following conditions: *
* *
* The above copyright notice and this permission notice shall be included *
* in all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY *
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, *
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE *
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************/
#ifndef COLORPRINTF_H_
#define COLORPRINTF_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdarg.h>
#ifdef _WIN32
#include <windows.h>
#endif
/*
* Output colored text to ANSI (Linux, Mac, iPhone) and Windows terminals.
* This function wraps printf (by using vprintf), and adds a 'color' parameter to it.
*
* color = -1 -> not colored (same as printf)
* 0 -> red
* 1 -> green
* 2 -> yellow
* 3 -> blue
* 4 -> magenta
* 5 -> cyan
*/
int colorprintf(int color, const char *format, ...) {
int fcolor = -1, retval = -99;
va_list args;
#ifdef _WIN32
if (color == 0) {
fcolor = FOREGROUND_RED;
} else if (color == 1) {
fcolor = FOREGROUND_GREEN;
} else if (color == 2) {
fcolor = FOREGROUND_RED | FOREGROUND_GREEN;
} else if (color == 3) {
fcolor = FOREGROUND_BLUE;
} else if (color == 4) {
fcolor = FOREGROUND_RED | FOREGROUND_BLUE;
} else if (color == 5) {
fcolor = FOREGROUND_GREEN | FOREGROUND_BLUE;
}
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
WORD wOldColorAttrs;
HANDLE hStdout;
if (fcolor != -1) {
hStdout = GetStdHandle(STD_OUTPUT_HANDLE);
if ((hStdout == NULL) || (hStdout == INVALID_HANDLE_VALUE)) {
return -99;
}
if (GetConsoleScreenBufferInfo(hStdout, &csbiInfo) == 0) {
return -99;
}
wOldColorAttrs = csbiInfo.wAttributes;
if (SetConsoleTextAttribute(hStdout, fcolor | FOREGROUND_INTENSITY) == 0) {
return -99;
}
}
#else
if (color == 0) {
fcolor = 1;
} else if (color == 1) {
fcolor = 2;
} else if (color == 2) {
fcolor = 3;
} else if (color == 3) {
fcolor = 4;
} else if (color == 4) {
fcolor = 5;
} else if (color == 5) {
fcolor = 6;
}
if (fcolor != -1 && printf("\033[1;3%dm", fcolor) < 0) {
return -99;
}
#endif
va_start(args, format);
if (!args) {
return -99;
}
retval = vprintf(format, args);
va_end(args);
if (fcolor != -1) {
#ifdef _WIN32
if (SetConsoleTextAttribute(hStdout, wOldColorAttrs) == 0) {
return -99;
}
#else
if (printf("\033[0m") < 0) {
return -99;
}
#endif
}
return retval;
}
#ifdef __cplusplus
}
#endif
#endif

32
Pump/main.cpp Normal file
View File

@ -0,0 +1,32 @@
// main.cpp
#include <QtGlobal>
#include <QCoreApplication>
#include <QtCore>
#include <QVector>
#include <QVariant>
#include <QDebug>
#include <iostream>
using namespace std;
#include "xlsxdocument.h"
#include "xlsxchartsheet.h"
#include "xlsxcellrange.h"
#include "xlsxchart.h"
#include "xlsxrichstring.h"
#include "xlsxworkbook.h"
using namespace QXlsx;
extern int test(QVector<QVariant> params);
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QVector<QVariant> testParams;
int ret = test(testParams);
return 0;
}

48
Pump/pump.pro Normal file
View File

@ -0,0 +1,48 @@
# pump.pro
TARGET = pump
TEMPLATE = app
QT += core
QT += gui
CONFIG += console
CONFIG -= app_bundle
# NOTE: You can fix value of QXlsx path of source code.
# QXLSX_PARENTPATH=./
# QXLSX_HEADERPATH=./header/
# QXLSX_SOURCEPATH=./source/
include(../QXlsx/QXlsx.pri)
##########################################################################
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
##########################################################################
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain
# version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
# disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++14
INCLUDEPATH += .
SOURCES += main.cpp
SOURCES += test.cpp
RESOURCES += pump.qrc
win32 {
DEFINES += _WIN32
DEFINES += WIN32
DEFINES += WIN
DEFINES += WINDOWS
HEADERS += colorprintf.h
}

483
Pump/pump.qrc Normal file
View File

@ -0,0 +1,483 @@
<!DOCTYPE RCC>
<RCC>
<qresource>
<file>xlsx_files/dir2.txt</file>
<file>xlsx_files/array_formula01.xlsx</file>
<file>xlsx_files/array_formula02.xlsx</file>
<file>xlsx_files/autofilter00.xlsx</file>
<file>xlsx_files/autofilter01.xlsx</file>
<file>xlsx_files/chartsheet01.xlsx</file>
<file>xlsx_files/chartsheet02.xlsx</file>
<file>xlsx_files/chartsheet03.xlsx</file>
<file>xlsx_files/chartsheet04.xlsx</file>
<file>xlsx_files/chartsheet05.xlsx</file>
<file>xlsx_files/chartsheet06.xlsx</file>
<file>xlsx_files/chartsheet07.xlsx</file>
<file>xlsx_files/chartsheet08.xlsx</file>
<file>xlsx_files/chartsheet09.xlsx</file>
<file>xlsx_files/chart_area01.xlsx</file>
<file>xlsx_files/chart_area02.xlsx</file>
<file>xlsx_files/chart_area03.xlsx</file>
<file>xlsx_files/chart_axis01.xlsx</file>
<file>xlsx_files/chart_axis02.xlsx</file>
<file>xlsx_files/chart_axis04.xlsx</file>
<file>xlsx_files/chart_axis05.xlsx</file>
<file>xlsx_files/chart_axis06.xlsx</file>
<file>xlsx_files/chart_axis07.xlsx</file>
<file>xlsx_files/chart_axis08.xlsx</file>
<file>xlsx_files/chart_axis09.xlsx</file>
<file>xlsx_files/chart_axis10.xlsx</file>
<file>xlsx_files/chart_axis11.xlsx</file>
<file>xlsx_files/chart_axis12.xlsx</file>
<file>xlsx_files/chart_axis13.xlsx</file>
<file>xlsx_files/chart_axis15.xlsx</file>
<file>xlsx_files/chart_axis17.xlsx</file>
<file>xlsx_files/chart_axis18.xlsx</file>
<file>xlsx_files/chart_axis19.xlsx</file>
<file>xlsx_files/chart_axis20.xlsx</file>
<file>xlsx_files/chart_axis21.xlsx</file>
<file>xlsx_files/chart_axis22.xlsx</file>
<file>xlsx_files/chart_axis23.xlsx</file>
<file>xlsx_files/chart_axis24.xlsx</file>
<file>xlsx_files/chart_axis25.xlsx</file>
<file>xlsx_files/chart_axis26.xlsx</file>
<file>xlsx_files/chart_axis27.xlsx</file>
<file>xlsx_files/chart_axis28.xlsx</file>
<file>xlsx_files/chart_axis29.xlsx</file>
<file>xlsx_files/chart_axis30.xlsx</file>
<file>xlsx_files/chart_axis31.xlsx</file>
<file>xlsx_files/chart_axis32.xlsx</file>
<file>xlsx_files/chart_axis33.xlsx</file>
<file>xlsx_files/chart_axis34.xlsx</file>
<file>xlsx_files/chart_axis35.xlsx</file>
<file>xlsx_files/chart_axis36.xlsx</file>
<file>xlsx_files/chart_axis37.xlsx</file>
<file>xlsx_files/chart_axis38.xlsx</file>
<file>xlsx_files/chart_axis39.xlsx</file>
<file>xlsx_files/chart_axis40.xlsx</file>
<file>xlsx_files/chart_axis41.xlsx</file>
<file>xlsx_files/chart_axis42.xlsx</file>
<file>xlsx_files/chart_axis43.xlsx</file>
<file>xlsx_files/chart_axis44.xlsx</file>
<file>xlsx_files/chart_axis45.xlsx</file>
<file>xlsx_files/chart_axis46.xlsx</file>
<file>xlsx_files/chart_bar01.xlsx</file>
<file>xlsx_files/chart_bar02.xlsx</file>
<file>xlsx_files/chart_bar03.xlsx</file>
<file>xlsx_files/chart_bar04.xlsx</file>
<file>xlsx_files/chart_bar05.xlsx</file>
<file>xlsx_files/chart_bar06.xlsx</file>
<file>xlsx_files/chart_bar08.xlsx</file>
<file>xlsx_files/chart_bar09.xlsx</file>
<file>xlsx_files/chart_bar10.xlsx</file>
<file>xlsx_files/chart_bar11.xlsx</file>
<file>xlsx_files/chart_bar12.xlsx</file>
<file>xlsx_files/chart_bar13.xlsx</file>
<file>xlsx_files/chart_bar14.xlsx</file>
<file>xlsx_files/chart_bar15.xlsx</file>
<file>xlsx_files/chart_bar16.xlsx</file>
<file>xlsx_files/chart_bar17.xlsx</file>
<file>xlsx_files/chart_bar18.xlsx</file>
<file>xlsx_files/chart_bar19.xlsx</file>
<file>xlsx_files/chart_bar20.xlsx</file>
<file>xlsx_files/chart_bar21.xlsx</file>
<file>xlsx_files/chart_bar22.xlsx</file>
<file>xlsx_files/chart_bar51.xlsx</file>
<file>xlsx_files/chart_blank01.xlsx</file>
<file>xlsx_files/chart_blank02.xlsx</file>
<file>xlsx_files/chart_blank03.xlsx</file>
<file>xlsx_files/chart_blank04.xlsx</file>
<file>xlsx_files/chart_blank05.xlsx</file>
<file>xlsx_files/chart_blank06.xlsx</file>
<file>xlsx_files/chart_chartarea01.xlsx</file>
<file>xlsx_files/chart_chartarea03.xlsx</file>
<file>xlsx_files/chart_chartarea05.xlsx</file>
<file>xlsx_files/chart_chartarea06.xlsx</file>
<file>xlsx_files/chart_column01.xlsx</file>
<file>xlsx_files/chart_column02.xlsx</file>
<file>xlsx_files/chart_column03.xlsx</file>
<file>xlsx_files/chart_column05.xlsx</file>
<file>xlsx_files/chart_column06.xlsx</file>
<file>xlsx_files/chart_column07.xlsx</file>
<file>xlsx_files/chart_column08.xlsx</file>
<file>xlsx_files/chart_column09.xlsx</file>
<file>xlsx_files/chart_column10.xlsx</file>
<file>xlsx_files/chart_column11.xlsx</file>
<file>xlsx_files/chart_column12.xlsx</file>
<file>xlsx_files/chart_crossing01.xlsx</file>
<file>xlsx_files/chart_crossing02.xlsx</file>
<file>xlsx_files/chart_crossing03.xlsx</file>
<file>xlsx_files/chart_crossing04.xlsx</file>
<file>xlsx_files/chart_data_labels01.xlsx</file>
<file>xlsx_files/chart_data_labels02.xlsx</file>
<file>xlsx_files/chart_data_labels03.xlsx</file>
<file>xlsx_files/chart_data_labels04.xlsx</file>
<file>xlsx_files/chart_data_labels05.xlsx</file>
<file>xlsx_files/chart_data_labels06.xlsx</file>
<file>xlsx_files/chart_data_labels07.xlsx</file>
<file>xlsx_files/chart_data_labels08.xlsx</file>
<file>xlsx_files/chart_data_labels09.xlsx</file>
<file>xlsx_files/chart_data_labels10.xlsx</file>
<file>xlsx_files/chart_data_labels11.xlsx</file>
<file>xlsx_files/chart_data_labels12.xlsx</file>
<file>xlsx_files/chart_data_labels13.xlsx</file>
<file>xlsx_files/chart_data_labels14.xlsx</file>
<file>xlsx_files/chart_data_labels15.xlsx</file>
<file>xlsx_files/chart_data_labels16.xlsx</file>
<file>xlsx_files/chart_data_labels18.xlsx</file>
<file>xlsx_files/chart_data_labels19.xlsx</file>
<file>xlsx_files/chart_data_labels20.xlsx</file>
<file>xlsx_files/chart_data_labels21.xlsx</file>
<file>xlsx_files/chart_data_labels22.xlsx</file>
<file>xlsx_files/chart_data_labels23.xlsx</file>
<file>xlsx_files/chart_data_labels24.xlsx</file>
<file>xlsx_files/chart_data_labels25.xlsx</file>
<file>xlsx_files/chart_display_units01.xlsx</file>
<file>xlsx_files/chart_display_units02.xlsx</file>
<file>xlsx_files/chart_display_units03.xlsx</file>
<file>xlsx_files/chart_display_units04.xlsx</file>
<file>xlsx_files/chart_display_units05.xlsx</file>
<file>xlsx_files/chart_display_units06.xlsx</file>
<file>xlsx_files/chart_display_units07.xlsx</file>
<file>xlsx_files/chart_display_units08.xlsx</file>
<file>xlsx_files/chart_display_units09.xlsx</file>
<file>xlsx_files/chart_display_units10.xlsx</file>
<file>xlsx_files/chart_display_units11.xlsx</file>
<file>xlsx_files/chart_display_units12.xlsx</file>
<file>xlsx_files/chart_doughnut01.xlsx</file>
<file>xlsx_files/chart_doughnut02.xlsx</file>
<file>xlsx_files/chart_doughnut03.xlsx</file>
<file>xlsx_files/chart_doughnut04.xlsx</file>
<file>xlsx_files/chart_doughnut05.xlsx</file>
<file>xlsx_files/chart_doughnut06.xlsx</file>
<file>xlsx_files/chart_drop_lines01.xlsx</file>
<file>xlsx_files/chart_drop_lines02.xlsx</file>
<file>xlsx_files/chart_drop_lines03.xlsx</file>
<file>xlsx_files/chart_errorbars01.xlsx</file>
<file>xlsx_files/chart_errorbars02.xlsx</file>
<file>xlsx_files/chart_errorbars03.xlsx</file>
<file>xlsx_files/chart_errorbars04.xlsx</file>
<file>xlsx_files/chart_errorbars05.xlsx</file>
<file>xlsx_files/chart_errorbars06.xlsx</file>
<file>xlsx_files/chart_font01.xlsx</file>
<file>xlsx_files/chart_font02.xlsx</file>
<file>xlsx_files/chart_font03.xlsx</file>
<file>xlsx_files/chart_font04.xlsx</file>
<file>xlsx_files/chart_font05.xlsx</file>
<file>xlsx_files/chart_font06.xlsx</file>
<file>xlsx_files/chart_font07.xlsx</file>
<file>xlsx_files/chart_font08.xlsx</file>
<file>xlsx_files/chart_font09.xlsx</file>
<file>xlsx_files/chart_format01.xlsx</file>
<file>xlsx_files/chart_format02.xlsx</file>
<file>xlsx_files/chart_format03.xlsx</file>
<file>xlsx_files/chart_format04.xlsx</file>
<file>xlsx_files/chart_format05.xlsx</file>
<file>xlsx_files/chart_format06.xlsx</file>
<file>xlsx_files/chart_format07.xlsx</file>
<file>xlsx_files/chart_format08.xlsx</file>
<file>xlsx_files/chart_format09.xlsx</file>
<file>xlsx_files/chart_format10.xlsx</file>
<file>xlsx_files/chart_format11.xlsx</file>
<file>xlsx_files/chart_format12.xlsx</file>
<file>xlsx_files/chart_format13.xlsx</file>
<file>xlsx_files/chart_format14.xlsx</file>
<file>xlsx_files/chart_format15.xlsx</file>
<file>xlsx_files/chart_format16.xlsx</file>
<file>xlsx_files/chart_format17.xlsx</file>
<file>xlsx_files/chart_format18.xlsx</file>
<file>xlsx_files/chart_format19.xlsx</file>
<file>xlsx_files/chart_format20.xlsx</file>
<file>xlsx_files/chart_format21.xlsx</file>
<file>xlsx_files/chart_format22.xlsx</file>
<file>xlsx_files/chart_format23.xlsx</file>
<file>xlsx_files/chart_format24.xlsx</file>
<file>xlsx_files/chart_format25.xlsx</file>
<file>xlsx_files/chart_format26.xlsx</file>
<file>xlsx_files/chart_format27.xlsx</file>
<file>xlsx_files/chart_format28.xlsx</file>
<file>xlsx_files/chart_format29.xlsx</file>
<file>xlsx_files/chart_format30.xlsx</file>
<file>xlsx_files/chart_format31.xlsx</file>
<file>xlsx_files/chart_gap01.xlsx</file>
<file>xlsx_files/chart_gap02.xlsx</file>
<file>xlsx_files/chart_gap03.xlsx</file>
<file>xlsx_files/chart_gridlines01.xlsx</file>
<file>xlsx_files/chart_gridlines02.xlsx</file>
<file>xlsx_files/chart_gridlines04.xlsx</file>
<file>xlsx_files/chart_gridlines05.xlsx</file>
<file>xlsx_files/chart_gridlines06.xlsx</file>
<file>xlsx_files/chart_gridlines08.xlsx</file>
<file>xlsx_files/chart_gridlines09.xlsx</file>
<file>xlsx_files/chart_high_low_lines01.xlsx</file>
<file>xlsx_files/chart_high_low_lines02.xlsx</file>
<file>xlsx_files/chart_legend01.xlsx</file>
<file>xlsx_files/chart_legend03.xlsx</file>
<file>xlsx_files/chart_legend04.xlsx</file>
<file>xlsx_files/chart_line01.xlsx</file>
<file>xlsx_files/chart_line03.xlsx</file>
<file>xlsx_files/chart_line04.xlsx</file>
<file>xlsx_files/chart_order01.xlsx</file>
<file>xlsx_files/chart_pattern01.xlsx</file>
<file>xlsx_files/chart_pattern02.xlsx</file>
<file>xlsx_files/chart_pattern03.xlsx</file>
<file>xlsx_files/chart_pattern04.xlsx</file>
<file>xlsx_files/chart_pattern05.xlsx</file>
<file>xlsx_files/chart_pattern06.xlsx</file>
<file>xlsx_files/chart_pattern07.xlsx</file>
<file>xlsx_files/chart_pattern08.xlsx</file>
<file>xlsx_files/chart_pattern10.xlsx</file>
<file>xlsx_files/chart_pie01.xlsx</file>
<file>xlsx_files/chart_pie02.xlsx</file>
<file>xlsx_files/chart_pie03.xlsx</file>
<file>xlsx_files/chart_pie04.xlsx</file>
<file>xlsx_files/chart_pie05.xlsx</file>
<file>xlsx_files/chart_points01.xlsx</file>
<file>xlsx_files/chart_points02.xlsx</file>
<file>xlsx_files/chart_points03.xlsx</file>
<file>xlsx_files/chart_points04.xlsx</file>
<file>xlsx_files/chart_points05.xlsx</file>
<file>xlsx_files/chart_points06.xlsx</file>
<file>xlsx_files/chart_radar01.xlsx</file>
<file>xlsx_files/chart_radar02.xlsx</file>
<file>xlsx_files/chart_radar03.xlsx</file>
<file>xlsx_files/chart_scatter01.xlsx</file>
<file>xlsx_files/chart_scatter02.xlsx</file>
<file>xlsx_files/chart_scatter03.xlsx</file>
<file>xlsx_files/chart_scatter04.xlsx</file>
<file>xlsx_files/chart_scatter05.xlsx</file>
<file>xlsx_files/chart_scatter06.xlsx</file>
<file>xlsx_files/chart_scatter09.xlsx</file>
<file>xlsx_files/chart_scatter10.xlsx</file>
<file>xlsx_files/chart_scatter11.xlsx</file>
<file>xlsx_files/chart_scatter12.xlsx</file>
<file>xlsx_files/chart_scatter14.xlsx</file>
<file>xlsx_files/chart_scatter15.xlsx</file>
<file>xlsx_files/chart_size01.xlsx</file>
<file>xlsx_files/chart_size04.xlsx</file>
<file>xlsx_files/chart_sparse01.xlsx</file>
<file>xlsx_files/chart_str01.xlsx</file>
<file>xlsx_files/chart_str02.xlsx</file>
<file>xlsx_files/chart_table01.xlsx</file>
<file>xlsx_files/chart_table02.xlsx</file>
<file>xlsx_files/chart_table03.xlsx</file>
<file>xlsx_files/chart_title01.xlsx</file>
<file>xlsx_files/chart_title02.xlsx</file>
<file>xlsx_files/chart_up_down_bars01.xlsx</file>
<file>xlsx_files/chart_up_down_bars02.xlsx</file>
<file>xlsx_files/data01.xlsx</file>
<file>xlsx_files/data02.xlsx</file>
<file>xlsx_files/data03.xlsx</file>
<file>xlsx_files/data04.xlsx</file>
<file>xlsx_files/data05.xlsx</file>
<file>xlsx_files/data06.xlsx</file>
<file>xlsx_files/data07.xlsx</file>
<file>xlsx_files/data_validation01.xlsx</file>
<file>xlsx_files/data_validation02.xlsx</file>
<file>xlsx_files/data_validation03.xlsx</file>
<file>xlsx_files/data_validation07.xlsx</file>
<file>xlsx_files/data_validation08.xlsx</file>
<file>xlsx_files/default_row01.xlsx</file>
<file>xlsx_files/default_row02.xlsx</file>
<file>xlsx_files/default_row03.xlsx</file>
<file>xlsx_files/default_row05.xlsx</file>
<file>xlsx_files/defined_name01.xlsx</file>
<file>xlsx_files/defined_name02.xlsx</file>
<file>xlsx_files/defined_name03.xlsx</file>
<file>xlsx_files/defined_name04.xlsx</file>
<file>xlsx_files/escapes03.xlsx</file>
<file>xlsx_files/escapes04.xlsx</file>
<file>xlsx_files/escapes05.xlsx</file>
<file>xlsx_files/escapes06.xlsx</file>
<file>xlsx_files/escapes07.xlsx</file>
<file>xlsx_files/escapes08.xlsx</file>
<file>xlsx_files/firstsheet01.xlsx</file>
<file>xlsx_files/fit_to_pages01.xlsx</file>
<file>xlsx_files/fit_to_pages02.xlsx</file>
<file>xlsx_files/fit_to_pages03.xlsx</file>
<file>xlsx_files/fit_to_pages04.xlsx</file>
<file>xlsx_files/fit_to_pages05.xlsx</file>
<file>xlsx_files/format01.xlsx</file>
<file>xlsx_files/format02.xlsx</file>
<file>xlsx_files/format06.xlsx</file>
<file>xlsx_files/format07.xlsx</file>
<file>xlsx_files/format08.xlsx</file>
<file>xlsx_files/format09.xlsx</file>
<file>xlsx_files/format10.xlsx</file>
<file>xlsx_files/format12.xlsx</file>
<file>xlsx_files/format15.xlsx</file>
<file>xlsx_files/format50.xlsx</file>
<file>xlsx_files/format51.xlsx</file>
<file>xlsx_files/format52.xlsx</file>
<file>xlsx_files/gh42_01.xlsx</file>
<file>xlsx_files/gh42_02.xlsx</file>
<file>xlsx_files/gridlines01.xlsx</file>
<file>xlsx_files/hide01.xlsx</file>
<file>xlsx_files/hyperlink01.xlsx</file>
<file>xlsx_files/hyperlink02.xlsx</file>
<file>xlsx_files/hyperlink03.xlsx</file>
<file>xlsx_files/hyperlink04.xlsx</file>
<file>xlsx_files/hyperlink05.xlsx</file>
<file>xlsx_files/hyperlink06.xlsx</file>
<file>xlsx_files/hyperlink07.xlsx</file>
<file>xlsx_files/hyperlink08.xlsx</file>
<file>xlsx_files/hyperlink09.xlsx</file>
<file>xlsx_files/hyperlink10.xlsx</file>
<file>xlsx_files/hyperlink11.xlsx</file>
<file>xlsx_files/hyperlink12.xlsx</file>
<file>xlsx_files/hyperlink13.xlsx</file>
<file>xlsx_files/hyperlink14.xlsx</file>
<file>xlsx_files/hyperlink15.xlsx</file>
<file>xlsx_files/hyperlink16.xlsx</file>
<file>xlsx_files/hyperlink17.xlsx</file>
<file>xlsx_files/hyperlink18.xlsx</file>
<file>xlsx_files/hyperlink19.xlsx</file>
<file>xlsx_files/hyperlink20.xlsx</file>
<file>xlsx_files/image01.xlsx</file>
<file>xlsx_files/image02.xlsx</file>
<file>xlsx_files/image03.xlsx</file>
<file>xlsx_files/image04.xlsx</file>
<file>xlsx_files/image05.xlsx</file>
<file>xlsx_files/image07.xlsx</file>
<file>xlsx_files/image08.xlsx</file>
<file>xlsx_files/image09.xlsx</file>
<file>xlsx_files/image10.xlsx</file>
<file>xlsx_files/image11.xlsx</file>
<file>xlsx_files/image12.xlsx</file>
<file>xlsx_files/image13.xlsx</file>
<file>xlsx_files/image14.xlsx</file>
<file>xlsx_files/image15.xlsx</file>
<file>xlsx_files/image16.xlsx</file>
<file>xlsx_files/image17.xlsx</file>
<file>xlsx_files/image18.xlsx</file>
<file>xlsx_files/image19.xlsx</file>
<file>xlsx_files/image22.xlsx</file>
<file>xlsx_files/image23.xlsx</file>
<file>xlsx_files/image24.xlsx</file>
<file>xlsx_files/image25.xlsx</file>
<file>xlsx_files/image26.xlsx</file>
<file>xlsx_files/image27.xlsx</file>
<file>xlsx_files/image28.xlsx</file>
<file>xlsx_files/image29.xlsx</file>
<file>xlsx_files/image30.xlsx</file>
<file>xlsx_files/image31.xlsx</file>
<file>xlsx_files/image32.xlsx</file>
<file>xlsx_files/image33.xlsx</file>
<file>xlsx_files/image34.xlsx</file>
<file>xlsx_files/image35.xlsx</file>
<file>xlsx_files/image36.xlsx</file>
<file>xlsx_files/image44.xlsx</file>
<file>xlsx_files/image45.xlsx</file>
<file>xlsx_files/image46.xlsx</file>
<file>xlsx_files/image47.xlsx</file>
<file>xlsx_files/image82.xlsx</file>
<file>xlsx_files/landscape01.xlsx</file>
<file>xlsx_files/macro01.xlsm</file>
<file>xlsx_files/macro02.xlsm</file>
<file>xlsx_files/merge_range01.xlsx</file>
<file>xlsx_files/merge_range02.xlsx</file>
<file>xlsx_files/merge_range03.xlsx</file>
<file>xlsx_files/merge_range04.xlsx</file>
<file>xlsx_files/merge_range05.xlsx</file>
<file>xlsx_files/optimize01.xlsx</file>
<file>xlsx_files/optimize02.xlsx</file>
<file>xlsx_files/optimize04.xlsx</file>
<file>xlsx_files/optimize05.xlsx</file>
<file>xlsx_files/optimize06.xlsx</file>
<file>xlsx_files/optimize08.xlsx</file>
<file>xlsx_files/optimize21.xlsx</file>
<file>xlsx_files/optimize22.xlsx</file>
<file>xlsx_files/optimize23.xlsx</file>
<file>xlsx_files/optimize24.xlsx</file>
<file>xlsx_files/optimize25.xlsx</file>
<file>xlsx_files/optimize26.xlsx</file>
<file>xlsx_files/outline01.xlsx</file>
<file>xlsx_files/outline02.xlsx</file>
<file>xlsx_files/outline03.xlsx</file>
<file>xlsx_files/outline04.xlsx</file>
<file>xlsx_files/outline05.xlsx</file>
<file>xlsx_files/outline06.xlsx</file>
<file>xlsx_files/page_breaks01.xlsx</file>
<file>xlsx_files/page_breaks02.xlsx</file>
<file>xlsx_files/page_breaks03.xlsx</file>
<file>xlsx_files/page_breaks04.xlsx</file>
<file>xlsx_files/page_breaks05.xlsx</file>
<file>xlsx_files/page_breaks06.xlsx</file>
<file>xlsx_files/page_view01.xlsx</file>
<file>xlsx_files/panes01.xlsx</file>
<file>xlsx_files/print_across01.xlsx</file>
<file>xlsx_files/print_area01.xlsx</file>
<file>xlsx_files/print_area02.xlsx</file>
<file>xlsx_files/print_area03.xlsx</file>
<file>xlsx_files/print_area04.xlsx</file>
<file>xlsx_files/print_area05.xlsx</file>
<file>xlsx_files/print_area06.xlsx</file>
<file>xlsx_files/print_area07.xlsx</file>
<file>xlsx_files/print_options01.xlsx</file>
<file>xlsx_files/print_options02.xlsx</file>
<file>xlsx_files/print_options03.xlsx</file>
<file>xlsx_files/print_options04.xlsx</file>
<file>xlsx_files/print_options05.xlsx</file>
<file>xlsx_files/print_options06.xlsx</file>
<file>xlsx_files/print_scale01.xlsx</file>
<file>xlsx_files/print_scale02.xlsx</file>
<file>xlsx_files/properties01.xlsx</file>
<file>xlsx_files/properties02.xlsx</file>
<file>xlsx_files/properties03.xlsx</file>
<file>xlsx_files/properties04.xlsx</file>
<file>xlsx_files/properties05.xlsx</file>
<file>xlsx_files/protect01.xlsx</file>
<file>xlsx_files/protect02.xlsx</file>
<file>xlsx_files/protect03.xlsx</file>
<file>xlsx_files/repeat01.xlsx</file>
<file>xlsx_files/repeat02.xlsx</file>
<file>xlsx_files/repeat03.xlsx</file>
<file>xlsx_files/repeat04.xlsx</file>
<file>xlsx_files/repeat05.xlsx</file>
<file>xlsx_files/repeat06.xlsx</file>
<file>xlsx_files/rich_string01.xlsx</file>
<file>xlsx_files/rich_string02.xlsx</file>
<file>xlsx_files/rich_string03.xlsx</file>
<file>xlsx_files/rich_string04.xlsx</file>
<file>xlsx_files/rich_string05.xlsx</file>
<file>xlsx_files/rich_string06.xlsx</file>
<file>xlsx_files/rich_string07.xlsx</file>
<file>xlsx_files/rich_string08.xlsx</file>
<file>xlsx_files/rich_string09.xlsx</file>
<file>xlsx_files/rich_string10.xlsx</file>
<file>xlsx_files/rich_string11.xlsx</file>
<file>xlsx_files/rich_string12.xlsx</file>
<file>xlsx_files/row_col_format01.xlsx</file>
<file>xlsx_files/row_col_format02.xlsx</file>
<file>xlsx_files/row_col_format03.xlsx</file>
<file>xlsx_files/row_col_format04.xlsx</file>
<file>xlsx_files/row_col_format05.xlsx</file>
<file>xlsx_files/row_col_format06.xlsx</file>
<file>xlsx_files/row_col_format07.xlsx</file>
<file>xlsx_files/row_col_format08.xlsx</file>
<file>xlsx_files/row_col_format09.xlsx</file>
<file>xlsx_files/row_col_format10.xlsx</file>
<file>xlsx_files/row_col_format11.xlsx</file>
<file>xlsx_files/row_col_format12.xlsx</file>
<file>xlsx_files/row_col_format13.xlsx</file>
<file>xlsx_files/row_col_format14.xlsx</file>
<file>xlsx_files/row_col_format15.xlsx</file>
<file>xlsx_files/row_col_format16.xlsx</file>
<file>xlsx_files/row_col_format17.xlsx</file>
<file>xlsx_files/row_col_format18.xlsx</file>
<file>xlsx_files/set_selection01.xlsx</file>
<file>xlsx_files/set_selection02.xlsx</file>
<file>xlsx_files/set_start_page01.xlsx</file>
<file>xlsx_files/set_start_page02.xlsx</file>
<file>xlsx_files/set_start_page03.xlsx</file>
<file>xlsx_files/shared_strings01.xlsx</file>
<file>xlsx_files/simple01.xlsx</file>
<file>xlsx_files/simple02.xlsx</file>
<file>xlsx_files/simple03.xlsx</file>
<file>xlsx_files/simple04.xlsx</file>
<file>xlsx_files/simple05.xlsx</file>
<file>xlsx_files/tab_color01.xlsx</file>
<file>xlsx_files/types02.xlsx</file>
<file>xlsx_files/types08.xlsx</file>
</qresource>
</RCC>

91
Pump/test.cpp Normal file
View File

@ -0,0 +1,91 @@
// test.cpp
#include <QtGlobal>
#include <QCoreApplication>
#include <QtCore>
#include <QVector>
#include <QVariant>
#include <QDebug>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QDataStream>
#include <QByteArray>
#include <QString>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#include "xlsxdocument.h"
#include "xlsxchartsheet.h"
#include "xlsxcellrange.h"
#include "xlsxchart.h"
#include "xlsxrichstring.h"
#include "xlsxworkbook.h"
#ifdef Q_OS_WIN
#include "colorprintf.h" // https://github.com/VittGam/colorprintf
#endif
int test( QVector<QVariant> params );
int test( QVector<QVariant> params )
{
qDebug() << "[debug] current path : " << QDir::currentPath();
QFile fileNames(":/xlsx_files/dir2.txt");
if ( !fileNames.open(QIODevice::ReadOnly | QIODevice::Text) )
{
qDebug() << "[debug] failed to load dir2.txt";
return (-1);
}
while (!fileNames.atEnd())
{
QByteArray line = fileNames.readLine();
QString strArg(line);
QString strArg2 = strArg.simplified();
QString strArg3 = strArg2.trimmed();
QString currentFilename = QString(":/xlsx_files/%1").arg(strArg3);
{
using namespace QXlsx;
Document output2(currentFilename);
if ( output2.load() )
{
if ( output2.saveAs( strArg3 ) )
{
#ifdef Q_OS_WIN
colorprintf(3, "[debug] xlsx is saved. %s\n", strArg3.toStdString().c_str() );
#else
qDebug() << "[debug] xlsx is saved. " << strArg3;
#endif
}
else
{
#ifdef Q_OS_WIN
colorprintf(0, "[debug] failed to save. %s\n", strArg3.toStdString().c_str() );
#else
qCritical() << "[debug] failed to save. " << strArg3;
#endif
}
}
else
{
#ifdef Q_OS_WIN
colorprintf(0, "[debug] failed to load. %s\n", strArg3.toStdString().c_str() );
#else
qCritical() << "[debug] failed to load. " << strArg3;
#endif
}
}
}
return 0;
}

150
Pump/xlsx_files/License.txt Normal file
View File

@ -0,0 +1,150 @@
/**
@page license License
Libxlsxwriter is released under a FreeBSD license:
Copyright 2014-2019, John McNamara <jmcnamara@cpan.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are
those of the authors and should not be interpreted as representing
official policies, either expressed or implied, of the FreeBSD Project.
Libxlsxwriter includes `queue.h` and `tree.h` from FreeBSD, the `minizip`
component of `zlib` and `tmpfileplus` which have the following licenses:
Queue.h from FreeBSD:
Copyright (c) 1991, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Tree.h from FreeBSD:
Copyright 2002 Niels Provos <provos@citi.umich.edu>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The `minizip` files used in the libxlsxwriter source tree are taken from the
`zlib` ` contrib/minizip` directory. [Zlib](http://www.zlib.net) has the
following License/Copyright:
(C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
The `minizip` files have the following additional copyright declarations:
Copyright (C) 1998-2010 Gilles Vollant
(minizip) ( http://www.winimage.com/zLibDll/minizip.html )
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
Note, it is possible to compile libxlsxwriter without statically linking the
`minizip` files and instead dynamically linking to `lminizip`, see
@ref gsg_minizip.
[Tmpfileplus](http://www.di-mgt.com.au/c_function_to_create_temp_file.html)
has the following license:
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) 2012-16 David Ireland, DI Management Services Pty Ltd
<http://www.di-mgt.com.au/contact/>.
See the [Mozilla Public License, v. 2.0](http://mozilla.org/MPL/2.0/).
Note, it is possible to compile libxlsxwriter using the standard library
`tmpfile()` function instead of `tmpfileplus`, see @ref gsg_tmpdir.
Next: @ref changes
*/

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More