本文整理汇总了C++中RUN_XLSX_STREQ函数的典型用法代码示例。如果您正苦于以下问题:C++ RUN_XLSX_STREQ函数的具体用法?C++ RUN_XLSX_STREQ怎么用?C++ RUN_XLSX_STREQ使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RUN_XLSX_STREQ函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CTEST
// Test the _write_font() function.
CTEST(styles, write_font13) {
char* got;
char exp[] = "<font><b/><i/><strike/><outline/><shadow/><u/><vertAlign val=\"superscript\"/><sz val=\"12\"/><color rgb=\"FFFF0000\"/><name val=\"Calibri\"/><family val=\"2\"/><scheme val=\"minor\"/></font>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_styles *styles = lxw_styles_new();
lxw_format *format = lxw_format_new();
format_set_bold(format);
format_set_italic(format);
format_set_font_size(format, 12);
format_set_font_color(format, LXW_COLOR_RED);
format_set_font_strikeout(format);
format_set_font_outline(format);
format_set_font_shadow(format);
format_set_font_script(format, LXW_FONT_SUPERSCRIPT);
format_set_underline(format, LXW_UNDERLINE_SINGLE);
styles->file = testfile;
_write_font(styles, format, LXW_FALSE);
RUN_XLSX_STREQ(exp, got);
lxw_styles_free(styles);
lxw_format_free(format);
}
示例2: CTEST
/* Test the _write_defined_name() method. */
CTEST(workbook, write_defined_names_sorted) {
char* got;
char exp[] = "<definedNames><definedName name=\"_Egg\">Sheet1!$A$1</definedName><definedName name=\"_Fog\">Sheet1!$A$1</definedName><definedName name=\"aaa\" localSheetId=\"1\">Sheet2!$A$1</definedName><definedName name=\"Abc\">Sheet1!$A$1</definedName><definedName name=\"Bar\" localSheetId=\"2\">'Sheet 3'!$A$1</definedName><definedName name=\"Bar\" localSheetId=\"0\">Sheet1!$A$1</definedName><definedName name=\"Bar\" localSheetId=\"1\">Sheet2!$A$1</definedName><definedName name=\"Baz\">0.98</definedName><definedName name=\"car\" localSheetId=\"2\">\"Saab 900\"</definedName></definedNames>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_workbook *workbook = workbook_new(NULL);
workbook->file = testfile;
workbook_add_worksheet(workbook, NULL);
workbook_add_worksheet(workbook, NULL);
workbook_add_worksheet(workbook, "Sheet 3");
workbook_define_name(workbook, "'Sheet 3'!Bar", "='Sheet 3'!$A$1");
workbook_define_name(workbook, "Abc", "=Sheet1!$A$1" );
workbook_define_name(workbook, "Baz", "=0.98" );
workbook_define_name(workbook, "Sheet1!Bar", "=Sheet1!$A$1" );
workbook_define_name(workbook, "Sheet2!Bar", "=Sheet2!$A$1" );
workbook_define_name(workbook, "Sheet2!aaa", "=Sheet2!$A$1" );
workbook_define_name(workbook, "'Sheet 3'!car", "=\"Saab 900\"" );
workbook_define_name(workbook, "_Egg", "=Sheet1!$A$1" );
workbook_define_name(workbook, "_Fog", "=Sheet1!$A$1" );
_write_defined_names(workbook);
RUN_XLSX_STREQ(exp, got);
lxw_workbook_free(workbook);
}
示例3: CTEST
/* Test the _write_page_setup() method. Without any page setup. */
CTEST(worksheet, write_page_setup01) {
char* got;
char exp[] = "";
FILE* testfile = tmpfile();
lxw_worksheet *worksheet = lxw_worksheet_new(NULL);
worksheet->file = testfile;
_worksheet_write_page_setup(worksheet);
RUN_XLSX_STREQ(exp, got);
lxw_worksheet_free(worksheet);
}
示例4: CTEST
// Test _xml_declaration().
CTEST(chartsheet, xml_declaration) {
char* got;
char exp[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
FILE* testfile = tmpfile();
lxw_chartsheet *chartsheet = lxw_chartsheet_new(NULL);
chartsheet->file = testfile;
_chartsheet_xml_declaration(chartsheet);
RUN_XLSX_STREQ(exp, got);
lxw_chartsheet_free(chartsheet);
}
示例5: CTEST
// Test the _write_file_version() function.
CTEST(workbook, write_file_version) {
char* got;
char exp[] = "<fileVersion appName=\"xl\" lastEdited=\"4\" lowestEdited=\"4\" rupBuild=\"4505\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_workbook *workbook = workbook_new(NULL);
workbook->file = testfile;
_write_file_version(workbook);
RUN_XLSX_STREQ(exp, got);
lxw_workbook_free(workbook);
}
示例6: CTEST
// Test the _write_sheet_format_pr() function.
CTEST(worksheet, write_sheet_format_pr) {
char* got;
char exp[] = "<sheetFormatPr defaultRowHeight=\"15\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_worksheet *worksheet = lxw_worksheet_new(NULL);
worksheet->file = testfile;
_worksheet_write_sheet_format_pr(worksheet);
RUN_XLSX_STREQ(exp, got);
lxw_worksheet_free(worksheet);
}
示例7: CTEST
// Test the _write_dxfs() function.
CTEST(styles, write_dxfs) {
char* got;
char exp[] = "<dxfs count=\"0\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_styles *styles = lxw_styles_new();
styles->file = testfile;
_write_dxfs(styles);
RUN_XLSX_STREQ(exp, got);
lxw_styles_free(styles);
}
示例8: CTEST
// Test the _write_table_styles() function.
CTEST(styles, write_table_styles) {
char* got;
char exp[] = "<tableStyles count=\"0\" defaultTableStyle=\"TableStyleMedium9\" defaultPivotStyle=\"PivotStyleLight16\"/>";
FILE* testfile = tmpfile();
lxw_styles *styles = _new_styles();
styles->file = testfile;
_write_table_styles(styles);
RUN_XLSX_STREQ(exp, got);
_free_styles(styles);
}
示例9: CTEST
// Test the _write_cell_style() function.
CTEST(styles, write_cell_style) {
char* got;
char exp[] = "<cellStyle name=\"Normal\" xfId=\"0\" builtinId=\"0\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_styles *styles = lxw_styles_new();
styles->file = testfile;
_write_cell_style(styles);
RUN_XLSX_STREQ(exp, got);
lxw_styles_free(styles);
}
示例10: CTEST
// Test _xml_declaration().
CTEST(sst, xml_declaration) {
char* got;
char exp[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
FILE* testfile = tmpfile();
lxw_sst *sst = lxw_sst_new();
sst->file = testfile;
_sst_xml_declaration(sst);
RUN_XLSX_STREQ(exp, got);
lxw_sst_free(sst);
}
示例11: CTEST
// Test the _write_sheet_data() function.
CTEST(worksheet, write_sheet_data) {
char* got;
char exp[] = "<sheetData/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_worksheet *worksheet = lxw_worksheet_new(NULL);
worksheet->file = testfile;
_worksheet_write_sheet_data(worksheet);
RUN_XLSX_STREQ(exp, got);
lxw_worksheet_free(worksheet);
}
示例12: CTEST
/* 2. Test the _write_sheet_pr() method. */
CTEST(worksheet, write_write_sheet_pr02) {
char* got;
char exp[] = "<sheetPr><tabColor rgb=\"FFFF0000\"/></sheetPr>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_worksheet *worksheet = lxw_worksheet_new(NULL);
worksheet->file = testfile;
worksheet_set_tab_color(worksheet, LXW_COLOR_RED);
_worksheet_write_sheet_pr(worksheet);
RUN_XLSX_STREQ(exp, got);
lxw_worksheet_free(worksheet);
}
示例13: CTEST
// Test _xml_declaration().
CTEST(core, xml_declaration) {
char* got;
char exp[] = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
FILE* testfile = tmpfile();
lxw_core *core = _new_core();
core->file = testfile;
_core_xml_declaration(core);
RUN_XLSX_STREQ(exp, got);
_free_core(core);
}
示例14: CTEST
// Test the _write_workbook_pr() function.
CTEST(workbook, write_workbook_pr) {
char* got;
char exp[] = "<workbookPr defaultThemeVersion=\"124226\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_workbook *workbook = workbook_new(NULL);
workbook->file = testfile;
_write_workbook_pr(workbook);
RUN_XLSX_STREQ(exp, got);
lxw_workbook_free(workbook);
}
示例15: CTEST
// Test the _write_style_xf() function.
CTEST(styles, write_style_xf) {
char* got;
char exp[] = "<xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/>";
FILE* testfile = lxw_tmpfile(NULL);
lxw_styles *styles = lxw_styles_new();
styles->file = testfile;
_write_style_xf(styles);
RUN_XLSX_STREQ(exp, got);
lxw_styles_free(styles);
}