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
4f24ed37
Commit
4f24ed37
authored
Dec 26, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormatReader - dataValidations
parent
036c3b37
Changes
26
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
213 additions
and
56 deletions
+213
-56
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
+22
-15
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.h
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.cpp
+6
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.h
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DVal.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/DVal.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
+63
-9
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h
+11
-7
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.cpp
+6
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.h
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DVParsedFormula.cpp
...ource/XlsFormat/Logic/Biff_structures/DVParsedFormula.cpp
+1
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DVParsedFormula.h
.../source/XlsFormat/Logic/Biff_structures/DVParsedFormula.h
+0
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.cpp
...lsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.cpp
+15
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.h
...eXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.h
+1
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.cpp
...lsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.cpp
+5
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.h
...eXlsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.h
+1
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
...File2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMTS.cpp
...eXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMTS.cpp
+0
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
...lsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL.h
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL_bu.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL_bu.cpp
+35
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
...ceXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
+11
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
...iceXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
+8
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
...fficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
+1
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
+5
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
...fficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
+7
-1
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
+1
-0
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
View file @
4f24ed37
...
...
@@ -61,7 +61,7 @@ BaseObjectPtr CF::clone()
void
CF
::
readFields
(
CFRecord
&
record
)
{
GlobalWorkbookInfoPtr
global_info
=
record
.
getGlobalWorkbookInfo
();
global_info_
=
record
.
getGlobalWorkbookInfo
();
unsigned
short
cce1
;
unsigned
short
cce2
;
...
...
@@ -72,10 +72,11 @@ void CF::readFields(CFRecord& record)
rgce1
.
load
(
record
,
cce1
);
rgce2
.
load
(
record
,
cce2
);
ipriority_
=
++
record
.
getGlobalWorkbookInfo
()
->
cmt_rules
;
ipriority_
=
++
global_info_
->
cmt_rules
;
rgbdxf
.
serialize
(
record
.
getGlobalWorkbookInfo
()
->
users_Dxfs_stream
);
dxfId_
=
global_info
->
cellStyleDxfs_count
++
;
rgbdxf
.
serialize
(
global_info_
->
users_Dxfs_stream
);
dxfId_
=
global_info_
->
cellStyleDxfs_count
++
;
}
int
CF
::
serialize
(
std
::
wostream
&
stream
)
...
...
@@ -84,9 +85,6 @@ int CF::serialize(std::wostream & stream)
return
0
;
CFEx
*
cfEx
=
dynamic_cast
<
CFEx
*>
(
m_CFEx
.
get
());
if
(
cfEx
)
{
}
CP_XML_WRITER
(
stream
)
{
...
...
@@ -120,25 +118,34 @@ int CF::serialize(std::wostream & stream)
if
((
cfEx
)
&&
(
cfEx
->
content
.
fHasDXF
))
{
cfEx
->
content
.
dxf
.
serialize
(
CP_XML_STREAM
());
//cfEx->content.dxf.serialize(CP_XML_STREAM()); - вложенный формат низя?
if
(
cfEx
->
dxfId_
>=
0
)
dxfId_
=
cfEx
->
dxfId_
;
}
else
{
if
(
dxfId_
>=
0
)
CP_XML_ATTR
(
L"dxfId"
,
dxfId_
);
}
std
::
wstring
s1
=
rgce1
.
getAssembledFormula
();
std
::
wstring
s2
=
rgce2
.
getAssembledFormula
();
if
(
!
s1
.
empty
())
{
CP_XML_NODE
(
L"formula"
)
{
if
(
!
s1
.
empty
())
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s1
);
else
if
(
!
s2
.
empty
())
}
}
if
(
!
s2
.
empty
())
{
CP_XML_NODE
(
L"formula"
)
{
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s2
);
}
}
}
}
return
0
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.h
View file @
4f24ed37
...
...
@@ -69,6 +69,8 @@ public:
CFParsedFormulaNoCCE
rgce2
;
BaseObjectPtr
m_CFEx
;
GlobalWorkbookInfoPtr
global_info_
;
};
typedef
boost
::
shared_ptr
<
CF
>
CFPtr
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.cpp
View file @
4f24ed37
...
...
@@ -37,6 +37,7 @@ namespace XLS
CFEx
::
CFEx
()
{
dxfId_
=
-
1
;
}
...
...
@@ -57,6 +58,11 @@ void CFEx::readFields(CFRecord& record)
if
(
!
fIsCF12
)
{
record
>>
content
;
if
(
content
.
dxf
.
serialize
(
record
.
getGlobalWorkbookInfo
()
->
users_Dxfs_stream
)
>=
0
)
{
dxfId_
=
record
.
getGlobalWorkbookInfo
()
->
cellStyleDxfs_count
++
;
}
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CFEx.h
View file @
4f24ed37
...
...
@@ -50,16 +50,16 @@ public:
BaseObjectPtr
clone
();
void
readFields
(
CFRecord
&
record
);
static
const
ElementType
type
=
typeCFEx
;
//-----------------------------
FrtRefHeaderU
frtRefHeaderU
;
unsigned
int
fIsCF12
;
_UINT16
nID
;
CFExNonCF12
content
;
//-----------------------------
int
dxfId_
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/DVal.cpp
View file @
4f24ed37
...
...
@@ -53,7 +53,9 @@ BaseObjectPtr DVal::clone()
void
DVal
::
readFields
(
CFRecord
&
record
)
{
unsigned
short
flags
;
record
>>
flags
>>
xLeft
>>
yTop
>>
idObj
>>
idvMac
;
fWnClosed
=
GETBIT
(
flags
,
0
);
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.cpp
View file @
4f24ed37
...
...
@@ -32,8 +32,33 @@
#include "Dv.h"
#include <utils.h>
#include <boost/algorithm/string.hpp>
namespace
XLS
{
static
std
::
wstring
replace_zero
(
const
std
::
wstring
&
str
,
const
std
::
wstring
&
delimetr
)
{
if
(
str
.
empty
())
return
L""
;
std
::
wstring
out
;
int
pos
=
0
;
while
(
true
)
{
if
(
pos
>=
str
.
size
())
break
;
if
(
str
[
pos
]
==
'\0'
)
{
out
+=
delimetr
;
}
else
{
out
+=
str
[
pos
];
}
pos
++
;
}
return
out
;
}
BaseObjectPtr
Dv
::
clone
()
{
...
...
@@ -57,10 +82,39 @@ void Dv::readFields(CFRecord& record)
typOperator
=
static_cast
<
unsigned
char
>
(
GETBITS
(
flags
,
20
,
23
));
record
>>
PromptTitle
>>
ErrorTitle
>>
Prompt
>>
Error
;
formula1
.
load
(
record
);
formula2
.
load
(
record
);
record
>>
sqref
;
}
int
Dv
::
serialize
(
std
::
wostream
&
stream
)
{
CP_XML_WRITER
(
stream
)
{
CP_XML_NODE
(
L"dataValidation"
)
{
CP_XML_ATTR
(
L"sqref"
,
sqref
.
strValue
);
CP_XML_ATTR
(
L"type"
,
L"list"
);
std
::
wstring
sFormula1
=
replace_zero
(
formula1
.
getAssembledFormula
(),
L","
);
std
::
wstring
sFormula2
=
replace_zero
(
formula2
.
getAssembledFormula
(),
L","
);
if
(
!
sFormula1
.
empty
())
{
//boost::algorithm::replace_all(sFormula1 , "\0", L",");
CP_XML_NODE
(
L"formula1"
)
{
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
sFormula1
);}
}
if
(
!
sFormula2
.
empty
())
{
//boost::algorithm::replace_all(sFormula2 , "\0", L",");
CP_XML_NODE
(
L"formula2"
)
{
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
sFormula2
);}
}
}
}
return
0
;
}
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Dv.h
View file @
4f24ed37
...
...
@@ -48,14 +48,16 @@ class Dv: public BiffRecord
public:
BaseObjectPtr
clone
();
void
readFields
(
CFRecord
&
record
);
static
const
ElementType
type
=
typeDv
;
int
serialize
(
std
::
wostream
&
stream
);
//-----------------------------
unsigned
char
valType
;
unsigned
char
errStyle
;
bool
fStrLookup
;
bool
fAllowBlank
;
bool
fSuppressCombo
;
...
...
@@ -68,8 +70,10 @@ public:
XLUnicodeString
ErrorTitle
;
XLUnicodeString
Prompt
;
XLUnicodeString
Error
;
DVParsedFormula
formula1
;
DVParsedFormula
formula2
;
SqRefU
sqref
;
};
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.cpp
View file @
4f24ed37
...
...
@@ -41,6 +41,7 @@ namespace XLS
Pos
::
Pos
()
{
m_iLinkObject
=
-
1
;
m_iLayoutTarget
=
0
;
//not set, 1 - outer, 2 -inner
}
...
...
@@ -98,6 +99,10 @@ int Pos::serialize(std::wostream & _stream)
{
CP_XML_NODE
(
L"c:manualLayout"
)
{
if
(
m_iLayoutTarget
>
0
)
{
CP_XML_NODE
(
L"c:layoutTarget"
){
CP_XML_ATTR
(
L"val"
,
m_iLayoutTarget
==
1
?
L"outer"
:
L"inner"
);}
}
//if (m_iLinkObject == 1) x += 0.5 + (w > 0 ? w : 0);
//if (m_iLinkObject == 2) x += 0.5 + (w > 0 ? w : 0);
if
(
m_iLinkObject
==
3
)
y
+=
0
+
(
h
>
0
?
h
:
0
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Pos.h
View file @
4f24ed37
...
...
@@ -67,6 +67,7 @@ public:
//-----------------------------
int
m_iLayoutTarget
;
short
m_iLinkObject
;
BaseObjectPtr
m_Frame
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DVParsedFormula.cpp
View file @
4f24ed37
...
...
@@ -37,8 +37,7 @@ namespace XLS
{
DVParsedFormula
::
DVParsedFormula
()
:
ParsedFormula
(
CellRef
())
DVParsedFormula
::
DVParsedFormula
()
:
ParsedFormula
(
CellRef
())
{
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DVParsedFormula.h
View file @
4f24ed37
...
...
@@ -45,8 +45,6 @@ public:
DVParsedFormula
();
BiffStructurePtr
clone
();
virtual
void
load
(
CFRecord
&
record
);
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.cpp
View file @
4f24ed37
...
...
@@ -59,13 +59,26 @@ BiffStructurePtr PtgStr::clone()
void
PtgStr
::
loadFields
(
CFRecord
&
record
)
{
record
>>
string_
;
ShortXLUnicodeString
s
;
record
>>
s
;
string_
=
s
;
int
pos1
=
string_
.
find
(
L"
\"
"
);
int
pos2
=
string_
.
rfind
(
L"
\"
"
);
if
(
pos1
==
0
&&
pos2
>=
string_
.
length
()
-
1
)
{
string_
=
string_
.
substr
(
1
,
string_
.
length
()
-
2
);
}
string_
=
L"
\"
"
+
string_
+
L"
\"
"
;
}
void
PtgStr
::
assemble
(
AssemblerStack
&
ptg_stack
,
PtgQueue
&
extra_data
,
bool
full_ref
)
{
ptg_stack
.
push
(
L"
\"
"
+
boost
::
algorithm
::
replace_all_copy
(
std
::
wstring
(
string_
),
L"
\"
"
,
L"
\"\"
"
)
+
L"
\"
"
);
ptg_stack
.
push
(
string_
);
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/PtgStr.h
View file @
4f24ed37
...
...
@@ -47,7 +47,6 @@ public:
PtgStr
(
const
std
::
wstring
&
str
);
BiffStructurePtr
clone
();
virtual
void
loadFields
(
CFRecord
&
record
);
...
...
@@ -56,7 +55,7 @@ public:
static
const
unsigned
short
fixed_id
=
0x17
;
private:
ShortXLUnicodeS
tring
string_
;
std
::
ws
tring
string_
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.cpp
View file @
4f24ed37
...
...
@@ -48,21 +48,22 @@ void SqRefU::load(CFRecord& record)
{
unsigned
short
cref
;
record
>>
cref
;
std
::
wstring
sqref_str
;
for
(
size_t
i
=
0
;
i
<
cref
;
++
i
)
{
Ref8U
ref8
;
record
>>
ref8
;
s
qref_str
+=
std
::
wstring
(
ref8
.
toString
(
false
).
c_str
())
+
((
i
==
cref
-
1
)
?
L""
:
L" "
);
s
trValue
+=
std
::
wstring
(
ref8
.
toString
(
false
).
c_str
())
+
((
i
==
cref
-
1
)
?
L""
:
L" "
);
}
sqref
=
sqref_str
;
}
const
CellRef
SqRefU
::
getLocationFirstCell
()
const
{
std
::
vector
<
CellRangeRef
>
refs
;
AUX
::
str2refs
(
sqref
,
refs
);
AUX
::
str2refs
(
strValue
,
refs
);
if
(
!
refs
.
size
())
{
return
CellRef
();
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/SqRefU.h
View file @
4f24ed37
...
...
@@ -49,10 +49,9 @@ public:
virtual
void
load
(
CFRecord
&
record
);
const
CellRef
getLocationFirstCell
()
const
;
std
::
wstring
s
qref
;
std
::
wstring
s
trValue
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
View file @
4f24ed37
...
...
@@ -107,7 +107,7 @@ int CONDFMT12::serialize(std::wostream & stream)
{
CondFmt12
*
condFmt
=
dynamic_cast
<
CondFmt12
*>
(
m_CondFmt12
.
get
());
CP_XML_ATTR
(
L"sqref"
,
condFmt
->
mainCF
.
sqref
.
s
qref
);
CP_XML_ATTR
(
L"sqref"
,
condFmt
->
mainCF
.
sqref
.
s
trValue
);
//condition_id
//condition_pos
for
(
int
i
=
0
;
i
<
m_arCF12
.
size
();
i
++
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMTS.cpp
View file @
4f24ed37
...
...
@@ -162,7 +162,6 @@ const bool CONDFMTS::loadContent(BinProcessor& proc)
return
res
;
}
int
CONDFMTS
::
serialize
(
std
::
wostream
&
stream
)
{
if
(
m_arCONDFMT
.
empty
())
return
0
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
View file @
4f24ed37
...
...
@@ -109,7 +109,7 @@ int CONDFMT::serialize(std::wostream & stream)
{
CondFmt
*
condFmt
=
dynamic_cast
<
CondFmt
*>
(
m_CondFmt
.
get
());
CP_XML_ATTR
(
L"sqref"
,
condFmt
->
sqref
.
s
qref
);
CP_XML_ATTR
(
L"sqref"
,
condFmt
->
sqref
.
s
trValue
);
//condition_id
//condition_pos
for
(
int
i
=
0
;
i
<
m_arCF
.
size
();
i
++
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL.h
View file @
4f24ed37
...
...
@@ -50,6 +50,11 @@ public:
virtual
const
bool
loadContent
(
BinProcessor
&
proc
);
static
const
ElementType
type
=
typeDVAL
;
int
serialize
(
std
::
wostream
&
stream
);
BaseObjectPtr
m_DVal
;
std
::
vector
<
BaseObjectPtr
>
m_arDv
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DVAL_bu.cpp
View file @
4f24ed37
...
...
@@ -61,10 +61,44 @@ const bool DVAL::loadContent(BinProcessor& proc)
{
return
false
;
}
proc
.
repeated
<
Dv
>
(
0
,
65534
);
m_DVal
=
elements_
.
back
();
elements_
.
pop_back
();
int
count
=
proc
.
repeated
<
Dv
>
(
0
,
65534
);
while
(
count
>
0
)
{
m_arDv
.
insert
(
m_arDv
.
begin
(),
elements_
.
back
());
elements_
.
pop_back
();
count
--
;
}
return
true
;
}
int
DVAL
::
serialize
(
std
::
wostream
&
stream
)
{
if
(
!
m_DVal
)
return
0
;
if
(
m_arDv
.
empty
())
return
0
;
CP_XML_WRITER
(
stream
)
{
CP_XML_NODE
(
L"dataValidations"
)
{
CP_XML_ATTR
(
L"count"
,
m_arDv
.
size
());
DVal
*
dval
=
dynamic_cast
<
DVal
*>
(
m_DVal
.
get
());
for
(
int
i
=
0
;
i
<
m_arDv
.
size
();
i
++
)
{
if
(
!
m_arDv
[
i
])
continue
;
m_arDv
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
return
0
;
}
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
View file @
4f24ed37
...
...
@@ -716,7 +716,17 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
PlotAreaFRAME
=
dynamic_cast
<
FRAME
*>
(
axes
->
m_PlotArea_FRAME
.
get
());
PlotAreaPos
=
dynamic_cast
<
Pos
*>
(
parent0
->
m_Pos
.
get
());
if
(
PlotAreaFRAME
&&
PlotAreaPos
)
if
(
PlotAreaPos
&&
!
parent0
->
m_arCRT
.
empty
())
{
CRT
*
crt
=
dynamic_cast
<
CRT
*>
(
parent0
->
m_arCRT
[
0
].
get
());
if
((
crt
)
&&
(
crt
->
m_iChartType
==
CHART_TYPE_Radar
||
crt
->
m_iChartType
==
CHART_TYPE_RadarArea
))
//еще?
{
PlotAreaPos
->
m_iLayoutTarget
=
2
;
//inner
}
}
if
(
PlotAreaPos
&&
PlotAreaFRAME
)
{
PlotAreaPos
->
m_Frame
=
PlotAreaFRAME
->
m_Frame
;
}
...
...
@@ -750,7 +760,6 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
if
(
PlotAreaPos
&&
(
sht_props
)
&&
(
sht_props
->
fAlwaysAutoPlotArea
!=
false
))
{
PlotAreaPos
->
serialize
(
CP_XML_STREAM
());
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
View file @
4f24ed37
...
...
@@ -354,7 +354,14 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
count
--
;
}
}
break
;
case
rt_DVal
:
proc
.
optional
<
DVAL
>
();
break
;
case
rt_DVal
:
{
if
(
proc
.
optional
<
DVAL
>
())
{
m_DVAL
=
elements_
.
back
();
elements_
.
pop_back
();
}
}
break
;
case
rt_CodeName
:
{
if
(
proc
.
optional
<
CodeName
>
())
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.h
View file @
4f24ed37
...
...
@@ -70,6 +70,7 @@ public:
BaseObjectPtr
m_CodeName
;
BaseObjectPtr
m_SheetExt
;
BaseObjectPtr
m_DxGCol
;
BaseObjectPtr
m_DVAL
;
std
::
vector
<
BaseObjectPtr
>
m_arMergeCells
;
std
::
vector
<
BaseObjectPtr
>
m_arWINDOW
;
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
View file @
4f24ed37
...
...
@@ -428,6 +428,11 @@ void XlsConverter::convert(XLS::WorksheetSubstream* sheet)
sheet
->
m_CONDFMTS
->
serialize
(
xlsx_context
->
current_sheet
().
conditionalFormatting
());
}
if
(
sheet
->
m_DVAL
)
{
sheet
->
m_DVAL
->
serialize
(
xlsx_context
->
current_sheet
().
dataValidations
());
}
convert
((
XLS
::
OBJECTS
*
)
sheet
->
m_OBJECTS
.
get
(),
sheet
);
if
(
sheet
->
m_arNote
.
size
()
>
0
&&
xls_global_info
->
Version
<
0x0600
)
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
View file @
4f24ed37
...
...
@@ -64,6 +64,7 @@ public:
std
::
wstringstream
customViews_
;
std
::
wstringstream
conditionalFormatting_
;
std
::
wstringstream
picture_background_
;
std
::
wstringstream
dataValidations_
;
rels
rels_
;
...
...
@@ -164,7 +165,10 @@ std::wostream & xlsx_xml_worksheet::picture_background()
{
return
impl_
->
picture_background_
;
}
std
::
wostream
&
xlsx_xml_worksheet
::
dataValidations
()
{
return
impl_
->
dataValidations_
;
}
//-----------------------------------------------------------------
rels
&
xlsx_xml_worksheet
::
sheet_rels
()
{
...
...
@@ -204,6 +208,8 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
CP_XML_STREAM
()
<<
impl_
->
conditionalFormatting_
.
str
();
CP_XML_STREAM
()
<<
impl_
->
dataValidations_
.
str
();
CP_XML_STREAM
()
<<
impl_
->
hyperlinks_
.
str
();
CP_XML_STREAM
()
<<
impl_
->
pageProperties_
.
str
();
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
View file @
4f24ed37
...
...
@@ -69,6 +69,7 @@ public:
std
::
wostream
&
customViews
();
std
::
wostream
&
conditionalFormatting
();
std
::
wostream
&
picture_background
();
std
::
wostream
&
dataValidations
();
rels
&
sheet_rels
();
//hyperlink, background image, external, media ...
...
...
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