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
99191e65
Commit
99191e65
authored
Nov 02, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat - fix connections (oleDb, query...)
parent
fb417208
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
283 additions
and
138 deletions
+283
-138
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConn.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/DConn.cpp
+0
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsi.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsi.h
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXStreamID.cpp
...sFile2/source/XlsFormat/Logic/Biff_records/SXStreamID.cpp
+0
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DConnConnectionOleDb.cpp
.../XlsFormat/Logic/Biff_structures/DConnConnectionOleDb.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
+87
-45
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
...ficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
+3
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT.h
...eXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT.h
+6
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT_bu.cpp
...ile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT_bu.cpp
+15
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON.h
+4
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON_bu.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON_bu.cpp
+13
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTADDL.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTADDL.cpp
+3
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
...urce/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
+9
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTFRT9.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTFRT9.cpp
+11
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVIEW.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVIEW.cpp
+32
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
...lsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
+5
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.cpp
...sFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.cpp
+28
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.h
...XlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.h
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLQSI.cpp
...XlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLQSI.cpp
+4
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
...fficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
+3
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.cpp
...fficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.cpp
+28
-19
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.h
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
...iceXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
+21
-22
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConn.cpp
View file @
99191e65
...
...
@@ -44,12 +44,10 @@ DConn::DConn()
{
}
DConn
::~
DConn
()
{
}
BaseObjectPtr
DConn
::
clone
()
{
return
BaseObjectPtr
(
new
DConn
(
*
this
));
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Qsi.h
View file @
99191e65
...
...
@@ -70,6 +70,7 @@ public:
bool
fibitAtrBdr
;
bool
fibitAtrPat
;
bool
fibitAtrProt
;
XLUnicodeString
rgchName
;
};
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXStreamID.cpp
View file @
99191e65
...
...
@@ -55,8 +55,6 @@ void SXStreamID::readFields(CFRecord& record)
{
GlobalWorkbookInfoPtr
global_info
=
record
.
getGlobalWorkbookInfo
();
record
>>
idStm
;
global_info
->
arPivotCacheStream
.
push_back
(
idStm
);
}
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DConnConnectionOleDb.cpp
View file @
99191e65
...
...
@@ -70,7 +70,8 @@ void DConnConnectionOleDb::load(CFRecord& record)
XLUnicodeStringSegmented
val
;
record
>>
val
;
rgConn
.
push_back
(
val
);
}}
}
}
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.cpp
View file @
99191e65
...
...
@@ -36,6 +36,9 @@
#include "../Biff_records/DbOrParamQry.h"
#include "../Biff_records/SXString.h"
#include "../Biff_records/TxtQry.h"
#include "../Biff_records/DBQueryExt.h"
#include "../Biff_records/ExtString.h"
#include "../Biff_records/DConn.h"
namespace
XLS
{
...
...
@@ -187,9 +190,20 @@ const bool DBQUERY::loadContent(BinProcessor& proc)
int
DBQUERY
::
serialize
(
std
::
wostream
&
strm
)
{
std
::
wstring
name
;
std
::
wstring
name
,
desc
;
if
(
global_info
->
connectionId
<
global_info
->
arDConn
.
size
())
//todooo + поиск по совпадению типа
{
DConn
*
dcon
=
dynamic_cast
<
DConn
*>
(
global_info
->
arDConn
[
global_info
->
connectionId
].
get
());
if
(
dcon
)
{
name
=
dcon
->
rgchConnectionName
.
strTotal
;
desc
=
dcon
->
rgchConnectionDesc
.
strTotal
;
}
}
int
connectionId
=
serialize_connection
(
name
);
int
connectionId
=
serialize_connection
(
name
,
desc
);
CP_XML_WRITER
(
strm
)
{
...
...
@@ -202,85 +216,113 @@ int DBQUERY::serialize(std::wostream & strm)
return
0
;
}
int
DBQUERY
::
serialize_connection
(
std
::
wstring
&
name
,
DBQUERYEXT
*
query_ext
)
int
DBQUERY
::
serialize_connection
(
std
::
wstring
&
name
,
std
::
wstring
desc
)
{
DbOrParamQry
*
queryOrParam
=
dynamic_cast
<
DbOrParamQry
*>
(
m_DbQry
.
get
());
if
(
!
queryOrParam
)
return
-
1
;
DbOrParamQry
*
dbQry
=
dynamic_cast
<
DbOrParamQry
*>
(
m_DbQry
.
get
());
if
(
!
dbQry
)
return
-
1
;
++
global_info
->
connectionId
;
if
(
name
.
empty
())
name
=
L"Connection"
+
std
::
to_wstring
(
global_info
->
connectionId
);
DBQUERYEXT
*
query_ext
=
dynamic_cast
<
DBQUERYEXT
*>
(
m_DBQUERYEXT
.
get
());
DBQueryExt
*
dbQry_ext
=
query_ext
?
dynamic_cast
<
DBQueryExt
*>
(
query_ext
->
m_DBQueryExt
.
get
())
:
NULL
;
CP_XML_WRITER
(
global_info
->
connections_stream
)
{
CP_XML_NODE
(
L"connection"
)
{
CP_XML_ATTR
(
L"id"
,
global_info
->
connectionId
);
CP_XML_ATTR
(
L"name"
,
name
);
if
(
!
desc
.
empty
())
{
CP_XML_ATTR
(
L"description"
,
desc
);
}
CP_XML_ATTR
(
L"type"
,
queryOrParam
->
query
.
dbt
);
CP_XML_ATTR
(
L"type"
,
dbQry
->
query
.
dbt
);
//background="1"
//saveData="1"
if
(
queryOrParam
->
query
.
fSavePwd
)
CP_XML_ATTR
(
L"savePassword"
,
1
);
if
(
dbQry
->
query
.
fSavePwd
)
CP_XML_ATTR
(
L"savePassword"
,
1
);
CP_XML_ATTR
(
L"refreshedVersion"
,
1
);
if
(
queryOrParam
->
query
.
dbt
==
6
)
if
(
dbQry
->
typeRecord
==
1
)
{
TxtQry
*
query_txt
=
dynamic_cast
<
TxtQry
*>
(
query_ext
->
m_TxtQry
.
get
());
if
(
query_txt
)
}
else
{
if
(
dbQry
->
query
.
dbt
==
6
)
{
CP_XML_NODE
(
L"textPr"
)
TxtQry
*
query_txt
=
query_ext
?
dynamic_cast
<
TxtQry
*>
(
query_ext
->
m_TxtQry
.
get
())
:
NULL
;
if
(
query_txt
)
{
CP_XML_ATTR
(
L"sourceFile"
,
query_txt
->
rgchFile
.
value
());
//delimited="0"
CP_XML_NODE
(
L"textFields"
)
CP_XML_NODE
(
L"textPr"
)
{
for
(
size_t
i
=
0
;
i
<
query_txt
->
rgtxtwf
.
size
();
i
++
)
CP_XML_ATTR
(
L"sourceFile"
,
query_txt
->
rgchFile
.
value
());
//delimited="0"
CP_XML_NODE
(
L"textFields"
)
{
CP_XML_NODE
(
L"textField"
)
for
(
size_t
i
=
0
;
i
<
query_txt
->
rgtxtwf
.
size
();
i
++
)
{
switch
(
query_txt
->
rgtxtwf
[
i
].
fieldType
)
CP_XML_NODE
(
L"textField"
)
{
case
0
:
CP_XML_ATTR
(
L"type"
,
L"general"
);
break
;
case
1
:
CP_XML_ATTR
(
L"type"
,
L"text"
);
break
;
case
2
:
CP_XML_ATTR
(
L"type"
,
L"MDY"
);
break
;
case
3
:
CP_XML_ATTR
(
L"type"
,
L"DMY"
);
break
;
case
4
:
CP_XML_ATTR
(
L"type"
,
L"YMD"
);
break
;
case
5
:
CP_XML_ATTR
(
L"type"
,
L"MYD"
);
break
;
case
6
:
CP_XML_ATTR
(
L"type"
,
L"DYM"
);
break
;
case
7
:
CP_XML_ATTR
(
L"type"
,
L"YDM"
);
break
;
case
8
:
CP_XML_ATTR
(
L"type"
,
L"skip"
);
break
;
case
9
:
CP_XML_ATTR
(
L"type"
,
L"EMD"
);
break
;
switch
(
query_txt
->
rgtxtwf
[
i
].
fieldType
)
{
case
0
:
CP_XML_ATTR
(
L"type"
,
L"general"
);
break
;
case
1
:
CP_XML_ATTR
(
L"type"
,
L"text"
);
break
;
case
2
:
CP_XML_ATTR
(
L"type"
,
L"MDY"
);
break
;
case
3
:
CP_XML_ATTR
(
L"type"
,
L"DMY"
);
break
;
case
4
:
CP_XML_ATTR
(
L"type"
,
L"YMD"
);
break
;
case
5
:
CP_XML_ATTR
(
L"type"
,
L"MYD"
);
break
;
case
6
:
CP_XML_ATTR
(
L"type"
,
L"DYM"
);
break
;
case
7
:
CP_XML_ATTR
(
L"type"
,
L"YDM"
);
break
;
case
8
:
CP_XML_ATTR
(
L"type"
,
L"skip"
);
break
;
case
9
:
CP_XML_ATTR
(
L"type"
,
L"EMD"
);
break
;
}
CP_XML_ATTR
(
L"position"
,
query_txt
->
rgtxtwf
[
i
].
fieldStart
);
}
CP_XML_ATTR
(
L"position"
,
query_txt
->
rgtxtwf
[
i
].
fieldStart
);
}
}
}
}
}
}
else
{
int
index
=
0
;
CP_XML_NODE
(
L"dbPr"
)
else
{
std
::
wstring
command
,
connection
;
for
(
index
=
0
;
index
<
queryOrParam
->
query
.
cstQuery
;
index
++
)
{
command
+=
m_arSXString
[
index
];
}
for
(;
index
<
queryOrParam
->
query
.
cstQuery
+
queryOrParam
->
query
.
cstOdbcConn
;
index
++
)
size_t
index
=
0
;
CP_XML_NODE
(
L"dbPr"
)
{
connection
+=
m_arSXString
[
index
];
std
::
wstring
command
,
connection
,
post
;
size_t
index_max
=
(
std
::
min
)((
size_t
)
dbQry
->
query
.
cstQuery
,
m_arSXString
.
size
());
for
(
index
=
0
;
index
<
index_max
;
index
++
)
{
command
+=
m_arSXString
[
index
];
}
index_max
=
(
std
::
min
)((
size_t
)(
dbQry
->
query
.
cstQuery
+
dbQry
->
query
.
cstOdbcConn
),
m_arSXString
.
size
());
for
(;
index
<
index_max
;
index
++
)
{
connection
+=
m_arSXString
[
index
];
}
index_max
=
(
std
::
min
)((
size_t
)(
dbQry
->
query
.
cstQuery
+
dbQry
->
query
.
cstOdbcConn
+
dbQry
->
query
.
cstWebPost
),
m_arSXString
.
size
());
for
(;
index
<
index_max
;
index
++
)
{
post
+=
m_arSXString
[
index
];
}
if
(
connection
.
empty
()
&&
(
query_ext
)
&&
(
!
query_ext
->
m_arOleDbConn
.
empty
()))
{
for
(
size_t
i
=
0
;
i
<
query_ext
->
m_arOleDbConn
[
0
].
arExtString
.
size
();
i
++
)
{
ExtString
*
ex_str
=
dynamic_cast
<
ExtString
*>
(
query_ext
->
m_arOleDbConn
[
0
].
arExtString
[
i
].
get
());
connection
+=
ex_str
->
string
.
value
();
}
}
CP_XML_ATTR
(
L"connection"
,
connection
);
CP_XML_ATTR
(
L"command"
,
command
);
}
CP_XML_ATTR
(
L"connection"
,
connection
);
CP_XML_ATTR
(
L"command"
,
command
);
}
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERY.h
View file @
99191e65
...
...
@@ -56,7 +56,7 @@ public:
int
serialize
(
std
::
wostream
&
stream
);
int
serialize_connection
(
std
::
wstring
&
name
,
DBQUERYEXT
*
query_ext
=
NULL
);
int
serialize_connection
(
std
::
wstring
&
name
,
std
::
wstring
desc
);
BaseObjectPtr
m_DbQry
;
...
...
@@ -65,7 +65,8 @@ public:
std
::
vector
<
std
::
wstring
>
m_arSXString
;
//------------------------------------------------------
GlobalWorkbookInfoPtr
global_info
;
BaseObjectPtr
m_DBQUERYEXT
;
GlobalWorkbookInfoPtr
global_info
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT.h
View file @
99191e65
...
...
@@ -35,6 +35,11 @@
namespace
XLS
{
struct
_oleDbConn
{
BaseObjectPtr
oleDbConn
;
std
::
vector
<
BaseObjectPtr
>
arExtString
;
};
class
DBQUERYEXT
:
public
CompositeObject
{
...
...
@@ -51,7 +56,7 @@ public:
BaseObjectPtr
m_DBQueryExt
;
BaseObjectPtr
m_ExtString
;
std
::
vector
<
BaseObjectPtr
>
m_arExtString
;
std
::
vector
<
_oleDbConn
>
m_arOleDbConn
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBQUERYEXT_bu.cpp
View file @
99191e65
...
...
@@ -92,8 +92,21 @@ const bool DBQUERYEXT::loadContent(BinProcessor& proc)
}
int
count
=
proc
.
repeated
<
Parenthesis_DBQUERYEXT_1
>
(
0
,
4
);
//....
while
(
!
elements_
.
empty
())
{
if
(
elements_
.
front
()
->
get_type
()
==
typeOleDbConn
)
{
_oleDbConn
conn
;
m_arOleDbConn
.
push_back
(
conn
);
m_arOleDbConn
.
back
().
oleDbConn
=
elements_
.
front
();
}
else
{
m_arOleDbConn
.
back
().
arExtString
.
push_back
(
elements_
.
front
());
}
elements_
.
pop_front
();
}
if
(
proc
.
optional
<
TxtQry
>
())
{
m_TxtQry
=
elements_
.
back
();
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON.h
View file @
99191e65
...
...
@@ -36,8 +36,6 @@
namespace
XLS
{
// Logical representation of DCON union of records
class
DCON
:
public
CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME
(
DCON
)
...
...
@@ -50,6 +48,10 @@ public:
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
static
const
ElementType
type
=
typeDCON
;
BaseObjectPtr
m_DCon
;
std
::
vector
<
BaseObjectPtr
>
m_arDCon
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DCON_bu.cpp
View file @
99191e65
...
...
@@ -31,10 +31,10 @@
*/
#include "DCON.h"
#include
<Logic/Biff_records/DCon.h>
#include
<Logic/Biff_records/DConName.h>
#include
<Logic/Biff_records/DConBin.h>
#include
<Logic/Biff_records/DConRef.h>
#include
"../Biff_records/DCon.h"
#include
"../Biff_records/DConName.h"
#include
"../Biff_records/DConBin.h"
#include
"../Biff_records/DConRef.h"
namespace
XLS
{
...
...
@@ -74,7 +74,6 @@ BaseObjectPtr DCON::clone()
return
BaseObjectPtr
(
new
DCON
(
*
this
));
}
// DCON = DCon *(DConName / DConBin / DConRef)
const
bool
DCON
::
loadContent
(
BinProcessor
&
proc
)
{
...
...
@@ -82,8 +81,16 @@ const bool DCON::loadContent(BinProcessor& proc)
{
return
false
;
}
proc
.
repeated
<
Parenthesis_DCON_1
>
(
0
,
0
);
m_DCon
=
elements_
.
back
();
elements_
.
pop_back
();
int
count
=
proc
.
repeated
<
Parenthesis_DCON_1
>
(
0
,
0
);
while
(
count
>
0
)
{
m_arDCon
.
insert
(
m_arDCon
.
begin
(),
elements_
.
back
());
elements_
.
pop_back
();
count
--
;
}
return
true
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTADDL.cpp
View file @
99191e65
...
...
@@ -96,12 +96,13 @@ const bool PIVOTADDL::loadContent(BinProcessor& proc)
if
(
addl
->
bEndElement
)
{
elements_
.
pop_back
();
if
(
level
==
0
)
break
;
else
level
--
;
current
=
current
->
back
().
prev
;
elements_
.
pop_back
();
continue
;
}
if
(
level
==
0
)
...
...
@@ -131,7 +132,7 @@ const bool PIVOTADDL::loadContent(BinProcessor& proc)
current
->
back
().
elements
.
push_back
(
elements_
.
back
());
elements_
.
pop_back
();
}
current
=
NULL
;
return
result
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTCACHEDEFINITION.cpp
View file @
99191e65
...
...
@@ -73,6 +73,11 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
m_SXStreamID
=
elements_
.
back
();
elements_
.
pop_back
();
SXStreamID
*
streamId
=
dynamic_cast
<
SXStreamID
*>
(
m_SXStreamID
.
get
());
if
(
!
streamId
)
return
0
;
global_info_
->
mapPivotCacheIndex
.
insert
(
std
::
make_pair
(
streamId
->
idStm
,
global_info_
->
mapPivotCacheIndex
.
size
()));
if
(
proc
.
mandatory
<
SXVS
>
())
{
m_SXVS
=
elements_
.
back
();
...
...
@@ -92,17 +97,16 @@ const bool PIVOTCACHEDEFINITION::loadContent(BinProcessor& proc)
}
int
PIVOTCACHEDEFINITION
::
serialize_definitions
(
std
::
wostream
&
strm
)
{
global_info_
->
arPivotCacheSxNames
.
clear
();
global_info_
->
arPivotSxNames
.
clear
();
SXStreamID
*
streamId
=
dynamic_cast
<
SXStreamID
*>
(
m_SXStreamID
.
get
());
if
(
!
streamId
)
return
0
;
global_info_
->
arPivotCacheSxNames
.
clear
();
global_info_
->
arPivotSxNames
.
clear
();
global_info_
->
idPivotCache
=
streamId
->
idStm
;
std
::
unordered_map
<
int
,
BaseObjectPtr
>::
iterator
pFind
=
global_info_
->
mapPivotCacheStream
.
find
(
streamId
->
idStm
);
if
(
pFind
==
global_info_
->
mapPivotCacheStream
.
end
())
return
0
;
global_info_
->
idPivotCache
=
streamId
->
idStm
;
PIVOTCACHE
*
pivot_cache
=
dynamic_cast
<
PIVOTCACHE
*>
(
pFind
->
second
.
get
());
if
(
!
pivot_cache
)
return
0
;
...
...
@@ -116,7 +120,6 @@ int PIVOTCACHEDEFINITION::serialize_definitions(std::wostream & strm)
global_info_
->
mapPivotCacheStream
.
erase
(
pFind
);
return
0
;
}
global_info_
->
mapPivotCacheIndex
.
insert
(
std
::
make_pair
(
global_info_
->
idPivotCache
,
global_info_
->
mapPivotCacheIndex
.
size
()));
SXSRC
*
src
=
dynamic_cast
<
SXSRC
*>
(
m_SXSRC
.
get
());
bool
bSql
=
src
?
src
->
bSql
:
false
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTFRT9.cpp
View file @
99191e65
...
...
@@ -31,10 +31,11 @@
*/
#include "PIVOTFRT9.h"
#include <Logic/Biff_records/QsiSXTag.h>
#include <Logic/Biff_unions/DBQUERYEXT.h>
#include <Logic/Biff_unions/PIVOTVIEWEX.h>
#include <Logic/Biff_records/SXViewEx9.h>
#include "DBQUERYEXT.h"
#include "PIVOTVIEWEX.h"
#include "../Biff_records/QsiSXTag.h"
#include "../Biff_records/SXViewEx9.h"
namespace
XLS
{
...
...
@@ -58,6 +59,8 @@ BaseObjectPtr PIVOTFRT9::clone()
// PIVOTFRT9 = QsiSXTag [DBQUERYEXT] [PIVOTVIEWEX] SXViewEx9
const
bool
PIVOTFRT9
::
loadContent
(
BinProcessor
&
proc
)
{
GlobalWorkbookInfoPtr
global_info
=
proc
.
getGlobalWorkbookInfo
();
if
(
!
proc
.
mandatory
<
QsiSXTag
>
())
{
return
false
;
...
...
@@ -69,6 +72,10 @@ const bool PIVOTFRT9::loadContent(BinProcessor& proc)
{
m_DBQUERYEXT
=
elements_
.
back
();
elements_
.
pop_back
();
//QsiSXTag* qsi = dynamic_cast<QsiSXTag*>(m_QsiSXTag.get());
//global_info->mapDBQueryExt.insert(std::make_pair(qsi->stName.value(), m_DBQUERYEXT));
}
if
(
proc
.
optional
<
PIVOTVIEWEX
>
())
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PIVOTVIEW.cpp
View file @
99191e65
...
...
@@ -41,6 +41,9 @@
#include "PIVOTADDL.h"
#include "PIVOTFORMAT.h"
#include "PIVOTFRT9.h"
#include "PIVOTCACHEDEFINITION.h"
#include "DBQUERY.h"
#include "SXSRC.h"
#include "../Biff_records/SXDI.h"
#include "../Biff_records/SxView.h"
...
...
@@ -49,6 +52,7 @@
#include "../Biff_records/SxFormat.h"
#include "../Biff_records/SxDXF.h"
#include "../Biff_records/SXViewEx9.h"
#include "../Biff_records/SXStreamID.h"
namespace
XLS
{
...
...
@@ -93,7 +97,27 @@ const bool PIVOTVIEW::loadContent(BinProcessor& proc)
m_PIVOTFRT
=
elements_
.
back
();
elements_
.
pop_back
();
}
//-------------------------------------------------------------------------------------------------
PIVOTCACHEDEFINITION
*
pivot_cache
=
dynamic_cast
<
PIVOTCACHEDEFINITION
*>
(
global_info_
->
arPIVOTCACHEDEFINITION
[
view
->
iCache
].
get
());
if
(
pivot_cache
)
{
SXStreamID
*
stream_id
=
dynamic_cast
<
SXStreamID
*>
(
pivot_cache
->
m_SXStreamID
.
get
());
indexStream
=
stream_id
->
idStm
;
if
(
m_PIVOTFRT
&&
pivot_cache
->
m_SXSRC
)
{
SXSRC
*
src
=
dynamic_cast
<
SXSRC
*>
(
pivot_cache
->
m_SXSRC
.
get
());
PIVOTFRT
*
frt
=
dynamic_cast
<
PIVOTFRT
*>
(
m_PIVOTFRT
.
get
());
PIVOTFRT9
*
frt9
=
frt
?
dynamic_cast
<
PIVOTFRT9
*>
(
frt
->
m_PIVOTFRT9
.
get
())
:
NULL
;
DBQUERY
*
db_query
=
dynamic_cast
<
DBQUERY
*>
(
src
->
m_source
.
get
());
if
(
frt9
)
{
db_query
->
m_DBQUERYEXT
=
frt9
->
m_DBQUERYEXT
;
}
}
}
return
true
;
}
...
...
@@ -105,18 +129,16 @@ int PIVOTVIEW::serialize(std::wostream & strm)
SxView
*
view
=
dynamic_cast
<
SxView
*>
(
core
->
m_SxView
.
get
());
if
(
!
view
)
return
0
;
PIVOTFRT
*
frt
=
dynamic_cast
<
PIVOTFRT
*>
(
m_PIVOTFRT
.
get
());
PIVOTEX
*
pivot_ex
=
dynamic_cast
<
PIVOTEX
*>
(
core
->
m_PIVOTEX
.
get
());
PIVOTADDL
*
addls
=
frt
?
dynamic_cast
<
PIVOTADDL
*>
(
frt
->
m_PIVOTADDL
.
get
())
:
NULL
;
PIVOTFRT9
*
frt9
=
frt
?
dynamic_cast
<
PIVOTFRT9
*>
(
frt
->
m_PIVOTFRT9
.
get
())
:
NULL
;
PIVOTFRT
*
frt
=
dynamic_cast
<
PIVOTFRT
*>
(
m_PIVOTFRT
.
get
());
PIVOTEX
*
pivot_ex
=
dynamic_cast
<
PIVOTEX
*>
(
core
->
m_PIVOTEX
.
get
());
SXEx
*
view_ex
=
pivot_ex
?
dynamic_cast
<
SXEx
*>
(
pivot_ex
->
m_SXEx
.
get
())
:
NULL
;
SXViewEx9
*
view_ex9
=
pivot_ex
?
dynamic_cast
<
SXViewEx9
*>
(
frt9
->
m_SXViewEx9
.
get
())
:
NULL
;
SXAddl_SXCView_SXDVer10Info
*
view_ex10
=
addls
?
dynamic_cast
<
SXAddl_SXCView_SXDVer10Info
*>
(
addls
->
m_SXAddl_SXCView_SXDVer10Info
.
get
())
:
NULL
;
SXAddl_SXCView_SXDVer12Info
*
view_ex12
=
addls
?
dynamic_cast
<
SXAddl_SXCView_SXDVer12Info
*>
(
addls
->
m_SXAddl_SXCView_SXDVer12Info
.
get
())
:
NULL
;
PIVOTADDL
*
addls
=
frt
?
dynamic_cast
<
PIVOTADDL
*>
(
frt
->
m_PIVOTADDL
.
get
())
:
NULL
;
PIVOTFRT9
*
frt9
=
frt
?
dynamic_cast
<
PIVOTFRT9
*>
(
frt
->
m_PIVOTFRT9
.
get
())
:
NULL
;
indexStream
=
global_info_
->
arPivotCacheStream
[
view
->
iCache
];
SXEx
*
view_ex
=
pivot_ex
?
dynamic_cast
<
SXEx
*>
(
pivot_ex
->
m_SXEx
.
get
())
:
NULL
;
SXViewEx9
*
view_ex9
=
pivot_ex
?
dynamic_cast
<
SXViewEx9
*>
(
frt9
->
m_SXViewEx9
.
get
())
:
NULL
;
SXAddl_SXCView_SXDVer10Info
*
view_ex10
=
addls
?
dynamic_cast
<
SXAddl_SXCView_SXDVer10Info
*>
(
addls
->
m_SXAddl_SXCView_SXDVer10Info
.
get
())
:
NULL
;
SXAddl_SXCView_SXDVer12Info
*
view_ex12
=
addls
?
dynamic_cast
<
SXAddl_SXCView_SXDVer12Info
*>
(
addls
->
m_SXAddl_SXCView_SXDVer12Info
.
get
())
:
NULL
;
std
::
map
<
int
,
int
>::
iterator
pFindIndex
=
global_info_
->
mapPivotCacheIndex
.
find
(
indexStream
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/QUERYTABLE.cpp
View file @
99191e65
...
...
@@ -79,6 +79,9 @@ const bool QUERYTABLE::loadContent(BinProcessor& proc)
if
(
proc
.
mandatory
<
DBQUERYEXT
>
())
{
m_DBQUERYEXT
=
elements_
.
back
();
elements_
.
pop_back
();
//Qsi* qsi = dynamic_cast<Qsi*>(m_Qsi.get());
//global_info->mapDBQueryExt.insert(std::make_pair(qsi->rgchName.value(), m_DBQUERYEXT));
}
if
(
proc
.
optional
<
SXADDLQSI
>
())
{
...
...
@@ -103,11 +106,10 @@ int QUERYTABLE::serialize(std::wostream & strm)
DBQUERY
*
query
=
dynamic_cast
<
DBQUERY
*>
(
m_DBQUERY
.
get
());
if
(
!
query
)
return
-
1
;
DBQUERYEXT
*
query_ext
=
dynamic_cast
<
DBQUERYEXT
*>
(
m_DBQUERYEXT
.
get
());
std
::
wstring
name
=
info
->
rgchName
.
value
();
int
connectionId
=
query
->
serialize_connection
(
name
,
query_ext
);
query
->
m_DBQUERYEXT
=
m_DBQUERYEXT
;
int
connectionId
=
query
->
serialize_connection
(
name
,
L""
);
if
(
connectionId
<
1
)
return
0
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.cpp
View file @
99191e65
...
...
@@ -86,12 +86,13 @@ const bool SXADDLCACHE::loadContent(BinProcessor& proc)
if
(
addl
->
bEndElement
)
{
elements_
.
pop_back
();
if
(
level
==
0
)
break
;
else
level
--
;
current
=
current
->
back
().
prev
;
elements_
.
pop_back
();
continue
;
}
if
(
level
==
0
)
...
...
@@ -101,15 +102,38 @@ const bool SXADDLCACHE::loadContent(BinProcessor& proc)
{
m_SXAddl_SXCCache_SXDId
=
addl
->
content
;
}
//SXAddl_SXCCache_SXDVer10Info
//[SXAddl_SXCCache_SXDVerSXMacro]
SXAddl_SXCCache_SXDVerUpdInv
*
p1
=
dynamic_cast
<
SXAddl_SXCCache_SXDVerUpdInv
*>
(
addl
->
content
.
get
());
if
(
p1
)
{
m_SXAddl_SXCCache_SXDVerUpdInv
=
addl
->
content
;
}
SXAddl_SXCCache_SXDVer10Info
*
p2
=
dynamic_cast
<
SXAddl_SXCCache_SXDVer10Info
*>
(
addl
->
content
.
get
());
if
(
p2
)
{
m_SXAddl_SXCCache_SXDVer10Info
=
addl
->
content
;
}
SXAddl_SXCCache_SXDVerSXMacro
*
p3
=
dynamic_cast
<
SXAddl_SXCCache_SXDVerSXMacro
*>
(
addl
->
content
.
get
());
if
(
p3
)
{
m_SXAddl_SXCCache_SXDVerSXMacro
=
addl
->
content
;
}
SXAddl_SXCCache_SXDInvRefreshReal
*
p4
=
dynamic_cast
<
SXAddl_SXCCache_SXDInvRefreshReal
*>
(
addl
->
content
.
get
());
if
(
p4
)
{
m_SXAddl_SXCCache_SXDVerSXMacro
=
addl
->
content
;
}
SXAddl_SXCCache_SXDInfo12
*
p5
=
dynamic_cast
<
SXAddl_SXCCache_SXDInfo12
*>
(
addl
->
content
.
get
());
if
(
p5
)
{
m_SXAddl_SXCCache_SXDInfo12
=
addl
->
content
;
}
}
current
->
back
().
elements
.
push_back
(
elements_
.
back
());
elements_
.
pop_back
();
}
current
=
NULL
;
return
result
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLCACHE.h
View file @
99191e65
...
...
@@ -59,6 +59,11 @@ public:
static
const
ElementType
type
=
typeSXADDLCACHE
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDId
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDVerUpdInv
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDVer10Info
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDVerSXMacro
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDInvRefreshReal
;
BiffStructurePtr
m_SXAddl_SXCCache_SXDInfo12
;
std
::
vector
<
_sxAddl
>
content
;
std
::
vector
<
_sxAddl
>
*
current
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXADDLQSI.cpp
View file @
99191e65
...
...
@@ -86,12 +86,13 @@ const bool SXADDLQSI::loadContent(BinProcessor& proc)
if
(
addl
->
bEndElement
)
{
elements_
.
pop_back
();
if
(
level
==
0
)
break
;
else
level
--
;
current
=
current
->
back
().
prev
;
elements_
.
pop_back
();
continue
;
}
if
(
level
==
0
)
...
...
@@ -107,6 +108,7 @@ const bool SXADDLQSI::loadContent(BinProcessor& proc)
elements_
.
pop_back
();
}
current
=
NULL
;
return
result
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalWorkbookInfo.h
View file @
99191e65
...
...
@@ -109,7 +109,9 @@ public:
short
idPivotCache
;
std
::
map
<
int
,
int
>
mapPivotCacheIndex
;
//streamIdCache, write index order
std
::
unordered_map
<
int
,
BaseObjectPtr
>
mapPivotCacheStream
;
//streamIdCache, object
std
::
vector
<
int
>
arPivotCacheStream
;
//order streamIdCache = iCache
std
::
vector
<
BaseObjectPtr
>
arPIVOTCACHEDEFINITION
;
std
::
vector
<
BaseObjectPtr
>
arDConn
;
std
::
vector
<
bool
>
arPivotCacheFields
;
std
::
vector
<
bool
>
arPivotCacheFieldShortSize
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.cpp
View file @
99191e65
...
...
@@ -179,11 +179,11 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
if
(
proc
.
optional
<
BOF
>
())
{
BOF
*
bof
=
dynamic_cast
<
BOF
*>
(
elements_
.
back
().
get
());
proc
.
getGlobalWorkbookInfo
()
->
Version
=
bof
->
vers
;
if
(
proc
.
getGlobalWorkbookInfo
()
->
Version
<
0x0600
)
global_info_
->
Version
=
bof
->
vers
;
if
(
global_info_
->
Version
<
0x0600
)
{
proc
.
getGlobalWorkbookInfo
()
->
CodePage
=
0
;
//???
global_info_
->
CodePage
=
0
;
//???
}
}
}
break
;
...
...
@@ -199,10 +199,10 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
{
if
(
proc
.
optional
<
FilePass
>
())
{
if
((
proc
.
getGlobalWorkbookInfo
()
->
decryptor
)
&&
(
proc
.
getGlobalWorkbookInfo
()
->
decryptor
->
IsVerify
()
==
false
))
if
((
global_info_
->
decryptor
)
&&
(
global_info_
->
decryptor
->
IsVerify
()
==
false
))
{
if
(
!
proc
.
getGlobalWorkbookInfo
()
->
decryptor
->
SetPassword
(
L"VelvetSweatshop"
))
if
(
!
global_info_
->
decryptor
->
SetPassword
(
L"VelvetSweatshop"
))
return
false
;
}
}
...
...
@@ -281,7 +281,7 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
if
((
CodePage_
)
&&
(
CodePage_
->
cv
!=
0
/* && CodePage_->cv != 1200*/
))
code_page_
=
CodePage_
->
cv
;
proc
.
getGlobalWorkbookInfo
()
->
CodePage
=
code_page_
;
global_info_
->
CodePage
=
code_page_
;
}
}
break
;
case
rt_Window1
:
...
...
@@ -314,7 +314,7 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
int
countryDef
=
Country_
->
iCountryDef
;
int
countryWinIni
=
Country_
->
iCountryWinIni
;
proc
.
getGlobalWorkbookInfo
()
->
CodePage
;
global_info_
->
CodePage
;
}
}
}
break
;
...
...
@@ -333,8 +333,8 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
if
(
fmts
)
{
proc
.
getGlobalWorkbookInfo
()
->
cellStyleDxfs_count
=
fmts
->
m_arDXF
.
size
();
proc
.
getGlobalWorkbookInfo
()
->
m_arFonts
=
&
fmts
->
m_arFonts
;
global_info_
->
cellStyleDxfs_count
=
fmts
->
m_arDXF
.
size
();
global_info_
->
m_arFonts
=
&
fmts
->
m_arFonts
;
}
}
//else
...
...
@@ -347,8 +347,8 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
// fmts->concatinate(fmts_add);
// elements_.pop_back();
//
proc.getGlobalWorkbookInfo()
->cellStyleDxfs_count = fmts->m_arDXF.size();
//
proc.getGlobalWorkbookInfo()
->m_arFonts = &fmts->m_arFonts;
//
global_info_
->cellStyleDxfs_count = fmts->m_arDXF.size();
//
global_info_
->m_arFonts = &fmts->m_arFonts;
// }
//}
}
...
...
@@ -358,7 +358,7 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
count
=
proc
.
repeated
<
PIVOTCACHEDEFINITION
>
(
0
,
0
);
while
(
count
>
0
)
{
m_arPIVOTCACHEDEFINITION
.
insert
(
m_
arPIVOTCACHEDEFINITION
.
begin
(),
elements_
.
back
());
global_info_
->
arPIVOTCACHEDEFINITION
.
insert
(
global_info_
->
arPIVOTCACHEDEFINITION
.
begin
(),
elements_
.
back
());
elements_
.
pop_back
();
count
--
;
}
...
...
@@ -441,7 +441,7 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
m_SHAREDSTRINGS
=
elements_
.
back
();
elements_
.
pop_back
();
proc
.
getGlobalWorkbookInfo
()
->
startAddedSharedStrings
=
shared_strings
.
size_
;
global_info_
->
startAddedSharedStrings
=
shared_strings
.
size_
;
}
}
break
;
case
rt_ExtSST
:
...
...
@@ -468,7 +468,16 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
FeatHdr
feat_hdr
(
true
);
proc
.
repeated
(
feat_hdr
,
0
,
0
);
}
break
;
case
rt_DConn
:
proc
.
repeated
<
DConn
>
(
0
,
0
);
break
;
case
rt_DConn
:
{
count
=
proc
.
repeated
<
DConn
>
(
0
,
0
);
while
(
count
>
0
)
{
global_info_
->
arDConn
.
insert
(
global_info_
->
arDConn
.
begin
(),
elements_
.
back
());
elements_
.
pop_back
();
count
--
;
}
}
break
;
case
rt_Theme
:
{
if
(
proc
.
optional
<
THEME
>
())
...
...
@@ -518,18 +527,18 @@ const bool GlobalsSubstream::loadContent(BinProcessor& proc)
}
}
if
(
proc
.
getGlobalWorkbookInfo
()
->
CodePage
==
0
)
if
(
global_info_
->
CodePage
==
0
)
{
//try from charsets ... todooo make local set on each record (aka Label)
//from ixfe -> ifnt from xf -> arFonts
for
(
std
::
map
<
int
,
int
>::
iterator
it
=
proc
.
getGlobalWorkbookInfo
()
->
fonts_charsets
.
begin
()
;
proc
.
getGlobalWorkbookInfo
()
->
CodePage
==
0
&&
it
!=
proc
.
getGlobalWorkbookInfo
()
->
fonts_charsets
.
end
()
for
(
std
::
map
<
int
,
int
>::
iterator
it
=
global_info_
->
fonts_charsets
.
begin
()
;
global_info_
->
CodePage
==
0
&&
it
!=
global_info_
->
fonts_charsets
.
end
()
;
it
++
)
{
for
(
int
i
=
0
;
i
<
sizeof
(
aCodePages
)
/
2
;
i
++
)
{
if
(
aCodePages
[
i
][
0
]
==
it
->
first
)
{
proc
.
getGlobalWorkbookInfo
()
->
CodePage
=
aCodePages
[
i
][
1
];
global_info_
->
CodePage
=
aCodePages
[
i
][
1
];
break
;
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/GlobalsSubstream.h
View file @
99191e65
...
...
@@ -78,7 +78,8 @@ public:
std
::
vector
<
BaseObjectPtr
>
m_arUserBView
;
std
::
vector
<
BaseObjectPtr
>
m_arBUNDLESHEET
;
std
::
vector
<
BaseObjectPtr
>
m_arSUPBOOK
;
std
::
vector
<
BaseObjectPtr
>
m_arPIVOTCACHEDEFINITION
;
//std::vector<BaseObjectPtr> m_arPIVOTCACHEDEFINITION; -> GlobalWorkbookInfo
//std::vector<BaseObjectPtr> m_arDConn;
std
::
vector
<
BiffStructurePtr
>
m_arHFPictureDrawing
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
View file @
99191e65
...
...
@@ -466,7 +466,7 @@ void WorksheetSubstream::LoadHFPicture()
{
if
(
m_arHFPicture
.
empty
())
return
;
in
t
current_size_hf
=
0
,
j
=
0
;
size_
t
current_size_hf
=
0
,
j
=
0
;
for
(
size_t
i
=
0
;
i
<
m_arHFPicture
.
size
();
i
++
)
{
HFPicture
*
hf
=
dynamic_cast
<
HFPicture
*>
(
m_arHFPicture
[
i
].
get
());
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
View file @
99191e65
...
...
@@ -404,7 +404,7 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
{
if
(
woorkbook
==
NULL
)
return
;
convert
(
(
XLS
::
GlobalsSubstream
*
)
woorkbook
->
m_GlobalsSubstream
.
get
(
));
convert
(
dynamic_cast
<
XLS
::
GlobalsSubstream
*>
(
woorkbook
->
m_GlobalsSubstream
.
get
()
));
int
count_sheets
=
0
,
count_chart_sheets
=
0
;
for
(
size_t
i
=
0
;
i
<
woorkbook
->
m_arWorksheetSubstream
.
size
();
i
++
)
...
...
@@ -434,7 +434,6 @@ void XlsConverter::convert(XLS::WorkbookStreamObject* woorkbook)
xlsx_context
->
end_table
();
}
for
(
std
::
list
<
XLS
::
BaseObjectPtr
>::
iterator
it
=
woorkbook
->
elements_
.
begin
();
it
!=
woorkbook
->
elements_
.
end
();
it
++
)
{
convert
(
it
->
get
());
...
...
@@ -570,50 +569,50 @@ void XlsConverter::convert (XLS::WorksheetSubstream* sheet)
}
}
void
XlsConverter
::
convert
(
XLS
::
GlobalsSubstream
*
global
)
void
XlsConverter
::
convert
(
XLS
::
GlobalsSubstream
*
global
s
)
{
if
(
global
==
NULL
)
return
;
if
(
global
s
==
NULL
)
return
;
convert
((
XLS
::
FORMATTING
*
)
global
->
m_Formating
.
get
());
convert
((
XLS
::
FORMATTING
*
)
global
s
->
m_Formating
.
get
());
convert
((
XLS
::
THEME
*
)
global
->
m_THEME
.
get
());
convert
((
XLS
::
THEME
*
)
global
s
->
m_THEME
.
get
());
convert
((
XLS
::
SHAREDSTRINGS
*
)
global
->
m_SHAREDSTRINGS
.
get
());
convert
((
XLS
::
SHAREDSTRINGS
*
)
global
s
->
m_SHAREDSTRINGS
.
get
());
for
(
size_t
i
=
0
;
i
<
global
->
m_arLBL
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arLBL
.
size
();
i
++
)
{
convert
((
XLS
::
LBL
*
)
global
->
m_arLBL
[
i
].
get
());
convert
((
XLS
::
LBL
*
)
global
s
->
m_arLBL
[
i
].
get
());
}
for
(
size_t
i
=
0
;
i
<
global
->
m_arMSODRAWINGGROUP
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arMSODRAWINGGROUP
.
size
();
i
++
)
{
convert
((
XLS
::
MSODRAWINGGROUP
*
)
global
->
m_arMSODRAWINGGROUP
[
i
].
get
());
convert
((
XLS
::
MSODRAWINGGROUP
*
)
global
s
->
m_arMSODRAWINGGROUP
[
i
].
get
());
}
for
(
size_t
i
=
0
;
i
<
global
->
m_arHFPictureDrawing
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arHFPictureDrawing
.
size
();
i
++
)
{
convert
((
ODRAW
::
OfficeArtDgContainer
*
)
global
->
m_arHFPictureDrawing
[
i
].
get
());
convert
((
ODRAW
::
OfficeArtDgContainer
*
)
global
s
->
m_arHFPictureDrawing
[
i
].
get
());
}
global
->
serialize_format
(
xlsx_context
->
workbook_format
());
global
s
->
serialize_format
(
xlsx_context
->
workbook_format
());
for
(
size_t
i
=
0
;
i
<
global
->
m_arWindow1
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arWindow1
.
size
();
i
++
)
{
global
->
m_arWindow1
[
i
]
->
serialize
(
xlsx_context
->
workbook_views
());
global
s
->
m_arWindow1
[
i
]
->
serialize
(
xlsx_context
->
workbook_views
());
}
for
(
size_t
i
=
0
;
i
<
global
->
m_arUserBView
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arUserBView
.
size
();
i
++
)
{
global
->
m_arUserBView
[
i
]
->
serialize
(
xlsx_context
->
custom_views
());
global
s
->
m_arUserBView
[
i
]
->
serialize
(
xlsx_context
->
custom_views
());
}
for
(
size_t
i
=
0
;
i
<
global
->
m_arSUPBOOK
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
global
s
->
m_arSUPBOOK
.
size
();
i
++
)
{
convert
((
XLS
::
SUPBOOK
*
)
global
->
m_arSUPBOOK
[
i
].
get
());
convert
((
XLS
::
SUPBOOK
*
)
global
s
->
m_arSUPBOOK
[
i
].
get
());
}
for
(
size_t
i
=
0
;
i
<
global
->
m_
arPIVOTCACHEDEFINITION
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
xls_global_info
->
arPIVOTCACHEDEFINITION
.
size
();
i
++
)
{
convert
((
XLS
::
PIVOTCACHEDEFINITION
*
)
global
->
m_
arPIVOTCACHEDEFINITION
[
i
].
get
());
convert
((
XLS
::
PIVOTCACHEDEFINITION
*
)
xls_global_info
->
arPIVOTCACHEDEFINITION
[
i
].
get
());
}
}
...
...
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