mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-10 21:37:34 +08:00
fix ptgList toArea conversion
This commit is contained in:
@ -166,11 +166,16 @@ Ptg* PtgList::toArea()
|
||||
{
|
||||
tableRef.fromString(tableRefIndex->second);
|
||||
tableRef.columnFirst += colFirst;
|
||||
tableRef.columnLast = tableRef.columnFirst + (colLast - colFirst);
|
||||
tableRef.columnLast = tableRef.columnFirst;
|
||||
if(colLast > colFirst)
|
||||
tableRef.columnLast += (colLast - colFirst);
|
||||
if(rowType == 0x2) //headers
|
||||
tableRef.rowLast = tableRef.rowFirst;
|
||||
else if(rowType == 0x0) //data
|
||||
{
|
||||
tableRef.rowFirst++;
|
||||
tableRef.rowLast--;
|
||||
}
|
||||
else if(rowType == 0x6) //dataheaders
|
||||
tableRef.rowLast--;
|
||||
else if(rowType == 0x0C) // datatotals
|
||||
@ -178,7 +183,11 @@ Ptg* PtgList::toArea()
|
||||
else if(rowType == 0x8) //totals
|
||||
tableRef.rowFirst = tableRef.rowLast;
|
||||
}
|
||||
PtgArea3d* listArea = new PtgArea3d(0x3B, CellRef());
|
||||
unsigned char ptgType = type_+1;
|
||||
unsigned char areaType = 0x3B;
|
||||
SETBITS(areaType,5,6, ptgType);
|
||||
|
||||
PtgArea3d* listArea = new PtgArea3d(areaType, CellRef());
|
||||
listArea->ixti = ixti;
|
||||
listArea->area = tableRef;
|
||||
listArea->area.rowFirstRelative = false;
|
||||
|
||||
@ -59,17 +59,17 @@ public:
|
||||
|
||||
//const std::wstring toString() const;
|
||||
|
||||
_UINT16 ixti;
|
||||
BYTE columns;
|
||||
BYTE rowType;
|
||||
bool squareBracketSpace;
|
||||
bool commaSpace;
|
||||
_UINT16 ixti = 0;
|
||||
BYTE columns = 0;
|
||||
BYTE rowType = 0;
|
||||
bool squareBracketSpace = false;
|
||||
bool commaSpace = false;
|
||||
BYTE type_;
|
||||
bool invalid;
|
||||
bool nonresident;
|
||||
bool invalid = false;
|
||||
bool nonresident = false;
|
||||
_UINT32 listIndex;
|
||||
_UINT16 colFirst;
|
||||
_UINT16 colLast;
|
||||
_UINT16 colFirst = 0;
|
||||
_UINT16 colLast = 0;
|
||||
|
||||
private:
|
||||
GlobalWorkbookInfoPtr global_info;
|
||||
|
||||
Reference in New Issue
Block a user