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
765677d9
Commit
765677d9
authored
Sep 07, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat - pivots errors value, ..
parent
6afc38c8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
6 deletions
+35
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.cpp
+14
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.h
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.h
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
+10
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
+2
-0
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.cpp
View file @
765677d9
...
...
@@ -39,6 +39,7 @@ namespace XLS
DConRef
::
DConRef
()
{
index_external
=
-
1
;
bFilePath
=
false
;
}
...
...
@@ -54,7 +55,7 @@ BaseObjectPtr DConRef::clone()
void
DConRef
::
readFields
(
CFRecord
&
record
)
{
GlobalWorkbookInfoPtr
global_info_
=
record
.
getGlobalWorkbookInfo
();
global_info_
=
record
.
getGlobalWorkbookInfo
();
record
>>
ref
>>
cchFile
;
...
...
@@ -77,6 +78,8 @@ void DConRef::readFields(CFRecord& record)
int
pos
=
sTmp
.
find
(
L"
\x0001
"
);
if
(
pos
>=
0
)
{
bFilePath
=
true
;
path
.
push_back
(
sTmp
.
substr
(
0
,
pos
));
sTmp
=
sTmp
.
substr
(
pos
+
1
);
continue
;
...
...
@@ -91,6 +94,8 @@ void DConRef::readFields(CFRecord& record)
pos
=
sTmp
.
find
(
L"
\x0003
"
);
if
(
pos
>=
0
)
{
bFilePath
=
true
;
path
.
push_back
(
sTmp
.
substr
(
0
,
pos
));
sTmp
=
sTmp
.
substr
(
pos
+
1
);
continue
;
...
...
@@ -111,8 +116,12 @@ void DConRef::readFields(CFRecord& record)
int
unused
=
record
.
getDataSize
()
-
record
.
getRdPtr
();
record
.
skipNunBytes
(
unused
);
}
void
DConRef
::
check_external
()
{
bool
bFound
=
false
;
for
(
size_t
i
=
0
;
i
<
global_info_
->
sheets_names
.
size
();
i
++
)
// todooo отдельно???
{
if
(
global_info_
->
sheets_names
[
i
]
==
sheet_name
)
...
...
@@ -121,7 +130,8 @@ void DConRef::readFields(CFRecord& record)
break
;
}
}
if
(
!
bFound
&&
(
!
path
.
empty
()
||
!
file_name
.
empty
()))
if
(
!
bFound
&&
(
!
path
.
empty
()
||
!
file_name
.
empty
())
&&
bFilePath
)
{
//external sheet
std
::
wstring
full_path
;
if
(
!
path
.
empty
())
...
...
@@ -149,6 +159,8 @@ void DConRef::readFields(CFRecord& record)
std
::
wstring
DConRef
::
get_external_path
()
{
if
(
path
.
empty
()
&&
file_name
.
empty
())
return
L""
;
std
::
wstring
result
=
L"file:///"
;
for
(
size_t
i
=
0
;
i
<
path
.
size
();
i
++
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DConRef.h
View file @
765677d9
...
...
@@ -62,8 +62,13 @@ public:
std
::
wstring
sheet_name
;
int
index_external
;
void
check_external
();
private:
GlobalWorkbookInfoPtr
global_info_
;
std
::
wstring
get_external_path
();
bool
bFilePath
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DREF.cpp
View file @
765677d9
...
...
@@ -116,6 +116,8 @@ int DREF::serialize(std::wostream & strm)
}
else
if
(
ref
)
{
ref
->
check_external
();
CP_XML_ATTR
(
L"type"
,
L"worksheet"
);
CP_XML_NODE
(
L"worksheetSource"
)
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
View file @
765677d9
...
...
@@ -258,8 +258,8 @@ int FDB::serialize(std::wostream & strm, bool bSql)
{
CP_XML_ATTR
(
L"containsMixedTypes"
,
1
);
if
(
bInteger
)
bNumber
=
true
;
if
(
bEmpty
&&
bNumber
)
bInteger
=
false
;
if
(
bInteger
)
bNumber
=
true
;
else
if
(
bEmpty
&&
bNumber
)
bInteger
=
false
;
}
else
if
(
!
bEmpty
&&
!
bString
&&
!
bBool
)
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
View file @
765677d9
...
...
@@ -97,10 +97,18 @@ const bool SXOPER::loadContent(BinProcessor& proc)
else
if
(
proc
.
optional
<
SxErr
>
())
{
SxErr
*
err
=
dynamic_cast
<
SxErr
*>
(
elements_
.
back
().
get
());
//bNumber = true;
bString
=
true
;
node
=
L"e"
;
value
=
L"#VALUE!"
;
//std::to_wstring(err->wbe);
switch
(
err
->
wbe
)
{
case
0x00
:
value
=
L"NULL!"
;
break
;
case
0x07
:
value
=
L"#DIV/0!"
;
break
;
case
0x0F
:
value
=
L"#VALUE!"
;
break
;
case
0x17
:
value
=
L"#REF!"
;
break
;
case
0x1D
:
value
=
L"#NAME?"
;
break
;
case
0x24
:
value
=
L"#NUM!"
;
break
;
case
0x2A
:
value
=
L"#N/A"
;
break
;
}
}
else
if
(
proc
.
optional
<
SXString
>
())
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXTBL_bu.cpp
View file @
765677d9
...
...
@@ -205,6 +205,8 @@ int SXTBL::serialize(std::wostream & strm)
}
if
(
ref
)
{
ref
->
check_external
();
CP_XML_ATTR
(
L"ref"
,
ref
->
ref
.
toString
());
CP_XML_ATTR
(
L"sheet"
,
ref
->
sheet_name
);
...
...
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