(1.0.0.101) - XlsxSerializerCom.dll

Для ячеек вместо Ref (строка с буквой столбца и номером строки, например "A1") пишем два числа: номер строки + номер столбца (парсинг на C++, вместо JavaScript). Тем самым ускорил открытие файла.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53945 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
Alexander.Trofimov
2014-01-28 08:53:20 +00:00
committed by Alexander Trofimov
parent c3cb7fd17d
commit a8c1ce706c
4 changed files with 25 additions and 7 deletions

View File

@ -236,7 +236,8 @@ namespace BinXlsxRW
Style = 1,
Type = 2,
Value = 3,
Formula = 4
Formula = 4,
RefRowCol = 5
};}
namespace c_oSerFormulaTypes{enum c_oSerFormulaTypes
{

View File

@ -2710,10 +2710,20 @@ namespace BinXlsxRW {
//Ref
if(oCell.m_oRef.IsInit())
{
m_oBcw.m_oStream.WriteByte(c_oSerCellTypes::Ref);
m_oBcw.m_oStream.WriteString2(oCell.m_oRef.get2());
int nRow = 0;
int nCol = 0;
OOX::Spreadsheet::CWorksheet::parseRef(oCell.m_oRef.get2(), nRow, nCol);
// <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> 2 <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> JavaScript, <20>.<2E>. <20><> C++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>). <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.
nCurPos = m_oBcw.WriteItemStart(c_oSerCellTypes::RefRowCol);
m_oBcw.m_oStream.WriteLong(nRow);
m_oBcw.m_oStream.WriteLong(nCol);
m_oBcw.WriteItemEnd(nCurPos);
//m_oBcw.m_oStream.WriteByte(c_oSerCellTypes::Ref);
//m_oBcw.m_oStream.WriteString2(oCell.m_oRef.get2());
}
//Ref
//Style
if(oCell.m_oStyle.IsInit())
{
nCurPos = m_oBcw.WriteItemStart(c_oSerCellTypes::Style);

View File

@ -3306,6 +3306,13 @@ namespace BinXlsxRW {
pCell->m_oRef.Init();
pCell->m_oRef->Append(sRef);
}
else if(c_oSerCellTypes::RefRowCol == type)
{
int nRow = m_oBufferedStream.ReadLong();
int nCol = m_oBufferedStream.ReadLong();
pCell->m_oRef.Init();
pCell->m_oRef = OOX::Spreadsheet::CWorksheet::combineRef(nRow, nCol);
}
else if(c_oSerCellTypes::Style == type)
{
pCell->m_oStyle.Init();

View File

@ -2,6 +2,6 @@
//1
//0
//0
//100
#define INTVER 1,0,0,100
#define STRVER "1,0,0,100\0"
//101
#define INTVER 1,0,0,101
#define STRVER "1,0,0,101\0"