Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
cf5458c7
Commit
cf5458c7
authored
Jul 13, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat - pivot tables
parent
9115edbd
Changes
48
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
368 additions
and
154 deletions
+368
-154
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
+27
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/AutoFilter.cpp
...sFile2/source/XlsFormat/Logic/Biff_records/AutoFilter.cpp
+3
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BOF.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/BOF.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BookExt.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_records/BookExt.cpp
+11
-11
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ColInfo.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_records/ColInfo.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DbOrParamQry.cpp
...ile2/source/XlsFormat/Logic/Biff_records/DbOrParamQry.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ExternName.cpp
...sFile2/source/XlsFormat/Logic/Biff_records/ExternName.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsir.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsir.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Row.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/Row.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXEx.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXEx.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXLI.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXLI.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp
+11
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SheetExt.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_records/SheetExt.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Style.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/Style.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.cpp
+4
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.h
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.h
+4
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxItm.h
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxItm.h
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxSelect.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_records/SxSelect.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Text.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/Text.cpp
+3
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Tick.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/Tick.cpp
+6
-5
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.h
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxtQry.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/TxtQry.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/XF.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/XF.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CellXF.cpp
...lsFile2/source/XlsFormat/Logic/Biff_structures/CellXF.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtCOLORREF.cpp
...sFormat/Logic/Biff_structures/ODRAW/OfficeArtCOLORREF.cpp
+3
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgSxName.cpp
...ile2/source/XlsFormat/Logic/Biff_structures/PtgSxName.cpp
+54
-26
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/StyleXF.cpp
...sFile2/source/XlsFormat/Logic/Biff_structures/StyleXF.cpp
+5
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
+18
-33
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
+7
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
...urce/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTRULE.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTRULE.cpp
+2
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVD.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVD.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.cpp
+9
-8
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.h
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.h
+4
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.cpp
+15
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.h
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.h
+7
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFORMULA_bu.cpp
...File2/source/XlsFormat/Logic/Biff_unions/SXFORMULA_bu.cpp
+45
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
+31
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.h
...fficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.h
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL.h
+11
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
+43
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.cpp
...iceXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
...fficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
+4
-0
No files found.
ASCOfficeXlsFile2/XlsFormatTest/XlsFormatTest.cpp
View file @
cf5458c7
...
@@ -51,12 +51,12 @@
...
@@ -51,12 +51,12 @@
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
#endif
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[]
)
HRESULT
convert_single
(
std
::
wstring
fileName
)
{
{
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
//////////////////////////////////////////////////////////////////////////
std
::
wstring
srcFileName
=
argv
[
1
]
;
std
::
wstring
srcFileName
=
fileName
;
std
::
wstring
dstPath
=
argc
>
2
?
argv
[
2
]
:
srcFileName
+
L"-my.xlsx"
;
std
::
wstring
dstPath
=
srcFileName
+
L"-my.xlsx"
;
std
::
wstring
outputDir
=
NSDirectory
::
GetFolderPath
(
dstPath
);
std
::
wstring
outputDir
=
NSDirectory
::
GetFolderPath
(
dstPath
);
std
::
wstring
dstTempPath
=
NSDirectory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
dstTempPath
=
NSDirectory
::
CreateDirectoryWithUniqueName
(
outputDir
);
...
@@ -73,3 +73,26 @@ int _tmain(int argc, _TCHAR* argv[])
...
@@ -73,3 +73,26 @@ int _tmain(int argc, _TCHAR* argv[])
return
hr
;
return
hr
;
}
}
HRESULT
convert_directory
(
std
::
wstring
pathName
)
{
HRESULT
hr
=
S_OK
;
std
::
vector
<
std
::
wstring
>
arFiles
=
NSDirectory
::
GetFiles
(
pathName
,
false
);
for
(
size_t
i
=
0
;
i
<
arFiles
.
size
();
i
++
)
{
convert_single
(
arFiles
[
i
]);
}
return
S_OK
;
}
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
if
(
argc
<
2
)
return
1
;
HRESULT
hr
=
convert_single
(
argv
[
1
]);
//HRESULT hr = convert_directory(argv[1]);
return
hr
;
}
\ No newline at end of file
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/AutoFilter.cpp
View file @
cf5458c7
...
@@ -66,6 +66,7 @@ static inline void/*std::wstring &*/trim(std::wstring &s)
...
@@ -66,6 +66,7 @@ static inline void/*std::wstring &*/trim(std::wstring &s)
AutoFilter
::
AutoFilter
()
AutoFilter
::
AutoFilter
()
{
{
wTopN
=
wJoin
=
0
;
}
}
...
@@ -86,7 +87,7 @@ void AutoFilter::readFields(CFRecord& record)
...
@@ -86,7 +87,7 @@ void AutoFilter::readFields(CFRecord& record)
unsigned
short
flags
;
unsigned
short
flags
;
record
>>
iEntry
>>
flags
;
record
>>
iEntry
>>
flags
;
wJoin
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
0
,
1
)
);
wJoin
=
GETBITS
(
flags
,
0
,
1
);
fSimple1
=
GETBIT
(
flags
,
2
);
fSimple1
=
GETBIT
(
flags
,
2
);
fSimple2
=
GETBIT
(
flags
,
3
);
fSimple2
=
GETBIT
(
flags
,
3
);
...
@@ -94,7 +95,7 @@ void AutoFilter::readFields(CFRecord& record)
...
@@ -94,7 +95,7 @@ void AutoFilter::readFields(CFRecord& record)
fTop
=
GETBIT
(
flags
,
5
);
//top(1) or bottom(0)
fTop
=
GETBIT
(
flags
,
5
);
//top(1) or bottom(0)
fPercent
=
GETBIT
(
flags
,
6
);
fPercent
=
GETBIT
(
flags
,
6
);
wTopN
=
static_cast
<
unsigned
short
>
(
GETBITS
(
flags
,
7
,
15
)
);
wTopN
=
GETBITS
(
flags
,
7
,
15
);
unsigned
short
_iEntry
=
iEntry
;
unsigned
short
_iEntry
=
iEntry
;
unsigned
char
_wJoin
=
wJoin
;
unsigned
char
_wJoin
=
wJoin
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BOF.cpp
View file @
cf5458c7
...
@@ -87,7 +87,7 @@ void BOF::readFields(CFRecord& record)
...
@@ -87,7 +87,7 @@ void BOF::readFields(CFRecord& record)
fGlJmp
=
GETBIT
(
flags
,
10
);
fGlJmp
=
GETBIT
(
flags
,
10
);
fFontLimit
=
GETBIT
(
flags
,
13
);
fFontLimit
=
GETBIT
(
flags
,
13
);
verXLHigh
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
14
,
17
)
);
verXLHigh
=
GETBITS
(
flags
,
14
,
17
);
record
>>
verLowestBiff
;
record
>>
verLowestBiff
;
unsigned
char
flags2
;
unsigned
char
flags2
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BookExt.cpp
View file @
cf5458c7
...
@@ -36,9 +36,9 @@
...
@@ -36,9 +36,9 @@
namespace
XLS
namespace
XLS
{
{
BookExt
::
BookExt
()
BookExt
::
BookExt
()
:
cb
(
22
)
:
cb
(
22
)
{
{
mdFactoidDisplay
=
0
;
}
}
...
@@ -66,7 +66,7 @@ void BookExt::readFields(CFRecord& record)
...
@@ -66,7 +66,7 @@ void BookExt::readFields(CFRecord& record)
fHidePivotList
=
GETBIT
(
flags
,
1
);
fHidePivotList
=
GETBIT
(
flags
,
1
);
fFilterPrivacy
=
GETBIT
(
flags
,
2
);
fFilterPrivacy
=
GETBIT
(
flags
,
2
);
fEmbedFactoids
=
GETBIT
(
flags
,
3
);
fEmbedFactoids
=
GETBIT
(
flags
,
3
);
mdFactoidDisplay
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
4
,
5
)
);
mdFactoidDisplay
=
GETBITS
(
flags
,
4
,
5
);
fSavedDuringRecovery
=
GETBIT
(
flags
,
6
);
fSavedDuringRecovery
=
GETBIT
(
flags
,
6
);
fCreatedViaMinimalSave
=
GETBIT
(
flags
,
7
);
fCreatedViaMinimalSave
=
GETBIT
(
flags
,
7
);
fOpenedViaDataRecovery
=
GETBIT
(
flags
,
8
);
fOpenedViaDataRecovery
=
GETBIT
(
flags
,
8
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ColInfo.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
ColInfo
::
ColInfo
()
ColInfo
::
ColInfo
()
{
{
iOutLevel
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DbOrParamQry.cpp
View file @
cf5458c7
...
@@ -38,6 +38,8 @@ namespace XLS
...
@@ -38,6 +38,8 @@ namespace XLS
DbOrParamQry
::
DbOrParamQry
(
int
typeRecord_
)
DbOrParamQry
::
DbOrParamQry
(
int
typeRecord_
)
{
{
typeRecord
=
typeRecord_
;
typeRecord
=
typeRecord_
;
param
.
pbt
=
query
.
dbt
=
0
;
}
}
DbOrParamQry
::~
DbOrParamQry
()
DbOrParamQry
::~
DbOrParamQry
()
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
View file @
cf5458c7
...
@@ -71,12 +71,12 @@ void Dv::readFields(CFRecord& record)
...
@@ -71,12 +71,12 @@ void Dv::readFields(CFRecord& record)
record
>>
flags
;
record
>>
flags
;
valType
=
static_cast
<
_valTypeDv
>
(
GETBITS
(
flags
,
0
,
3
));
valType
=
static_cast
<
_valTypeDv
>
(
GETBITS
(
flags
,
0
,
3
));
errStyle
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
4
,
6
)
);
errStyle
=
GETBITS
(
flags
,
4
,
6
);
fStrLookup
=
GETBIT
(
flags
,
7
);
fStrLookup
=
GETBIT
(
flags
,
7
);
fAllowBlank
=
GETBIT
(
flags
,
8
);
fAllowBlank
=
GETBIT
(
flags
,
8
);
fSuppressCombo
=
GETBIT
(
flags
,
9
);
fSuppressCombo
=
GETBIT
(
flags
,
9
);
mdImeMode
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
10
,
17
)
);
mdImeMode
=
GETBITS
(
flags
,
10
,
17
);
fShowInputMsg
=
GETBIT
(
flags
,
18
);
fShowInputMsg
=
GETBIT
(
flags
,
18
);
fShowErrorMsg
=
GETBIT
(
flags
,
19
);
fShowErrorMsg
=
GETBIT
(
flags
,
19
);
typOperator
=
static_cast
<
_typOperatorDv
>
(
GETBITS
(
flags
,
20
,
23
));
typOperator
=
static_cast
<
_typOperatorDv
>
(
GETBITS
(
flags
,
20
,
23
));
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ExternName.cpp
View file @
cf5458c7
...
@@ -36,7 +36,7 @@ namespace XLS
...
@@ -36,7 +36,7 @@ namespace XLS
{
{
ExternName
::
ExternName
(
const
unsigned
short
supporting_link_type
)
ExternName
::
ExternName
(
const
unsigned
short
supporting_link_type
)
:
supbook_cch
(
supporting_link_type
)
:
supbook_cch
(
supporting_link_type
)
,
cf
(
0
)
{
{
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
View file @
cf5458c7
...
@@ -45,7 +45,7 @@ const wchar_t* const AutoFilterDefineNames[] =
...
@@ -45,7 +45,7 @@ const wchar_t* const AutoFilterDefineNames[] =
Lbl
::
Lbl
()
Lbl
::
Lbl
()
:
rgce
(
false
)
:
rgce
(
false
)
,
fGrp
(
0
)
{
{
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsir.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
Qsir
::
Qsir
()
Qsir
::
Qsir
()
{
{
wVerBeforeRefreshAlert
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Row.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
Row
::
Row
()
Row
::
Row
()
{
{
iOutLevel
=
ixfe_val
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXEx.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
SXEx
::
SXEx
()
SXEx
::
SXEx
()
{
{
cWrapPage
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXLI.cpp
View file @
cf5458c7
...
@@ -60,7 +60,7 @@ void SXLI::readFields(CFRecord& record)
...
@@ -60,7 +60,7 @@ void SXLI::readFields(CFRecord& record)
{
{
break
;
break
;
}
}
SXLIItem
item
;
SXLIItem
item
=
{}
;
unsigned
short
flags
;
unsigned
short
flags
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
View file @
cf5458c7
...
@@ -74,12 +74,12 @@ int SXVI::serialize(std::wostream & strm)
...
@@ -74,12 +74,12 @@ int SXVI::serialize(std::wostream & strm)
CP_XML_NODE
(
L"item"
)
CP_XML_NODE
(
L"item"
)
{
{
if
(
fMissing
)
CP_XML_ATTR
(
L"m"
,
1
);
if
(
fMissing
)
CP_XML_ATTR
(
L"m"
,
1
);
if
(
fHidden
)
CP_XML_ATTR
(
L"h"
,
1
);
if
(
fHideDetail
)
CP_XML_ATTR
(
L"sd"
,
0
);
if
(
fHideDetail
)
CP_XML_ATTR
(
L"sd"
,
1
);
if
(
fFormula
)
CP_XML_ATTR
(
L"f"
,
1
);
if
(
fFormula
)
CP_XML_ATTR
(
L"f"
,
1
);
if
(
itmType
==
0
)
if
(
itmType
==
0
)
{
{
if
(
fHidden
)
CP_XML_ATTR
(
L"h"
,
1
);
CP_XML_ATTR
(
L"x"
,
iCache
);
CP_XML_ATTR
(
L"x"
,
iCache
);
}
}
switch
(
itmType
)
switch
(
itmType
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Setup.cpp
View file @
cf5458c7
...
@@ -37,7 +37,7 @@ namespace XLS
...
@@ -37,7 +37,7 @@ namespace XLS
Setup
::
Setup
()
Setup
::
Setup
()
// the following may appear uninitialized but we have to store them
// the following may appear uninitialized but we have to store them
:
iPaperSize
(
0
),
iScale
(
255
),
iRes
(
0
),
iVRes
(
0
),
iCopies
(
0
),
fNoOrient
(
false
),
fPortrait
(
false
),
iPageStart
(
1
)
:
iPaperSize
(
0
),
iScale
(
255
),
iRes
(
0
),
iVRes
(
0
),
iCopies
(
0
),
fNoOrient
(
false
),
fPortrait
(
false
),
iPageStart
(
1
)
,
iErrors
(
0
)
{
{
}
}
...
@@ -56,6 +56,7 @@ void Setup::readFields(CFRecord& record)
...
@@ -56,6 +56,7 @@ void Setup::readFields(CFRecord& record)
{
{
unsigned
short
flags
;
unsigned
short
flags
;
record
>>
iPaperSize
>>
iScale
>>
iPageStart
>>
iFitWidth
>>
iFitHeight
>>
flags
;
record
>>
iPaperSize
>>
iScale
>>
iPageStart
>>
iFitWidth
>>
iFitHeight
>>
flags
;
fLeftToRight
=
GETBIT
(
flags
,
0
);
fLeftToRight
=
GETBIT
(
flags
,
0
);
fPortrait
=
GETBIT
(
flags
,
1
);
fPortrait
=
GETBIT
(
flags
,
1
);
fNoPls
=
GETBIT
(
flags
,
2
);
fNoPls
=
GETBIT
(
flags
,
2
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SheetExt.cpp
View file @
cf5458c7
...
@@ -38,6 +38,7 @@ namespace XLS
...
@@ -38,6 +38,7 @@ namespace XLS
SheetExt
::
SheetExt
()
SheetExt
::
SheetExt
()
{
{
icvPlain
=
0
;
}
}
...
@@ -61,7 +62,7 @@ void SheetExt::readFields(CFRecord& record)
...
@@ -61,7 +62,7 @@ void SheetExt::readFields(CFRecord& record)
_UINT32
flags
;
_UINT32
flags
;
record
>>
flags
;
record
>>
flags
;
icvPlain
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
0
,
6
)
);
icvPlain
=
GETBITS
(
flags
,
0
,
6
);
if
(
0x00000028
==
cb
)
if
(
0x00000028
==
cb
)
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Style.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
Style
::
Style
()
Style
::
Style
()
{
{
ixfe
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
SxFilt
::
SxFilt
()
SxFilt
::
SxFilt
()
{
{
isxvd
=
iDim
=
cisxvi
=
grbitSbt
=
0
;
}
}
...
@@ -52,16 +53,15 @@ BaseObjectPtr SxFilt::clone()
...
@@ -52,16 +53,15 @@ BaseObjectPtr SxFilt::clone()
void
SxFilt
::
readFields
(
CFRecord
&
record
)
void
SxFilt
::
readFields
(
CFRecord
&
record
)
{
{
unsigned
short
flags1
;
unsigned
short
flags1
,
flags2
;
unsigned
short
flags2
;
record
>>
flags1
>>
isxvd
>>
flags2
>>
grbitSbt
>>
cisxvi
;
record
>>
flags1
>>
flags2
>>
grbitSbt
>>
cisxvi
;
sxaxisRw
=
GETBIT
(
flags1
,
0
);
sxaxisRw
=
GETBIT
(
flags1
,
0
);
sxaxisCol
=
GETBIT
(
flags1
,
1
);
sxaxisCol
=
GETBIT
(
flags1
,
1
);
sxaxisPage
=
GETBIT
(
flags1
,
2
);
sxaxisPage
=
GETBIT
(
flags1
,
2
);
sxaxisData
=
GETBIT
(
flags1
,
3
);
sxaxisData
=
GETBIT
(
flags1
,
3
);
iDim
=
GETBITS
(
flags1
,
4
,
15
);
iDim
=
GETBITS
(
flags1
,
6
,
15
);
isxvd
=
GETBITS
(
flags2
,
0
,
9
);
isxvd
=
GETBITS
(
flags2
,
0
,
9
);
fSelected
=
GETBIT
(
flags2
,
10
);
fSelected
=
GETBIT
(
flags2
,
10
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxFilt.h
View file @
cf5458c7
...
@@ -54,8 +54,10 @@ public:
...
@@ -54,8 +54,10 @@ public:
bool
sxaxisCol
;
bool
sxaxisCol
;
bool
sxaxisPage
;
bool
sxaxisPage
;
bool
sxaxisData
;
bool
sxaxisData
;
unsigned
short
iDim
;
unsigned
short
isxvd
;
char
iDim
;
char
isxvd
;
bool
fSelected
;
bool
fSelected
;
short
grbitSbt
;
short
grbitSbt
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxItm.h
View file @
cf5458c7
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
namespace
XLS
namespace
XLS
{
{
class
SxItm
:
public
BiffRecordContinued
class
SxItm
:
public
BiffRecordContinued
{
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
SxItm
)
BIFF_RECORD_DEFINE_TYPE_INFO
(
SxItm
)
BASE_OBJECT_DEFINE_CLASS_NAME
(
SxItm
)
BASE_OBJECT_DEFINE_CLASS_NAME
(
SxItm
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxSelect.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
SxSelect
::
SxSelect
()
SxSelect
::
SxSelect
()
{
{
cClick
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Text.cpp
View file @
cf5458c7
...
@@ -62,7 +62,7 @@ void Text::readFields(CFRecord& record)
...
@@ -62,7 +62,7 @@ void Text::readFields(CFRecord& record)
if
(
record
.
getGlobalWorkbookInfo
()
->
Version
<
0x0600
)
if
(
record
.
getGlobalWorkbookInfo
()
->
Version
<
0x0600
)
{
{
int
orient
=
GETBITS
(
flags1
,
8
,
10
);
unsigned
char
orient
=
GETBITS
(
flags1
,
8
,
10
);
switch
(
orient
)
switch
(
orient
)
{
{
case
0
:
trot
=
0
;
break
;
// Text orientation: not rotated.
case
0
:
trot
=
0
;
break
;
// Text orientation: not rotated.
...
@@ -75,8 +75,8 @@ void Text::readFields(CFRecord& record)
...
@@ -75,8 +75,8 @@ void Text::readFields(CFRecord& record)
{
{
record
>>
icvText
>>
flags2
>>
trot
;
record
>>
icvText
>>
flags2
>>
trot
;
//icv -> from Palette
//icv -> from Palette
dlp
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags2
,
0
,
3
)
);
dlp
=
GETBITS
(
flags2
,
0
,
3
);
iReadingOrder
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags2
,
14
,
15
)
);
iReadingOrder
=
GETBITS
(
flags2
,
14
,
15
);
}
}
fAutoColor
=
GETBIT
(
flags1
,
0
);
fAutoColor
=
GETBIT
(
flags1
,
0
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Tick.cpp
View file @
cf5458c7
...
@@ -37,6 +37,7 @@ namespace XLS
...
@@ -37,6 +37,7 @@ namespace XLS
Tick
::
Tick
()
Tick
::
Tick
()
{
{
iReadingOrder
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.cpp
View file @
cf5458c7
...
@@ -146,8 +146,8 @@ void TxO::readFields(CFRecord& record)
...
@@ -146,8 +146,8 @@ void TxO::readFields(CFRecord& record)
}
}
}
}
hAlignment
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
1
,
3
)
);
hAlignment
=
GETBITS
(
flags
,
1
,
3
);
vAlignment
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
4
,
6
)
);
// reserved2 (2 bits)
vAlignment
=
GETBITS
(
flags
,
4
,
6
);
// reserved2 (2 bits)
fLockText
=
GETBIT
(
flags
,
9
);
// reserved3 (4 bits)
fLockText
=
GETBIT
(
flags
,
9
);
// reserved3 (4 bits)
fJustLast
=
GETBIT
(
flags
,
14
);
fJustLast
=
GETBIT
(
flags
,
14
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxO.h
View file @
cf5458c7
...
@@ -55,6 +55,8 @@ public:
...
@@ -55,6 +55,8 @@ public:
cbRuns
=
0
;
cbRuns
=
0
;
sp_enabled
=
false
;
sp_enabled
=
false
;
preserve_enabled
=
false
;
preserve_enabled
=
false
;
hAlignment
=
0
;
vAlignment
=
0
;
}
}
~
TxO
();
~
TxO
();
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/TxtQry.cpp
View file @
cf5458c7
...
@@ -37,6 +37,8 @@ namespace XLS
...
@@ -37,6 +37,8 @@ namespace XLS
TxtQry
::
TxtQry
()
TxtQry
::
TxtQry
()
{
{
iCpidNew
=
0
;
iTextDelm
=
0
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/XF.cpp
View file @
cf5458c7
...
@@ -37,7 +37,8 @@ namespace XLS
...
@@ -37,7 +37,8 @@ namespace XLS
XF
::
XF
(
size_t
&
cell_xf_current_id
,
size_t
&
style_xf_current_id
)
XF
::
XF
(
size_t
&
cell_xf_current_id
,
size_t
&
style_xf_current_id
)
:
cell
(
cell_xf_current_id
,
style_xf_current_id
),
:
cell
(
cell_xf_current_id
,
style_xf_current_id
),
style
(
cell_xf_current_id
,
style_xf_current_id
)
style
(
cell_xf_current_id
,
style_xf_current_id
),
ixfParent
(
0
)
{
{
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CellXF.cpp
View file @
cf5458c7
...
@@ -41,6 +41,7 @@ namespace XLS
...
@@ -41,6 +41,7 @@ namespace XLS
CellXF
::
CellXF
(
size_t
&
cell_xf_current_id
,
size_t
&
style_xf_current_id
)
CellXF
::
CellXF
(
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
),
font_id
(
0xFFFF
)
:
cell_xf_current_id_
(
cell_xf_current_id
),
style_xf_current_id_
(
style_xf_current_id
),
font_id
(
0xFFFF
)
{
{
alc
=
alcV
=
0
;
}
}
...
@@ -70,7 +71,7 @@ void CellXF::load(CFRecord& record)
...
@@ -70,7 +71,7 @@ void CellXF::load(CFRecord& record)
fShrinkToFit
=
0
;
//GETBIT(flags1, 20);
fShrinkToFit
=
0
;
//GETBIT(flags1, 20);
iReadOrder
=
0
;
//static_cast<unsigned char>(GETBITS(flags1, 22, 23));
iReadOrder
=
0
;
//static_cast<unsigned char>(GETBITS(flags1, 22, 23));
char
orient
=
GETBITS
(
flags1
,
8
,
10
);
char
orient
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags1
,
8
,
10
)
);
switch
(
orient
)
switch
(
orient
)
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtCOLORREF.cpp
View file @
cf5458c7
...
@@ -44,9 +44,9 @@ OfficeArtCOLORREF::OfficeArtCOLORREF()
...
@@ -44,9 +44,9 @@ OfficeArtCOLORREF::OfficeArtCOLORREF()
OfficeArtCOLORREF
::
OfficeArtCOLORREF
(
const
int
raw_data
)
OfficeArtCOLORREF
::
OfficeArtCOLORREF
(
const
int
raw_data
)
{
{
red
=
static_cast
<
unsigned
char
>
(
GETBITS
(
raw_data
,
0
,
7
)
);
red
=
GETBITS
(
raw_data
,
0
,
7
);
green
=
static_cast
<
unsigned
char
>
(
GETBITS
(
raw_data
,
8
,
15
)
);
green
=
GETBITS
(
raw_data
,
8
,
15
);
blue
=
static_cast
<
unsigned
char
>
(
GETBITS
(
raw_data
,
16
,
23
)
);
blue
=
GETBITS
(
raw_data
,
16
,
23
);
fPaletteIndex
=
GETBIT
(
raw_data
,
24
);
fPaletteIndex
=
GETBIT
(
raw_data
,
24
);
fPaletteRGB
=
GETBIT
(
raw_data
,
25
);
fPaletteRGB
=
GETBIT
(
raw_data
,
25
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgSxName.cpp
View file @
cf5458c7
...
@@ -31,7 +31,14 @@
...
@@ -31,7 +31,14 @@
*/
*/
#include "PtgSxName.h"
#include "PtgSxName.h"
#include <Binary/CFRecord.h>
#include "../Biff_unions/PIVOTCACHE.h"
#include "../Biff_unions/FDB.h"
#include "../Biff_unions/SXOPER.h"
#include "../Biff_records/SXFDB.h"
#include "../Biff_records/SxName.h"
#include "../Biff_records/SXPair.h"
namespace
XLS
namespace
XLS
{
{
...
@@ -51,37 +58,58 @@ void PtgSxName::loadFields(CFRecord& record)
...
@@ -51,37 +58,58 @@ void PtgSxName::loadFields(CFRecord& record)
void
PtgSxName
::
assemble
(
AssemblerStack
&
ptg_stack
,
PtgQueue
&
extra_data
,
bool
full_ref
)
void
PtgSxName
::
assemble
(
AssemblerStack
&
ptg_stack
,
PtgQueue
&
extra_data
,
bool
full_ref
)
{
{
//RevNamePtr tab_id;
//if(!extra_data.empty() && (tab_id = boost::dynamic_pointer_cast<RevName>(extra_data.front())))
//{
// Log::error("PtgNameX struct for revisions is not assemble.");
// ptg_stack.push(L"#REF!");
// extra_data.pop();
// return;
//}
std
::
wstring
_Name
;
std
::
wstring
_Name
;
if
(
sxIndex
>
0
&&
sxIndex
<=
global_info
->
AddinUdfs
.
size
()
&&
!
(
_Name
=
global_info
->
AddinUdfs
[
sxIndex
-
1
]).
empty
())
if
(
sxIndex
<
global_info
->
arPivotSxNames
.
size
())
{
{
ptg_stack
.
push
(
_Name
);
SxName
*
name
=
dynamic_cast
<
SxName
*>
(
global_info
->
arPivotSxNames
[
sxIndex
].
name
.
get
());
if
((
name
)
&&
(
name
->
ifdb
>=
0
&&
name
->
ifdb
<
global_info
->
arPivotCacheSxNames
.
size
()))
{
_Name
=
global_info
->
arPivotCacheSxNames
[
name
->
ifdb
];
}
}
else
if
(
sxIndex
>
0
&&
sxIndex
<=
global_info
->
xti_parsed
.
size
())
else
if
(
!
global_info
->
arPivotSxNames
[
sxIndex
].
pair
.
empty
())
{
SXPair
*
pair
=
dynamic_cast
<
SXPair
*>
(
global_info
->
arPivotSxNames
[
sxIndex
].
pair
[
0
].
get
());
if
(
pair
)
{
std
::
map
<
int
,
BaseObjectPtr
>::
iterator
pFind
=
global_info
->
mapPivotCache
.
find
(
global_info
->
idPivotCache
);
if
(
pFind
!=
global_info
->
mapPivotCache
.
end
())
{
PIVOTCACHE
*
pivot_cache
=
dynamic_cast
<
PIVOTCACHE
*>
(
pFind
->
second
.
get
());
if
(
pivot_cache
)
{
if
(
pair
->
isxvd
>=
0
&&
pair
->
isxvd
<
pivot_cache
->
m_arFDB
.
size
())
{
FDB
*
field
=
dynamic_cast
<
FDB
*>
(
pivot_cache
->
m_arFDB
[
pair
->
isxvd
].
get
());
if
(
field
)
{
{
std
::
wstring
sheet
=
global_info
->
xti_parsed
[
sxIndex
-
1
];
if
(
!
sheet
.
empty
())
sheet
+=
L"!"
;
SXFDB
*
field_db
=
dynamic_cast
<
SXFDB
*>
(
field
->
m_SXFDB
.
get
());
if
(
field_db
)
{
_Name
=
field_db
->
stFieldName
.
value
();
if
(
sxIndex
>
0
&&
sxIndex
<=
global_info
->
arDefineNames
.
size
(
))
if
(
std
::
wstring
::
npos
!=
_Name
.
find
(
L" "
))
{
{
_Name
=
global_info
->
arDefineNames
[
sxIndex
-
1
]
;
_Name
=
L"'"
+
_Name
+
L"'"
;
}
}
}
if
(
sheet
.
empty
()
&&
_Name
.
empty
()
&&
sxIndex
<=
global_info
->
arExternalNames
.
size
()
&&
sxIndex
>
0
)
if
(
pair
->
iCache
>=
0
&&
pair
->
iCache
<
field
->
m_arSRCSXOPER
.
size
())
{
SXOPER
*
cache
=
dynamic_cast
<
SXOPER
*>
(
field
->
m_arSRCSXOPER
[
pair
->
iCache
].
get
());
if
(
cache
)
{
{
_Name
=
global_info
->
arExternalNames
[
sxIndex
-
1
]
;
_Name
+=
L"["
+
cache
->
get_value
()
+
L"]"
;
}
}
}
ptg_stack
.
push
(
sheet
+
_Name
);
}
}
}
}
}
}
ptg_stack
.
push
(
_Name
);
}
}
else
else
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/StyleXF.cpp
View file @
cf5458c7
...
@@ -44,6 +44,8 @@ StyleXF::StyleXF(size_t& cell_xf_current_id, size_t& style_xf_current_id)
...
@@ -44,6 +44,8 @@ StyleXF::StyleXF(size_t& cell_xf_current_id, size_t& style_xf_current_id)
font_id
=
-
1
;
font_id
=
-
1
;
border_x_id
=
-
1
;
border_x_id
=
-
1
;
fill_x_id
=
-
1
;
fill_x_id
=
-
1
;
fill
.
fls
=
0
;
}
}
...
@@ -83,7 +85,7 @@ void StyleXF::load(CFRecord& record)
...
@@ -83,7 +85,7 @@ void StyleXF::load(CFRecord& record)
case
3
:
trot
=
270
;
break
;
// Text orientation: 90 deg clockwise.
case
3
:
trot
=
270
;
break
;
// Text orientation: 90 deg clockwise.
}
}
fill
.
fls
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags2
,
16
,
21
)
);
fill
.
fls
=
GETBITS
(
flags2
,
16
,
21
);
fill
.
icvFore
=
GETBITS
(
flags2
,
0
,
6
);
fill
.
icvFore
=
GETBITS
(
flags2
,
0
,
6
);
fill
.
icvBack
=
GETBITS
(
flags2
,
7
,
13
);
fill
.
icvBack
=
GETBITS
(
flags2
,
7
,
13
);
...
@@ -132,7 +134,7 @@ void StyleXF::load(CFRecord& record)
...
@@ -132,7 +134,7 @@ void StyleXF::load(CFRecord& record)
border
.
icvBottom
=
(
0
!=
border
.
dgBottom
)
?
static_cast
<
unsigned
char
>
(
GETBITS
(
flags3
,
7
,
13
))
:
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
.
icvDiag
=
(
0
!=
border
.
dgDiag
)
?
static_cast
<
unsigned
char
>
(
GETBITS
(
flags3
,
14
,
20
))
:
0
;
fill
.
fls
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags3
,
26
,
31
)
);
fill
.
fls
=
GETBITS
(
flags3
,
26
,
31
);
fill
.
icvFore
=
GETBITS
(
flags4
,
0
,
6
);
fill
.
icvFore
=
GETBITS
(
flags4
,
0
,
6
);
fill
.
icvBack
=
GETBITS
(
flags4
,
7
,
13
);
fill
.
icvBack
=
GETBITS
(
flags4
,
7
,
13
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
View file @
cf5458c7
...
@@ -92,41 +92,26 @@ int DREF::serialize(std::wostream & strm)
...
@@ -92,41 +92,26 @@ int DREF::serialize(std::wostream & strm)
}
}
else
if
(
bin
)
else
if
(
bin
)
{
{
switch
(
bin
->
nBuiltin
)
CP_XML_ATTR
(
L"type"
,
L"worksheet"
);
{
case
0x0004
:
/*Database*/
case
0x000d
:
/*_FilterDatabase*/
{
CP_XML_ATTR
(
L"type"
,
L"external"
);
//connectionId in connections(root)
}
break
;
case
0x0000
:
/*Consolidate_Area*/
//{
// CP_XML_ATTR(L"type", L"consolidation");
// CP_XML_NODE(L"consolidation")
// {
// CP_XML_ATTR(L"name", bin->stFile.value());
// }
//}break;
case
0x0001
:
/*Auto_Open*/
case
0x0002
:
/*Auto_Close*/
case
0x0003
:
/*Extract*/
case
0x0005
:
/*Criteria*/
case
0x0006
:
/*Print_Area*/
case
0x0007
:
/*Print_Titles*/
case
0x0008
:
/*Recorder*/
case
0x0009
:
/*Data_Form*/
case
0x000a
:
/*Auto_Activate*/
case
0x000b
:
/*Auto_Deactivate*/
case
0x000c
:
/*Sheet_Title*/
{
CP_XML_ATTR
(
L"type"
,
L"scenario"
);
CP_XML_NODE
(
L"worksheetSource"
)
CP_XML_NODE
(
L"worksheetSource"
)
{
{
CP_XML_ATTR
(
L"name"
,
bin
->
stFile
.
value
());
switch
(
bin
->
nBuiltin
)
{
case
0x0000
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Consolidate_Area"
);
break
;
case
0x0001
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Auto_Open"
);
break
;
case
0x0002
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Auto_Close"
);
break
;
case
0x0003
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Extract"
);
break
;
case
0x0004
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Database"
);
break
;
case
0x0005
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Criteria"
);
break
;
case
0x0006
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Print_Area"
);
break
;
case
0x0007
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Print_Titles"
);
break
;
case
0x0008
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Recorder"
);
break
;
case
0x0009
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Data_Form"
);
break
;
case
0x000a
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Auto_Activate"
);
break
;
case
0x000b
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Auto_Deactivate"
);
break
;
case
0x000c
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm.Sheet_Title"
);
break
;
case
0x000d
:
CP_XML_ATTR
(
L"name"
,
L"_xlnm._FilterDatabase"
);
break
;
//??
}
}
}
break
;
}
}
}
}
else
if
(
ref
)
else
if
(
ref
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
View file @
cf5458c7
...
@@ -97,6 +97,8 @@ BaseObjectPtr FDB::clone()
...
@@ -97,6 +97,8 @@ BaseObjectPtr FDB::clone()
const
bool
FDB
::
loadContent
(
BinProcessor
&
proc
)
const
bool
FDB
::
loadContent
(
BinProcessor
&
proc
)
{
{
global_info
=
proc
.
getGlobalWorkbookInfo
();
if
(
!
proc
.
mandatory
<
SXFDB
>
())
if
(
!
proc
.
mandatory
<
SXFDB
>
())
{
{
return
false
;
return
false
;
...
@@ -180,6 +182,8 @@ int FDB::serialize(std::wostream & strm)
...
@@ -180,6 +182,8 @@ int FDB::serialize(std::wostream & strm)
if
(
!
fdb
||
!
fdb_type
)
return
0
;
if
(
!
fdb
||
!
fdb_type
)
return
0
;
global_info
->
arPivotCacheSxNames
.
push_back
(
fdb
->
stFieldName
.
value
());
CP_XML_WRITER
(
strm
)
CP_XML_WRITER
(
strm
)
{
{
CP_XML_NODE
(
L"cacheField"
)
CP_XML_NODE
(
L"cacheField"
)
...
@@ -214,7 +218,9 @@ int FDB::serialize(std::wostream & strm)
...
@@ -214,7 +218,9 @@ int FDB::serialize(std::wostream & strm)
}
}
if
(
m_SXFMLA
)
if
(
m_SXFMLA
)
{
{
//{formula
SXFMLA
*
Formula
=
dynamic_cast
<
SXFMLA
*>
(
m_SXFMLA
.
get
());
if
(
Formula
)
Formula
->
serialize_attr
(
CP_GET_XML_NODE
());
}
}
if
(
m_arSRCSXOPER
.
empty
()
==
false
)
if
(
m_arSRCSXOPER
.
empty
()
==
false
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
View file @
cf5458c7
...
@@ -67,6 +67,7 @@ public:
...
@@ -67,6 +67,7 @@ public:
bool
bInteger
;
bool
bInteger
;
bool
bBool
;
bool
bBool
;
GlobalWorkbookInfoPtr
global_info
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
View file @
cf5458c7
...
@@ -91,12 +91,17 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
...
@@ -91,12 +91,17 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
}
}
int
PIVOTCACHEDEFINITION
::
serialize_definitions
(
std
::
wostream
&
strm
)
int
PIVOTCACHEDEFINITION
::
serialize_definitions
(
std
::
wostream
&
strm
)
{
{
global_info_
->
arPivotCacheSxNames
.
clear
();
global_info_
->
arPivotSxNames
.
clear
();
SXStreamID
*
streamId
=
dynamic_cast
<
SXStreamID
*>
(
m_SXStreamID
.
get
());
SXStreamID
*
streamId
=
dynamic_cast
<
SXStreamID
*>
(
m_SXStreamID
.
get
());
if
(
!
streamId
)
return
0
;
if
(
!
streamId
)
return
0
;
std
::
map
<
int
,
BaseObjectPtr
>::
iterator
pFind
=
global_info_
->
mapPivotCache
.
find
(
streamId
->
idStm
);
std
::
map
<
int
,
BaseObjectPtr
>::
iterator
pFind
=
global_info_
->
mapPivotCache
.
find
(
streamId
->
idStm
);
if
(
pFind
==
global_info_
->
mapPivotCache
.
end
())
return
0
;
if
(
pFind
==
global_info_
->
mapPivotCache
.
end
())
return
0
;
global_info_
->
idPivotCache
=
streamId
->
idStm
;
PIVOTCACHE
*
pivot_cache
=
dynamic_cast
<
PIVOTCACHE
*>
(
pFind
->
second
.
get
());
PIVOTCACHE
*
pivot_cache
=
dynamic_cast
<
PIVOTCACHE
*>
(
pFind
->
second
.
get
());
if
(
!
pivot_cache
)
return
0
;
if
(
!
pivot_cache
)
return
0
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTRULE.cpp
View file @
cf5458c7
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
*/
*/
#include "PIVOTRULE.h"
#include "PIVOTRULE.h"
#include
<Logic/Biff_records/SxRule.h>
#include
"PRFILTER.h"
#include
<Logic/Biff_unions/PRFILTER.h>
#include
"../Biff_records/SxRule.h"
namespace
XLS
namespace
XLS
{
{
...
@@ -49,7 +49,6 @@ BaseObjectPtr PIVOTRULE::clone()
...
@@ -49,7 +49,6 @@ BaseObjectPtr PIVOTRULE::clone()
return
BaseObjectPtr
(
new
PIVOTRULE
(
*
this
));
return
BaseObjectPtr
(
new
PIVOTRULE
(
*
this
));
}
}
// PIVOTRULE = SxRule *PRFILTER
// PIVOTRULE = SxRule *PRFILTER
const
bool
PIVOTRULE
::
loadContent
(
BinProcessor
&
proc
)
const
bool
PIVOTRULE
::
loadContent
(
BinProcessor
&
proc
)
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVD.cpp
View file @
cf5458c7
...
@@ -89,7 +89,8 @@ int PIVOTVD::serialize(std::wostream & strm)
...
@@ -89,7 +89,8 @@ int PIVOTVD::serialize(std::wostream & strm)
if
(
vd
->
sxaxis
.
bRw
)
CP_XML_ATTR
(
L"axis"
,
L"axisRow"
);
if
(
vd
->
sxaxis
.
bRw
)
CP_XML_ATTR
(
L"axis"
,
L"axisRow"
);
else
if
(
vd
->
sxaxis
.
bCol
)
CP_XML_ATTR
(
L"axis"
,
L"axisCol"
);
else
if
(
vd
->
sxaxis
.
bCol
)
CP_XML_ATTR
(
L"axis"
,
L"axisCol"
);
else
if
(
vd
->
sxaxis
.
bPage
)
CP_XML_ATTR
(
L"axis"
,
L"axisPage"
);
else
if
(
vd
->
sxaxis
.
bPage
)
CP_XML_ATTR
(
L"axis"
,
L"axisPage"
);
else
if
(
vd
->
sxaxis
.
bData
)
if
(
vd
->
sxaxis
.
bData
)
{
{
CP_XML_ATTR
(
L"dataField"
,
1
);
CP_XML_ATTR
(
L"dataField"
,
1
);
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.cpp
View file @
cf5458c7
...
@@ -31,30 +31,26 @@
...
@@ -31,30 +31,26 @@
*/
*/
#include "PRFILTER.h"
#include "PRFILTER.h"
#include
<Logic/Biff_records/SxFilt.h>
#include
"../Biff_records/SxFilt.h"
#include
<Logic/Biff_records/SxItm.h>
#include
"../Biff_records/SxItm.h"
#include
<Logic/Biff_records/Continue.h>
#include
"../Biff_records/Continue.h"
namespace
XLS
namespace
XLS
{
{
PRFILTER
::
PRFILTER
()
PRFILTER
::
PRFILTER
()
{
{
}
}
PRFILTER
::~
PRFILTER
()
PRFILTER
::~
PRFILTER
()
{
{
}
}
BaseObjectPtr
PRFILTER
::
clone
()
BaseObjectPtr
PRFILTER
::
clone
()
{
{
return
BaseObjectPtr
(
new
PRFILTER
(
*
this
));
return
BaseObjectPtr
(
new
PRFILTER
(
*
this
));
}
}
// PRFILTER = SxFilt [SxItm *Continue]
// PRFILTER = SxFilt [SxItm *Continue]
const
bool
PRFILTER
::
loadContent
(
BinProcessor
&
proc
)
const
bool
PRFILTER
::
loadContent
(
BinProcessor
&
proc
)
{
{
...
@@ -62,11 +58,16 @@ const bool PRFILTER::loadContent(BinProcessor& proc)
...
@@ -62,11 +58,16 @@ const bool PRFILTER::loadContent(BinProcessor& proc)
{
{
return
false
;
return
false
;
}
}
m_SxFilt
=
elements_
.
back
();
elements_
.
pop_back
();
if
(
proc
.
optional
<
SxItm
>
())
if
(
proc
.
optional
<
SxItm
>
())
{
{
m_SxItm
=
elements_
.
back
();
elements_
.
pop_back
();
int
count
=
proc
.
repeated
<
Continue
>
(
0
,
0
);
int
count
=
proc
.
repeated
<
Continue
>
(
0
,
0
);
}
}
return
true
;
return
true
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PRFILTER.h
View file @
cf5458c7
...
@@ -36,8 +36,6 @@
...
@@ -36,8 +36,6 @@
namespace
XLS
namespace
XLS
{
{
// Logical representation of PRFILTER union of records
class
PRFILTER
:
public
CompositeObject
class
PRFILTER
:
public
CompositeObject
{
{
BASE_OBJECT_DEFINE_CLASS_NAME
(
PRFILTER
)
BASE_OBJECT_DEFINE_CLASS_NAME
(
PRFILTER
)
...
@@ -50,6 +48,9 @@ public:
...
@@ -50,6 +48,9 @@ public:
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
static
const
ElementType
type
=
typePRFILTER
;
static
const
ElementType
type
=
typePRFILTER
;
BaseObjectPtr
m_SxFilt
;
BaseObjectPtr
m_SxItm
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.cpp
View file @
cf5458c7
...
@@ -79,7 +79,7 @@ BaseObjectPtr SXFMLA::clone()
...
@@ -79,7 +79,7 @@ BaseObjectPtr SXFMLA::clone()
// SXFMLA = SxFmla *(SxName *SXPair)
// SXFMLA = SxFmla *(SxName *SXPair)
const
bool
SXFMLA
::
loadContent
(
BinProcessor
&
proc
)
const
bool
SXFMLA
::
loadContent
(
BinProcessor
&
proc
)
{
{
GlobalWorkbookInfoPtr
global_info
=
proc
.
getGlobalWorkbookInfo
();
global_info
=
proc
.
getGlobalWorkbookInfo
();
if
(
!
proc
.
mandatory
<
SxFmla
>
())
if
(
!
proc
.
mandatory
<
SxFmla
>
())
{
{
...
@@ -97,7 +97,7 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
...
@@ -97,7 +97,7 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
_sx_name
sx_name
;
_sx_name
sx_name
;
sx_name
.
name
=
elements_
.
front
();
elements_
.
pop_front
();
sx_name
.
name
=
elements_
.
front
();
elements_
.
pop_front
();
global_info
->
arPivotSxNames
.
push_back
(
sx_name
);
m_
arPivotSxNames
.
push_back
(
sx_name
);
}
}
else
else
{
{
...
@@ -109,7 +109,7 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
...
@@ -109,7 +109,7 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
}
}
else
else
{
{
global_info
->
arPivotSxNames
.
back
().
pair
.
push_back
(
elements_
.
front
());
m_
arPivotSxNames
.
back
().
pair
.
push_back
(
elements_
.
front
());
elements_
.
pop_front
();
elements_
.
pop_front
();
}
}
}
}
...
@@ -119,5 +119,17 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
...
@@ -119,5 +119,17 @@ const bool SXFMLA::loadContent(BinProcessor& proc)
return
true
;
return
true
;
}
}
void
SXFMLA
::
serialize_attr
(
CP_ATTR_NODE
)
{
if
(
!
m_SxFmla
)
return
;
SxFmla
*
sx_fmla
=
dynamic_cast
<
SxFmla
*>
(
m_SxFmla
.
get
());
global_info
->
arPivotSxNames
=
m_arPivotSxNames
;
CP_XML_ATTR
(
L"formula"
,
sx_fmla
->
fmla
.
getAssembledFormula
());
}
}
// namespace XLS
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFMLA_bu.h
View file @
cf5458c7
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
namespace
XLS
namespace
XLS
{
{
class
SXFMLA
:
public
CompositeObject
class
SXFMLA
:
public
CompositeObject
{
{
BASE_OBJECT_DEFINE_CLASS_NAME
(
SXFMLA
)
BASE_OBJECT_DEFINE_CLASS_NAME
(
SXFMLA
)
...
@@ -47,9 +48,14 @@ public:
...
@@ -47,9 +48,14 @@ public:
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
void
serialize_attr
(
CP_ATTR_NODE
);
static
const
ElementType
type
=
typeSXFMLA
;
static
const
ElementType
type
=
typeSXFMLA
;
BaseObjectPtr
m_SxFmla
;
BaseObjectPtr
m_SxFmla
;
std
::
vector
<
_sx_name
>
m_arPivotSxNames
;
//-------------------------------------------------------------------------
GlobalWorkbookInfoPtr
global_info
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXFORMULA_bu.cpp
View file @
cf5458c7
...
@@ -34,11 +34,15 @@
...
@@ -34,11 +34,15 @@
#include "SXFMLA_bu.h"
#include "SXFMLA_bu.h"
#include "PIVOTRULE.h"
#include "PIVOTRULE.h"
#include "PRFILTER.h"
#include "../Biff_records/SXFormula.h"
#include "../Biff_records/SXFormula.h"
#include "../Biff_records/SxFmla.h"
#include "../Biff_records/SxFmla.h"
#include "../Biff_records/SxName.h"
#include "../Biff_records/SxName.h"
#include "../Biff_records/SXPair.h"
#include "../Biff_records/SXPair.h"
#include "../Biff_records/SxItm.h"
#include "../Biff_records/SxFilt.h"
#include "../Biff_records/SxRule.h"
namespace
XLS
namespace
XLS
{
{
...
@@ -85,21 +89,52 @@ int SXFORMULA::serialize(std::wostream & strm)
...
@@ -85,21 +89,52 @@ int SXFORMULA::serialize(std::wostream & strm)
SXFMLA
*
fmla
=
dynamic_cast
<
SXFMLA
*>
(
m_SXFMLA
.
get
());
SXFMLA
*
fmla
=
dynamic_cast
<
SXFMLA
*>
(
m_SXFMLA
.
get
());
if
(
!
fmla
)
return
0
;
if
(
!
fmla
)
return
0
;
SxFmla
*
sx_fmla
=
dynamic_cast
<
SxFmla
*>
(
fmla
->
m_SxFmla
.
get
());
PIVOTRULE
*
pivot_rule
=
dynamic_cast
<
PIVOTRULE
*>
(
m_PIVOTRULE
.
get
());
CP_XML_WRITER
(
strm
)
CP_XML_WRITER
(
strm
)
{
{
CP_XML_NODE
(
L"calculatedItem"
)
CP_XML_NODE
(
L"calculatedItem"
)
{
{
CP_XML_ATTR
(
L"formula"
,
sx_fmla
->
fmla
.
getAssembledFormula
());
fmla
->
serialize_attr
(
CP_GET_XML_NODE
());
//for (size_t j = 0; j < global_info->arPivotSxNames.size(); j++)//???
if
(
pivot_rule
)
//{
{
// SxName *name = dynamic_cast<SxName*>(global_info->arPivotSxNames[j].m_SxName.get());
SxRule
*
rule
=
dynamic_cast
<
SxRule
*>
(
pivot_rule
->
m_SxRule
.
get
());
// CP_XML_NODE(L"pivotArea")
// {
for
(
size_t
j
=
0
;
j
<
pivot_rule
->
m_arPRFILTER
.
size
();
j
++
)
//multi in pivotAreas !!! todooo ???
// }
{
//}
PRFILTER
*
filter
=
dynamic_cast
<
PRFILTER
*>
(
pivot_rule
->
m_arPRFILTER
[
j
].
get
());
SxItm
*
item
=
dynamic_cast
<
SxItm
*>
(
filter
->
m_SxItm
.
get
());
SxFilt
*
filt
=
dynamic_cast
<
SxFilt
*>
(
filter
->
m_SxFilt
.
get
());
CP_XML_NODE
(
L"pivotArea"
)
{
CP_XML_ATTR
(
L"cacheIndex"
,
1
);
//true
CP_XML_ATTR
(
L"outline"
,
0
);
CP_XML_ATTR
(
L"fieldPosition"
,
(
int
)
rule
->
iDim
);
CP_XML_NODE
(
L"references"
)
{
CP_XML_ATTR
(
L"count"
,
item
->
rgisxvi
.
size
());
for
(
size_t
i
=
0
;
i
<
item
->
rgisxvi
.
size
();
i
++
)
{
CP_XML_NODE
(
L"reference"
)
{
CP_XML_ATTR
(
L"field"
,
(
int
)
filt
->
isxvd
);
CP_XML_ATTR
(
L"count"
,
(
int
)
filt
->
iDim
);
CP_XML_NODE
(
L"x"
)
{
CP_XML_ATTR
(
L"v"
,
item
->
rgisxvi
[
i
]);
}
}
}
}
}
}
}
}
}
}
}
return
0
;
return
0
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
View file @
cf5458c7
...
@@ -111,5 +111,36 @@ int SXOPER::serialize(std::wostream & strm)
...
@@ -111,5 +111,36 @@ int SXOPER::serialize(std::wostream & strm)
m_element
->
serialize
(
strm
);
m_element
->
serialize
(
strm
);
return
0
;
return
0
;
}
}
std
::
wstring
SXOPER
::
get_value
()
{
std
::
wstring
value
;
SXNum
*
num
=
dynamic_cast
<
SXNum
*>
(
m_element
.
get
());
if
(
num
)
{
value
=
std
::
to_wstring
(
num
->
num
.
data
.
value
);
}
else
{
SXString
*
str
=
dynamic_cast
<
SXString
*>
(
m_element
.
get
());
if
(
str
)
{
value
=
str
->
segment
.
value
();
}
else
{
SXDtr
*
dtr
=
dynamic_cast
<
SXDtr
*>
(
m_element
.
get
());
if
(
dtr
)
{
value
=
dtr
->
get_string_date
();
}
else
{
}
}
}
return
value
;
}
}
// namespace XLS
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.h
View file @
cf5458c7
...
@@ -49,6 +49,8 @@ public:
...
@@ -49,6 +49,8 @@ public:
int
serialize
(
std
::
wostream
&
strm
);
int
serialize
(
std
::
wostream
&
strm
);
std
::
wstring
get_value
();
static
const
ElementType
type
=
typeSXOPER
;
static
const
ElementType
type
=
typeSXOPER
;
BaseObjectPtr
m_element
;
BaseObjectPtr
m_element
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL.h
View file @
cf5458c7
...
@@ -35,6 +35,11 @@
...
@@ -35,6 +35,11 @@
namespace
XLS
namespace
XLS
{
{
struct
_sxtbl_item
{
BaseObjectPtr
item
;
std
::
vector
<
BaseObjectPtr
>
strings
;
};
class
SXTBL
:
public
CompositeObject
class
SXTBL
:
public
CompositeObject
{
{
...
@@ -47,8 +52,14 @@ public:
...
@@ -47,8 +52,14 @@ public:
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
int
serialize
(
std
::
wostream
&
stream
);
static
const
ElementType
type
=
typeSXTBL
;
static
const
ElementType
type
=
typeSXTBL
;
BaseObjectPtr
m_SXTbl
;
std
::
vector
<
BaseObjectPtr
>
m_arDREF
;
std
::
vector
<
BaseObjectPtr
>
m_arSxTbpg
;
std
::
vector
<
_sxtbl_item
>
m_arSXTBRGIITM
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
View file @
cf5458c7
...
@@ -65,6 +65,7 @@ public:
...
@@ -65,6 +65,7 @@ public:
{
{
return
false
;
return
false
;
}
}
proc
.
repeated
<
SXString
>
(
0
,
0
);
proc
.
repeated
<
SXString
>
(
0
,
0
);
return
true
;
return
true
;
};
};
...
@@ -80,17 +81,55 @@ BaseObjectPtr SXTBL::clone()
...
@@ -80,17 +81,55 @@ BaseObjectPtr SXTBL::clone()
// SXTBL = SXTbl *DREF *SxTbpg *(SXTBRGIITM *SXString)
// SXTBL = SXTbl *DREF *SxTbpg *(SXTBRGIITM *SXString)
const
bool
SXTBL
::
loadContent
(
BinProcessor
&
proc
)
const
bool
SXTBL
::
loadContent
(
BinProcessor
&
proc
)
{
{
if
(
!
proc
.
mandatory
<
SXTbl
>
())
if
(
!
proc
.
mandatory
<
SXTbl
>
())
{
{
return
false
;
return
false
;
}
}
proc
.
repeated
<
DREF
>
(
0
,
0
);
proc
.
repeated
<
SxTbpg
>
(
0
,
0
);
proc
.
repeated
<
Parenthesis_SXTBL_1
>
(
0
,
0
);
m_SXTbl
=
elements_
.
back
();
elements_
.
pop_back
();
int
count
=
0
;
count
=
proc
.
repeated
<
DREF
>
(
0
,
0
);
while
(
!
elements_
.
empty
())
{
m_arDREF
.
push_back
(
elements_
.
front
());
elements_
.
pop_front
();
}
count
=
proc
.
repeated
<
SxTbpg
>
(
0
,
0
);
while
(
!
elements_
.
empty
())
{
m_arSxTbpg
.
push_back
(
elements_
.
front
());
elements_
.
pop_front
();
}
count
=
proc
.
repeated
<
Parenthesis_SXTBL_1
>
(
0
,
0
);
while
(
!
elements_
.
empty
())
{
SXTBRGIITM
*
item
=
dynamic_cast
<
SXTBRGIITM
*>
(
elements_
.
front
().
get
());
if
(
item
)
{
_sxtbl_item
it
;
it
.
item
=
elements_
.
front
();
m_arSXTBRGIITM
.
push_back
(
it
);
}
else
{
m_arSXTBRGIITM
.
back
().
strings
.
push_back
(
elements_
.
front
());
}
elements_
.
pop_front
();
}
return
true
;
return
true
;
}
}
int
SXTBL
::
serialize
(
std
::
wostream
&
stream
)
{
if
(
!
m_SXTbl
)
return
0
;
return
0
;
}
}
// namespace XLS
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.cpp
View file @
cf5458c7
...
@@ -118,6 +118,8 @@ GlobalWorkbookInfo::GlobalWorkbookInfo(const unsigned short code_page, XlsConver
...
@@ -118,6 +118,8 @@ GlobalWorkbookInfo::GlobalWorkbookInfo(const unsigned short code_page, XlsConver
defaultDigitFontSize
=
std
::
pair
<
float
,
float
>
(
0
,
0
);
defaultDigitFontSize
=
std
::
pair
<
float
,
float
>
(
0
,
0
);
applicationFonts
=
NULL
;
applicationFonts
=
NULL
;
idPivotCache
=
0
;
}
}
GlobalWorkbookInfo
::~
GlobalWorkbookInfo
()
GlobalWorkbookInfo
::~
GlobalWorkbookInfo
()
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
View file @
cf5458c7
...
@@ -105,10 +105,14 @@ public:
...
@@ -105,10 +105,14 @@ public:
unsigned
int
last_AXES_id
;
unsigned
int
last_AXES_id
;
const
static
unsigned
int
initial_AXES_id
=
0x2000000
;
const
static
unsigned
int
initial_AXES_id
=
0x2000000
;
short
idPivotCache
;
std
::
map
<
int
,
BaseObjectPtr
>
mapPivotCache
;
std
::
map
<
int
,
BaseObjectPtr
>
mapPivotCache
;
std
::
vector
<
bool
>
arPivotCacheFields
;
std
::
vector
<
bool
>
arPivotCacheFields
;
std
::
vector
<
bool
>
arPivotCacheFieldShortSize
;
std
::
vector
<
bool
>
arPivotCacheFieldShortSize
;
std
::
vector
<
_sx_name
>
arPivotSxNames
;
std
::
vector
<
_sx_name
>
arPivotSxNames
;
std
::
vector
<
std
::
wstring
>
arPivotCacheSxNames
;
std
::
vector
<
std
::
wstring
>
arPivotCacheReferences
;
std
::
map
<
std
::
wstring
,
std
::
vector
<
std
::
wstring
>>
mapDefineNames
;
std
::
map
<
std
::
wstring
,
std
::
vector
<
std
::
wstring
>>
mapDefineNames
;
std
::
vector
<
std
::
wstring
>
arDefineNames
;
std
::
vector
<
std
::
wstring
>
arDefineNames
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment