mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 908609c3f8 | |||
| b22eeeab9d | |||
| 643dc749f2 | |||
| 4dd402f49a | |||
| f0aa7d3212 | |||
| e632f0df3f | |||
| e9535abe9f | |||
| 743800155c | |||
| ee5fed4dbb | |||
| 894239a034 | |||
| b8091509f4 | |||
| 0239816790 | |||
| f0bda85e87 | |||
| 5a42572d79 | |||
| 8cd9dfaef4 | |||
| fa6b903edc |
@ -578,40 +578,51 @@ namespace BinXlsxRW{
|
||||
//SharedStrings
|
||||
if(pCell->m_oValue.IsInit())
|
||||
{
|
||||
pCell->m_oType.Init();
|
||||
const std::wstring& val = pCell->m_oValue->m_sText;
|
||||
if(L"TRUE" == val || L"FALSE" == val)
|
||||
if (pCell->m_oType.IsInit())
|
||||
{
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
|
||||
if(L"TRUE" == val)
|
||||
if (pCell->m_oType->GetValue() == SimpleTypes::Spreadsheet::celltypeSharedString)
|
||||
{
|
||||
pCell->m_oValue->m_sText = L"1";
|
||||
aSharedStrings.push_back(pCell->m_oValue->m_sText);
|
||||
pCell->m_oValue->m_sText = std::to_wstring(aSharedStrings.size() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCell->m_oValue->m_sText = L"0";
|
||||
}
|
||||
}
|
||||
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
|
||||
{
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
|
||||
pCell->m_oValue->m_sText = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
//как в CsvReader - подозрительный код
|
||||
WCHAR *pEndPtr;
|
||||
wcstod(val.c_str(), &pEndPtr);
|
||||
if (0 != *pEndPtr)
|
||||
pCell->m_oType.Init();
|
||||
const std::wstring& val = pCell->m_oValue->m_sText;
|
||||
if(L"TRUE" == val || L"FALSE" == val)
|
||||
{
|
||||
// Не число
|
||||
aSharedStrings.push_back(val);
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
|
||||
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
|
||||
if(L"TRUE" == val)
|
||||
{
|
||||
pCell->m_oValue->m_sText = L"1";
|
||||
}
|
||||
else
|
||||
{
|
||||
pCell->m_oValue->m_sText = L"0";
|
||||
}
|
||||
}
|
||||
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
|
||||
{
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
|
||||
pCell->m_oValue->m_sText = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
pCell->m_oValue->m_sText = val;
|
||||
//как в CsvReader - подозрительный код
|
||||
WCHAR *pEndPtr;
|
||||
wcstod(val.c_str(), &pEndPtr);
|
||||
if (0 != *pEndPtr)
|
||||
{
|
||||
// Не число
|
||||
aSharedStrings.push_back(val);
|
||||
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
|
||||
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCell->m_oValue->m_sText = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -620,7 +631,7 @@ namespace BinXlsxRW{
|
||||
pWorksheet->m_oSheetData->m_arrItems.push_back(pRow);
|
||||
}
|
||||
}
|
||||
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL)
|
||||
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL, bool bAlwaysSharedString)
|
||||
{
|
||||
std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*>::const_iterator itSheets = m_mapSheets.find(sheet);
|
||||
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>* rows = NULL;
|
||||
@ -649,6 +660,12 @@ namespace BinXlsxRW{
|
||||
if(cells->find(nCol) == cells->end())
|
||||
{
|
||||
OOX::Spreadsheet::CCell* pNewCell = parseCreateCell(nRow, nCol, val, format);
|
||||
|
||||
if (bAlwaysSharedString)
|
||||
{
|
||||
pNewCell->m_oType.Init();
|
||||
pNewCell->m_oType->SetValue(SimpleTypes::Spreadsheet::ECellTypeType::celltypeSharedString);
|
||||
}
|
||||
cells->insert(std::make_pair(nCol, pNewCell));
|
||||
}
|
||||
}
|
||||
@ -707,14 +724,14 @@ namespace BinXlsxRW{
|
||||
{
|
||||
if(nCol1 > 1)
|
||||
{
|
||||
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL);
|
||||
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nRow1 > 1)
|
||||
{
|
||||
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL);
|
||||
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -751,7 +768,7 @@ namespace BinXlsxRW{
|
||||
nRow = nRow1 + *val->m_idx;
|
||||
nCol = nCol1;
|
||||
}
|
||||
parseCell(sheetFrom, nRow, nCol, *val->m_v);
|
||||
parseCell(sheetFrom, nRow, nCol, *val->m_v, NULL, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ namespace BinXlsxRW {
|
||||
OOX::Spreadsheet::CWorksheet* toXlsxGetSheet(std::vector<OOX::Spreadsheet::CWorksheet*>& arWorksheets, std::map<std::wstring, OOX::Spreadsheet::CWorksheet*>& mapWorksheets, const std::wstring& sName);
|
||||
void toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings);
|
||||
|
||||
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
|
||||
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format, bool bAlwaysSharedString = false);
|
||||
OOX::Spreadsheet::CCell* parseCreateCell(const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
|
||||
void parseStrRef(const OOX::Spreadsheet::CT_StrRef* pStrRef, bool bUpdateRange, const wchar_t* cRangeName);
|
||||
void parseNumRef(const OOX::Spreadsheet::CT_NumRef* pNumRef, bool bUpdateRange, const wchar_t* cRangeName);
|
||||
|
||||
@ -52,11 +52,11 @@ public:
|
||||
std::wstring convert(std::wstring const & expr);
|
||||
|
||||
// $Лист1.$A$1 -> Лист1!$A$1
|
||||
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ");
|
||||
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ", bool bAbsoluteAlways = false);
|
||||
std::wstring get_table_name();
|
||||
|
||||
//a-la convert without check formula
|
||||
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true);
|
||||
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true, bool bAbsoluteAlways = false);
|
||||
|
||||
//Sheet2.C3:Sheet2.C19 -> Sheet2!C3:C19
|
||||
std::wstring convert_chart_distance(std::wstring const & expr);
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
#include"../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
#include "../src/docx/xlsxconversioncontext.h"
|
||||
#include "../src/docx/xlsx_utils.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace formulasconvert {
|
||||
@ -52,7 +53,7 @@ namespace formulasconvert {
|
||||
|
||||
void split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out);
|
||||
|
||||
void replace_cells_range(std::wstring& expr, bool withTableName);
|
||||
void replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways = false);
|
||||
bool check_formula(std::wstring& expr);
|
||||
void replace_semicolons(std::wstring& expr);
|
||||
void replace_tilda(std::wstring& expr);
|
||||
@ -60,21 +61,22 @@ namespace formulasconvert {
|
||||
void replace_space(std::wstring& expr);
|
||||
void replace_apersand(std::wstring& expr);
|
||||
|
||||
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator);
|
||||
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName);
|
||||
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways);
|
||||
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways);
|
||||
|
||||
static std::wstring replace_named_ref_formater(boost::wsmatch const & what);
|
||||
static std::wstring replace_named_ref_formater1(boost::wsmatch const & what);
|
||||
//static std::wstring replace_cell_range_formater(boost::wsmatch const & what);
|
||||
|
||||
void replace_named_formula(std::wstring & expr, bool w = true);
|
||||
void replace_named_ref(std::wstring & expr, bool w = true);
|
||||
void replace_named_ref(std::wstring & expr, bool withTable = true, bool bAbsoluteAlways = false);
|
||||
|
||||
bool find_first_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref);
|
||||
bool find_first_last_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref_first,std::wstring & ref_last);
|
||||
|
||||
static bool convert_with_TableName;
|
||||
static std::wstring table_name_;
|
||||
static bool convert_with_absolute;
|
||||
static bool convert_with_TableName;
|
||||
static std::wstring table_name_;
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
static std::wstring replace_apersand_formater(boost::wsmatch const & what)
|
||||
@ -259,6 +261,7 @@ namespace formulasconvert {
|
||||
};
|
||||
bool odf2oox_converter::Impl::convert_with_TableName = true;
|
||||
std::wstring odf2oox_converter::Impl::table_name_ = L"";
|
||||
bool odf2oox_converter::Impl::convert_with_absolute = false;
|
||||
|
||||
std::unordered_map<std::wstring, int> &odf2oox_converter::Impl::mapExternalLink_ = oox::xlsx_conversion_context::mapExternalLink_;
|
||||
|
||||
@ -364,7 +367,6 @@ namespace formulasconvert {
|
||||
std::wstring ref2 = sz == 7 ? what[6].str() : what[5].str();
|
||||
|
||||
XmlUtils::replace_all( sheet1, L"$", L"");
|
||||
//XmlUtils::replace_all( sheet2, L"$", L"");
|
||||
|
||||
std::wstring result;
|
||||
|
||||
@ -398,6 +400,20 @@ namespace formulasconvert {
|
||||
}
|
||||
|
||||
table_name_ = sheet1;
|
||||
|
||||
if (convert_with_absolute)
|
||||
{
|
||||
size_t col = 0, row = 0;
|
||||
oox::getCellAddressInv(ref1, col, row);
|
||||
|
||||
ref1 = oox::getCellAddress(col, row, true);
|
||||
|
||||
if (false == ref2.empty())
|
||||
{
|
||||
oox::getCellAddressInv(ref2, col, row);
|
||||
ref2 = oox::getCellAddress(col, row, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (convert_with_TableName)
|
||||
{
|
||||
@ -430,13 +446,14 @@ namespace formulasconvert {
|
||||
// [Sheet2.A1:B5] -> Sheet2!A1:B5
|
||||
// [Sheet2.A1] -> Sheet2!A1
|
||||
// [$'Sheet2 A'.$B2] -> 'Sheet2 A'!$B2
|
||||
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName)
|
||||
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
|
||||
{
|
||||
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
|
||||
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
|
||||
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
|
||||
|
||||
convert_with_TableName = withTableName;
|
||||
convert_with_absolute = bAbsoluteAlways;
|
||||
|
||||
//boost::wregex complexRef(L"\\[(?:\'([^\']*)\'#){0,1}\\[{0,1}(?:\\$){0,1}([^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::(\\${0,1}[^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
|
||||
boost::wregex complexRef(L"(?:(?:(?:(?:\\[\'([^\']*)\'#)|(?:\'([^\']*)\'#\\[)))|(?:\\[))\
|
||||
@ -449,13 +466,14 @@ namespace formulasconvert {
|
||||
&replace_named_ref_formater,
|
||||
boost::match_default | boost::format_all);
|
||||
}
|
||||
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName)
|
||||
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName, bool bAbsoluteAlways)
|
||||
{
|
||||
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
|
||||
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
|
||||
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
|
||||
|
||||
convert_with_TableName = withTableName;
|
||||
convert_with_absolute = bAbsoluteAlways;
|
||||
|
||||
//boost::wregex complexRef(L"\\${0,1}([^\\.]+?){0,1}\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)(?::\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)){0,1}");
|
||||
boost::wregex complexRef(L"\\[{0,1}(?:\'([^\']*)\'#){0,1}\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
|
||||
@ -663,7 +681,7 @@ namespace formulasconvert {
|
||||
|
||||
return result.substr(0, result.size() - 1);// минус последняя лишняя запятая
|
||||
}
|
||||
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
|
||||
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
|
||||
{
|
||||
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там
|
||||
|
||||
@ -674,7 +692,7 @@ namespace formulasconvert {
|
||||
boost::wregex(L"('.*?')|(\".*?\")"),
|
||||
&convert_scobci, boost::match_default | boost::format_all);
|
||||
|
||||
replace_named_ref(workstr, withTableName);
|
||||
replace_named_ref(workstr, withTableName, bAbsoluteAlways);
|
||||
|
||||
if (separator != L" ")
|
||||
{
|
||||
@ -689,7 +707,7 @@ namespace formulasconvert {
|
||||
}
|
||||
return workstr;
|
||||
}
|
||||
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName)
|
||||
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
|
||||
{
|
||||
std::wstring workstr = expr;
|
||||
|
||||
@ -708,7 +726,7 @@ namespace formulasconvert {
|
||||
&convert_scobci, boost::match_default | boost::format_all);
|
||||
|
||||
|
||||
replace_cells_range(workstr, withTableName);
|
||||
replace_cells_range(workstr, withTableName, bAbsoluteAlways);
|
||||
replace_semicolons(workstr);
|
||||
replace_vertical(workstr);
|
||||
|
||||
@ -755,13 +773,13 @@ namespace formulasconvert {
|
||||
{
|
||||
return impl_->split_distance_by(expr, by, out);
|
||||
}
|
||||
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
|
||||
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
|
||||
{
|
||||
return impl_->convert_named_ref(expr, withTableName, separator);
|
||||
return impl_->convert_named_ref(expr, withTableName, separator, bAbsoluteAlways);
|
||||
}
|
||||
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName)
|
||||
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
|
||||
{
|
||||
return impl_->convert_named_expr(expr, withTableName);
|
||||
return impl_->convert_named_expr(expr, withTableName, bAbsoluteAlways);
|
||||
}
|
||||
|
||||
std::wstring odf2oox_converter::convert_ref(std::wstring const & expr)
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
namespace cpdoccore {
|
||||
namespace oox
|
||||
{
|
||||
void forms_context::start_element (int type)
|
||||
void forms_context::start_element (_form_type type)
|
||||
{
|
||||
current_state_.clear();
|
||||
|
||||
|
||||
@ -60,15 +60,32 @@ namespace odf_reader
|
||||
typedef boost::shared_ptr<office_element> office_element_ptr;
|
||||
};
|
||||
|
||||
namespace oox {
|
||||
namespace oox
|
||||
{
|
||||
enum _form_type
|
||||
{
|
||||
formNone = 0,
|
||||
formButton = 1,
|
||||
formLabel = 2,
|
||||
formCheckbox = 3,
|
||||
formCombobox = 4,
|
||||
formListbox = 5,
|
||||
formDateTime = 6,
|
||||
formSpin = 7,
|
||||
formScroll = 8,
|
||||
formFrame = 9,
|
||||
formImage = 10,
|
||||
formText = 11
|
||||
};
|
||||
class forms_context
|
||||
{
|
||||
public:
|
||||
|
||||
struct _state
|
||||
{
|
||||
std::wstring id;
|
||||
std::wstring name;
|
||||
int type = 0; //enum?
|
||||
_form_type type;
|
||||
std::wstring label;
|
||||
std::wstring uuid;
|
||||
std::wstring value;
|
||||
@ -78,7 +95,7 @@ public:
|
||||
|
||||
void clear()
|
||||
{
|
||||
type = 0;
|
||||
type = formNone;
|
||||
id.clear();
|
||||
name.clear();
|
||||
label.clear();
|
||||
@ -90,7 +107,7 @@ public:
|
||||
};
|
||||
forms_context(){}
|
||||
|
||||
void start_element (int type);
|
||||
void start_element (_form_type type);
|
||||
void set_id (const std::wstring& id);
|
||||
void set_name (const std::wstring& name);
|
||||
void set_label (const std::wstring& label);
|
||||
|
||||
@ -538,7 +538,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
|
||||
case OBJ_SpinControl: CP_XML_ATTR(L"ObjectType", L"Spin"); break;
|
||||
case OBJ_Scrollbar: CP_XML_ATTR(L"ObjectType", L"Scroll"); break;
|
||||
case OBJ_List: CP_XML_ATTR(L"ObjectType", L"List"); break;
|
||||
case OBJ_DropdownList: CP_XML_ATTR(L"ObjectType", L"List"); break;
|
||||
case OBJ_DropdownList: CP_XML_ATTR(L"ObjectType", L"Drop"); break;
|
||||
case OBJ_Note: CP_XML_ATTR(L"ObjectType", L"Note"); break;
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
|
||||
if (sVal)
|
||||
{
|
||||
formulasconvert::odf2oox_converter converter;
|
||||
std::wstring fmla = converter.convert_named_ref(*sVal);
|
||||
std::wstring fmla = converter.convert_named_ref(*sVal, true, L" ", true);
|
||||
CP_XML_NODE(L"x:FmlaLink")
|
||||
{
|
||||
CP_XML_STREAM() << fmla;
|
||||
@ -586,7 +586,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
|
||||
if (sVal)
|
||||
{
|
||||
formulasconvert::odf2oox_converter converter;
|
||||
std::wstring fmla = converter.convert_named_ref(*sVal);
|
||||
std::wstring fmla = converter.convert_named_ref(*sVal, true, L" ", true);
|
||||
CP_XML_NODE(L"x:FmlaRange")
|
||||
{
|
||||
CP_XML_STREAM() << fmla;
|
||||
|
||||
@ -182,9 +182,17 @@ public:
|
||||
}
|
||||
CP_XML_NODE(L"v:path")
|
||||
{
|
||||
CP_XML_ATTR(L"gradientshapeok", L"t");
|
||||
CP_XML_ATTR(L"shadowok", L"f");
|
||||
CP_XML_ATTR(L"o:extrusionok", L"f");
|
||||
CP_XML_ATTR(L"strokeok", L"f");
|
||||
CP_XML_ATTR(L"fillok", L"f");
|
||||
CP_XML_ATTR(L"o:connecttype", L"rect");
|
||||
}
|
||||
CP_XML_NODE(L"o:lock")
|
||||
{
|
||||
CP_XML_ATTR(L"v:ext", L"edit");
|
||||
CP_XML_ATTR(L"shapetype", L"t");
|
||||
}
|
||||
}
|
||||
CP_XML_NODE(L"v:shapetype")
|
||||
{
|
||||
|
||||
@ -84,9 +84,10 @@ std::wstring getRowAddress(size_t row)
|
||||
return std::to_wstring(row + 1);
|
||||
}
|
||||
|
||||
std::wstring getCellAddress(size_t col, size_t row)
|
||||
std::wstring getCellAddress(size_t col, size_t row, bool bAbsolute)
|
||||
{
|
||||
return getColAddress(col) + getRowAddress(row);
|
||||
std::wstring a = bAbsolute ? L"$" : L"";
|
||||
return a + getColAddress(col) + a + getRowAddress(row);
|
||||
}
|
||||
|
||||
//_ASSERTE(getColAddressInv(L"A") == 0);
|
||||
|
||||
@ -49,7 +49,7 @@ std::wstring getRowAddress(size_t row);
|
||||
size_t getColAddressInv(const std::wstring & a);
|
||||
size_t getRowAdderssInv(const std::wstring & a);
|
||||
|
||||
std::wstring getCellAddress(size_t col, size_t row);
|
||||
std::wstring getCellAddress(size_t col, size_t row, bool bAbsolute = false);
|
||||
void getCellAddressInv(const std::wstring & a, size_t & col, size_t & row);
|
||||
|
||||
bool parseBoolVal(const std::wstring & str);
|
||||
|
||||
@ -301,13 +301,13 @@ void form_frame::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_frame::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(1);
|
||||
Context.get_forms_context().start_element(oox::formFrame);
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_frame::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(1);
|
||||
Context.get_forms_context().start_element(oox::formFrame);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -340,13 +340,13 @@ void form_button::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_button::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(1);
|
||||
Context.get_forms_context().start_element(oox::formButton);
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_button::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(1);
|
||||
Context.get_forms_context().start_element(oox::formButton);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -379,14 +379,14 @@ void form_text::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_text::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(2);
|
||||
Context.get_forms_context().start_element(oox::formText);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_text::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(2);
|
||||
Context.get_forms_context().start_element(oox::formLabel);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -403,9 +403,6 @@ void form_text::serialize_control_props(std::wostream & strm)
|
||||
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
CP_XML_ATTR(L"noThreeD", L"1");
|
||||
|
||||
if (value_)
|
||||
CP_XML_ATTR(L"val", *value_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -463,7 +460,7 @@ void form_text::docx_convert_field(oox::docx_conversion_context & Context, draw_
|
||||
Context.finish_run();
|
||||
Context.output_stream() << L"<w:r><w:fldChar w:fldCharType=\"end\"/></w:r>";
|
||||
}
|
||||
// form:fixed-text
|
||||
// form:textarea
|
||||
//----------------------------------------------------------------------------------
|
||||
const wchar_t * form_textarea::ns = L"form";
|
||||
const wchar_t * form_textarea::name = L"textarea";
|
||||
@ -480,14 +477,14 @@ void form_fixed_text::add_attributes( const xml::attributes_wc_ptr & Attributes
|
||||
}
|
||||
void form_fixed_text::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(2);
|
||||
Context.get_forms_context().start_element(oox::formLabel);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_fixed_text::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(2);
|
||||
Context.get_forms_context().start_element(oox::formLabel);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -500,13 +497,10 @@ void form_fixed_text::serialize_control_props(std::wostream & strm)
|
||||
{
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
|
||||
|
||||
CP_XML_ATTR(L"objectType", L"EditBox");
|
||||
CP_XML_ATTR(L"objectType", L"Label");
|
||||
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
CP_XML_ATTR(L"lockText", L"1");
|
||||
CP_XML_ATTR(L"noThreeD", L"1");
|
||||
|
||||
if (value_)
|
||||
CP_XML_ATTR(L"val", *value_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -584,14 +578,14 @@ void form_checkbox::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_checkbox::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(3);
|
||||
Context.get_forms_context().start_element(oox::formCheckbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_checkbox::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(3);
|
||||
Context.get_forms_context().start_element(oox::formCheckbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -701,7 +695,7 @@ void form_radio::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_radio::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(3);
|
||||
Context.get_forms_context().start_element(oox::formCheckbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
@ -710,7 +704,7 @@ void form_radio::docx_convert(oox::docx_conversion_context & Context)
|
||||
}
|
||||
void form_radio::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(3);
|
||||
Context.get_forms_context().start_element(oox::formCheckbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -750,6 +744,8 @@ void form_combobox::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
|
||||
CP_APPLY_ATTR(L"form:source-cell-range", source_cell_range_);
|
||||
CP_APPLY_ATTR(L"form:list-source", list_source_);
|
||||
CP_APPLY_ATTR(L"form:size", size_);
|
||||
CP_APPLY_ATTR(L"form:value", n_value_);
|
||||
}
|
||||
void form_combobox::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
|
||||
{
|
||||
@ -764,14 +760,14 @@ void form_combobox::add_child_element( xml::sax * Reader, const std::wstring & N
|
||||
}
|
||||
void form_combobox::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(4);
|
||||
Context.get_forms_context().start_element(oox::formCombobox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_combobox::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(4);
|
||||
Context.get_forms_context().start_element(oox::formCombobox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -786,22 +782,29 @@ void form_combobox::serialize_control_props(std::wostream & strm)
|
||||
CP_XML_ATTR(L"xmlns", L"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main");
|
||||
CP_XML_ATTR(L"objectType", L"Drop");
|
||||
CP_XML_ATTR(L"dropStyle", L"combo");
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
|
||||
if (size_)
|
||||
CP_XML_ATTR(L"dx", 3 * (*size_));
|
||||
else
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
|
||||
CP_XML_ATTR(L"noThreeD", L"1");
|
||||
|
||||
if (linked_cell_)
|
||||
{
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_);
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_, true, L" ", true);
|
||||
CP_XML_ATTR(L"fmlaLink", fmla);
|
||||
}
|
||||
if (source_cell_range_)
|
||||
{
|
||||
std::wstring fmla = converter.convert_named_expr(*source_cell_range_);
|
||||
std::wstring fmla = converter.convert_named_ref(*source_cell_range_, true, L" ", true);
|
||||
CP_XML_ATTR(L"fmlaRange", fmla);
|
||||
}
|
||||
//CP_XML_ATTR(L"sel", L"3");
|
||||
if (value_)
|
||||
CP_XML_ATTR(L"val", *value_);
|
||||
CP_XML_ATTR(L"sel", L"3");
|
||||
if (n_value_)
|
||||
CP_XML_ATTR(L"val", *n_value_);
|
||||
else
|
||||
CP_XML_ATTR(L"val", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -873,17 +876,19 @@ void form_listbox::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
CP_APPLY_ATTR(L"form:list-source", list_source_);
|
||||
CP_APPLY_ATTR(L"form:list-source-type", list_source_type_);
|
||||
CP_APPLY_ATTR(L"form:list-linkage-type", list_linkage_type_);
|
||||
CP_APPLY_ATTR(L"form:size", size_);
|
||||
CP_APPLY_ATTR(L"form:value", n_value_);
|
||||
}
|
||||
void form_listbox::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(5);
|
||||
Context.get_forms_context().start_element(oox::formListbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_listbox::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(5);
|
||||
Context.get_forms_context().start_element(oox::formListbox);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -902,22 +907,26 @@ void form_listbox::serialize_control_props(std::wostream & strm)
|
||||
{
|
||||
CP_XML_ATTR(L"dropStyle", L"combo");
|
||||
}
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
if (size_)
|
||||
CP_XML_ATTR(L"dx", 3 * (*size_));
|
||||
else
|
||||
CP_XML_ATTR(L"dx", L"20");
|
||||
|
||||
CP_XML_ATTR(L"noThreeD", L"1");
|
||||
|
||||
if (linked_cell_)
|
||||
{
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_);
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_, true, L" ", true);
|
||||
CP_XML_ATTR(L"fmlaLink", fmla);
|
||||
}
|
||||
if (source_cell_range_)
|
||||
{
|
||||
std::wstring fmla = converter./*convert_named_expr*/convert_named_ref(*source_cell_range_);
|
||||
std::wstring fmla = converter./*convert_named_expr*/convert_named_ref(*source_cell_range_, true, L" ", true);
|
||||
CP_XML_ATTR(L"fmlaRange", fmla);
|
||||
}
|
||||
//CP_XML_ATTR(L"sel", L"3");
|
||||
if (value_)
|
||||
CP_XML_ATTR(L"val", *value_);
|
||||
if (n_value_)
|
||||
CP_XML_ATTR(L"val", *n_value_);
|
||||
|
||||
}
|
||||
}
|
||||
@ -934,14 +943,14 @@ void form_date::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_date::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(6);
|
||||
Context.get_forms_context().start_element(oox::formDateTime);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_date::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(6);
|
||||
Context.get_forms_context().start_element(oox::formDateTime);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -1009,14 +1018,14 @@ void form_time::add_attributes( const xml::attributes_wc_ptr & Attributes )
|
||||
}
|
||||
void form_time::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(6);
|
||||
Context.get_forms_context().start_element(oox::formDateTime);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_time::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
Context.get_forms_context().start_element(6);
|
||||
Context.get_forms_context().start_element(oox::formDateTime);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
form_element::xlsx_convert(Context);
|
||||
@ -1086,17 +1095,17 @@ void form_image_frame::add_attributes( const xml::attributes_wc_ptr & Attributes
|
||||
}
|
||||
void form_image_frame::docx_convert(oox::docx_conversion_context & Context)
|
||||
{
|
||||
//Context.get_forms_context().start_element(xxx);
|
||||
//Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
Context.get_forms_context().start_element(oox::formImage);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
//form_element::docx_convert(Context);
|
||||
form_element::docx_convert(Context);
|
||||
}
|
||||
void form_image_frame::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
//Context.get_forms_context().start_element(xxx);
|
||||
//Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
Context.get_forms_context().start_element(oox::formImage);
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
//form_element::xlsx_convert(Context);
|
||||
form_element::xlsx_convert(Context);
|
||||
}
|
||||
void form_image_frame::serialize_control_props(std::wostream & strm)
|
||||
{
|
||||
@ -1141,9 +1150,9 @@ void form_value_range::docx_convert(oox::docx_conversion_context & Context)
|
||||
if (!control_implementation_) return;
|
||||
|
||||
if (control_implementation_->find(L"SpinButton") != std::wstring::npos)
|
||||
Context.get_forms_context().start_element(7); //spin
|
||||
Context.get_forms_context().start_element(oox::formSpin);
|
||||
else
|
||||
Context.get_forms_context().start_element(8); //scroll
|
||||
Context.get_forms_context().start_element(oox::formScroll);
|
||||
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
@ -1154,9 +1163,9 @@ void form_value_range::xlsx_convert(oox::xlsx_conversion_context & Context)
|
||||
if (!control_implementation_) return;
|
||||
|
||||
if (control_implementation_->find(L"SpinButton") != std::wstring::npos)
|
||||
Context.get_forms_context().start_element(7); //spin
|
||||
Context.get_forms_context().start_element(oox::formSpin);
|
||||
else
|
||||
Context.get_forms_context().start_element(8); //scroll
|
||||
Context.get_forms_context().start_element(oox::formScroll);
|
||||
|
||||
Context.get_forms_context().set_element(dynamic_cast<form_element*>(this));
|
||||
|
||||
@ -1179,7 +1188,7 @@ void form_value_range::serialize_control_props(std::wostream & strm)
|
||||
|
||||
if (linked_cell_)
|
||||
{
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_);
|
||||
std::wstring fmla = converter.convert_named_ref(*linked_cell_, true, L" ", true);
|
||||
CP_XML_ATTR(L"fmlaLink", fmla);
|
||||
}
|
||||
if (value_) CP_XML_ATTR(L"val", *value_);
|
||||
|
||||
@ -486,7 +486,8 @@ private:
|
||||
public:
|
||||
office_element_ptr_array items_;
|
||||
_CP_OPT(int ) size_;
|
||||
|
||||
_CP_OPT(int) n_value_;
|
||||
|
||||
_CP_OPT(std::wstring) source_cell_range_;
|
||||
_CP_OPT(std::wstring) list_source_;
|
||||
|
||||
@ -518,13 +519,13 @@ public:
|
||||
_CP_OPT(std::wstring) source_cell_range_;
|
||||
_CP_OPT(std::wstring) list_source_;
|
||||
_CP_OPT(std::wstring) list_source_type_;
|
||||
_CP_OPT(int) size_;
|
||||
_CP_OPT(int) n_value_;
|
||||
|
||||
//form:bound-column
|
||||
//form:xforms-list-source
|
||||
//form:multiple
|
||||
//form:listlinkage-type
|
||||
|
||||
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(form_listbox);
|
||||
|
||||
@ -631,13 +632,10 @@ CP_REGISTER_OFFICE_ELEMENT2(form_item);
|
||||
}
|
||||
//<form:connection-resource>7.6.2,
|
||||
//<form:file> 13.5.5,
|
||||
//<form:form> 13.3,
|
||||
//<form:formatted-text> 13.5.6,
|
||||
//<form:frame> 13.5.19,
|
||||
//<form:generic-control> 13.5.25,
|
||||
//<form:grid> 13.5.22,
|
||||
//<form:hidden> 13.5.21,
|
||||
//<form:image> 13.5.16,
|
||||
//<form:image-frame> 13.5.20,
|
||||
//<form:number> 13.5.7,
|
||||
//<form:password> 13.5.4,
|
||||
|
||||
@ -1424,7 +1424,7 @@ void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xls
|
||||
if (horizontal_margins.fo_margin_left_ || horizontal_margins.fo_margin_right_ ||
|
||||
vertical_margins.fo_margin_top_ || vertical_margins.fo_margin_bottom_ )
|
||||
{
|
||||
_CP_OPT(double) header, footer;
|
||||
_CP_OPT(double) header, footer, top, bottom;
|
||||
|
||||
header = Context.get_table_context().get_header_page();
|
||||
footer = Context.get_table_context().get_footer_page();
|
||||
@ -1440,17 +1440,33 @@ void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xls
|
||||
else CP_XML_ATTR(L"right", 0);
|
||||
|
||||
if (vertical_margins.fo_margin_top_ && vertical_margins.fo_margin_top_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"top" , vertical_margins.fo_margin_top_->get_length().get_value_unit(odf_types::length::inch));
|
||||
{
|
||||
top = vertical_margins.fo_margin_top_->get_length().get_value_unit(odf_types::length::inch);
|
||||
CP_XML_ATTR(L"top", *top);
|
||||
}
|
||||
else CP_XML_ATTR(L"top", 1.025);
|
||||
|
||||
if (vertical_margins.fo_margin_bottom_ && vertical_margins.fo_margin_bottom_->get_type() == odf_types::length_or_percent::Length)
|
||||
CP_XML_ATTR(L"bottom" , vertical_margins.fo_margin_bottom_->get_length().get_value_unit(odf_types::length::inch));
|
||||
{
|
||||
bottom = vertical_margins.fo_margin_bottom_->get_length().get_value_unit(odf_types::length::inch);
|
||||
CP_XML_ATTR(L"bottom", *bottom);
|
||||
}
|
||||
else CP_XML_ATTR(L"bottom", 1.025);
|
||||
|
||||
if (header) CP_XML_ATTR(L"header" , *header / 72.0); // pt -> inch
|
||||
if (header)
|
||||
{
|
||||
*header = (*header / 72.0) + top.get_value_or(0);
|
||||
if (*header < 0) *header = 0.7875;
|
||||
CP_XML_ATTR(L"header", *header); // pt -> inch
|
||||
}
|
||||
else CP_XML_ATTR(L"header", 0.7875);
|
||||
|
||||
if (footer) CP_XML_ATTR(L"footer" , *footer / 72.0);
|
||||
if (footer)
|
||||
{
|
||||
*footer = (*footer / 72.0) + bottom.get_value_or(0);
|
||||
if (*footer < 0) *footer = 0.7875;
|
||||
CP_XML_ATTR(L"footer", *footer);
|
||||
}
|
||||
else CP_XML_ATTR(L"footer", 0.7875);
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,14 +201,48 @@ namespace PPTX
|
||||
pWriter->m_pMainDocument = old_serializer;
|
||||
}
|
||||
else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX ||
|
||||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM)
|
||||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM ||
|
||||
office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
|
||||
{
|
||||
type = 2;
|
||||
|
||||
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(oFontProcessor);
|
||||
OOX::Spreadsheet::CXlsx oXlsxEmbedded(oox_unpacked);
|
||||
|
||||
xlsxBinaryWriter.intoBindoc(&oXlsxEmbedded, *oDrawingConverter.m_pBinaryWriter , NULL, &oDrawingConverter);
|
||||
type = 2;
|
||||
|
||||
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(oFontProcessor);
|
||||
OOX::Spreadsheet::CXlsx *pXlsxEmbedded = NULL;
|
||||
NSBinPptxRW::CXlsbBinaryWriter oXlsbWriter;
|
||||
|
||||
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
|
||||
pXlsxEmbedded = new OOX::Spreadsheet::CXlsb();
|
||||
else
|
||||
pXlsxEmbedded = new OOX::Spreadsheet::CXlsx();
|
||||
|
||||
oXlsbWriter.WriteReserved(xlsxBinaryWriter.GetMainTableSize());
|
||||
unsigned int nXlsbWriterStartPos = oXlsbWriter.GetPositionAbsolute();
|
||||
|
||||
pXlsxEmbedded->m_pXlsbWriter = &oXlsbWriter;
|
||||
pXlsxEmbedded->m_bNeedCalcChain = false;
|
||||
|
||||
pXlsxEmbedded->Read(oox_unpacked);
|
||||
pXlsxEmbedded->PrepareWorkbook();
|
||||
|
||||
unsigned int nXlsbWriterEndPos = oXlsbWriter.GetPositionAbsolute();
|
||||
|
||||
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
|
||||
{
|
||||
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareSi();
|
||||
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareTableFormula();
|
||||
}
|
||||
xlsxBinaryWriter.WriteMainTableStart(*oDrawingConverter.m_pBinaryWriter);
|
||||
|
||||
if (nXlsbWriterEndPos > nXlsbWriterStartPos)
|
||||
{
|
||||
xlsxBinaryWriter.WriteBinaryTable(oXlsbWriter.GetBuffer() + nXlsbWriterStartPos, nXlsbWriterEndPos - nXlsbWriterStartPos);
|
||||
}
|
||||
xlsxBinaryWriter.WriteContent(pXlsxEmbedded, NULL, &oDrawingConverter);
|
||||
xlsxBinaryWriter.WriteMainTableEnd();
|
||||
|
||||
pXlsxEmbedded->m_pXlsbWriter = NULL;
|
||||
|
||||
delete pXlsxEmbedded;
|
||||
}
|
||||
//else if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX)
|
||||
//{
|
||||
|
||||
@ -451,14 +451,48 @@ namespace PPTX
|
||||
|
||||
oDrawingConverter.SetFontPicker(pWriter->m_pCommon->m_pFontPicker);
|
||||
|
||||
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(oFontProcessor);
|
||||
//----------------------------
|
||||
OOX::Spreadsheet::CXlsx oXlsxEmbedded(oox_unpacked);
|
||||
BinXlsxRW::BinaryFileWriter xlsxBinaryWriter(oFontProcessor);
|
||||
OOX::Spreadsheet::CXlsx *pXlsxEmbedded = NULL;
|
||||
NSBinPptxRW::CXlsbBinaryWriter oXlsbWriter;
|
||||
|
||||
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
|
||||
pXlsxEmbedded = new OOX::Spreadsheet::CXlsb();
|
||||
else
|
||||
pXlsxEmbedded = new OOX::Spreadsheet::CXlsx();
|
||||
|
||||
//startheader for test
|
||||
//oXlsbWriter.WriteStringUtf8(xlsxBinaryWriter.WriteFileHeader(0, BinXlsxRW::g_nFormatVersionNoBase64));
|
||||
oXlsbWriter.WriteReserved(xlsxBinaryWriter.GetMainTableSize());
|
||||
unsigned int nXlsbWriterStartPos = oXlsbWriter.GetPositionAbsolute();
|
||||
|
||||
pXlsxEmbedded->m_pXlsbWriter = &oXlsbWriter;
|
||||
pXlsxEmbedded->m_bNeedCalcChain = false;
|
||||
|
||||
pXlsxEmbedded->Read(oox_unpacked);
|
||||
pXlsxEmbedded->PrepareWorkbook();
|
||||
|
||||
unsigned int nXlsbWriterEndPos = xlsxBinaryWriter.m_nLastFilePosOffset = oXlsbWriter.GetPositionAbsolute() - nXlsbWriterStartPos;
|
||||
|
||||
if (office_checker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSB)
|
||||
{
|
||||
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareSi();
|
||||
dynamic_cast<OOX::Spreadsheet::CXlsb*>(pXlsxEmbedded)->PrepareTableFormula();
|
||||
}
|
||||
//startheader for test
|
||||
//oDrawingConverter.m_pBinaryWriter->WriteStringUtf8(xlsxBinaryWriter.WriteFileHeader(0, BinXlsxRW::g_nFormatVersionNoBase64));
|
||||
|
||||
xlsxBinaryWriter.intoBindoc(&oXlsxEmbedded, *oDrawingConverter.m_pBinaryWriter, NULL, &oDrawingConverter);
|
||||
xlsxBinaryWriter.WriteMainTableStart(*oDrawingConverter.m_pBinaryWriter);
|
||||
|
||||
if (nXlsbWriterEndPos - nXlsbWriterStartPos > 0)
|
||||
{
|
||||
xlsxBinaryWriter.WriteBinaryTable(oXlsbWriter.GetBuffer() + nXlsbWriterStartPos, nXlsbWriterEndPos - nXlsbWriterStartPos);
|
||||
}
|
||||
xlsxBinaryWriter.WriteContent(pXlsxEmbedded, NULL, &oDrawingConverter);
|
||||
xlsxBinaryWriter.WriteMainTableEnd();
|
||||
|
||||
pXlsxEmbedded->m_pXlsbWriter = NULL;
|
||||
|
||||
delete pXlsxEmbedded;
|
||||
//------------------------------
|
||||
pWriter->SetRels(old_rels);
|
||||
*pWriter->m_pTheme = old_theme;
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include "../../../../UnicodeConverter/UnicodeConverter.h"
|
||||
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include "../Logic/Biff_structures/CellRangeRef.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
@ -44,366 +44,387 @@ struct CFRecordTypeValue
|
||||
}
|
||||
CFRecordTypeValues[] =
|
||||
{
|
||||
{"Formula", rt_Formula},
|
||||
{"EOF", rt_EOF},
|
||||
{"CalcCount", rt_CalcCount},
|
||||
{"CalcMode", rt_CalcMode},
|
||||
{"CalcPrecision", rt_CalcPrecision},
|
||||
{"CalcRefMode", rt_CalcRefMode},
|
||||
{"CalcDelta", rt_CalcDelta},
|
||||
{"CalcIter", rt_CalcIter},
|
||||
{"Protect", rt_Protect},
|
||||
{"Password", rt_Password},
|
||||
{"Header", rt_Header},
|
||||
{"Footer", rt_Footer},
|
||||
{"ExternSheet", rt_ExternSheet},
|
||||
{"Lbl", rt_Lbl},
|
||||
{"WinProtect", rt_WinProtect},
|
||||
{"VerticalPageBreaks", rt_VerticalPageBreaks},
|
||||
{"HorizontalPageBreaks", rt_HorizontalPageBreaks},
|
||||
{"Note", rt_Note},
|
||||
{"Selection", rt_Selection},
|
||||
{"Date1904", rt_Date1904},
|
||||
{"ExternName", rt_ExternName},
|
||||
{"LeftMargin", rt_LeftMargin},
|
||||
{"RightMargin", rt_RightMargin},
|
||||
{"TopMargin", rt_TopMargin},
|
||||
{"BottomMargin", rt_BottomMargin},
|
||||
{"PrintRowCol", rt_PrintRowCol},
|
||||
{"PrintGrid", rt_PrintGrid},
|
||||
{"FilePass", rt_FilePass},
|
||||
{"Font", rt_Font},
|
||||
{"PrintSize", rt_PrintSize},
|
||||
{"Continue", rt_Continue},
|
||||
{"Window1", rt_Window1},
|
||||
{"Backup", rt_Backup},
|
||||
{"Pane", rt_Pane},
|
||||
{"CodePage", rt_CodePage},
|
||||
{"Pls", rt_Pls},
|
||||
{"DCon", rt_DCon},
|
||||
{"DConRef", rt_DConRef},
|
||||
{"DConName", rt_DConName},
|
||||
{"DefColWidth", rt_DefColWidth},
|
||||
{"XCT", rt_XCT},
|
||||
{"CRN", rt_CRN},
|
||||
{"FileSharing", rt_FileSharing},
|
||||
{"WriteAccess", rt_WriteAccess},
|
||||
{"Obj", rt_Obj},
|
||||
{"Uncalced", rt_Uncalced},
|
||||
{"CalcSaveRecalc", rt_CalcSaveRecalc},
|
||||
{"Template", rt_Template},
|
||||
{"Intl", rt_Intl},
|
||||
{"ObjProtect", rt_ObjProtect},
|
||||
{"ColInfo", rt_ColInfo},
|
||||
{"Guts", rt_Guts},
|
||||
{"WsBool", rt_WsBool},
|
||||
{"GridSet", rt_GridSet},
|
||||
{"HCenter", rt_HCenter},
|
||||
{"VCenter", rt_VCenter},
|
||||
{"BoundSheet8", rt_BoundSheet8},
|
||||
{"WriteProtect", rt_WriteProtect},
|
||||
{"Country", rt_Country},
|
||||
{"HideObj", rt_HideObj},
|
||||
{"Sort", rt_Sort},
|
||||
{"Palette", rt_Palette},
|
||||
{"Sync", rt_Sync},
|
||||
{"LPr", rt_LPr},
|
||||
{"DxGCol", rt_DxGCol},
|
||||
{"FnGroupName", rt_FnGroupName},
|
||||
{"FilterMode", rt_FilterMode},
|
||||
{"BuiltInFnGroupCount", rt_BuiltInFnGroupCount},
|
||||
{"AutoFilterInfo", rt_AutoFilterInfo},
|
||||
{"AutoFilter", rt_AutoFilter},
|
||||
{"Scl", rt_Scl},
|
||||
{"Setup", rt_Setup},
|
||||
{"ScenMan", rt_ScenMan},
|
||||
{"SCENARIO", rt_SCENARIO},
|
||||
{"SxView", rt_SxView},
|
||||
{"Sxvd", rt_Sxvd},
|
||||
{"SXVI", rt_SXVI},
|
||||
{"SxIvd", rt_SxIvd},
|
||||
{"SXLI", rt_SXLI},
|
||||
{"SXPI", rt_SXPI},
|
||||
{"DocRoute", rt_DocRoute},
|
||||
{"RecipName", rt_RecipName},
|
||||
{"MulRk", rt_MulRk},
|
||||
{"MulBlank", rt_MulBlank},
|
||||
{"Mms", rt_Mms},
|
||||
{"SXDI", rt_SXDI},
|
||||
{"SXDB", rt_SXDB},
|
||||
{"SXFDB", rt_SXFDB},
|
||||
{"SXDBB", rt_SXDBB},
|
||||
{"SXNum", rt_SXNum},
|
||||
{"SxBool", rt_SxBool},
|
||||
{"SxErr", rt_SxErr},
|
||||
{"SXInt", rt_SXInt},
|
||||
{"SXString", rt_SXString},
|
||||
{"SXDtr", rt_SXDtr},
|
||||
{"SxNil", rt_SxNil},
|
||||
{"SXTbl", rt_SXTbl},
|
||||
{"SXTBRGIITM", rt_SXTBRGIITM},
|
||||
{"SxTbpg", rt_SxTbpg},
|
||||
{"ObProj", rt_ObProj},
|
||||
{"SXStreamID", rt_SXStreamID},
|
||||
{"DBCell", rt_DBCell},
|
||||
{"SXRng", rt_SXRng},
|
||||
{"SxIsxoper", rt_SxIsxoper},
|
||||
{"BookBool", rt_BookBool},
|
||||
{"DbOrParamQry", rt_DbOrParamQry},
|
||||
{"ScenarioProtect", rt_ScenarioProtect},
|
||||
{"OleObjectSize", rt_OleObjectSize},
|
||||
{"XF", rt_XF},
|
||||
{"InterfaceHdr", rt_InterfaceHdr},
|
||||
{"InterfaceEnd", rt_InterfaceEnd},
|
||||
{"SXVS", rt_SXVS},
|
||||
{"MergeCells", rt_MergeCells},
|
||||
{"BkHim", rt_BkHim},
|
||||
{"IMDATA", rt_IMDATA},
|
||||
{"MsoDrawingGroup", rt_MsoDrawingGroup},
|
||||
{"MsoDrawing", rt_MsoDrawing},
|
||||
{"MsoDrawingSelection", rt_MsoDrawingSelection},
|
||||
{"PhoneticInfo", rt_PhoneticInfo},
|
||||
{"SxRule", rt_SxRule},
|
||||
{"SXEx", rt_SXEx},
|
||||
{"SxFilt", rt_SxFilt},
|
||||
{"SxDXF", rt_SxDXF},
|
||||
{"SxItm", rt_SxItm},
|
||||
{"SxName", rt_SxName},
|
||||
{"SxSelect", rt_SxSelect},
|
||||
{"SXPair", rt_SXPair},
|
||||
{"SxFmla", rt_SxFmla},
|
||||
{"SxFormat", rt_SxFormat},
|
||||
{"SST", rt_SST},
|
||||
{"LabelSst", rt_LabelSst},
|
||||
{"ExtSST", rt_ExtSST},
|
||||
{"SXVDEx", rt_SXVDEx},
|
||||
{"SXFormula", rt_SXFormula},
|
||||
{"SXDBEx", rt_SXDBEx},
|
||||
{"RRDInsDel", rt_RRDInsDel},
|
||||
{"RRDHead", rt_RRDHead},
|
||||
{"RRDChgCell", rt_RRDChgCell},
|
||||
{"RRTabId", rt_RRTabId},
|
||||
{"RRDRenSheet", rt_RRDRenSheet},
|
||||
{"RRSort", rt_RRSort},
|
||||
{"RRDMove", rt_RRDMove},
|
||||
{"RRFormat", rt_RRFormat},
|
||||
{"RRAutoFmt", rt_RRAutoFmt},
|
||||
{"RRInsertSh", rt_RRInsertSh},
|
||||
{"RRDMoveBegin", rt_RRDMoveBegin},
|
||||
{"RRDMoveEnd", rt_RRDMoveEnd},
|
||||
{"RRDInsDelBegin", rt_RRDInsDelBegin},
|
||||
{"RRDInsDelEnd", rt_RRDInsDelEnd},
|
||||
{"RRDConflict", rt_RRDConflict},
|
||||
{"RRDDefName", rt_RRDDefName},
|
||||
{"RRDRstEtxp", rt_RRDRstEtxp},
|
||||
{"LRng", rt_LRng},
|
||||
{"UsesELFs", rt_UsesELFs},
|
||||
{"DSF", rt_DSF},
|
||||
{"CUsr", rt_CUsr},
|
||||
{"CbUsr", rt_CbUsr},
|
||||
{"UsrInfo", rt_UsrInfo},
|
||||
{"UsrExcl", rt_UsrExcl},
|
||||
{"FileLock", rt_FileLock},
|
||||
{"RRDInfo", rt_RRDInfo},
|
||||
{"BCUsrs", rt_BCUsrs},
|
||||
{"UsrChk", rt_UsrChk},
|
||||
{"UserBView", rt_UserBView},
|
||||
{"UserSViewBegin", rt_UserSViewBegin},
|
||||
{"UserSViewBegin_Chart", rt_UserSViewBegin_Chart},
|
||||
{"UserSViewEnd", rt_UserSViewEnd},
|
||||
{"RRDUserView", rt_RRDUserView},
|
||||
{"Qsi", rt_Qsi},
|
||||
{"SupBook", rt_SupBook},
|
||||
{"Prot4Rev", rt_Prot4Rev},
|
||||
{"CondFmt", rt_CondFmt},
|
||||
{"CF", rt_CF},
|
||||
{"DVal", rt_DVal},
|
||||
{"DConBin", rt_DConBin},
|
||||
{"TxO", rt_TxO},
|
||||
{"RefreshAll", rt_RefreshAll},
|
||||
{"HLink", rt_HLink},
|
||||
{"Lel", rt_Lel},
|
||||
{"CodeName", rt_CodeName},
|
||||
{"SXFDBType", rt_SXFDBType},
|
||||
{"Prot4RevPass", rt_Prot4RevPass},
|
||||
{"ObNoMacros", rt_ObNoMacros},
|
||||
{"Dv", rt_Dv},
|
||||
{"Excel9File", rt_Excel9File},
|
||||
{"RecalcId", rt_RecalcId},
|
||||
{"EntExU2", rt_EntExU2},
|
||||
{"Dimensions", rt_Dimensions},
|
||||
{"Blank", rt_Blank},
|
||||
{"Number", rt_Number},
|
||||
{"Label", rt_Label},
|
||||
{"BoolErr", rt_BoolErr},
|
||||
{"String", rt_String},
|
||||
{"Row", rt_Row},
|
||||
{"Index", rt_Index},
|
||||
{"Array", rt_Array},
|
||||
{"DefaultRowHeight", rt_DefaultRowHeight},
|
||||
{"Table", rt_Table},
|
||||
{"Window2", rt_Window2},
|
||||
{"RK", rt_RK},
|
||||
{"Style", rt_Style},
|
||||
{"BigName", rt_BigName},
|
||||
{"Format", rt_Format},
|
||||
{"ContinueBigName", rt_ContinueBigName},
|
||||
{"ShrFmla", rt_ShrFmla},
|
||||
{"HLinkTooltip", rt_HLinkTooltip},
|
||||
{"WebPub", rt_WebPub},
|
||||
{"QsiSXTag", rt_QsiSXTag},
|
||||
{"DBQueryExt", rt_DBQueryExt},
|
||||
{"ExtString", rt_ExtString},
|
||||
{"TxtQry", rt_TxtQry},
|
||||
{"Qsir", rt_Qsir},
|
||||
{"Qsif", rt_Qsif},
|
||||
{"RRDTQSIF", rt_RRDTQSIF},
|
||||
{"BOF", rt_BOF_BIFF8},
|
||||
{"BOF_BIFF4", rt_BOF_BIFF4},
|
||||
{"BOF_BIFF3", rt_BOF_BIFF3},
|
||||
{"BOF_BIFF2", rt_BOF_BIFF2},
|
||||
{"OleDbConn", rt_OleDbConn},
|
||||
{"WOpt", rt_WOpt},
|
||||
{"SXViewEx", rt_SXViewEx},
|
||||
{"SXTH", rt_SXTH},
|
||||
{"SXPIEx", rt_SXPIEx},
|
||||
{"SXVDTEx", rt_SXVDTEx},
|
||||
{"SXViewEx9", rt_SXViewEx9},
|
||||
{"ContinueFrt", rt_ContinueFrt},
|
||||
{"RealTimeData", rt_RealTimeData},
|
||||
{"ChartFrtInfo", rt_ChartFrtInfo},
|
||||
{"FrtWrapper", rt_FrtWrapper},
|
||||
{"StartBlock", rt_StartBlock},
|
||||
{"EndBlock", rt_EndBlock},
|
||||
{"StartObject", rt_StartObject},
|
||||
{"EndObject", rt_EndObject},
|
||||
{"CatLab", rt_CatLab},
|
||||
{"YMult", rt_YMult},
|
||||
{"SXViewLink", rt_SXViewLink},
|
||||
{"PivotChartBits", rt_PivotChartBits},
|
||||
{"FrtFontList", rt_FrtFontList},
|
||||
{"SheetExt", rt_SheetExt},
|
||||
{"BookExt", rt_BookExt},
|
||||
{"SXAddl", rt_SXAddl},
|
||||
{"CrErr", rt_CrErr},
|
||||
{"HFPicture", rt_HFPicture},
|
||||
{"FeatHdr", rt_FeatHdr},
|
||||
{"Feat", rt_Feat},
|
||||
{"DataLabExt", rt_DataLabExt},
|
||||
{"DataLabExtContents", rt_DataLabExtContents},
|
||||
{"CellWatch", rt_CellWatch},
|
||||
{"FeatHdr11", rt_FeatHdr11},
|
||||
{"Feature11", rt_Feature11},
|
||||
{"DropDownObjIds", rt_DropDownObjIds},
|
||||
{"ContinueFrt11", rt_ContinueFrt11},
|
||||
{"DConn", rt_DConn},
|
||||
{"List12", rt_List12},
|
||||
{"Feature12", rt_Feature12},
|
||||
{"CondFmt12", rt_CondFmt12},
|
||||
{"CF12", rt_CF12},
|
||||
{"CFEx", rt_CFEx},
|
||||
{"XFCRC", rt_XFCRC},
|
||||
{"XFExt", rt_XFExt},
|
||||
{"AutoFilter12", rt_AutoFilter12},
|
||||
{"ContinueFrt12", rt_ContinueFrt12},
|
||||
{"MDTInfo", rt_MDTInfo},
|
||||
{"MDXStr", rt_MDXStr},
|
||||
{"MDXTuple", rt_MDXTuple},
|
||||
{"MDXSet", rt_MDXSet},
|
||||
{"MDXProp", rt_MDXProp},
|
||||
{"MDXKPI", rt_MDXKPI},
|
||||
{"MDB", rt_MDB},
|
||||
{"PLV", rt_PLV},
|
||||
{"Compat12", rt_Compat12},
|
||||
{"DXF", rt_DXF},
|
||||
{"TableStyles", rt_TableStyles},
|
||||
{"TableStyle", rt_TableStyle},
|
||||
{"TableStyleElement", rt_TableStyleElement},
|
||||
{"StyleExt", rt_StyleExt},
|
||||
{"NamePublish", rt_NamePublish},
|
||||
{"NameCmt", rt_NameCmt},
|
||||
{"SortData", rt_SortData},
|
||||
{"Theme", rt_Theme},
|
||||
{"GUIDTypeLib", rt_GUIDTypeLib},
|
||||
{"FnGrp12", rt_FnGrp12},
|
||||
{"NameFnGrp12", rt_NameFnGrp12},
|
||||
{"MTRSettings", rt_MTRSettings},
|
||||
{"CompressPictures", rt_CompressPictures},
|
||||
{"HeaderFooter", rt_HeaderFooter},
|
||||
{"CrtLayout12", rt_CrtLayout12},
|
||||
{"CrtMlFrt", rt_CrtMlFrt},
|
||||
{"CrtMlFrtContinue", rt_CrtMlFrtContinue},
|
||||
{"ForceFullCalculation", rt_ForceFullCalculation},
|
||||
{"ShapePropsStream", rt_ShapePropsStream},
|
||||
{"TextPropsStream", rt_TextPropsStream},
|
||||
{"RichTextStream", rt_RichTextStream},
|
||||
{"CrtLayout12A", rt_CrtLayout12A},
|
||||
{"Units", rt_Units},
|
||||
{"Chart", rt_Chart},
|
||||
{"Series", rt_Series},
|
||||
{"DataFormat", rt_DataFormat},
|
||||
{"LineFormat", rt_LineFormat},
|
||||
{"MarkerFormat", rt_MarkerFormat},
|
||||
{"AreaFormat", rt_AreaFormat},
|
||||
{"PieFormat", rt_PieFormat},
|
||||
{"AttachedLabel", rt_AttachedLabel},
|
||||
{"SeriesText", rt_SeriesText},
|
||||
{"ChartFormat", rt_ChartFormat},
|
||||
{"Legend", rt_Legend},
|
||||
{"SeriesList", rt_SeriesList},
|
||||
{"Bar", rt_Bar},
|
||||
{"Line", rt_Line},
|
||||
{"Pie", rt_Pie},
|
||||
{"Area", rt_Area},
|
||||
{"Scatter", rt_Scatter},
|
||||
{"CrtLine", rt_CrtLine},
|
||||
{"Axis", rt_Axis},
|
||||
{"Tick", rt_Tick},
|
||||
{"ValueRange", rt_ValueRange},
|
||||
{"CatSerRange", rt_CatSerRange},
|
||||
{"AxisLine", rt_AxisLine},
|
||||
{"CrtLink", rt_CrtLink},
|
||||
{"DefaultText", rt_DefaultText},
|
||||
{"Text", rt_Text},
|
||||
{"FontX", rt_FontX},
|
||||
{"ObjectLink", rt_ObjectLink},
|
||||
{"Frame", rt_Frame},
|
||||
{"Begin", rt_Begin},
|
||||
{"End", rt_End},
|
||||
{"PlotArea", rt_PlotArea},
|
||||
{"Chart3d", rt_Chart3d},
|
||||
{"PicF", rt_PicF},
|
||||
{"DropBar", rt_DropBar},
|
||||
{"Radar", rt_Radar},
|
||||
{"Surf", rt_Surf},
|
||||
{"RadarArea", rt_RadarArea},
|
||||
{"AxisParent", rt_AxisParent},
|
||||
{"LegendException", rt_LegendException},
|
||||
{"ShtProps", rt_ShtProps},
|
||||
{"SerToCrt", rt_SerToCrt},
|
||||
{"AxesUsed", rt_AxesUsed},
|
||||
{"SBaseRef", rt_SBaseRef},
|
||||
{"SerParent", rt_SerParent},
|
||||
{"SerAuxTrend", rt_SerAuxTrend},
|
||||
{"IFmtRecord", rt_IFmtRecord},
|
||||
{"Pos", rt_Pos},
|
||||
{"AlRuns", rt_AlRuns},
|
||||
{"BRAI", rt_BRAI},
|
||||
{"SerAuxErrBar", rt_SerAuxErrBar},
|
||||
{"ClrtClient", rt_ClrtClient},
|
||||
{"SerFmt", rt_SerFmt},
|
||||
{"Chart3DBarShape", rt_Chart3DBarShape},
|
||||
{"Fbi", rt_Fbi},
|
||||
{"BopPop", rt_BopPop},
|
||||
{"AxcExt", rt_AxcExt},
|
||||
{"Dat", rt_Dat},
|
||||
{"PlotGrowth", rt_PlotGrowth},
|
||||
{"SIIndex", rt_SIIndex},
|
||||
{"GelFrame", rt_GelFrame},
|
||||
{"BopPopCustom", rt_BopPopCustom},
|
||||
{"Fbi2", rt_Fbi2},
|
||||
{"CommentText", rt_CommentText},
|
||||
{"ANY_TYPE", rt_ANY_TYPE}
|
||||
{ "Formula", rt_Formula },
|
||||
{ "ColumnDefault", rt_ColumnDefault },
|
||||
{ "BuiltInFmtCount", rt_BuiltInFmtCount },
|
||||
{ "EOF", rt_EOF },
|
||||
{ "CalcCount", rt_CalcCount },
|
||||
{ "CalcMode", rt_CalcMode },
|
||||
{ "CalcPrecision", rt_CalcPrecision },
|
||||
{ "CalcRefMode", rt_CalcRefMode },
|
||||
{ "CalcDelta", rt_CalcDelta },
|
||||
{ "CalcIter", rt_CalcIter },
|
||||
{ "Protect", rt_Protect },
|
||||
{ "Password", rt_Password },
|
||||
{ "Header", rt_Header },
|
||||
{ "Footer", rt_Footer },
|
||||
{ "ExternSheet", rt_ExternSheet },
|
||||
{ "Lbl", rt_Lbl },
|
||||
{ "WinProtect", rt_WinProtect },
|
||||
{ "VerticalPageBreaks", rt_VerticalPageBreaks },
|
||||
{ "HorizontalPageBreaks", rt_HorizontalPageBreaks },
|
||||
{ "Note", rt_Note },
|
||||
{ "ColWidth", rt_ColWidth },
|
||||
{ "FontColor", rt_FontColor },
|
||||
{ "Selection", rt_Selection },
|
||||
{ "Date1904", rt_Date1904 },
|
||||
{ "ExternName", rt_ExternName },
|
||||
{ "DefinedName_BIFF2", rt_DefinedName_BIFF2 },
|
||||
{ "DefinedName", rt_DefinedName },
|
||||
{ "LeftMargin", rt_LeftMargin },
|
||||
{ "RightMargin", rt_RightMargin },
|
||||
{ "TopMargin", rt_TopMargin },
|
||||
{ "BottomMargin", rt_BottomMargin },
|
||||
{ "PrintRowCol", rt_PrintRowCol },
|
||||
{ "PrintGrid", rt_PrintGrid },
|
||||
{ "FilePass", rt_FilePass },
|
||||
{ "Font", rt_Font },
|
||||
{ "Font_BIFF34", rt_Font_BIFF34 },
|
||||
{ "PrintSize", rt_PrintSize },
|
||||
{ "Continue", rt_Continue },
|
||||
{ "Window1", rt_Window1 },
|
||||
{ "Backup", rt_Backup },
|
||||
{ "Pane", rt_Pane },
|
||||
{ "CodePage", rt_CodePage },
|
||||
{ "Pls", rt_Pls },
|
||||
{ "DCon", rt_DCon },
|
||||
{ "DConRef", rt_DConRef },
|
||||
{ "DConName", rt_DConName },
|
||||
{ "DefColWidth", rt_DefColWidth },
|
||||
{ "XCT", rt_XCT },
|
||||
{ "CRN", rt_CRN },
|
||||
{ "FileSharing", rt_FileSharing },
|
||||
{ "WriteAccess", rt_WriteAccess },
|
||||
{ "Obj", rt_Obj },
|
||||
{ "Uncalced", rt_Uncalced },
|
||||
{ "CalcSaveRecalc", rt_CalcSaveRecalc },
|
||||
{ "Template", rt_Template },
|
||||
{ "Intl", rt_Intl },
|
||||
{ "ObjProtect", rt_ObjProtect },
|
||||
{ "ColInfo", rt_ColInfo },
|
||||
{ "Guts", rt_Guts },
|
||||
{ "WsBool", rt_WsBool },
|
||||
{ "GridSet", rt_GridSet },
|
||||
{ "HCenter", rt_HCenter },
|
||||
{ "VCenter", rt_VCenter },
|
||||
{ "BoundSheet8", rt_BoundSheet8 },
|
||||
{ "WriteProtect", rt_WriteProtect },
|
||||
{ "Country", rt_Country },
|
||||
{ "HideObj", rt_HideObj },
|
||||
{ "Sort", rt_Sort },
|
||||
{ "Palette", rt_Palette },
|
||||
{ "Sync", rt_Sync },
|
||||
{ "LPr", rt_LPr },
|
||||
{ "DxGCol", rt_DxGCol },
|
||||
{ "FnGroupName", rt_FnGroupName },
|
||||
{ "FilterMode", rt_FilterMode },
|
||||
{ "BuiltInFnGroupCount", rt_BuiltInFnGroupCount },
|
||||
{ "AutoFilterInfo", rt_AutoFilterInfo },
|
||||
{ "AutoFilter", rt_AutoFilter },
|
||||
{ "Scl", rt_Scl },
|
||||
{ "Setup", rt_Setup },
|
||||
{ "ScenMan", rt_ScenMan },
|
||||
{ "SCENARIO", rt_SCENARIO },
|
||||
{ "SxView", rt_SxView },
|
||||
{ "Sxvd", rt_Sxvd },
|
||||
{ "SXVI", rt_SXVI },
|
||||
{ "SxIvd", rt_SxIvd },
|
||||
{ "SXLI", rt_SXLI },
|
||||
{ "SXPI", rt_SXPI },
|
||||
{ "DocRoute", rt_DocRoute },
|
||||
{ "RecipName", rt_RecipName },
|
||||
{ "MulRk", rt_MulRk },
|
||||
{ "MulBlank", rt_MulBlank },
|
||||
{ "Mms", rt_Mms },
|
||||
{ "SXDI", rt_SXDI },
|
||||
{ "SXDB", rt_SXDB },
|
||||
{ "SXFDB", rt_SXFDB },
|
||||
{ "SXDBB", rt_SXDBB },
|
||||
{ "SXNum", rt_SXNum },
|
||||
{ "SxBool", rt_SxBool },
|
||||
{ "SxErr", rt_SxErr },
|
||||
{ "SXInt", rt_SXInt },
|
||||
{ "SXString", rt_SXString },
|
||||
{ "SXDtr", rt_SXDtr },
|
||||
{ "SxNil", rt_SxNil },
|
||||
{ "SXTbl", rt_SXTbl },
|
||||
{ "SXTBRGIITM", rt_SXTBRGIITM },
|
||||
{ "SxTbpg", rt_SxTbpg },
|
||||
{ "ObProj", rt_ObProj },
|
||||
{ "SXStreamID", rt_SXStreamID },
|
||||
{ "DBCell", rt_DBCell },
|
||||
{ "SXRng", rt_SXRng },
|
||||
{ "SxIsxoper", rt_SxIsxoper },
|
||||
{ "BookBool", rt_BookBool },
|
||||
{ "DbOrParamQry", rt_DbOrParamQry },
|
||||
{ "ScenarioProtect", rt_ScenarioProtect },
|
||||
{ "OleObjectSize", rt_OleObjectSize },
|
||||
{ "XF", rt_XF },
|
||||
{ "XF_BIFF2", rt_XF_BIFF2 },
|
||||
{ "XF_BIFF3", rt_XF_BIFF3 },
|
||||
{ "XF_BIFF4", rt_XF_BIFF4 },
|
||||
{ "InterfaceHdr", rt_InterfaceHdr },
|
||||
{ "InterfaceEnd", rt_InterfaceEnd },
|
||||
{ "SXVS", rt_SXVS },
|
||||
{ "MergeCells", rt_MergeCells },
|
||||
{ "BkHim", rt_BkHim },
|
||||
{ "IMDATA", rt_IMDATA },
|
||||
{ "MsoDrawingGroup", rt_MsoDrawingGroup },
|
||||
{ "MsoDrawing", rt_MsoDrawing },
|
||||
{ "MsoDrawingSelection", rt_MsoDrawingSelection },
|
||||
{ "PhoneticInfo", rt_PhoneticInfo },
|
||||
{ "SxRule", rt_SxRule },
|
||||
{ "SXEx", rt_SXEx },
|
||||
{ "SxFilt", rt_SxFilt },
|
||||
{ "SxDXF", rt_SxDXF },
|
||||
{ "SxItm", rt_SxItm },
|
||||
{ "SxName", rt_SxName },
|
||||
{ "SxSelect", rt_SxSelect },
|
||||
{ "SXPair", rt_SXPair },
|
||||
{ "SxFmla", rt_SxFmla },
|
||||
{ "SxFormat", rt_SxFormat },
|
||||
{ "SST", rt_SST },
|
||||
{ "LabelSst", rt_LabelSst },
|
||||
{ "ExtSST", rt_ExtSST },
|
||||
{ "SXVDEx", rt_SXVDEx },
|
||||
{ "SXFormula", rt_SXFormula },
|
||||
{ "SXDBEx", rt_SXDBEx },
|
||||
{ "RRDInsDel", rt_RRDInsDel },
|
||||
{ "RRDHead", rt_RRDHead },
|
||||
{ "RRDChgCell", rt_RRDChgCell },
|
||||
{ "RRTabId", rt_RRTabId },
|
||||
{ "RRDRenSheet", rt_RRDRenSheet },
|
||||
{ "RRSort", rt_RRSort },
|
||||
{ "RRDMove", rt_RRDMove },
|
||||
{ "RRFormat", rt_RRFormat },
|
||||
{ "RRAutoFmt", rt_RRAutoFmt },
|
||||
{ "RRInsertSh", rt_RRInsertSh },
|
||||
{ "RRDMoveBegin", rt_RRDMoveBegin },
|
||||
{ "RRDMoveEnd", rt_RRDMoveEnd },
|
||||
{ "RRDInsDelBegin", rt_RRDInsDelBegin },
|
||||
{ "RRDInsDelEnd", rt_RRDInsDelEnd },
|
||||
{ "RRDConflict", rt_RRDConflict },
|
||||
{ "RRDDefName", rt_RRDDefName },
|
||||
{ "RRDRstEtxp", rt_RRDRstEtxp },
|
||||
{ "LRng", rt_LRng },
|
||||
{ "UsesELFs", rt_UsesELFs },
|
||||
{ "DSF", rt_DSF },
|
||||
{ "CUsr", rt_CUsr },
|
||||
{ "CbUsr", rt_CbUsr },
|
||||
{ "UsrInfo", rt_UsrInfo },
|
||||
{ "UsrExcl", rt_UsrExcl },
|
||||
{ "FileLock", rt_FileLock },
|
||||
{ "RRDInfo", rt_RRDInfo },
|
||||
{ "BCUsrs", rt_BCUsrs },
|
||||
{ "UsrChk", rt_UsrChk },
|
||||
{ "UserBView", rt_UserBView },
|
||||
{ "UserSViewBegin", rt_UserSViewBegin },
|
||||
{ "UserSViewBegin_Chart", rt_UserSViewBegin_Chart },
|
||||
{ "UserSViewEnd", rt_UserSViewEnd },
|
||||
{ "RRDUserView", rt_RRDUserView },
|
||||
{ "Qsi", rt_Qsi },
|
||||
{ "SupBook", rt_SupBook },
|
||||
{ "Prot4Rev", rt_Prot4Rev },
|
||||
{ "CondFmt", rt_CondFmt },
|
||||
{ "CF", rt_CF },
|
||||
{ "DVal", rt_DVal },
|
||||
{ "DConBin", rt_DConBin },
|
||||
{ "TxO", rt_TxO },
|
||||
{ "RefreshAll", rt_RefreshAll },
|
||||
{ "HLink", rt_HLink },
|
||||
{ "Lel", rt_Lel },
|
||||
{ "CodeName", rt_CodeName },
|
||||
{ "SXFDBType", rt_SXFDBType },
|
||||
{ "Prot4RevPass", rt_Prot4RevPass },
|
||||
{ "ObNoMacros", rt_ObNoMacros },
|
||||
{ "Dv", rt_Dv },
|
||||
{ "Excel9File", rt_Excel9File },
|
||||
{ "RecalcId", rt_RecalcId },
|
||||
{ "EntExU2", rt_EntExU2 },
|
||||
{ "Dimensions", rt_Dimensions },
|
||||
{ "Blank", rt_Blank },
|
||||
{ "Blank_BIFF2v", rt_Blank_BIFF2 },
|
||||
{ "Integer_BIFF2", rt_Integer_BIFF2 },
|
||||
{ "Number", rt_Number },
|
||||
{ "Number_BIFF2", rt_Number_BIFF2 },
|
||||
{ "Label", rt_Label },
|
||||
{ "Label_BIFF2", rt_Label_BIFF2 },
|
||||
{ "BoolErr", rt_BoolErr },
|
||||
{ "BoolErr_BIFF2", rt_BoolErr_BIFF2 },
|
||||
{ "String", rt_String },
|
||||
{ "String_BIFF2", rt_String_BIFF2 },
|
||||
{ "Row", rt_Row },
|
||||
{ "Row_BIFF2", rt_Row_BIFF2 },
|
||||
{ "Index", rt_Index },
|
||||
{ "Index_BIFF2", rt_Index_BIFF2 },
|
||||
{ "Array", rt_Array },
|
||||
{ "Array_BIFF2", rt_Array_BIFF2 },
|
||||
{ "DefaultRowHeight", rt_DefaultRowHeight },
|
||||
{ "DefaultRowHeight_BIFF2", rt_DefaultRowHeight_BIFF2 },
|
||||
{ "Table", rt_Table },
|
||||
{ "Window2", rt_Window2 },
|
||||
{ "RK", rt_RK },
|
||||
{ "Style", rt_Style },
|
||||
{ "BigName", rt_BigName },
|
||||
{ "Format", rt_Format },
|
||||
{ "Format_BIFF23", rt_Format_BIFF23 },
|
||||
{ "ContinueBigName", rt_ContinueBigName },
|
||||
{ "ShrFmla", rt_ShrFmla },
|
||||
{ "HLinkTooltip", rt_HLinkTooltip },
|
||||
{ "WebPub", rt_WebPub },
|
||||
{ "QsiSXTag", rt_QsiSXTag },
|
||||
{ "DBQueryExt", rt_DBQueryExt },
|
||||
{ "ExtString", rt_ExtString },
|
||||
{ "TxtQry", rt_TxtQry },
|
||||
{ "Qsir", rt_Qsir },
|
||||
{ "Qsif", rt_Qsif },
|
||||
{ "RRDTQSIF", rt_RRDTQSIF },
|
||||
{ "BOF", rt_BOF_BIFF8 },
|
||||
{ "BOF_BIFF4", rt_BOF_BIFF4 },
|
||||
{ "BOF_BIFF3", rt_BOF_BIFF3 },
|
||||
{ "BOF_BIFF2", rt_BOF_BIFF2 },
|
||||
{ "OleDbConn", rt_OleDbConn },
|
||||
{ "WOpt", rt_WOpt },
|
||||
{ "SXViewEx", rt_SXViewEx },
|
||||
{ "SXTH", rt_SXTH },
|
||||
{ "SXPIEx", rt_SXPIEx },
|
||||
{ "SXVDTEx", rt_SXVDTEx },
|
||||
{ "SXViewEx9", rt_SXViewEx9 },
|
||||
{ "ContinueFrt", rt_ContinueFrt },
|
||||
{ "RealTimeData", rt_RealTimeData },
|
||||
{ "ChartFrtInfo", rt_ChartFrtInfo },
|
||||
{ "FrtWrapper", rt_FrtWrapper },
|
||||
{ "StartBlock", rt_StartBlock },
|
||||
{ "EndBlock", rt_EndBlock },
|
||||
{ "StartObject", rt_StartObject },
|
||||
{ "EndObject", rt_EndObject },
|
||||
{ "CatLab", rt_CatLab },
|
||||
{ "YMult", rt_YMult },
|
||||
{ "SXViewLink", rt_SXViewLink },
|
||||
{ "PivotChartBits", rt_PivotChartBits },
|
||||
{ "FrtFontList", rt_FrtFontList },
|
||||
{ "SheetExt", rt_SheetExt },
|
||||
{ "BookExt", rt_BookExt },
|
||||
{ "SXAddl", rt_SXAddl },
|
||||
{ "CrErr", rt_CrErr },
|
||||
{ "HFPicture", rt_HFPicture },
|
||||
{ "FeatHdr", rt_FeatHdr },
|
||||
{ "Feat", rt_Feat },
|
||||
{ "DataLabExt", rt_DataLabExt },
|
||||
{ "DataLabExtContents", rt_DataLabExtContents },
|
||||
{ "CellWatch", rt_CellWatch },
|
||||
{ "FeatHdr11", rt_FeatHdr11 },
|
||||
{ "Feature11", rt_Feature11 },
|
||||
{ "DropDownObjIds", rt_DropDownObjIds },
|
||||
{ "ContinueFrt11", rt_ContinueFrt11 },
|
||||
{ "DConn", rt_DConn },
|
||||
{ "List12", rt_List12 },
|
||||
{ "Feature12", rt_Feature12 },
|
||||
{ "CondFmt12", rt_CondFmt12 },
|
||||
{ "CF12", rt_CF12 },
|
||||
{ "CFEx", rt_CFEx },
|
||||
{ "XFCRC", rt_XFCRC },
|
||||
{ "XFExt", rt_XFExt },
|
||||
{ "AutoFilter12", rt_AutoFilter12 },
|
||||
{ "ContinueFrt12", rt_ContinueFrt12 },
|
||||
{ "MDTInfo", rt_MDTInfo },
|
||||
{ "MDXStr", rt_MDXStr },
|
||||
{ "MDXTuple", rt_MDXTuple },
|
||||
{ "MDXSet", rt_MDXSet },
|
||||
{ "MDXProp", rt_MDXProp },
|
||||
{ "MDXKPI", rt_MDXKPI },
|
||||
{ "MDB", rt_MDB },
|
||||
{ "PLV", rt_PLV },
|
||||
{ "Compat12", rt_Compat12 },
|
||||
{ "DXF", rt_DXF },
|
||||
{ "TableStyles", rt_TableStyles },
|
||||
{ "TableStyle", rt_TableStyle },
|
||||
{ "TableStyleElement", rt_TableStyleElement },
|
||||
{ "StyleExt", rt_StyleExt },
|
||||
{ "NamePublish", rt_NamePublish },
|
||||
{ "NameCmt", rt_NameCmt },
|
||||
{ "SortData", rt_SortData },
|
||||
{ "Theme", rt_Theme },
|
||||
{ "GUIDTypeLib", rt_GUIDTypeLib },
|
||||
{ "FnGrp12", rt_FnGrp12 },
|
||||
{ "NameFnGrp12", rt_NameFnGrp12 },
|
||||
{ "MTRSettings", rt_MTRSettings },
|
||||
{ "CompressPictures", rt_CompressPictures },
|
||||
{ "HeaderFooter", rt_HeaderFooter },
|
||||
{ "CrtLayout12", rt_CrtLayout12 },
|
||||
{ "CrtMlFrt", rt_CrtMlFrt },
|
||||
{ "CrtMlFrtContinue", rt_CrtMlFrtContinue },
|
||||
{ "ForceFullCalculation", rt_ForceFullCalculation },
|
||||
{ "ShapePropsStream", rt_ShapePropsStream },
|
||||
{ "TextPropsStream", rt_TextPropsStream },
|
||||
{ "RichTextStream", rt_RichTextStream },
|
||||
{ "CrtLayout12A", rt_CrtLayout12A },
|
||||
{ "Units", rt_Units },
|
||||
{ "Chart", rt_Chart },
|
||||
{ "Series", rt_Series },
|
||||
{ "DataFormat", rt_DataFormat },
|
||||
{ "LineFormat", rt_LineFormat },
|
||||
{ "MarkerFormat", rt_MarkerFormat },
|
||||
{ "AreaFormat", rt_AreaFormat },
|
||||
{ "PieFormat", rt_PieFormat },
|
||||
{ "AttachedLabel", rt_AttachedLabel },
|
||||
{ "SeriesText", rt_SeriesText },
|
||||
{ "ChartFormat", rt_ChartFormat },
|
||||
{ "Legend", rt_Legend },
|
||||
{ "SeriesList", rt_SeriesList },
|
||||
{ "Bar", rt_Bar },
|
||||
{ "Line", rt_Line },
|
||||
{ "Pie", rt_Pie },
|
||||
{ "Area", rt_Area },
|
||||
{ "Scatter", rt_Scatter },
|
||||
{ "CrtLine", rt_CrtLine },
|
||||
{ "Axis", rt_Axis },
|
||||
{ "Tick", rt_Tick },
|
||||
{ "ValueRange", rt_ValueRange },
|
||||
{ "CatSerRange", rt_CatSerRange },
|
||||
{ "AxisLine", rt_AxisLine },
|
||||
{ "CrtLink", rt_CrtLink },
|
||||
{ "DefaultText", rt_DefaultText },
|
||||
{ "Text", rt_Text },
|
||||
{ "FontX", rt_FontX },
|
||||
{ "ObjectLink", rt_ObjectLink },
|
||||
{ "Frame", rt_Frame },
|
||||
{ "Begin", rt_Begin },
|
||||
{ "End", rt_End },
|
||||
{ "PlotArea", rt_PlotArea },
|
||||
{ "Chart3d", rt_Chart3d },
|
||||
{ "PicF", rt_PicF },
|
||||
{ "DropBar", rt_DropBar },
|
||||
{ "Radar", rt_Radar },
|
||||
{ "Surf", rt_Surf },
|
||||
{ "RadarArea", rt_RadarArea },
|
||||
{ "AxisParent", rt_AxisParent },
|
||||
{ "LegendException", rt_LegendException },
|
||||
{ "ShtProps", rt_ShtProps },
|
||||
{ "SerToCrt", rt_SerToCrt },
|
||||
{ "AxesUsed", rt_AxesUsed },
|
||||
{ "SBaseRef", rt_SBaseRef },
|
||||
{ "SerParent", rt_SerParent },
|
||||
{ "SerAuxTrend", rt_SerAuxTrend },
|
||||
{ "IFmtRecord", rt_IFmtRecord },
|
||||
{ "Pos", rt_Pos },
|
||||
{ "AlRuns", rt_AlRuns },
|
||||
{ "BRAI", rt_BRAI },
|
||||
{ "SerAuxErrBar", rt_SerAuxErrBar },
|
||||
{ "ClrtClient", rt_ClrtClient },
|
||||
{ "SerFmt", rt_SerFmt },
|
||||
{ "Chart3DBarShape", rt_Chart3DBarShape },
|
||||
{ "Fbi", rt_Fbi },
|
||||
{ "BopPop", rt_BopPop },
|
||||
{ "AxcExt", rt_AxcExt },
|
||||
{ "Dat", rt_Dat },
|
||||
{ "PlotGrowth", rt_PlotGrowth },
|
||||
{ "SIIndex", rt_SIIndex },
|
||||
{ "GelFrame", rt_GelFrame },
|
||||
{ "BopPopCustom", rt_BopPopCustom },
|
||||
{ "Fbi2", rt_Fbi2 },
|
||||
{ "CommentText", rt_CommentText },
|
||||
{ "ANY_TYPE", rt_ANY_TYPE }
|
||||
};
|
||||
|
||||
// Called only once per process
|
||||
|
||||
@ -83,8 +83,11 @@ typedef enum CF_RECORD_TYPE
|
||||
rt_HorizontalPageBreaks = 0x001b,
|
||||
rt_Note = 0x001c,
|
||||
rt_Selection = 0x001d,
|
||||
rt_BuiltInFmtCount = 0x001f,
|
||||
rt_ColumnDefault = 0x0020,
|
||||
rt_Date1904 = 0x0022,
|
||||
rt_ExternName = 0x0023,
|
||||
rt_ColWidth = 0x0024,
|
||||
rt_LeftMargin = 0x0026,
|
||||
rt_RightMargin = 0x0027,
|
||||
rt_TopMargin = 0x0028,
|
||||
@ -93,12 +96,15 @@ typedef enum CF_RECORD_TYPE
|
||||
rt_PrintGrid = 0x002b,
|
||||
rt_FilePass = 0x002f,
|
||||
rt_Font = 0x0031,
|
||||
rt_Font2 = 0x0032,
|
||||
rt_Font_BIFF34 = 0x0231,
|
||||
rt_PrintSize = 0x0033,
|
||||
rt_Continue = 0x003c,
|
||||
rt_Window1 = 0x003d,
|
||||
rt_Backup = 0x0040,
|
||||
rt_Pane = 0x0041,
|
||||
rt_CodePage = 0x0042,
|
||||
rt_FontColor = 0x0045,
|
||||
rt_Pls = 0x004d,
|
||||
rt_DCon = 0x0050,
|
||||
rt_DConRef = 0x0051,
|
||||
@ -251,16 +257,29 @@ typedef enum CF_RECORD_TYPE
|
||||
rt_Excel9File = 0x01c0,
|
||||
rt_RecalcId = 0x01c1,
|
||||
rt_EntExU2 = 0x01c2,
|
||||
rt_Dimensions_BIFF2 = 0x0200,
|
||||
rt_Dimensions = 0x0200,
|
||||
rt_Blank_BIFF2 = 0x0001,
|
||||
rt_Blank = 0x0201,
|
||||
rt_Integer_BIFF2 = 0x0002,
|
||||
rt_Number_BIFF2 = 0x0003,
|
||||
rt_Number = 0x0203,
|
||||
rt_Label_BIFF2 = 0x0004,
|
||||
rt_Label = 0x0204,
|
||||
rt_BoolErr_BIFF2 = 0x0005,
|
||||
rt_BoolErr = 0x0205,
|
||||
rt_String_BIFF2 = 0x0007,
|
||||
rt_String = 0x0207,
|
||||
rt_Row_BIFF2 = 0x0008,
|
||||
rt_Row = 0x0208,
|
||||
rt_BOF_BIFF3 = 0x0209,
|
||||
rt_Index_BIFF2 = 0x000b,
|
||||
rt_Index = 0x020b,
|
||||
rt_DefinedName_BIFF2 = 0x0018,
|
||||
rt_DefinedName = 0x0218,
|
||||
rt_Array_BIFF2 = 0x0021,
|
||||
rt_Array = 0x0221,
|
||||
rt_DefaultRowHeight_BIFF2 = 0x0025,
|
||||
rt_DefaultRowHeight = 0x0225,
|
||||
rt_Table = 0x0236,
|
||||
rt_Window2 = 0x023e,
|
||||
@ -270,8 +289,12 @@ typedef enum CF_RECORD_TYPE
|
||||
rt_BOF_BIFF4 = 0x0409,
|
||||
rt_BigName = 0x0418,
|
||||
rt_Format = 0x041e,
|
||||
rt_Format_BIFF23 = 0x001e,
|
||||
rt_ContinueBigName = 0x043c,
|
||||
rt_ShrFmla = 0x04bc,
|
||||
rt_XF_BIFF2 = 0x0043,
|
||||
rt_XF_BIFF3 = 0x0243,
|
||||
rt_XF_BIFF4 = 0x0443,
|
||||
rt_HLinkTooltip = 0x0800,
|
||||
rt_WebPub = 0x0801,
|
||||
rt_QsiSXTag = 0x0802,
|
||||
@ -281,7 +304,7 @@ typedef enum CF_RECORD_TYPE
|
||||
rt_Qsir = 0x0806,
|
||||
rt_Qsif = 0x0807,
|
||||
rt_RRDTQSIF = 0x0808,
|
||||
rt_BOF_BIFF8 = 0x0809, //biff5-biff8
|
||||
rt_BOF_BIFF8 = 0x0809,
|
||||
rt_OleDbConn = 0x080a,
|
||||
rt_WOpt = 0x080b,
|
||||
rt_SXViewEx = 0x080c,
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../../Common/3dParty/pole/pole.h"
|
||||
#include "../../../../Common/3dParty/pole/pole.h"
|
||||
|
||||
#include "BinSmartPointers.h"
|
||||
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "AnyObject.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
|
||||
namespace XLS
|
||||
{;
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "BOF.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
#include "../../../../../Common/MS-LCID.h"
|
||||
|
||||
@ -124,9 +123,9 @@ void BOF::readFields(CFRecord& record)
|
||||
switch(type_id_)
|
||||
{
|
||||
case rt_BOF_BIFF8: verLowestBiff = 6; break;
|
||||
case rt_BOF_BIFF4: verLowestBiff = 4; break;
|
||||
case rt_BOF_BIFF3: verLowestBiff = 3; break;
|
||||
case rt_BOF_BIFF2: verLowestBiff = 2; break;
|
||||
case rt_BOF_BIFF4: verLowestBiff = 4; vers = 0x0400; break;
|
||||
case rt_BOF_BIFF3: verLowestBiff = 3; vers = 0x0300; break;
|
||||
case rt_BOF_BIFF2: verLowestBiff = 2; vers = 0x0200; break;;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -53,11 +53,15 @@ BaseObjectPtr BRAI::clone()
|
||||
|
||||
void BRAI::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned short flags;
|
||||
record >> id >> rt >> flags;
|
||||
fUnlinkedIfmt = static_cast<unsigned char>(GETBIT(flags, 0));
|
||||
record >> ifmt;
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
formula.load(record);
|
||||
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
*/
|
||||
|
||||
#include "BiffRecord.h"
|
||||
#include "Binary/CFStream.h"
|
||||
#include "Binary/CFStreamCacheReader.h"
|
||||
#include "../../Binary/CFStream.h"
|
||||
#include "../../Binary/CFStreamCacheReader.h"
|
||||
|
||||
|
||||
namespace XLS
|
||||
|
||||
@ -31,8 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "BiffRecordContinued.h"
|
||||
#include "Binary/CFStreamCacheReader.h"
|
||||
|
||||
#include "../../Binary/CFStreamCacheReader.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -35,19 +35,21 @@ namespace XLS
|
||||
{
|
||||
|
||||
Blank::Blank()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
Blank::~Blank()
|
||||
{
|
||||
}
|
||||
|
||||
{}
|
||||
BaseObjectPtr Blank::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Blank(*this));
|
||||
}
|
||||
|
||||
Blank_BIFF2::Blank_BIFF2()
|
||||
{}
|
||||
Blank_BIFF2::~Blank_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr Blank_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Blank_BIFF2(*this));
|
||||
}
|
||||
|
||||
void Blank::readFields(CFRecord& record)
|
||||
{
|
||||
@ -66,7 +68,7 @@ int Blank::serialize(std::wostream & stream)
|
||||
int row = cell.rw;
|
||||
int st = (int)cell.ixfe - global_info_->cellStyleXfs_count;
|
||||
|
||||
if (cell.ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
|
||||
@ -37,9 +37,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Blank record in BIFF8
|
||||
class Blank: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Blank)
|
||||
@ -50,7 +47,6 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeBlank;
|
||||
@ -63,8 +59,16 @@ public:
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
CellOffsetResender resender;
|
||||
Cell cell;
|
||||
|
||||
};
|
||||
class Blank_BIFF2 : public Blank
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Blank_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Blank_BIFF2)
|
||||
public:
|
||||
Blank_BIFF2();
|
||||
~Blank_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "BookBool.h"
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CalcMode.h"
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CalcRefMode.h"
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "CatLab.h"
|
||||
#include <Logic/Biff_structures/FrtHeaderOld.h>
|
||||
#include "../Biff_structures/FrtHeaderOld.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -34,61 +34,74 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
ColWidth::ColWidth()
|
||||
{}
|
||||
ColWidth::~ColWidth()
|
||||
{}
|
||||
BaseObjectPtr ColWidth::clone()
|
||||
{
|
||||
return BaseObjectPtr(new ColWidth(*this));
|
||||
}
|
||||
void ColWidth::readFields(CFRecord& record)
|
||||
{
|
||||
BYTE colLast_1b, colFirst_1b;
|
||||
_UINT16 coldx_2b;
|
||||
|
||||
ColInfo::ColInfo()
|
||||
{
|
||||
iOutLevel = 0;
|
||||
}
|
||||
record >> colFirst_1b >> colLast_1b >> coldx_2b;
|
||||
|
||||
colFirst = colFirst_1b;
|
||||
colLast = colLast_1b;
|
||||
|
||||
ColInfo::~ColInfo()
|
||||
{
|
||||
}
|
||||
coldx = coldx_2b;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
ColInfo::ColInfo() : iOutLevel(0)
|
||||
{}
|
||||
ColInfo::~ColInfo()
|
||||
{}
|
||||
BaseObjectPtr ColInfo::clone()
|
||||
{
|
||||
return BaseObjectPtr(new ColInfo(*this));
|
||||
}
|
||||
void ColInfo::readFields(CFRecord& record)
|
||||
{
|
||||
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
|
||||
{
|
||||
_UINT16 colFirst_2b;
|
||||
_UINT16 colLast_2b;
|
||||
_UINT16 coldx_2b;
|
||||
|
||||
BaseObjectPtr ColInfo::clone()
|
||||
{
|
||||
return BaseObjectPtr(new ColInfo(*this));
|
||||
}
|
||||
unsigned short flags;
|
||||
record >> colFirst_2b >> colLast_2b >> coldx_2b >> ixfe >> flags;
|
||||
|
||||
void ColInfo::readFields(CFRecord& record)
|
||||
{
|
||||
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
|
||||
{
|
||||
_UINT16 colFirst_2b;
|
||||
_UINT16 colLast_2b;
|
||||
_UINT16 coldx_2b;
|
||||
fHidden = GETBIT(flags, 0);
|
||||
fUserSet = GETBIT(flags, 1);
|
||||
fBestFit = GETBIT(flags, 2);
|
||||
fPhonetic = GETBIT(flags, 3);
|
||||
iOutLevel = GETBITS(flags, 8, 10);
|
||||
fCollapsed = GETBIT(flags, 12);
|
||||
|
||||
unsigned short flags;
|
||||
record >> colFirst_2b >> colLast_2b >> coldx_2b >> ixfe >> flags;
|
||||
colFirst = colFirst_2b;
|
||||
colLast = colLast_2b;
|
||||
coldx = coldx_2b;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned short flags;
|
||||
record >> colFirst >> colLast >> coldx >> ixfeXLSB >> flags;
|
||||
|
||||
fHidden = GETBIT(flags, 0);
|
||||
fUserSet = GETBIT(flags, 1);
|
||||
fBestFit = GETBIT(flags, 2);
|
||||
fPhonetic = GETBIT(flags, 3);
|
||||
iOutLevel = GETBITS(flags, 8, 10);
|
||||
fCollapsed = GETBIT(flags, 12);
|
||||
fHidden = GETBIT(flags, 0);
|
||||
fUserSet = GETBIT(flags, 1);
|
||||
fBestFit = GETBIT(flags, 2);
|
||||
fPhonetic = GETBIT(flags, 3);
|
||||
iOutLevel = GETBITS(flags, 8, 10);
|
||||
fCollapsed = GETBIT(flags, 12);
|
||||
}
|
||||
|
||||
colFirst = colFirst_2b;
|
||||
colLast = colLast_2b;
|
||||
coldx = coldx_2b;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned short flags;
|
||||
record >> colFirst >> colLast >> coldx >> ixfeXLSB >> flags;
|
||||
|
||||
fHidden = GETBIT(flags, 0);
|
||||
fUserSet = GETBIT(flags, 1);
|
||||
fBestFit = GETBIT(flags, 2);
|
||||
fPhonetic = GETBIT(flags, 3);
|
||||
iOutLevel = GETBITS(flags, 8, 10);
|
||||
fCollapsed = GETBIT(flags, 12);
|
||||
}
|
||||
|
||||
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); // unused
|
||||
//0x0600 - 2 bytes; lower - 1 byte
|
||||
}
|
||||
record.skipNunBytes(record.getDataSize() - record.getRdPtr()); // unused
|
||||
//0x0600 - 2 bytes; lower - 1 byte
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -35,7 +35,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
// Logical representation of ColInfo record in BIFF8 and ColInfo in BIFF12
|
||||
class ColInfo: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(ColInfo)
|
||||
@ -46,7 +45,7 @@ public:
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
virtual void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeColInfo;
|
||||
|
||||
@ -54,16 +53,26 @@ public:
|
||||
_UINT32 colFirst;
|
||||
_UINT32 colLast;
|
||||
_UINT32 coldx;
|
||||
IXFCell ixfe;
|
||||
_UINT32 ixfeXLSB;
|
||||
IXFCell ixfe = 0xffff;
|
||||
_UINT32 ixfeXLSB = 0xffffffff;
|
||||
|
||||
bool fHidden;
|
||||
bool fUserSet;
|
||||
bool fBestFit;
|
||||
bool fPhonetic;
|
||||
unsigned char iOutLevel;
|
||||
bool fCollapsed;
|
||||
bool fHidden = false;
|
||||
bool fUserSet = false;
|
||||
bool fBestFit = false;
|
||||
bool fPhonetic = false;
|
||||
unsigned char iOutLevel = 0;
|
||||
bool fCollapsed = false;
|
||||
};
|
||||
class ColWidth : public ColInfo
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(ColWidth)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(ColWidth)
|
||||
public:
|
||||
ColWidth();
|
||||
~ColWidth();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
virtual void readFields(CFRecord& record);
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -32,8 +32,6 @@
|
||||
|
||||
#include "CrtLayout12A.h"
|
||||
|
||||
#include <simple_xml_writer.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
@ -34,43 +34,49 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
DefaultRowHeight::DefaultRowHeight()
|
||||
{
|
||||
miyRw = -1;
|
||||
}
|
||||
|
||||
|
||||
DefaultRowHeight::~DefaultRowHeight()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr DefaultRowHeight::clone()
|
||||
{
|
||||
return BaseObjectPtr(new DefaultRowHeight(*this));
|
||||
}
|
||||
|
||||
void DefaultRowHeight::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned short flags;
|
||||
record >> flags;
|
||||
|
||||
fUnsynced = GETBIT(flags, 0);
|
||||
fDyZero = GETBIT(flags, 1);
|
||||
fExAsc = GETBIT(flags, 2);
|
||||
fExDsc = GETBIT(flags, 3);
|
||||
|
||||
record >> miyRw;
|
||||
|
||||
if (!global_info->sheets_info.empty())
|
||||
DefaultRowHeight_BIFF2::DefaultRowHeight_BIFF2()
|
||||
{}
|
||||
DefaultRowHeight_BIFF2::~DefaultRowHeight_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr DefaultRowHeight_BIFF2::clone()
|
||||
{
|
||||
global_info->sheets_info.back().defaultRowHeight = miyRw / 20.;
|
||||
return BaseObjectPtr(new DefaultRowHeight_BIFF2(*this));
|
||||
}
|
||||
//--------------------------------------------------------------
|
||||
DefaultRowHeight::DefaultRowHeight() : miyRw(-1)
|
||||
{}
|
||||
DefaultRowHeight::~DefaultRowHeight()
|
||||
{}
|
||||
BaseObjectPtr DefaultRowHeight::clone()
|
||||
{
|
||||
return BaseObjectPtr(new DefaultRowHeight(*this));
|
||||
}
|
||||
void DefaultRowHeight::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
}
|
||||
unsigned short flags;
|
||||
record >> flags;
|
||||
|
||||
if (global_info->Version == 0x0200)
|
||||
{
|
||||
miyRw = GETBITS(flags, 0, 14);
|
||||
}
|
||||
else
|
||||
{
|
||||
fUnsynced = GETBIT(flags, 0);
|
||||
fDyZero = GETBIT(flags, 1);
|
||||
fExAsc = GETBIT(flags, 2);
|
||||
fExDsc = GETBIT(flags, 3);
|
||||
|
||||
record >> miyRw;
|
||||
}
|
||||
|
||||
if (!global_info->sheets_info.empty())
|
||||
{
|
||||
global_info->sheets_info.back().defaultRowHeight = miyRw / 20.;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -35,9 +35,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of DefaultRowHeight record in BIFF8
|
||||
class DefaultRowHeight: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(DefaultRowHeight)
|
||||
@ -47,12 +44,10 @@ public:
|
||||
~DefaultRowHeight();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeDefaultRowHeight;
|
||||
|
||||
//-----------------------------
|
||||
bool fUnsynced;
|
||||
bool fDyZero;
|
||||
@ -60,8 +55,17 @@ public:
|
||||
bool fExDsc;
|
||||
|
||||
_INT16 miyRw; // measured in twips (1/20 of of a printer's point)
|
||||
|
||||
};
|
||||
|
||||
class DefaultRowHeight_BIFF2 : public DefaultRowHeight
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(DefaultRowHeight_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(DefaultRowHeight_BIFF2)
|
||||
public:
|
||||
DefaultRowHeight_BIFF2();
|
||||
~DefaultRowHeight_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "Dimensions.h"
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "Dv.h"
|
||||
|
||||
#include <utils.h>
|
||||
#include "../../../Common/utils.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "../../../../../Common/DocxFormat/Source/XlsbFormat/Biff12_structures/DValStrings.h"
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "EntExU2.h"
|
||||
//#include <Exception/UnexpectedProgramPath.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -39,407 +39,417 @@ namespace XLS
|
||||
const static std::wstring shemeColor[17] =
|
||||
{L"accent1",L"accent2",L"accent3",L"accent4",L"accent5",L"accent6",L"bg1",L"bg2",L"dk1",L"dk2",L"folHlink",L"hlink",L"lt1",L"lt2",L"phClr",L"tx1",L"tx2"};
|
||||
|
||||
Font::Font()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Font::~Font()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr Font::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Font(*this));
|
||||
}
|
||||
|
||||
void Font::set(FontInfo & info)
|
||||
{
|
||||
info.dyHeight = dyHeight;
|
||||
info.fItalic = fItalic;
|
||||
info.fStrikeOut = fStrikeOut;
|
||||
info.fOutline = fOutline;
|
||||
info.fShadow = fShadow;
|
||||
info.fCondense = fCondense;
|
||||
info.fExtend = fExtend;
|
||||
info.icv = icv;
|
||||
info.bls = bls;
|
||||
info.sss = sss;
|
||||
info.uls = uls;
|
||||
info.bFamily = bFamily;
|
||||
info.bCharSet = bCharSet;
|
||||
info.name = fontName;
|
||||
}
|
||||
|
||||
void Font::readFields(CFRecord& record)
|
||||
{
|
||||
correct = false;
|
||||
|
||||
global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned short flags;
|
||||
record >> dyHeight >> flags;
|
||||
|
||||
fItalic = GETBIT(flags, 1);
|
||||
fStrikeOut = GETBIT(flags, 3);
|
||||
fOutline = GETBIT(flags, 4);
|
||||
fShadow = GETBIT(flags, 5);
|
||||
fCondense = GETBIT(flags, 6);
|
||||
fExtend = GETBIT(flags, 7);
|
||||
|
||||
if(global_info->Version < 0x0800)
|
||||
{
|
||||
record >> icv;
|
||||
}
|
||||
|
||||
record >> bls >> sss >> uls >> bFamily >> bCharSet;
|
||||
|
||||
unsigned char reserved;
|
||||
|
||||
record >> reserved;
|
||||
|
||||
if (global_info->Version < 0x0800)
|
||||
{
|
||||
if ((bls >= 100 && bls <= 1000) || bls == 0 || bls == 0x8000)
|
||||
correct = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bls >= 400 && bls <= 1000)
|
||||
correct = true;
|
||||
}
|
||||
|
||||
if (global_info->Version < 0x0600)
|
||||
Font::Font()
|
||||
{}
|
||||
Font::~Font()
|
||||
{}
|
||||
BaseObjectPtr Font::clone()
|
||||
{
|
||||
ShortXLAnsiString name;
|
||||
record >> name;
|
||||
|
||||
fontName = name;
|
||||
return BaseObjectPtr(new Font(*this));
|
||||
}
|
||||
else if(global_info->Version < 0x0800)
|
||||
Font_BIFF34::Font_BIFF34()
|
||||
{}
|
||||
Font_BIFF34::~Font_BIFF34()
|
||||
{}
|
||||
BaseObjectPtr Font_BIFF34::clone()
|
||||
{
|
||||
ShortXLUnicodeString name;
|
||||
|
||||
record >> name;
|
||||
fontName = name;
|
||||
return BaseObjectPtr(new Font_BIFF34(*this));
|
||||
}
|
||||
else
|
||||
{
|
||||
brtColor.readFields(record);
|
||||
record >> bFontScheme;
|
||||
|
||||
XLSB::XLWideString name;
|
||||
|
||||
record >> name;
|
||||
fontName = name;
|
||||
}
|
||||
|
||||
if (global_info->fonts_charsets.find(bCharSet) == global_info->fonts_charsets.end() && bCharSet != 0)
|
||||
void Font::set(FontInfo & info)
|
||||
{
|
||||
global_info->fonts_charsets.insert(std::make_pair(bCharSet, bFamily));
|
||||
info.dyHeight = dyHeight;
|
||||
info.fItalic = fItalic;
|
||||
info.fStrikeOut = fStrikeOut;
|
||||
info.fOutline = fOutline;
|
||||
info.fShadow = fShadow;
|
||||
info.fCondense = fCondense;
|
||||
info.fExtend = fExtend;
|
||||
info.icv = icv;
|
||||
info.bls = bls;
|
||||
info.sss = sss;
|
||||
info.uls = uls;
|
||||
info.bFamily = bFamily;
|
||||
info.bCharSet = bCharSet;
|
||||
info.name = fontName;
|
||||
}
|
||||
}
|
||||
|
||||
int Font::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"font")
|
||||
{
|
||||
serialize_properties(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
void Font::readFields(CFRecord& record)
|
||||
{
|
||||
correct = false;
|
||||
|
||||
void Font::set_color_ext(FillInfoExt & color_ext_)
|
||||
{
|
||||
color_ext = color_ext_;
|
||||
}
|
||||
int Font::serialize_rPr(std::wostream & stream, bool rtl, bool defRPr, std::wstring namespace_)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
std::wstring strRpr = namespace_ + L"rPr";
|
||||
if (defRPr) strRpr = namespace_ + L"defRPr";
|
||||
|
||||
CP_XML_NODE(strRpr)
|
||||
global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned short flags;
|
||||
record >> dyHeight >> flags;
|
||||
|
||||
fItalic = GETBIT(flags, 1);
|
||||
fStrikeOut = GETBIT(flags, 3);
|
||||
fOutline = GETBIT(flags, 4);
|
||||
fShadow = GETBIT(flags, 5);
|
||||
fCondense = GETBIT(flags, 6);
|
||||
fExtend = GETBIT(flags, 7);
|
||||
|
||||
if (global_info->Version > 0x0200 && global_info->Version < 0x0800)
|
||||
{
|
||||
if (dyHeight > 0)
|
||||
{
|
||||
CP_XML_ATTR(L"sz", (int)(dyHeight/20. * 100));
|
||||
record >> icv;
|
||||
}
|
||||
|
||||
}
|
||||
if (bls == 700)
|
||||
if (global_info->Version > 0x400)
|
||||
{
|
||||
record >> bls >> sss >> uls >> bFamily >> bCharSet;
|
||||
|
||||
unsigned char reserved;
|
||||
record >> reserved;
|
||||
|
||||
if (global_info->Version < 0x0800)
|
||||
{
|
||||
CP_XML_ATTR(L"b", true);
|
||||
if ((bls >= 100 && bls <= 1000) || bls == 0 || bls == 0x8000)
|
||||
correct = true;
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"b", false);
|
||||
|
||||
if (fItalic)
|
||||
{
|
||||
CP_XML_ATTR(L"i", fItalic);
|
||||
if (bls >= 400 && bls <= 1000)
|
||||
correct = true;
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"i", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
correct = true;
|
||||
|
||||
switch(sss)
|
||||
{
|
||||
case 1: CP_XML_ATTR(L"cap", L"all");break;
|
||||
case 2: CP_XML_ATTR(L"cap", L"small");break;
|
||||
}
|
||||
if (GETBIT(flags, 0))
|
||||
bls = 700;
|
||||
uls = GETBIT(flags, 2);
|
||||
}
|
||||
|
||||
if ( (icv < 0x7fff) || color_ext.enabled )
|
||||
if (global_info->Version < 0x0600)
|
||||
{
|
||||
ShortXLAnsiString name;
|
||||
record >> name;
|
||||
|
||||
fontName = name;
|
||||
}
|
||||
else if (global_info->Version < 0x0800)
|
||||
{
|
||||
ShortXLUnicodeString name;
|
||||
|
||||
record >> name;
|
||||
fontName = name;
|
||||
}
|
||||
else
|
||||
{
|
||||
brtColor.readFields(record);
|
||||
record >> bFontScheme;
|
||||
|
||||
XLSB::XLWideString name;
|
||||
|
||||
record >> name;
|
||||
fontName = name;
|
||||
}
|
||||
|
||||
if (global_info->fonts_charsets.find(bCharSet) == global_info->fonts_charsets.end() && bCharSet != 0)
|
||||
{
|
||||
global_info->fonts_charsets.insert(std::make_pair(bCharSet, bFamily));
|
||||
}
|
||||
}
|
||||
|
||||
int Font::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
CP_XML_NODE(L"font")
|
||||
{
|
||||
if (color_ext.enabled )
|
||||
serialize_properties(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Font::set_color_ext(FillInfoExt & color_ext_)
|
||||
{
|
||||
color_ext = color_ext_;
|
||||
}
|
||||
int Font::serialize_rPr(std::wostream & stream, bool rtl, bool defRPr, std::wstring namespace_)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
std::wstring strRpr = namespace_ + L"rPr";
|
||||
if (defRPr) strRpr = namespace_ + L"defRPr";
|
||||
|
||||
CP_XML_NODE(strRpr)
|
||||
{
|
||||
if (dyHeight > 0)
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"solidFill")
|
||||
CP_XML_ATTR(L"sz", (int)(dyHeight / 20. * 100));
|
||||
|
||||
}
|
||||
if (bls == 700)
|
||||
{
|
||||
CP_XML_ATTR(L"b", true);
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"b", false);
|
||||
|
||||
if (fItalic)
|
||||
{
|
||||
CP_XML_ATTR(L"i", fItalic);
|
||||
}
|
||||
else
|
||||
CP_XML_ATTR(L"i", false);
|
||||
|
||||
switch (sss)
|
||||
{
|
||||
case 1: CP_XML_ATTR(L"cap", L"all"); break;
|
||||
case 2: CP_XML_ATTR(L"cap", L"small"); break;
|
||||
}
|
||||
|
||||
if ((icv < 0x7fff) || color_ext.enabled)
|
||||
{
|
||||
if (color_ext.enabled)
|
||||
{
|
||||
switch(color_ext.xclrType)
|
||||
CP_XML_NODE(namespace_ + L"solidFill")
|
||||
{
|
||||
switch (color_ext.xclrType)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
CP_XML_NODE(namespace_ + L"schemeClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", color_ext.icv); break;
|
||||
CP_XML_ATTR(L"val", color_ext.icv); break;
|
||||
}
|
||||
case 2://rgb
|
||||
CP_XML_NODE(namespace_ + L"srgbClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", STR::toRGB(color_ext.xclrValue));
|
||||
CP_XML_ATTR(L"val", STR::toRGB(color_ext.xclrValue));
|
||||
}break;
|
||||
case 3://theme color
|
||||
CP_XML_NODE(namespace_ + L"schemeClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", color_ext.xclrValue + 1);
|
||||
CP_XML_ATTR(L"val", color_ext.xclrValue + 1);
|
||||
CP_XML_NODE(L"tint")
|
||||
{
|
||||
CP_XML_ATTR(L"val", color_ext.nTintShade / 32767.0);
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::wstring strColor;
|
||||
|
||||
std::map<int, std::wstring>::iterator it = global_info->colors_palette.find(icv);
|
||||
|
||||
if (it != global_info->colors_palette.end()) strColor = it->second;
|
||||
else if ( icv < 64) strColor = DefaultPalette[icv].substr(2);
|
||||
|
||||
if (!strColor.empty())
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"solidFill")
|
||||
std::wstring strColor;
|
||||
|
||||
std::map<int, std::wstring>::iterator it = global_info->colors_palette.find(icv);
|
||||
|
||||
if (it != global_info->colors_palette.end()) strColor = it->second;
|
||||
else if (icv < 64) strColor = DefaultPalette[icv].substr(2);
|
||||
|
||||
if (!strColor.empty())
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"srgbClr")
|
||||
CP_XML_NODE(namespace_ + L"solidFill")
|
||||
{
|
||||
CP_XML_ATTR(L"val", strColor);
|
||||
}
|
||||
CP_XML_NODE(namespace_ + L"srgbClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val", strColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!fontName.empty())
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"latin")
|
||||
if (!fontName.empty())
|
||||
{
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
CP_XML_NODE(namespace_ + L"ea")
|
||||
{
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
CP_XML_NODE(namespace_ + L"cs")
|
||||
{
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
}
|
||||
if (rtl)
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"rtl");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int Font::serialize_properties(std::wostream & stream, bool isRPr)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
if ( bls== 700)
|
||||
{
|
||||
CP_XML_NODE(L"b")
|
||||
{
|
||||
CP_XML_ATTR(L"val", true);
|
||||
}
|
||||
}
|
||||
|
||||
if (bCharSet)
|
||||
{
|
||||
CP_XML_NODE(L"charset")
|
||||
{
|
||||
CP_XML_ATTR(L"val", bCharSet);
|
||||
}
|
||||
}
|
||||
|
||||
if (icv < 0x7fff || color_ext.enabled )
|
||||
{
|
||||
CP_XML_NODE(L"color")
|
||||
{
|
||||
if (color_ext.enabled )
|
||||
{
|
||||
switch(color_ext.xclrType)
|
||||
CP_XML_NODE(namespace_ + L"latin")
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
CP_XML_ATTR(L"indexed", color_ext.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(color_ext.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", color_ext.xclrValue + 1);
|
||||
CP_XML_ATTR(L"tint", color_ext.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
CP_XML_NODE(namespace_ + L"ea")
|
||||
{
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
CP_XML_NODE(namespace_ + L"cs")
|
||||
{
|
||||
CP_XML_ATTR(L"typeface", fontName);
|
||||
}
|
||||
}
|
||||
if (rtl)
|
||||
{
|
||||
CP_XML_NODE(namespace_ + L"rtl");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int Font::serialize_properties(std::wostream & stream, bool isRPr)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
if (bls == 700)
|
||||
{
|
||||
CP_XML_NODE(L"b")
|
||||
{
|
||||
CP_XML_ATTR(L"val", true);
|
||||
}
|
||||
}
|
||||
|
||||
if (bCharSet)
|
||||
{
|
||||
CP_XML_NODE(L"charset")
|
||||
{
|
||||
CP_XML_ATTR(L"val", bCharSet);
|
||||
}
|
||||
}
|
||||
|
||||
if (icv < 0x7fff || color_ext.enabled)
|
||||
{
|
||||
CP_XML_NODE(L"color")
|
||||
{
|
||||
if (color_ext.enabled)
|
||||
{
|
||||
switch (color_ext.xclrType)
|
||||
{
|
||||
case 0://auto
|
||||
/*CP_XML_ATTR(L"auto");*/ break;
|
||||
case 1://indexed
|
||||
CP_XML_ATTR(L"indexed", color_ext.icv); break;
|
||||
case 2://rgb
|
||||
CP_XML_ATTR(L"rgb", STR::toARGB(color_ext.xclrValue)); break;
|
||||
case 3://theme color
|
||||
CP_XML_ATTR(L"theme", color_ext.xclrValue + 1);
|
||||
CP_XML_ATTR(L"tint", color_ext.nTintShade / 32767.0); break;
|
||||
case 4://not set
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_ATTR(L"indexed", icv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fCondense)
|
||||
{
|
||||
CP_XML_NODE(L"condense")
|
||||
{
|
||||
CP_XML_ATTR(L"val", 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (fExtend)
|
||||
{
|
||||
CP_XML_NODE(L"extend")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fExtend);
|
||||
}
|
||||
}
|
||||
|
||||
if (bFamily)
|
||||
{
|
||||
CP_XML_NODE(L"family")
|
||||
{
|
||||
CP_XML_ATTR(L"val", bFamily);
|
||||
}
|
||||
}
|
||||
|
||||
if (fItalic)
|
||||
{
|
||||
CP_XML_NODE(L"i")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fItalic);
|
||||
}
|
||||
}
|
||||
|
||||
if (!fontName.empty())
|
||||
{
|
||||
if (isRPr)
|
||||
{
|
||||
CP_XML_NODE(L"rFont")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fontName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CP_XML_ATTR(L"indexed", icv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fCondense)
|
||||
{
|
||||
CP_XML_NODE(L"condense")
|
||||
{
|
||||
CP_XML_ATTR(L"val", 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (fExtend)
|
||||
{
|
||||
CP_XML_NODE(L"extend")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fExtend);
|
||||
}
|
||||
}
|
||||
|
||||
if (bFamily)
|
||||
{
|
||||
CP_XML_NODE(L"family")
|
||||
{
|
||||
CP_XML_ATTR(L"val", bFamily);
|
||||
}
|
||||
}
|
||||
|
||||
if (fItalic)
|
||||
{
|
||||
CP_XML_NODE(L"i")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fItalic);
|
||||
}
|
||||
}
|
||||
|
||||
if (!fontName.empty())
|
||||
{
|
||||
if (isRPr)
|
||||
{
|
||||
CP_XML_NODE(L"rFont")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fontName);
|
||||
CP_XML_NODE(L"name")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fontName);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if (fOutline)
|
||||
{
|
||||
CP_XML_NODE(L"name")
|
||||
CP_XML_NODE(L"outline")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fontName);
|
||||
CP_XML_ATTR(L"val", fOutline);
|
||||
}
|
||||
}
|
||||
|
||||
//if (font.scheme)
|
||||
//{
|
||||
// CP_XML_NODE(L"scheme")
|
||||
// {
|
||||
// CP_XML_ATTR(L"val", *font.scheme);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (fShadow)
|
||||
{
|
||||
CP_XML_NODE(L"shadow")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fShadow);
|
||||
}
|
||||
}
|
||||
|
||||
if (fStrikeOut)
|
||||
{
|
||||
CP_XML_NODE(L"strike")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fStrikeOut);
|
||||
}
|
||||
}
|
||||
|
||||
if (dyHeight > 0)
|
||||
{
|
||||
CP_XML_NODE(L"sz")
|
||||
{
|
||||
CP_XML_ATTR(L"val", dyHeight / 20.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (uls > 0)
|
||||
{
|
||||
CP_XML_NODE(L"u")
|
||||
{
|
||||
switch (uls)
|
||||
{
|
||||
case 0: CP_XML_ATTR(L"val", L"none"); break;
|
||||
case 1: CP_XML_ATTR(L"val", L"single"); break;
|
||||
case 2: CP_XML_ATTR(L"val", L"double"); break;
|
||||
case 33: CP_XML_ATTR(L"val", L"singleAccounting"); break;
|
||||
case 34: CP_XML_ATTR(L"val", L"doubleAccounting"); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sss > 0)
|
||||
{
|
||||
CP_XML_NODE(L"vertAlign")
|
||||
{
|
||||
switch (sss)
|
||||
{
|
||||
case 1: CP_XML_ATTR(L"val", L"superscript"); break;
|
||||
case 2: CP_XML_ATTR(L"val", L"subscript"); break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fOutline)
|
||||
{
|
||||
CP_XML_NODE(L"outline")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fOutline);
|
||||
}
|
||||
}
|
||||
|
||||
//if (font.scheme)
|
||||
//{
|
||||
// CP_XML_NODE(L"scheme")
|
||||
// {
|
||||
// CP_XML_ATTR(L"val", *font.scheme);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (fShadow)
|
||||
{
|
||||
CP_XML_NODE(L"shadow")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fShadow);
|
||||
}
|
||||
}
|
||||
|
||||
if (fStrikeOut)
|
||||
{
|
||||
CP_XML_NODE(L"strike")
|
||||
{
|
||||
CP_XML_ATTR(L"val", fStrikeOut);
|
||||
}
|
||||
}
|
||||
|
||||
if (dyHeight > 0)
|
||||
{
|
||||
CP_XML_NODE(L"sz")
|
||||
{
|
||||
CP_XML_ATTR(L"val", dyHeight/20.f);
|
||||
}
|
||||
}
|
||||
|
||||
if (uls > 0)
|
||||
{
|
||||
CP_XML_NODE(L"u")
|
||||
{
|
||||
switch(uls)
|
||||
{
|
||||
case 0: CP_XML_ATTR(L"val", L"none");break;
|
||||
case 1: CP_XML_ATTR(L"val", L"single");break;
|
||||
case 2: CP_XML_ATTR(L"val", L"double");break;
|
||||
case 33: CP_XML_ATTR(L"val", L"singleAccounting");break;
|
||||
case 34: CP_XML_ATTR(L"val", L"doubleAccounting");break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sss > 0)
|
||||
{
|
||||
CP_XML_NODE(L"vertAlign")
|
||||
{
|
||||
switch(sss)
|
||||
{
|
||||
case 1: CP_XML_ATTR(L"val", L"superscript");break;
|
||||
case 2: CP_XML_ATTR(L"val", L"subscript");break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -72,22 +72,32 @@ public:
|
||||
bool fExtend;
|
||||
|
||||
_UINT16 icv;
|
||||
_UINT16 bls;
|
||||
_UINT16 sss;
|
||||
unsigned char uls;
|
||||
unsigned char bFamily;
|
||||
unsigned char bCharSet;
|
||||
_UINT16 bls = 0;
|
||||
_UINT16 sss = 0;
|
||||
unsigned char uls = 0;
|
||||
unsigned char bFamily = 0;
|
||||
unsigned char bCharSet = 0;
|
||||
|
||||
std::wstring fontName;
|
||||
FillInfoExt color_ext;
|
||||
std::wstring fontName;
|
||||
FillInfoExt color_ext;
|
||||
|
||||
bool correct;
|
||||
bool correct;
|
||||
|
||||
//xlsb
|
||||
XLSB::Color brtColor;
|
||||
unsigned char bFontScheme;
|
||||
//xlsb
|
||||
XLSB::Color brtColor;
|
||||
unsigned char bFontScheme;
|
||||
|
||||
};
|
||||
class Font_BIFF34 : public Font
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Font_BIFF34)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Font_BIFF34)
|
||||
public:
|
||||
Font_BIFF34();
|
||||
~Font_BIFF34();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
//0045H 5.47 FONTCOLOR
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -36,26 +36,39 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Format::Format()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Format::~Format()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr Format::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Format(*this));
|
||||
}
|
||||
|
||||
Format::Format()
|
||||
{}
|
||||
Format::~Format()
|
||||
{}
|
||||
BaseObjectPtr Format::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Format(*this));
|
||||
}
|
||||
Format_BIFF23::Format_BIFF23()
|
||||
{}
|
||||
Format_BIFF23::~Format_BIFF23()
|
||||
{}
|
||||
BaseObjectPtr Format_BIFF23::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Format_BIFF23(*this));
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
void Format::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
record >> ifmt;
|
||||
|
||||
ifmt = 0xffff;
|
||||
if (global_info->Version > 0x0300)
|
||||
{
|
||||
if (global_info->Version == 0x0400)
|
||||
{
|
||||
_UINT16 notUsed;
|
||||
record >> notUsed;
|
||||
}
|
||||
else
|
||||
record >> ifmt;
|
||||
}
|
||||
|
||||
XLUnicodeString format;
|
||||
if (global_info->Version < 0x0600)
|
||||
{
|
||||
@ -67,8 +80,7 @@ void Format::readFields(CFRecord& record)
|
||||
else
|
||||
record >> format;
|
||||
|
||||
|
||||
stFormat = XmlUtils::EncodeXmlString(format.value(), true);
|
||||
stFormat = format.value();
|
||||
}
|
||||
|
||||
int Format::serialize(std::wostream & stream)
|
||||
|
||||
@ -57,5 +57,15 @@ public:
|
||||
std::wstring stFormat;
|
||||
};
|
||||
|
||||
class Format_BIFF23 : public Format
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Format_BIFF23)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Format_BIFF23)
|
||||
public:
|
||||
Format_BIFF23();
|
||||
~Format_BIFF23();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
*/
|
||||
|
||||
#include "HLinkTooltip.h"
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
#include <Logic/Biff_structures/FrtRefHeaderNoGrbit.h>
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
#include "../Biff_structures/FrtRefHeaderNoGrbit.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -32,21 +32,14 @@
|
||||
|
||||
#include "HeaderFooter.h"
|
||||
#include "../Biff_structures/FrtHeader.h"
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
HeaderFooter::HeaderFooter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
HeaderFooter::~HeaderFooter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
BaseObjectPtr HeaderFooter::clone()
|
||||
{
|
||||
return BaseObjectPtr(new HeaderFooter(*this));
|
||||
|
||||
@ -36,9 +36,6 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of HeaderFooter record in BIFF8
|
||||
class HeaderFooter: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(HeaderFooter)
|
||||
@ -48,11 +45,10 @@ public:
|
||||
~HeaderFooter();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeHeaderFooter;
|
||||
static const ElementType type = typeHeaderFooter;
|
||||
|
||||
//-----------------------------
|
||||
std::wstring guidSView;
|
||||
@ -71,7 +67,6 @@ public:
|
||||
XLUnicodeString strFooterEven;
|
||||
XLUnicodeString strHeaderFirst;
|
||||
XLUnicodeString strFooterFirst;
|
||||
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -53,7 +53,11 @@ BaseObjectPtr IFmtRecord::clone()
|
||||
|
||||
void IFmtRecord::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
record >> ifmt;
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
}
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -37,8 +37,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Index record in BIFF8
|
||||
class Index: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Index)
|
||||
@ -48,11 +46,10 @@ public:
|
||||
~Index();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeIndex;
|
||||
static const ElementType type = typeIndex;
|
||||
|
||||
//-----------------------------
|
||||
BackwardOnlyParam<_UINT32> rwMic;
|
||||
@ -63,6 +60,6 @@ public:
|
||||
BiffStructurePtrVector rgibRw;
|
||||
|
||||
};
|
||||
|
||||
//000BH biff2
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "InterfaceHdr.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "LPr.h"
|
||||
//#include <Exception/UnexpectedProgramPath.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -34,30 +34,37 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Label::Label()
|
||||
{
|
||||
isst_ = -1;
|
||||
}
|
||||
|
||||
|
||||
Label::Label() : isst_(-1)
|
||||
{}
|
||||
Label::~Label()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
BaseObjectPtr Label::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Label(*this));
|
||||
}
|
||||
|
||||
Label_BIFF2::Label_BIFF2() : Label()
|
||||
{}
|
||||
Label_BIFF2::~Label_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr Label_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Label_BIFF2(*this));
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
void Label::readFields(CFRecord& record)
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
record >> cell;
|
||||
|
||||
if (global_info_->Version < 0x0600)
|
||||
if (global_info_->Version == 0x0200)
|
||||
{
|
||||
ShortXLAnsiString name;
|
||||
record >> name;
|
||||
|
||||
st = name;
|
||||
}
|
||||
else if (global_info_->Version < 0x0600)
|
||||
{
|
||||
LPAnsiString name;
|
||||
record >> name;
|
||||
@ -82,8 +89,7 @@ int Label::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
int st = (int)cell.ixfe - global_info_->cellStyleXfs_count;
|
||||
if (cell.ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of Label record in BIFF8
|
||||
class Label: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Label)
|
||||
@ -49,7 +47,6 @@ public:
|
||||
~Label();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -57,6 +54,7 @@ public:
|
||||
|
||||
static const ElementType type = typeLabel;
|
||||
|
||||
unsigned short xti = 0xffff;
|
||||
Cell cell;
|
||||
XLUnicodeString st;
|
||||
//-----------------------------
|
||||
@ -64,7 +62,16 @@ public:
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
int isst_;
|
||||
};
|
||||
class Label_BIFF2 : public Label
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Label_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Label_BIFF2)
|
||||
public:
|
||||
Label_BIFF2();
|
||||
~Label_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
|
||||
class CommentText: public BiffRecord
|
||||
{
|
||||
@ -75,7 +82,6 @@ public:
|
||||
~CommentText();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
|
||||
@ -38,12 +38,10 @@ LabelSst::LabelSst()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LabelSst::~LabelSst()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr LabelSst::clone()
|
||||
{
|
||||
return BaseObjectPtr(new LabelSst(*this));
|
||||
@ -72,8 +70,7 @@ int LabelSst::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
int st = (int)cell.ixfe - global_info_->cellStyleXfs_count;
|
||||
if (cell.ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of LabelSst record in BIFF8
|
||||
class LabelSst: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(LabelSst)
|
||||
@ -49,7 +47,6 @@ public:
|
||||
~LabelSst();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "Mms.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -71,12 +71,10 @@ MulBlank::MulBlank()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
MulBlank::~MulBlank()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr MulBlank::clone()
|
||||
{
|
||||
return BaseObjectPtr(new MulBlank(*this));
|
||||
@ -125,9 +123,8 @@ int MulBlank::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
if ( ((i-colFirst) < rgixfe.rgixfe.size()) && (rgixfe.rgixfe[i-colFirst] > global_info_->cellStyleXfs_count))
|
||||
if ( ((i-colFirst) < rgixfe.rgixfe.size()) && (rgixfe.rgixfe[i-colFirst] >= global_info_->cellStyleXfs_count))
|
||||
{
|
||||
int st = (int)rgixfe.rgixfe[i-colFirst] - global_info_->cellStyleXfs_count;
|
||||
CP_XML_ATTR(L"s", rgixfe.rgixfe[i-colFirst] - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
else if (((i - colFirst) < rgixfe.rgixfe.size()) && ((i - colFirst) < global_info_->cellStyleXfs_count))
|
||||
|
||||
@ -43,7 +43,6 @@ MulRk::~MulRk()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObjectPtr MulRk::clone()
|
||||
{
|
||||
return BaseObjectPtr(new MulRk(*this));
|
||||
@ -53,7 +52,6 @@ void MulRk::readFields(CFRecord& record)
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
// A little hack to extract colLast before it is used
|
||||
record.skipNunBytes(record.getDataSize() - sizeof(unsigned short));
|
||||
record >> colLast;
|
||||
record.resetPointerToBegin();
|
||||
@ -96,7 +94,7 @@ int MulRk::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
if (cell->ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell->ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell->ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
|
||||
// Logical representation of MulRk record in BIFF8
|
||||
class MulRk: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(MulRk)
|
||||
@ -49,7 +47,6 @@ public:
|
||||
~MulRk();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
|
||||
@ -30,28 +30,30 @@
|
||||
*
|
||||
*/
|
||||
#include "Number.h"
|
||||
#include <Auxiliary/HelpFunc.h>
|
||||
#include "../../Auxiliary/HelpFunc.h"
|
||||
|
||||
#include "../../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Number_BIFF2::Number_BIFF2()
|
||||
{}
|
||||
Number_BIFF2::~Number_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr Number_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Number_BIFF2(*this));
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
Number::Number()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
Number::~Number()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
BaseObjectPtr Number::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Number(*this));
|
||||
}
|
||||
|
||||
void Number::readFields(CFRecord& record)
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
@ -64,12 +66,10 @@ void Number::readFields(CFRecord& record)
|
||||
record >> val;
|
||||
}
|
||||
}
|
||||
|
||||
const CellRef Number::getLocation() const
|
||||
{
|
||||
return cell.getLocation();
|
||||
}
|
||||
|
||||
int Number::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
@ -81,7 +81,7 @@ int Number::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
if (cell.ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
@ -93,6 +93,47 @@ int Number::serialize(std::wostream & stream)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
Integer_BIFF2::Integer_BIFF2()
|
||||
{}
|
||||
Integer_BIFF2::~Integer_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr Integer_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Integer_BIFF2(*this));
|
||||
}
|
||||
void Integer_BIFF2::readFields(CFRecord& record)
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
record >> cell >> num;
|
||||
}
|
||||
const CellRef Integer_BIFF2::getLocation() const
|
||||
{
|
||||
return cell.getLocation();
|
||||
}
|
||||
int Integer_BIFF2::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_WRITER(stream)
|
||||
{
|
||||
int row = cell.rw;
|
||||
|
||||
std::wstring ref = cell.getLocation().toString();// getColRowRef(i, row);
|
||||
CP_XML_NODE(L"c")
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
CP_XML_NODE(L"v")
|
||||
{
|
||||
CP_XML_STREAM() << std::to_wstring(num);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -48,7 +48,6 @@ public:
|
||||
~Number();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -64,6 +63,39 @@ public:
|
||||
//-----------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
};
|
||||
class Number_BIFF2 : public Number
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Number_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Number_BIFF2)
|
||||
public:
|
||||
Number_BIFF2();
|
||||
~Number_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
class Integer_BIFF2 : public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Integer_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Integer_BIFF2)
|
||||
public:
|
||||
Integer_BIFF2();
|
||||
~Integer_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeNumber;
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
const CellRef getLocation() const;
|
||||
|
||||
CellOffsetResender resender;
|
||||
Cell cell;
|
||||
_INT32 num;
|
||||
//-----------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "Pos.h"
|
||||
#include "Frame.h"
|
||||
|
||||
#include <utils.h>
|
||||
#include "../../../Common/utils.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -78,7 +78,7 @@ int RK::serialize(std::wostream & stream)
|
||||
{
|
||||
CP_XML_ATTR(L"r", ref);
|
||||
|
||||
if (cell.ixfe > global_info_->cellStyleXfs_count)
|
||||
if (cell.ixfe >= global_info_->cellStyleXfs_count)
|
||||
{
|
||||
CP_XML_ATTR(L"s", cell.ixfe - global_info_->cellStyleXfs_count);
|
||||
}
|
||||
|
||||
@ -34,61 +34,80 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Row::Row()
|
||||
{
|
||||
iOutLevel = 0;
|
||||
ixfe_val = 0;
|
||||
}
|
||||
|
||||
|
||||
Row::Row() : iOutLevel(0), ixfe_val(0)
|
||||
{}
|
||||
Row::~Row()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
BaseObjectPtr Row::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Row(*this));
|
||||
}
|
||||
|
||||
Row_BIFF2::Row_BIFF2() : Row()
|
||||
{}
|
||||
Row_BIFF2::~Row_BIFF2()
|
||||
{}
|
||||
BaseObjectPtr Row_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Row_BIFF2(*this));
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void Row::readFields(CFRecord& record)
|
||||
{
|
||||
|
||||
if (record.getGlobalWorkbookInfo()->Version < 0x0800)
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
if (global_info_->Version < 0x0800)
|
||||
{
|
||||
Rw rw_2b;
|
||||
_UINT16 ixfe_val_2b;
|
||||
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
Rw rw_2b;
|
||||
unsigned short ixfe_val_2b = 0xffff;
|
||||
record >> rw_2b >> colMic >> colMac >> miyRw;
|
||||
|
||||
unsigned short flags, flags2, reserved1, unused1;
|
||||
unsigned short unused1, rel_offset = 0xffff, flags1, flags2;
|
||||
record >> unused1;
|
||||
|
||||
if (global_info_->Version == 0x0200)
|
||||
{
|
||||
unsigned char flag;
|
||||
record >> flag >> rel_offset;
|
||||
fGhostDirty = flag;
|
||||
|
||||
if (fGhostDirty)
|
||||
{
|
||||
record >> flag >> flags1 >> ixfe_val_2b;
|
||||
}
|
||||
bValid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (global_info_->Version == 0x0300 ||
|
||||
global_info_->Version == 0x0400)
|
||||
{
|
||||
record >> rel_offset; // relative offset stream for first cell in row
|
||||
}
|
||||
else
|
||||
record >> unused1;
|
||||
|
||||
record >> reserved1 >> unused1 >> flags >> flags2;
|
||||
record >> flags1 >> flags2;
|
||||
|
||||
iOutLevel = GETBITS(flags, 0, 2);
|
||||
fCollapsed = GETBIT(flags, 4);
|
||||
fDyZero = GETBIT(flags, 5);
|
||||
fUnsynced = GETBIT(flags, 6);
|
||||
fGhostDirty = GETBIT(flags, 7);
|
||||
iOutLevel = GETBITS(flags1, 0, 2);
|
||||
fCollapsed = GETBIT(flags1, 4);
|
||||
fDyZero = GETBIT(flags1, 5);
|
||||
fUnsynced = GETBIT(flags1, 6);
|
||||
fGhostDirty = GETBIT(flags1, 7);
|
||||
|
||||
ixfe_val_2b = GETBITS(flags2, 0, 11);
|
||||
fExAsc = GETBIT(flags2, 12);
|
||||
fExDes = GETBIT(flags2, 13);
|
||||
fPhonetic = GETBIT(flags2, 14);
|
||||
|
||||
ixfe_val_2b = GETBITS(flags2, 0, 11);
|
||||
fExAsc = GETBIT(flags2, 12);
|
||||
fExDes = GETBIT(flags2, 13);
|
||||
fPhonetic = GETBIT(flags2, 14);
|
||||
|
||||
bValid = (flags != 0 || flags2 != 0);
|
||||
|
||||
rw = rw_2b;
|
||||
ixfe_val = ixfe_val_2b;
|
||||
bValid = (flags1 != 0 || flags2 != 0);
|
||||
}
|
||||
if (ixfe_val_2b != 0xffff)
|
||||
ixfe_val = ixfe_val_2b;
|
||||
rw = rw_2b;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
global_info_ = record.getGlobalWorkbookInfo();
|
||||
|
||||
record >> rw >> ixfe_val >> miyRw;
|
||||
|
||||
unsigned short flags;
|
||||
|
||||
@ -36,56 +36,56 @@
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
// Logical representation of Row record in BIFF8 and BrtRowHdr in BIFF12
|
||||
class Row: public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Row)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Row)
|
||||
public:
|
||||
Row();
|
||||
~Row();
|
||||
class Row : public BiffRecord
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Row)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Row)
|
||||
public:
|
||||
Row();
|
||||
~Row();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
static const ElementType type = typeRow;
|
||||
static const ElementType type = typeRow;
|
||||
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
UncheckedRw rw;
|
||||
unsigned short colMic;
|
||||
unsigned short colMac;
|
||||
_UINT16 miyRw;
|
||||
|
||||
//-----------------------------
|
||||
//Rw rw;
|
||||
UncheckedRw rw;
|
||||
unsigned char iOutLevel = 0;
|
||||
bool fCollapsed = false;
|
||||
bool fDyZero = false;
|
||||
bool fUnsynced = false;
|
||||
bool fGhostDirty = false;
|
||||
|
||||
//BackwardOnlyParam<unsigned short> colMic;
|
||||
//BackwardOnlyParam<unsigned short> colMac;
|
||||
_UINT32 ixfe_val = 0xffffffff;
|
||||
|
||||
unsigned short colMic;
|
||||
unsigned short colMac;
|
||||
bool fExAsc = false; //fExtraAsc in biff12
|
||||
bool fExDes = false; //fExtraDsc in biff12
|
||||
bool fPhonetic = false; //fPhShow in biff12
|
||||
|
||||
_UINT16 miyRw;
|
||||
bool bValid = false;
|
||||
|
||||
unsigned char iOutLevel;
|
||||
bool fCollapsed;
|
||||
bool fDyZero;
|
||||
bool fUnsynced;
|
||||
bool fGhostDirty;
|
||||
|
||||
//_UINT16 ixfe_val;
|
||||
_UINT32 ixfe_val;
|
||||
bool fExAsc; //fExtraAsc in biff12
|
||||
bool fExDes; //fExtraDsc in biff12
|
||||
bool fPhonetic; //fPhShow in biff12
|
||||
|
||||
bool bValid;
|
||||
|
||||
//xlsb
|
||||
_UINT32 ccolspan;
|
||||
std::vector<XLSB::ColSpan> rgBrtColspan;
|
||||
|
||||
};
|
||||
//xlsb
|
||||
_UINT32 ccolspan;
|
||||
std::vector<XLSB::ColSpan> rgBrtColspan;
|
||||
//--------------------------------------------------------------------
|
||||
GlobalWorkbookInfoPtr global_info_;
|
||||
};
|
||||
class Row_BIFF2 : public Row
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Row_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Row_BIFF2)
|
||||
public:
|
||||
Row_BIFF2();
|
||||
~Row_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -50,8 +50,11 @@ BaseObjectPtr SXDI::clone()
|
||||
|
||||
void SXDI::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
record >> isxvdData >> iiftab >> df >> isxvd >> isxvi >> ifmt >> cchName;
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
if (cchName > 0 && cchName < 0xFFFF)
|
||||
{
|
||||
stName.setSize(cchName);
|
||||
|
||||
@ -51,11 +51,14 @@ BaseObjectPtr SXVDEx::clone()
|
||||
|
||||
void SXVDEx::readFields(CFRecord& record)
|
||||
{
|
||||
GlobalWorkbookInfoPtr global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned short flags1;
|
||||
unsigned char flags2;
|
||||
|
||||
record >> flags1 >> flags2 >> citmAutoShow >> isxdiAutoSort >> isxdiAutoShow >> ifmt;
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
fShowAllItems = GETBIT(flags1, 0);
|
||||
fDragToRow = GETBIT(flags1, 1);
|
||||
fDragToColumn = GETBIT(flags1, 2);
|
||||
|
||||
@ -38,17 +38,12 @@ namespace XLS
|
||||
{
|
||||
|
||||
Setup::Setup(bool isChart)
|
||||
// the following may appear uninitialized but we have to store them
|
||||
: _isChart(isChart), iPaperSize(0), iScale(255), iRes(0), iVRes(0), iCopies(0), fNoOrient(false), fPortrait(false), iPageStart(1), iErrors(0)
|
||||
{
|
||||
numHdr.data.value = numFtr.data.value = 0.5;
|
||||
}
|
||||
|
||||
|
||||
Setup::~Setup()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
{}
|
||||
BaseObjectPtr Setup::clone()
|
||||
{
|
||||
return BaseObjectPtr(new Setup(*this));
|
||||
@ -65,9 +60,6 @@ void Setup::readFields(CFRecord& record)
|
||||
_INT16 iPageStart_2b;
|
||||
_UINT16 iFitWidth_2b;
|
||||
_UINT16 iFitHeight_2b;
|
||||
_UINT16 iRes_2b;
|
||||
_UINT16 iVRes_2b;
|
||||
_UINT16 iCopies_2b;
|
||||
|
||||
record >> iPaperSize_2b >> iScale_2b >> iPageStart_2b >> iFitWidth_2b >> iFitHeight_2b >> flags;
|
||||
|
||||
@ -82,16 +74,24 @@ void Setup::readFields(CFRecord& record)
|
||||
fEndNotes = GETBIT(flags, 9);
|
||||
iErrors = GETBITS(flags, 10, 11);
|
||||
|
||||
record >> iRes_2b >> iVRes_2b >> numHdr >> numFtr >> iCopies_2b;
|
||||
iPaperSize = iPaperSize_2b;
|
||||
iScale = iScale_2b;
|
||||
iPageStart = iPageStart_2b;
|
||||
iFitWidth = iFitWidth_2b;
|
||||
iFitHeight = iFitHeight_2b;
|
||||
|
||||
iPaperSize = iPaperSize_2b;
|
||||
iScale = iScale_2b;
|
||||
iPageStart = iPageStart_2b;
|
||||
iFitWidth = iFitWidth_2b;
|
||||
iFitHeight = iFitHeight_2b;
|
||||
iRes = iRes_2b;
|
||||
iVRes = iVRes_2b;
|
||||
iCopies = iCopies_2b;
|
||||
if (record.getGlobalWorkbookInfo()->Version > 0x0200)
|
||||
{
|
||||
_UINT16 iRes_2b;
|
||||
_UINT16 iVRes_2b;
|
||||
_UINT16 iCopies_2b;
|
||||
|
||||
record >> iRes_2b >> iVRes_2b >> numHdr >> numFtr >> iCopies_2b;
|
||||
|
||||
iRes = iRes_2b;
|
||||
iVRes = iVRes_2b;
|
||||
iCopies = iCopies_2b;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -42,44 +42,43 @@ class Setup: public BiffRecord
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(Setup)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(Setup)
|
||||
public:
|
||||
Setup(bool isChart = false);
|
||||
Setup(bool isChart = false);
|
||||
~Setup();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeSetup;
|
||||
static const ElementType type = typeSetup;
|
||||
|
||||
//-----------------------------
|
||||
_UINT32 iPaperSize;
|
||||
_UINT32 iScale;
|
||||
_INT32 iPageStart;
|
||||
_UINT32 iFitWidth;
|
||||
_UINT32 iFitHeight;
|
||||
_UINT32 iPaperSize = 0;
|
||||
_UINT32 iScale = 100;
|
||||
_INT32 iPageStart = 1;
|
||||
_UINT32 iFitWidth = 0;
|
||||
_UINT32 iFitHeight = 0;
|
||||
|
||||
bool fLeftToRight;
|
||||
bool fPortrait;
|
||||
bool fNoPls;
|
||||
bool fNoColor;
|
||||
bool fDraft;
|
||||
bool fNotes;
|
||||
bool fNoOrient;
|
||||
bool fUsePage;
|
||||
bool fEndNotes;
|
||||
unsigned char iErrors;
|
||||
bool fLeftToRight = false;
|
||||
bool fPortrait = false;
|
||||
bool fNoPls = false;
|
||||
bool fNoColor = false;
|
||||
bool fDraft = false;
|
||||
bool fNotes = false;
|
||||
bool fNoOrient = false;
|
||||
bool fUsePage = false;
|
||||
bool fEndNotes = false;
|
||||
unsigned char iErrors = 0;
|
||||
|
||||
_UINT32 iRes = 0;
|
||||
_UINT32 iVRes = 0;
|
||||
|
||||
_UINT32 iRes;
|
||||
_UINT32 iVRes;
|
||||
Xnum numHdr;
|
||||
Xnum numFtr;
|
||||
_UINT32 iCopies;
|
||||
_UINT32 iCopies = 1;
|
||||
|
||||
std::wstring szRelID; // biff12
|
||||
bool fLandscape; // biff12
|
||||
|
||||
bool _isChart;
|
||||
std::wstring szRelID; // biff12
|
||||
bool fLandscape; // biff12
|
||||
|
||||
bool _isChart;
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -36,20 +36,26 @@ namespace XLS
|
||||
{
|
||||
|
||||
String::String()
|
||||
{
|
||||
}
|
||||
|
||||
{}
|
||||
|
||||
String::~String()
|
||||
{
|
||||
}
|
||||
|
||||
{}
|
||||
|
||||
BaseObjectPtr String::clone()
|
||||
{
|
||||
return BaseObjectPtr(new String(*this));
|
||||
}
|
||||
|
||||
String_BIFF2::String_BIFF2()
|
||||
{}
|
||||
|
||||
String_BIFF2::~String_BIFF2()
|
||||
{}
|
||||
|
||||
BaseObjectPtr String_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new String_BIFF2(*this));
|
||||
}
|
||||
|
||||
void String::readFields(CFRecord& record)
|
||||
{
|
||||
|
||||
@ -46,7 +46,6 @@ public:
|
||||
~String();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
@ -54,8 +53,16 @@ public:
|
||||
|
||||
//-----------------------------
|
||||
XLUnicodeString string;
|
||||
|
||||
};
|
||||
class String_BIFF2 : public String
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(String_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(String_BIFF2)
|
||||
public:
|
||||
String_BIFF2();
|
||||
~String_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
} // namespace XLS
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
|
||||
static const ElementType type = typeStyle;
|
||||
static const ElementType type = typeStyle;
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
//-----------------------------
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "Template.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,10 +31,10 @@
|
||||
*/
|
||||
|
||||
#include "Theme.h"
|
||||
#include "../../../DesktopEditor/common/File.h"
|
||||
#include "../../../OfficeUtils/src/OfficeUtils.h"
|
||||
#include "../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../../ASCOfficePPTXFile/PPTXFormat/Theme.h"
|
||||
#include "../../../../../DesktopEditor/common/File.h"
|
||||
#include "../../../../../OfficeUtils/src/OfficeUtils.h"
|
||||
#include "../../../../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../../../../ASCOfficePPTXFile/PPTXFormat/Theme.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -195,7 +195,7 @@ int TxO::serialize_vml (std::wostream & _stream)
|
||||
std::wstring str_ = rawText.value();
|
||||
int str_size = str_.size();
|
||||
|
||||
int iFmt = 0;
|
||||
int iFnt = 0;
|
||||
|
||||
CP_XML_WRITER(_stream)
|
||||
{
|
||||
@ -218,11 +218,11 @@ int TxO::serialize_vml (std::wostream & _stream)
|
||||
//style='text-align:left'
|
||||
CP_XML_NODE(L"font")
|
||||
{
|
||||
iFmt = run->formatRun.ifnt;
|
||||
iFnt = run->formatRun.ifnt;
|
||||
Font *font = NULL;
|
||||
if (iFmt >= 0 && iFmt < global_info->m_arFonts.size())
|
||||
if (iFnt >= 0 && iFnt < global_info->m_arFonts.size())
|
||||
{
|
||||
font = dynamic_cast<Font *>(global_info->m_arFonts[iFmt].get());
|
||||
font = dynamic_cast<Font *>(global_info->m_arFonts[iFnt].get());
|
||||
}
|
||||
if (font)
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "UserBView.h"
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,8 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "UserSViewBegin.h"
|
||||
#include <Logic/Biff_structures/CellRangeRef.h>
|
||||
//#include <Exception/AttributeDataWrong.h>
|
||||
#include "../Biff_structures/CellRangeRef.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "WriteProtect.h"
|
||||
#include <Binary/CFStream.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -38,16 +38,143 @@
|
||||
#include "../Biff_structures/XFPropBorder.h"
|
||||
#include "../Biff_structures/FontIndex.h"
|
||||
#include "Font.h"
|
||||
#include "Format.h"
|
||||
#include "../../../../../ASCOfficePPTXFile/PPTXFormat/Theme.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
XF_BIFF2::XF_BIFF2(size_t& cell_xf_current_id, size_t& style_xf_current_id) :
|
||||
XF(cell_xf_current_id, style_xf_current_id)
|
||||
{}
|
||||
XF_BIFF2::~XF_BIFF2()
|
||||
{}
|
||||
|
||||
BaseObjectPtr XF_BIFF2::clone()
|
||||
{
|
||||
return BaseObjectPtr(new XF_BIFF2(*this));
|
||||
}
|
||||
void XF_BIFF2::readFields(CFRecord& record)
|
||||
{
|
||||
global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned char ifmt_index, ifnt, notUsing, flags1, flags2;
|
||||
record >> ifnt >> notUsing >> flags1 >> flags2;
|
||||
font_index = ifnt < 4 ? ifnt : ifnt - 1;
|
||||
|
||||
ifmt_index = GETBITS(flags1, 0, 5);
|
||||
fLocked = GETBIT(flags1, 6);
|
||||
fHidden = GETBIT(flags1, 7);
|
||||
|
||||
alc = GETBITS(flags2, 0, 2);
|
||||
|
||||
border.dgLeft = GETBIT(flags2, 3) ? 1 : 0;
|
||||
border.dgRight = GETBIT(flags2, 4) ? 1 : 0;
|
||||
border.dgTop = GETBIT(flags2, 5) ? 1 : 0;
|
||||
border.dgBottom = GETBIT(flags2, 6) ? 1 : 0;
|
||||
|
||||
fill.fls = GETBIT(flags2, 7) ? 1 : 0;
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
if (ifmt_index < global_info->m_arNumFormats.size() && ifmt_index != 0xff)
|
||||
{
|
||||
Format* fmt = dynamic_cast<Format*>(global_info->m_arNumFormats[ifmt_index].get());
|
||||
if (fmt)
|
||||
ifmt = fmt->ifmt;
|
||||
}
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
if (font_index >= 0 && font_index < global_info->m_arFonts.size())
|
||||
{
|
||||
Font* pFont = dynamic_cast<Font*>(global_info->m_arFonts[font_index].get());
|
||||
if (pFont)
|
||||
{
|
||||
pFont->set(font);
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
XF_BIFF3::XF_BIFF3(size_t& cell_xf_current_id, size_t& style_xf_current_id) :
|
||||
XF(cell_xf_current_id, style_xf_current_id)
|
||||
{}
|
||||
XF_BIFF3::~XF_BIFF3()
|
||||
{}
|
||||
|
||||
BaseObjectPtr XF_BIFF3::clone()
|
||||
{
|
||||
return BaseObjectPtr(new XF_BIFF3(*this));
|
||||
}
|
||||
void XF_BIFF3::readFields(CFRecord& record)
|
||||
{
|
||||
global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
unsigned char ifmt_index, ifnt, flags1, flags2;
|
||||
unsigned short flags3, flags4;
|
||||
_UINT32 flags5;
|
||||
|
||||
record >> ifnt >> ifmt_index >> flags1 >> flags2 >> flags3 >> flags4 >> flags5;
|
||||
font_index = ifnt < 4 ? ifnt : ifnt - 1;
|
||||
|
||||
fLocked = GETBIT(flags1, 0);
|
||||
fHidden = GETBIT(flags1, 1);
|
||||
fStyle = GETBIT(flags1, 2);
|
||||
|
||||
fAtrNum = GETBIT(flags2, 2);
|
||||
fAtrFnt = GETBIT(flags2, 3);
|
||||
fAtrAlc = GETBIT(flags2, 4);
|
||||
fAtrBdr = GETBIT(flags2, 5);
|
||||
fAtrPat = GETBIT(flags2, 6);
|
||||
fAtrProt = GETBIT(flags2, 7);
|
||||
|
||||
alc = GETBITS(flags3, 0, 2);
|
||||
fWrap = GETBIT(flags3, 3);
|
||||
ixfParent = GETBITS(flags3, 4, 15);
|
||||
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags4, 0, 5));
|
||||
fill.icvFore = GETBITS(flags4, 0, 6);
|
||||
fill.icvBack = GETBITS(flags4, 7, 13);
|
||||
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags5, 0, 2));
|
||||
border.icvTop = (0 != border.dgTop) ? static_cast<unsigned char>(GETBITS(flags5, 3, 7)) : 0;
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags5, 8, 10));
|
||||
border.icvLeft = (0 != border.dgLeft) ? static_cast<unsigned char>(GETBITS(flags5, 11, 15)) : 0;
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags5, 16, 18));
|
||||
border.icvBottom = (0 != border.dgBottom) ? static_cast<unsigned char>(GETBITS(flags5, 19, 23)) : 0;
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags5, 24, 26));
|
||||
border.icvRight = (0 != border.dgRight) ? static_cast<unsigned char>(GETBITS(flags5, 27, 31)) : 0;
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
if (ifmt_index < global_info->m_arNumFormats.size() && ifmt_index != 0xff)
|
||||
{
|
||||
Format* fmt = dynamic_cast<Format*>(global_info->m_arNumFormats[ifmt_index].get());
|
||||
if (fmt)
|
||||
ifmt = fmt->ifmt;
|
||||
}
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
if (font_index >= 0 && font_index < global_info->m_arFonts.size())
|
||||
{
|
||||
Font* pFont = dynamic_cast<Font*>(global_info->m_arFonts[font_index].get());
|
||||
if (pFont)
|
||||
{
|
||||
pFont->set(font);
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
XF_BIFF4::XF_BIFF4(size_t& cell_xf_current_id, size_t& style_xf_current_id) :
|
||||
XF(cell_xf_current_id, style_xf_current_id)
|
||||
{}
|
||||
XF_BIFF4::~XF_BIFF4()
|
||||
{}
|
||||
|
||||
BaseObjectPtr XF_BIFF4::clone()
|
||||
{
|
||||
return BaseObjectPtr(new XF_BIFF4(*this));
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
XF::XF (size_t& cell_xf_current_id, size_t& style_xf_current_id) :
|
||||
cell_xf_current_id_(cell_xf_current_id), style_xf_current_id_(style_xf_current_id)
|
||||
{
|
||||
alc = alcV = 0;
|
||||
|
||||
border_x_id = -1;
|
||||
fill_x_id = -1;
|
||||
font_x_id = -1;
|
||||
@ -56,18 +183,10 @@ namespace XLS
|
||||
|
||||
ixfParent = 0;
|
||||
font_index = 0xffff;
|
||||
|
||||
fAtrNum = false;
|
||||
fAtrFnt = false;
|
||||
fAtrAlc = false;
|
||||
fAtrBdr = false;
|
||||
fAtrPat = false;
|
||||
fAtrProt = false;
|
||||
}
|
||||
XF::~XF()
|
||||
{
|
||||
}
|
||||
|
||||
BaseObjectPtr XF::clone()
|
||||
{
|
||||
return BaseObjectPtr(new XF(*this));
|
||||
@ -77,152 +196,163 @@ void XF::readFields(CFRecord& record)
|
||||
{
|
||||
global_info = record.getGlobalWorkbookInfo();
|
||||
|
||||
if(global_info->Version < 0x0800)
|
||||
{
|
||||
unsigned short flags;
|
||||
FontIndex ifnt;
|
||||
unsigned char ifmt_index = 0xff;
|
||||
char orient = 0xff;
|
||||
|
||||
record >> ifnt >> ifmt >> flags;
|
||||
if (global_info->Version == 0x0400)
|
||||
{
|
||||
unsigned short flags1, flags4;
|
||||
unsigned char ifnt, flags2, flags3;
|
||||
_UINT32 flags5;
|
||||
|
||||
font_index = ifnt.getValue();
|
||||
record >> ifnt >> ifmt_index >> flags1 >> flags2 >> flags3 >> flags4 >> flags5;
|
||||
font_index = ifnt < 4 ? ifnt : ifnt - 1;
|
||||
|
||||
fLocked = GETBIT(flags1, 0);
|
||||
fHidden = GETBIT(flags1, 1);
|
||||
fStyle = GETBIT(flags1, 2);
|
||||
ixfParent = GETBITS(flags1, 4, 15);
|
||||
|
||||
alc = GETBITS(flags2, 0, 2);
|
||||
fWrap = GETBIT(flags2, 3);
|
||||
alcV = GETBITS(flags2, 4, 5);
|
||||
orient = static_cast<unsigned char>(GETBITS(flags2, 6, 7));
|
||||
|
||||
fAtrNum = GETBIT(flags3, 2);
|
||||
fAtrFnt = GETBIT(flags3, 3);
|
||||
fAtrAlc = GETBIT(flags3, 4);
|
||||
fAtrBdr = GETBIT(flags3, 5);
|
||||
fAtrPat = GETBIT(flags3, 6);
|
||||
fAtrProt = GETBIT(flags3, 7);
|
||||
|
||||
if (font_index >= 0 && font_index < global_info->m_arFonts.size())
|
||||
{
|
||||
Font* pFont = dynamic_cast<Font*>(global_info->m_arFonts[font_index].get());
|
||||
if (pFont)
|
||||
{
|
||||
pFont->set(font);
|
||||
}
|
||||
}
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags4, 0, 5));
|
||||
|
||||
fLocked = GETBIT(flags, 0);
|
||||
fHidden = GETBIT(flags, 1);
|
||||
fStyle = GETBIT(flags, 2);
|
||||
f123Prefix = GETBIT(flags, 3);
|
||||
ixfParent = GETBITS(flags, 4, 15);
|
||||
fill.icvFore = GETBITS(flags4, 0, 6);
|
||||
fill.icvBack = GETBITS(flags4, 7, 13);
|
||||
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags5, 0, 2));
|
||||
border.icvTop = (0 != border.dgTop) ? static_cast<unsigned char>(GETBITS(flags5, 3, 7)) : 0;
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags5, 8, 10));
|
||||
border.icvLeft = (0 != border.dgLeft) ? static_cast<unsigned char>(GETBITS(flags5, 11, 15)) : 0;
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags5, 16, 18));
|
||||
border.icvBottom = (0 != border.dgBottom) ? static_cast<unsigned char>(GETBITS(flags5, 19, 23)) : 0;
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags5, 24, 26));
|
||||
border.icvRight = (0 != border.dgRight) ? static_cast<unsigned char>(GETBITS(flags5, 27, 31)) : 0;
|
||||
}
|
||||
else if (global_info->Version == 0x0500)
|
||||
{
|
||||
unsigned short flags1;
|
||||
unsigned char flags2, flags3;
|
||||
_UINT32 flags4, flags5;
|
||||
|
||||
if (global_info->Version < 0x0600)
|
||||
{
|
||||
_UINT16 flags1;
|
||||
_UINT32 flags2;
|
||||
_UINT32 flags3;
|
||||
FontIndex ifnt;
|
||||
record >> ifnt >> ifmt >> flags1 >> flags2 >> flags3 >> flags4 >> flags5;
|
||||
font_index = ifnt.getValue();
|
||||
|
||||
record >> flags1 >> flags2 >> flags3;
|
||||
fLocked = GETBIT(flags1, 0);
|
||||
fHidden = GETBIT(flags1, 1);
|
||||
fStyle = GETBIT(flags1, 2);
|
||||
ixfParent = GETBITS(flags1, 4, 15);
|
||||
|
||||
alc = GETBITS(flags1, 0, 2);
|
||||
fWrap = GETBIT (flags1, 3);
|
||||
alcV = GETBITS(flags1, 4, 6);
|
||||
fJustLast = GETBIT (flags1, 7);
|
||||
trot = 0;//static_cast<unsigned char>(GETBITS(flags1, 8, 15));
|
||||
cIndent = 0;//static_cast<unsigned char>(GETBITS(flags1, 16, 19));
|
||||
fShrinkToFit = 0;//GETBIT(flags1, 20);
|
||||
iReadOrder = 0;//static_cast<unsigned char>(GETBITS(flags1, 22, 23));
|
||||
alc = GETBITS(flags2, 0, 2);
|
||||
fWrap = GETBIT(flags2, 3);
|
||||
alcV = GETBITS(flags2, 4, 6);
|
||||
|
||||
char orient = static_cast<unsigned char>(GETBITS(flags1, 8, 10));
|
||||
orient = static_cast<unsigned char>(GETBITS(flags3, 0, 1));
|
||||
fAtrNum = GETBIT(flags3, 2);
|
||||
fAtrFnt = GETBIT(flags3, 3);
|
||||
fAtrAlc = GETBIT(flags3, 4);
|
||||
fAtrBdr = GETBIT(flags3, 5);
|
||||
fAtrPat = GETBIT(flags3, 6);
|
||||
fAtrProt = GETBIT(flags3, 7);
|
||||
|
||||
switch(orient)
|
||||
{
|
||||
case 0: trot = 0; break; // Text orientation: not rotated.
|
||||
case 1: trot = 0xff; break; // Text orientation: vertically stacked.
|
||||
case 2: trot = 90; break; // Text orientation: 90 deg counterclockwise.
|
||||
case 3: trot = 270; break; // Text orientation: 90 deg clockwise.
|
||||
}
|
||||
if(!fStyle)
|
||||
{
|
||||
fAtrNum = GETBIT(flags2, 10);
|
||||
fAtrFnt = GETBIT(flags2, 11);
|
||||
fAtrAlc = GETBIT(flags2, 12);
|
||||
fAtrBdr = GETBIT(flags2, 13);
|
||||
fAtrPat = GETBIT(flags2, 14);
|
||||
fAtrProt = GETBIT(flags2, 15);
|
||||
}
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags4, 16, 21));
|
||||
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags2, 16, 21));
|
||||
fill.icvFore = GETBITS(flags4, 0, 6);
|
||||
fill.icvBack = GETBITS(flags4, 7, 13);
|
||||
|
||||
fill.icvFore = GETBITS(flags2, 0, 6);
|
||||
fill.icvBack = GETBITS(flags2, 7, 13);
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags5, 0, 2));
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags5, 3, 5));
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags5, 6, 8));
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags4, 22, 24));
|
||||
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags3, 0, 2));
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags3, 3, 5));
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags3, 6, 8));
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags2, 22, 24));
|
||||
border.dgDiag = 0;
|
||||
border.grbitDiag = 0;
|
||||
border.icvTop = (0 != border.dgTop) ? static_cast<unsigned char>(GETBITS(flags5, 9, 15)) : 0;
|
||||
border.icvLeft = (0 != border.dgLeft) ? static_cast<unsigned char>(GETBITS(flags5, 16, 22)) : 0;
|
||||
border.icvRight = (0 != border.dgRight) ? static_cast<unsigned char>(GETBITS(flags5, 23, 29)) : 0;
|
||||
border.icvBottom = (0 != border.dgBottom) ? static_cast<unsigned char>(GETBITS(flags4, 25, 31)) : 0;
|
||||
}
|
||||
else if (global_info->Version == 0x0600)
|
||||
{
|
||||
unsigned short flags1, flags5;
|
||||
_UINT32 flags2, flags3, flags4;
|
||||
|
||||
border.icvTop = (0 != border.dgTop) ? static_cast<unsigned char>(GETBITS(flags3, 9, 15)) : 0;
|
||||
border.icvLeft = (0 != border.dgLeft) ? static_cast<unsigned char>(GETBITS(flags3, 16, 22)) : 0;
|
||||
border.icvRight = (0 != border.dgRight) ? static_cast<unsigned char>(GETBITS(flags3, 23, 29)) : 0;
|
||||
border.icvBottom = (0 != border.dgBottom)? static_cast<unsigned char>(GETBITS(flags2, 25, 31)) : 0;
|
||||
border.icvDiag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_UINT32 flags1;
|
||||
_UINT32 flags2;
|
||||
_UINT32 flags3;
|
||||
_UINT16 flags4;
|
||||
FontIndex ifnt;
|
||||
record >> ifnt >> ifmt >> flags1 >> flags2 >> flags3 >> flags4 >> flags5;
|
||||
font_index = ifnt.getValue();
|
||||
|
||||
record >> flags1 >> flags2 >> flags3 >> flags4;
|
||||
fLocked = GETBIT(flags1, 0);
|
||||
fHidden = GETBIT(flags1, 1);
|
||||
fStyle = GETBIT(flags1, 2);
|
||||
f123Prefix = GETBIT(flags1, 3);
|
||||
ixfParent = GETBITS(flags1, 4, 15);
|
||||
|
||||
alc = static_cast<unsigned char>(GETBITS(flags1, 0, 2));
|
||||
fWrap = GETBIT(flags1, 3);
|
||||
alcV = static_cast<unsigned char>(GETBITS(flags1, 4, 6));
|
||||
fJustLast = GETBIT(flags1, 7);
|
||||
trot = static_cast<unsigned char>(GETBITS(flags1, 8, 15));
|
||||
cIndent = static_cast<unsigned char>(GETBITS(flags1, 16, 19));
|
||||
fShrinkToFit = GETBIT(flags1, 20);
|
||||
iReadOrder = static_cast<unsigned char>(GETBITS(flags1, 22, 23));
|
||||
alc = static_cast<unsigned char>(GETBITS(flags2, 0, 2));
|
||||
fWrap = GETBIT(flags2, 3);
|
||||
alcV = static_cast<unsigned char>(GETBITS(flags2, 4, 6));
|
||||
fJustLast = GETBIT(flags2, 7);
|
||||
|
||||
if(!fStyle)
|
||||
{
|
||||
fAtrNum = GETBIT(flags1, 26);
|
||||
fAtrFnt = GETBIT(flags1, 27);
|
||||
fAtrAlc = GETBIT(flags1, 28);
|
||||
fAtrBdr = GETBIT(flags1, 29);
|
||||
fAtrPat = GETBIT(flags1, 30);
|
||||
fAtrProt = GETBIT(flags1, 31);
|
||||
}
|
||||
trot = static_cast<unsigned char>(GETBITS(flags2, 8, 15));
|
||||
cIndent = static_cast<unsigned char>(GETBITS(flags2, 16, 19));
|
||||
fShrinkToFit = GETBIT(flags2, 20);
|
||||
iReadOrder = static_cast<unsigned char>(GETBITS(flags2, 22, 23));
|
||||
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags2, 0, 3));
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags2, 4, 7));
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags2, 8, 11));
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags2, 12, 15));
|
||||
border.dgDiag = static_cast<unsigned char>(GETBITS(flags3, 21, 24));
|
||||
if (!fStyle)
|
||||
{
|
||||
fAtrNum = GETBIT(flags2, 26);
|
||||
fAtrFnt = GETBIT(flags2, 27);
|
||||
fAtrAlc = GETBIT(flags2, 28);
|
||||
fAtrBdr = GETBIT(flags2, 29);
|
||||
fAtrPat = GETBIT(flags2, 30);
|
||||
fAtrProt = GETBIT(flags2, 31);
|
||||
}
|
||||
|
||||
border.icvLeft = 0 != border.dgLeft ? static_cast<unsigned char>(GETBITS(flags2, 16, 22)) : 0;
|
||||
border.icvRight = 0 != border.dgRight ? static_cast<unsigned char>(GETBITS(flags2, 23, 29)) : 0;
|
||||
border.icvTop = 0 != border.dgTop ? static_cast<unsigned char>(GETBITS(flags3, 0, 6)) : 0;
|
||||
border.icvBottom = 0 != border.dgBottom ? static_cast<unsigned char>(GETBITS(flags3, 7, 13)) : 0;
|
||||
border.icvDiag = 0 != border.dgDiag ? static_cast<unsigned char>(GETBITS(flags3, 14, 20)) : 0;
|
||||
border.dgLeft = static_cast<unsigned char>(GETBITS(flags3, 0, 3));
|
||||
border.dgRight = static_cast<unsigned char>(GETBITS(flags3, 4, 7));
|
||||
border.dgTop = static_cast<unsigned char>(GETBITS(flags3, 8, 11));
|
||||
border.dgBottom = static_cast<unsigned char>(GETBITS(flags3, 12, 15));
|
||||
border.dgDiag = static_cast<unsigned char>(GETBITS(flags4, 21, 24));
|
||||
|
||||
border.grbitDiag = static_cast<unsigned char>(GETBITS(flags2, 30, 31));
|
||||
border.icvLeft = 0 != border.dgLeft ? static_cast<unsigned char>(GETBITS(flags3, 16, 22)) : 0;
|
||||
border.icvRight = 0 != border.dgRight ? static_cast<unsigned char>(GETBITS(flags3, 23, 29)) : 0;
|
||||
border.icvTop = 0 != border.dgTop ? static_cast<unsigned char>(GETBITS(flags4, 0, 6)) : 0;
|
||||
border.icvBottom = 0 != border.dgBottom ? static_cast<unsigned char>(GETBITS(flags4, 7, 13)) : 0;
|
||||
border.icvDiag = 0 != border.dgDiag ? static_cast<unsigned char>(GETBITS(flags4, 14, 20)) : 0;
|
||||
|
||||
if(!fStyle)
|
||||
{
|
||||
fHasXFExt = GETBIT(flags3, 25);
|
||||
}
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags3, 26, 31));
|
||||
border.grbitDiag = static_cast<unsigned char>(GETBITS(flags3, 30, 31));
|
||||
|
||||
fill.icvFore = GETBITS(flags4, 0, 6);
|
||||
fill.icvBack = GETBITS(flags4, 7, 13);
|
||||
if (!fStyle)
|
||||
{
|
||||
fHasXFExt = GETBIT(flags4, 25);
|
||||
}
|
||||
fill.fls = static_cast<unsigned char>(GETBITS(flags4, 26, 31));
|
||||
|
||||
if(!fStyle)
|
||||
{
|
||||
fsxButton = GETBIT(flags4, 14);
|
||||
}
|
||||
}
|
||||
fill.icvFore = GETBITS(flags5, 0, 6);
|
||||
fill.icvBack = GETBITS(flags5, 7, 13);
|
||||
|
||||
if (!fStyle)
|
||||
{
|
||||
fsxButton = GETBIT(flags5, 14);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
unsigned char trot_;
|
||||
record >> ixfParent >> ifmt >> font_index >> iFill >> ixBorder >> trot_ >> cIndent;
|
||||
|
||||
trot = trot_;
|
||||
|
||||
_UINT32 flags;
|
||||
unsigned char trot_;
|
||||
record >> ixfParent >> ifmt >> font_index >> iFill >> ixBorder >> trot_ >> cIndent >> flags;
|
||||
|
||||
record >> flags;
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
trot = trot_;
|
||||
|
||||
alc = GETBITS(flags, 0, 2);
|
||||
alcV = GETBITS(flags, 3, 5);
|
||||
@ -244,6 +374,31 @@ void XF::readFields(CFRecord& record)
|
||||
fAtrPat = !GETBIT(xfGrbitAtr, 4);
|
||||
fAtrProt = !GETBIT(xfGrbitAtr, 5);
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
switch (orient)
|
||||
{
|
||||
case 0: trot = 0; break; // Text orientation: not rotated.
|
||||
case 1: trot = 0xff; break; // Text orientation: vertically stacked.
|
||||
case 2: trot = 90; break; // Text orientation: 90 deg counterclockwise.
|
||||
case 3: trot = 270; break; // Text orientation: 90 deg clockwise.
|
||||
}
|
||||
if (ifmt_index < global_info->m_arNumFormats.size() && ifmt_index != 0xff)
|
||||
{
|
||||
Format* fmt = dynamic_cast<Format*>(global_info->m_arNumFormats[ifmt_index].get());
|
||||
if (fmt)
|
||||
ifmt = fmt->ifmt;
|
||||
}
|
||||
|
||||
global_info->mapUsedFormatCode.insert(std::make_pair(ifmt, true));
|
||||
|
||||
if (font_index >= 0 && font_index < global_info->m_arFonts.size())
|
||||
{
|
||||
Font* pFont = dynamic_cast<Font*>(global_info->m_arFonts[font_index].get());
|
||||
if (pFont)
|
||||
{
|
||||
pFont->set(font);
|
||||
}
|
||||
}
|
||||
}
|
||||
void XF::Update(ExtProp* ext_prop)
|
||||
{
|
||||
|
||||
@ -54,38 +54,38 @@ namespace XLS
|
||||
|
||||
BaseObjectPtr clone();
|
||||
|
||||
void readFields(CFRecord& record);
|
||||
virtual void readFields(CFRecord& record);
|
||||
|
||||
int serialize(std::wostream & stream);
|
||||
|
||||
static const ElementType type = typeXF;
|
||||
static const ElementType type = typeXF;
|
||||
|
||||
_UINT16 font_index;
|
||||
_UINT16 ifmt;
|
||||
|
||||
_UINT16 ixfParent;
|
||||
|
||||
bool fLocked;
|
||||
bool fHidden;
|
||||
bool fStyle;
|
||||
bool f123Prefix;
|
||||
bool fLocked = false;
|
||||
bool fHidden = false;
|
||||
bool fStyle = false;
|
||||
bool f123Prefix = false;
|
||||
|
||||
//-----------------------------
|
||||
unsigned char alc;
|
||||
bool fWrap;
|
||||
unsigned char alcV;
|
||||
bool fJustLast;
|
||||
unsigned short trot;
|
||||
unsigned char cIndent;
|
||||
bool fShrinkToFit;
|
||||
unsigned char iReadOrder;
|
||||
unsigned char alc = 0xff;
|
||||
bool fWrap = false;
|
||||
unsigned char alcV = 0xff;
|
||||
bool fJustLast = false;
|
||||
unsigned short trot = 0;
|
||||
unsigned char cIndent = 0;
|
||||
bool fShrinkToFit = false;
|
||||
unsigned char iReadOrder = 0;
|
||||
|
||||
bool fAtrNum;
|
||||
bool fAtrFnt;
|
||||
bool fAtrAlc;
|
||||
bool fAtrBdr;
|
||||
bool fAtrPat;
|
||||
bool fAtrProt;
|
||||
bool fAtrNum = true;
|
||||
bool fAtrFnt = true;
|
||||
bool fAtrAlc = true;
|
||||
bool fAtrBdr = true;
|
||||
bool fAtrPat = true;
|
||||
bool fAtrProt = false;
|
||||
|
||||
BorderInfo border;
|
||||
FillInfo fill;
|
||||
@ -93,15 +93,15 @@ namespace XLS
|
||||
|
||||
FillInfoExt font_color;
|
||||
|
||||
bool fHasXFExt;
|
||||
bool fsxButton;
|
||||
bool fHasXFExt = false;
|
||||
bool fsxButton = false;
|
||||
|
||||
//xlsb
|
||||
_UINT16 iFill;
|
||||
_UINT16 ixBorder;
|
||||
bool fMergeCell;
|
||||
unsigned char xfGrbitAtr;
|
||||
//------------------------------------------------------------------
|
||||
//xlsb
|
||||
_UINT16 iFill = 0;
|
||||
_UINT16 ixBorder = 0;
|
||||
bool fMergeCell = false;
|
||||
unsigned char xfGrbitAtr = 0;
|
||||
//------------------------------------------------------------------
|
||||
BiffStructurePtrVector ext_props;
|
||||
BiffStructurePtrVector xf_props;
|
||||
|
||||
@ -113,12 +113,47 @@ namespace XLS
|
||||
void Update(XFProp* xfProps); // xlsx style
|
||||
|
||||
void RegisterFillBorderFont();
|
||||
//------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------
|
||||
size_t& cell_xf_current_id_;
|
||||
size_t& style_xf_current_id_;
|
||||
int ind_xf; //for ext
|
||||
|
||||
GlobalWorkbookInfoPtr global_info;
|
||||
GlobalWorkbookInfoPtr global_info;
|
||||
};
|
||||
//-------------------------------------------------------------------------------------
|
||||
class XF_BIFF4 : public XF
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(XF_BIFF4)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(XF_BIFF4)
|
||||
public:
|
||||
XF_BIFF4(size_t& cell_xf_current_id, size_t& style_xf_current_id);
|
||||
~XF_BIFF4();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
};
|
||||
//-------------------------------------------------------------------------------------
|
||||
class XF_BIFF3 : public XF
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(XF_BIFF3)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(XF_BIFF3)
|
||||
public:
|
||||
XF_BIFF3(size_t& cell_xf_current_id, size_t& style_xf_current_id);
|
||||
~XF_BIFF3();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
virtual void readFields(CFRecord& record);
|
||||
};
|
||||
//-------------------------------------------------------------------------------------
|
||||
class XF_BIFF2 : public XF
|
||||
{
|
||||
BIFF_RECORD_DEFINE_TYPE_INFO(XF_BIFF2)
|
||||
BASE_OBJECT_DEFINE_CLASS_NAME(XF_BIFF2)
|
||||
public:
|
||||
XF_BIFF2(size_t& cell_xf_current_id, size_t& style_xf_current_id);
|
||||
~XF_BIFF2();
|
||||
|
||||
BaseObjectPtr clone();
|
||||
virtual void readFields(CFRecord& record);
|
||||
};
|
||||
|
||||
} // namespace XLS
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "AF12CellIcon.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "AddinUdf.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "AntiMoniker.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace OSHARED
|
||||
{
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "ArrayParsedFormula.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
//#include <Exception/UnexpectedProgramPath.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "Bes.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "BiffString.h"
|
||||
#include <utils.h>
|
||||
#include "../../../Common/utils.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -357,7 +357,6 @@ struct CFFlag14 : public BiffStructure_NoVtbl // in biff12
|
||||
long iIcon;
|
||||
};
|
||||
|
||||
|
||||
struct FrtFlags : public BiffStructure_NoVtbl
|
||||
{
|
||||
FrtFlags() : fFrtRef(false), fFrtAlert(false), reserved2(0), reserved(0) {};
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "BookExt_Conditional11.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "BookExt_Conditional12.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -29,11 +29,12 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "BorderFillInfo.h"
|
||||
#include <Auxiliary/HelpFunc.h>
|
||||
#include <boost/functional/hash/hash.hpp>
|
||||
|
||||
#include <simple_xml_writer.h>
|
||||
#include "BorderFillInfo.h"
|
||||
#include "../../Auxiliary/HelpFunc.h"
|
||||
|
||||
#include "../../../Common/simple_xml_writer.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "BuiltInStyle.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFColor.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "CFDatabar.h"
|
||||
#include <simple_xml_writer.h>
|
||||
#include "../../../Common/simple_xml_writer.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFExTemplateParams.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFMStateItem.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "CFMultistate.h"
|
||||
#include <simple_xml_writer.h>
|
||||
#include "../../../Common/simple_xml_writer.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFParsedFormula.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFParsedFormulaNoCCE.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFVO.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "CFVOParsedFormula.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
|
||||
#include "Cell.h"
|
||||
#include "CellRef.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
@ -58,7 +57,33 @@ BiffStructurePtr Cell::clone()
|
||||
|
||||
void Cell::load(CFRecord& record)
|
||||
{
|
||||
record >> rw >> col >> ixfe;
|
||||
record >> rw >> col;
|
||||
|
||||
if (record.getGlobalWorkbookInfo()->Version == 0x0200)
|
||||
{
|
||||
unsigned char flags1, flags2, flags3;
|
||||
|
||||
record >> flags1 >> flags2 >> flags3;
|
||||
|
||||
ixfe = GETBITS(flags1, 0, 5);
|
||||
|
||||
bool fLocked = GETBIT(flags1, 6);
|
||||
bool fHidden = GETBIT(flags1, 7);
|
||||
|
||||
short ifmt_index = GETBITS(flags2, 0, 5);
|
||||
short ifnt_index = GETBITS(flags2, 6, 7);
|
||||
|
||||
short alc = GETBITS(flags3, 0, 2);
|
||||
|
||||
short border_dgLeft = GETBIT(flags3, 3) ? 1 : 0;
|
||||
short border_dgRight = GETBIT(flags3, 4) ? 1 : 0;
|
||||
short border_dgTop = GETBIT(flags3, 5) ? 1 : 0;
|
||||
short border_dgBottom = GETBIT(flags3, 6) ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
record >> ixfe;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -31,8 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "CellOffsetResender.h"
|
||||
#include <Binary/CFRecord.h>
|
||||
#include <Binary/CFStream.h>
|
||||
#include "../../Binary/CFStream.h"
|
||||
|
||||
namespace XLS
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user