mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-20 03:55:47 +08:00
x2t version 2.4.506
This commit is contained in:
@ -127,11 +127,11 @@ namespace BinXlsxRW{
|
||||
}
|
||||
ChartWriter::~ChartWriter()
|
||||
{
|
||||
for (boost::unordered_map<std::wstring, boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>*>::iterator it = m_mapSheets.begin(); it != m_mapSheets.end(); ++it)
|
||||
for (std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*>::iterator it = m_mapSheets.begin(); it != m_mapSheets.end(); ++it)
|
||||
{
|
||||
boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>* rows = it->second;
|
||||
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>* rows = it->second;
|
||||
|
||||
for(boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>::iterator itRow = rows->begin(); itRow != rows->end(); itRow++)
|
||||
for(std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>::iterator itRow = rows->begin(); itRow != rows->end(); itRow++)
|
||||
{
|
||||
delete itRow->second;
|
||||
}
|
||||
@ -149,7 +149,7 @@ namespace BinXlsxRW{
|
||||
int nSheetId = 1;
|
||||
OOX::Spreadsheet::CWorksheet* pFirstWorksheet = NULL;
|
||||
|
||||
for (boost::unordered_map<std::wstring, boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>*>::iterator it = m_mapSheets.begin(); it != m_mapSheets.end(); ++it)
|
||||
for (std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*>::iterator it = m_mapSheets.begin(); it != m_mapSheets.end(); ++it)
|
||||
{
|
||||
const std::wstring& sSheetName = it->first;
|
||||
OOX::Spreadsheet::CWorksheet* pWorksheet = toXlsxGetSheet(mapWorksheets, sSheetName);
|
||||
@ -462,15 +462,15 @@ namespace BinXlsxRW{
|
||||
//проверяем можем ли создать таблицу
|
||||
if(m_mapSheets.size() > 0 && m_nRow1 > 0 && m_nRow2 > 0 && m_nCol1 > 0 && m_nCol2 > 0 && m_nRow1 < m_nRow2)
|
||||
{
|
||||
boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>* rows = m_mapSheets.begin()->second;
|
||||
boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>::iterator itRows = rows->find(m_nRow1);
|
||||
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>* rows = m_mapSheets.begin()->second;
|
||||
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>::iterator itRows = rows->find(m_nRow1);
|
||||
|
||||
if(itRows != rows->end())
|
||||
{
|
||||
boost::unordered_map<int, OOX::Spreadsheet::CCell*>* cells = itRows->second;
|
||||
std::map<int, OOX::Spreadsheet::CCell*>* cells = itRows->second;
|
||||
std::vector<int> aIndexesCell;
|
||||
|
||||
for(boost::unordered_map<int, OOX::Spreadsheet::CCell*>::const_iterator it = cells->begin(); it != cells->end(); ++it)
|
||||
for(std::map<int, OOX::Spreadsheet::CCell*>::const_iterator it = cells->begin(); it != cells->end(); ++it)
|
||||
{
|
||||
aIndexesCell.push_back(it->first);
|
||||
}
|
||||
@ -524,12 +524,12 @@ namespace BinXlsxRW{
|
||||
}
|
||||
return pWorksheet;
|
||||
}
|
||||
void ChartWriter::toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings)
|
||||
void ChartWriter::toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings)
|
||||
{
|
||||
pWorksheet->m_oSheetData.Init();
|
||||
std::vector<int> aIndexesRow;
|
||||
|
||||
for(boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>::const_iterator it = rows.begin(); it != rows.end(); ++it)
|
||||
for(std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>::const_iterator it = rows.begin(); it != rows.end(); ++it)
|
||||
{
|
||||
aIndexesRow.push_back(it->first);
|
||||
}
|
||||
@ -544,10 +544,10 @@ namespace BinXlsxRW{
|
||||
pRow->m_oR.Init();
|
||||
pRow->m_oR->SetValue(nIndexRow);
|
||||
|
||||
const boost::unordered_map<int, OOX::Spreadsheet::CCell*>& cells = *rows.at(nIndexRow);
|
||||
const std::map<int, OOX::Spreadsheet::CCell*>& cells = *rows.at(nIndexRow);
|
||||
std::vector<int> aIndexesCell;
|
||||
|
||||
for(boost::unordered_map<int, OOX::Spreadsheet::CCell*>::const_iterator it = cells.begin(); it != cells.end(); ++it)
|
||||
for(std::map<int, OOX::Spreadsheet::CCell*>::const_iterator it = cells.begin(); it != cells.end(); ++it)
|
||||
{
|
||||
aIndexesCell.push_back(it->first);
|
||||
}
|
||||
@ -605,24 +605,24 @@ namespace BinXlsxRW{
|
||||
}
|
||||
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL)
|
||||
{
|
||||
boost::unordered_map<std::wstring, boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>*>::const_iterator itSheets = m_mapSheets.find(sheet);
|
||||
boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>* rows = NULL;
|
||||
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;
|
||||
|
||||
if(itSheets == m_mapSheets.end())
|
||||
{
|
||||
rows = new boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>();
|
||||
rows = new std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>();
|
||||
m_mapSheets.insert(std::make_pair(sheet, rows));
|
||||
}
|
||||
else
|
||||
{
|
||||
rows = itSheets->second;
|
||||
}
|
||||
boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>::const_iterator itRows = rows->find(nRow);
|
||||
boost::unordered_map<int, OOX::Spreadsheet::CCell*>* cells = NULL;
|
||||
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>::const_iterator itRows = rows->find(nRow);
|
||||
std::map<int, OOX::Spreadsheet::CCell*>* cells = NULL;
|
||||
|
||||
if(itRows == rows->end())
|
||||
{
|
||||
cells = new boost::unordered_map<int, OOX::Spreadsheet::CCell*>();
|
||||
cells = new std::map<int, OOX::Spreadsheet::CCell*>();
|
||||
rows->insert(std::make_pair(nRow, cells));
|
||||
}
|
||||
else
|
||||
|
||||
@ -59,8 +59,8 @@ namespace BinXlsxRW {
|
||||
class ChartWriter
|
||||
{
|
||||
public:
|
||||
boost::unordered_map<std::wstring, boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>*> m_mapSheets;
|
||||
boost::unordered_map<std::wstring, int> m_mapFormats;
|
||||
std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*> m_mapSheets;
|
||||
boost::unordered_map<std::wstring, int> m_mapFormats;
|
||||
|
||||
std::vector<OOX::Spreadsheet::CXfs*> m_aXfs;
|
||||
std::vector<std::wstring> m_aTableNames;
|
||||
@ -77,7 +77,7 @@ namespace BinXlsxRW {
|
||||
|
||||
private:
|
||||
OOX::Spreadsheet::CWorksheet* toXlsxGetSheet(boost::unordered_map<std::wstring, OOX::Spreadsheet::CWorksheet*>& mapWorksheets, const std::wstring& sName);
|
||||
void toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const boost::unordered_map<int, boost::unordered_map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings);
|
||||
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);
|
||||
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);
|
||||
|
||||
@ -781,7 +781,6 @@ SOURCES += \
|
||||
../XlsFormat/Logic/Biff_unions/SXFORMULA_bu.cpp \
|
||||
../XlsFormat/Logic/Biff_unions/SXOPER.cpp \
|
||||
../XlsFormat/Logic/Biff_unions/SXRANGE.cpp \
|
||||
../XlsFormat/Logic/SummaryInformationStream/Structures/Property_Structures.cpp \
|
||||
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertyFactory.cpp \
|
||||
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySet.cpp \
|
||||
../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp \
|
||||
|
||||
@ -760,7 +760,6 @@
|
||||
#include "../XlsFormat/Logic/Biff_unions/SXOPER.cpp"
|
||||
#include "../XlsFormat/Logic/Biff_unions/SXRANGE.cpp"
|
||||
|
||||
#include "../XlsFormat/Logic/SummaryInformationStream/Structures/Property_Structures.cpp"
|
||||
#include "../XlsFormat/Logic/SummaryInformationStream/Structures/PropertyFactory.cpp"
|
||||
#include "../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySet.cpp"
|
||||
#include "../XlsFormat/Logic/SummaryInformationStream/Structures/PropertySetStream.cpp"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
QT -= core
|
||||
QT -= gui
|
||||
|
||||
VERSION = 2.4.505.0
|
||||
VERSION = 2.4.506.0
|
||||
DEFINES += INTVER=$$VERSION
|
||||
|
||||
TARGET = x2t
|
||||
|
||||
@ -2715,7 +2715,7 @@ namespace BinXlsxRW
|
||||
m_oBcw.m_oStream.WriteStringW(oHyperlink.m_oDisplay.get2());
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteMergeCells(const OOX::Spreadsheet::CMergeCells& oMergeCells)
|
||||
{
|
||||
for(size_t i = 0, length = oMergeCells.m_arrItems.size(); i < length; ++i)
|
||||
@ -2727,7 +2727,7 @@ namespace BinXlsxRW
|
||||
m_oBcw.m_oStream.WriteStringW(pMergeCell->m_oRef.get2());
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteSheetData(const OOX::Spreadsheet::CSheetData& oSheetData)
|
||||
{
|
||||
int nCurPos;
|
||||
@ -2738,7 +2738,7 @@ namespace BinXlsxRW
|
||||
WriteRow(*pRow);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteRow(const OOX::Spreadsheet::CRow& oRows)
|
||||
{
|
||||
int nCurPos;
|
||||
@ -2791,7 +2791,7 @@ namespace BinXlsxRW
|
||||
WriteCells(oRows);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteCells(const OOX::Spreadsheet::CRow& oRows)
|
||||
{
|
||||
int nCurPos;
|
||||
@ -2802,7 +2802,7 @@ namespace BinXlsxRW
|
||||
WriteCell(*oCell);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteCell(const OOX::Spreadsheet::CCell& oCell)
|
||||
{
|
||||
int nCurPos;
|
||||
@ -2861,7 +2861,7 @@ namespace BinXlsxRW
|
||||
m_oBcw.m_oStream.WriteDoubleReal(dValue);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
};
|
||||
}
|
||||
void WriteFormula(OOX::Spreadsheet::CFormula& oFormula)
|
||||
{
|
||||
//Aca
|
||||
@ -2958,7 +2958,7 @@ namespace BinXlsxRW
|
||||
if(NULL != m_pEmbeddedFontsManager)
|
||||
m_pEmbeddedFontsManager->CheckString(oFormula.m_sText);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void WriteDrawings(const OOX::Spreadsheet::CWorksheet& oWorksheet, OOX::Spreadsheet::CDrawing* pDrawing, OOX::CVmlDrawing *pVmlDrawing = NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user