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
e1ca5a53
Commit
e1ca5a53
authored
Mar 31, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat - правка багов по результатам тестирования + условное форматирование (гистограмма)
parent
44e483a0
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
288 additions
and
65 deletions
+288
-65
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BoundSheet8.cpp
...File2/source/XlsFormat/Logic/Biff_records/BoundSheet8.cpp
+14
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BoundSheet8.h
...lsFile2/source/XlsFormat/Logic/Biff_records/BoundSheet8.h
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
+3
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF12.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF12.cpp
+49
-15
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXAddl.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/SXAddl.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVDEx.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/SXVDEx.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Sxvd.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/Sxvd.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFColor.cpp
...sFile2/source/XlsFormat/Logic/Biff_structures/CFColor.cpp
+1
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFColor.h
...XlsFile2/source/XlsFormat/Logic/Biff_structures/CFColor.h
+5
-5
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.cpp
...ile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.cpp
+39
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.h
...sFile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.h
+38
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFVO.h
...iceXlsFile2/source/XlsFormat/Logic/Biff_structures/CFVO.h
+3
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
...Format/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
+16
-15
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
...File2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
...lsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
+2
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
...ceXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
+101
-9
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
+8
-0
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BoundSheet8.cpp
View file @
e1ca5a53
...
@@ -42,6 +42,8 @@ void BoundSheet8::writeFields(CFRecord& record)
...
@@ -42,6 +42,8 @@ void BoundSheet8::writeFields(CFRecord& record)
{
{
throw
;
// EXCEPT::LE::AttributeDataWrong(L"hsState", record.getTypeString().c_str(), hsState);
throw
;
// EXCEPT::LE::AttributeDataWrong(L"hsState", record.getTypeString().c_str(), hsState);
}
}
ShortXLUnicodeString
stName
=
name_
;
SETBITS
(
flags
,
0
,
1
,
hsState_num
);
SETBITS
(
flags
,
0
,
1
,
hsState_num
);
SETBITS
(
flags
,
8
,
15
,
dt
);
SETBITS
(
flags
,
8
,
15
,
dt
);
record
<<
flags
<<
stName
;
record
<<
flags
<<
stName
;
...
@@ -55,13 +57,15 @@ void BoundSheet8::readFields(CFRecord& record)
...
@@ -55,13 +57,15 @@ void BoundSheet8::readFields(CFRecord& record)
if
(
record
.
getGlobalWorkbookInfo
()
->
Version
<
0x0600
)
if
(
record
.
getGlobalWorkbookInfo
()
->
Version
<
0x0600
)
{
{
ShortXLAnsiString
n
ame
;
ShortXLAnsiString
stN
ame
;
record
>>
n
ame
;
record
>>
stN
ame
;
stName
=
name
;
name_
=
stName
.
value
()
;
}
}
else
else
{
{
ShortXLUnicodeString
stName
;
record
>>
stName
;
record
>>
stName
;
name_
=
stName
.
value
();
}
}
switch
(
GETBITS
(
flags
,
0
,
1
))
switch
(
GETBITS
(
flags
,
0
,
1
))
...
@@ -76,7 +80,13 @@ void BoundSheet8::readFields(CFRecord& record)
...
@@ -76,7 +80,13 @@ void BoundSheet8::readFields(CFRecord& record)
hsState
=
std
::
wstring
(
L"hidden"
);
//(L"veryHidden");
hsState
=
std
::
wstring
(
L"hidden"
);
//(L"veryHidden");
break
;
break
;
}
}
record
.
getGlobalWorkbookInfo
()
->
sheets_names
.
push_back
(
stName
);
if
(
name_
.
length
()
>
31
)
{
name_
=
name_
.
substr
(
0
,
31
);
//cell_links_broken.xls
}
record
.
getGlobalWorkbookInfo
()
->
sheets_names
.
push_back
(
name_
);
record
.
getGlobalWorkbookInfo
()
->
sheets_state
.
push_back
(
hsState
);
record
.
getGlobalWorkbookInfo
()
->
sheets_state
.
push_back
(
hsState
);
dt
=
GETBITS
(
flags
,
8
,
15
);
dt
=
GETBITS
(
flags
,
8
,
15
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/BoundSheet8.h
View file @
e1ca5a53
...
@@ -23,11 +23,11 @@ public:
...
@@ -23,11 +23,11 @@ public:
static
const
ElementType
type
=
typeBoundSheet8
;
static
const
ElementType
type
=
typeBoundSheet8
;
//-----------------------------
ForwardOnlyParam
<
_UINT32
>
lbPlyPos
;
ForwardOnlyParam
<
_UINT32
>
lbPlyPos
;
std
::
wstring
hsState
;
std
::
wstring
hsState
;
unsigned
char
dt
;
unsigned
char
dt
;
ShortXLUnicodeString
stName
;
//-----------------------------
std
::
wstring
name_
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF.cpp
View file @
e1ca5a53
...
@@ -63,6 +63,9 @@ void CF::readFields(CFRecord& record)
...
@@ -63,6 +63,9 @@ void CF::readFields(CFRecord& record)
int
CF
::
serialize
(
std
::
wostream
&
stream
)
int
CF
::
serialize
(
std
::
wostream
&
stream
)
{
{
if
(
ct
!=
1
&&
ct
!=
2
&&
ct
!=
6
)
return
0
;
CP_XML_WRITER
(
stream
)
CP_XML_WRITER
(
stream
)
{
{
CP_XML_NODE
(
L"cfRule"
)
CP_XML_NODE
(
L"cfRule"
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/CF12.cpp
View file @
e1ca5a53
#include "CF12.h"
#include "CF12.h"
#include <Logic/Biff_structures/CFMultistate.h>
#include <Logic/Biff_structures/CFMultistate.h>
#include <Logic/Biff_structures/CFDatabar.h>
#include <utils.h>
#include <utils.h>
namespace
XLS
namespace
XLS
...
@@ -64,20 +65,14 @@ void CF12::readFields(CFRecord& record)
...
@@ -64,20 +65,14 @@ void CF12::readFields(CFRecord& record)
switch
(
ct
)
switch
(
ct
)
{
{
case
0x03
:
case
0x03
:
#pragma message("####################### CFGradient structure is not implemented")
Log
::
info
(
"CFGradient structure is not implemented."
);
//rgbCT = BiffStructurePtr(new CFGradient);
//rgbCT = BiffStructurePtr(new CFGradient);
//rgbCT->load(record);
//rgbCT->load(record);
break
;
break
;
case
0x04
:
case
0x04
:
#pragma message("####################### CFDatabar structure is not implemented")
rgbCT
=
BiffStructurePtr
(
new
CFDatabar
);
Log
::
info
(
"CFDatabar structure is not implemented."
);
rgbCT
->
load
(
record
);
//rgbCT = BiffStructurePtr(new CFDatabar);
//rgbCT->load(record);
break
;
break
;
case
0x05
:
case
0x05
:
#pragma message("####################### CFFilter structure is not implemented")
Log
::
info
(
"CFFilter structure is not implemented."
);
//rgbCT = BiffStructurePtr(new CFFilter);
//rgbCT = BiffStructurePtr(new CFFilter);
//rgbCT->load(record);
//rgbCT->load(record);
break
;
break
;
...
@@ -103,9 +98,10 @@ int CF12::serialize(std::wostream & stream)
...
@@ -103,9 +98,10 @@ int CF12::serialize(std::wostream & stream)
{
{
case
1
:
CP_XML_ATTR
(
L"type"
,
L"cellIs"
);
break
;
case
1
:
CP_XML_ATTR
(
L"type"
,
L"cellIs"
);
break
;
case
2
:
CP_XML_ATTR
(
L"type"
,
L"expression"
);
break
;
case
2
:
CP_XML_ATTR
(
L"type"
,
L"expression"
);
break
;
case
4
:
CP_XML_ATTR
(
L"type"
,
L"dataBar"
);
break
;
case
6
:
CP_XML_ATTR
(
L"type"
,
L"iconSet"
);
break
;
case
6
:
CP_XML_ATTR
(
L"type"
,
L"iconSet"
);
break
;
}
}
if
(
ct
==
(
unsigned
char
)
1
)
if
(
ct
==
1
)
{
{
switch
(
cp
)
switch
(
cp
)
{
{
...
@@ -122,16 +118,54 @@ int CF12::serialize(std::wostream & stream)
...
@@ -122,16 +118,54 @@ int CF12::serialize(std::wostream & stream)
CP_XML_ATTR
(
L"priority"
,
ipriority_
);
CP_XML_ATTR
(
L"priority"
,
ipriority_
);
CP_XML_ATTR
(
L"stopIfTrue"
,
fStopIfTrue
);
CP_XML_ATTR
(
L"stopIfTrue"
,
fStopIfTrue
);
CP_XML_ATTR
(
L"dxfId"
,
dxfId_
);
CP_XML_ATTR
(
L"dxfId"
,
dxfId_
);
if
(
ct
==
4
)
{
CFDatabar
*
dataBar
=
dynamic_cast
<
CFDatabar
*>
(
rgbCT
.
get
());
CP_XML_NODE
(
L"dataBar"
)
{
CP_XML_NODE
(
L"cfvo"
)
{
if
(
dataBar
->
iPercentMin
>
0
)
CP_XML_ATTR
(
L"percent"
,
dataBar
->
iPercentMin
);
else
CP_XML_ATTR
(
L"type"
,
L"min"
);
}
CP_XML_NODE
(
L"cfvo"
)
{
if
(
dataBar
->
iPercentMax
<
100
)
CP_XML_ATTR
(
L"percent"
,
dataBar
->
iPercentMax
);
else
CP_XML_ATTR
(
L"type"
,
L"max"
);
}
CP_XML_NODE
(
L"color"
)
{
switch
(
dataBar
->
color
.
xclrType
.
type
)
{
case
1
:
CP_XML_ATTR
(
L"indexed"
,
dataBar
->
color
.
icv
);
break
;
case
2
:
CP_XML_ATTR
(
L"rgb"
,
dataBar
->
color
.
rgb
.
strARGB
);
break
;
case
3
:
CP_XML_ATTR
(
L"theme"
,
dataBar
->
color
.
theme
);
CP_XML_ATTR
(
L"tint"
,
dataBar
->
color
.
numTint
);
break
;
default:
CP_XML_ATTR
(
L"auto"
,
true
);
}
}
}
}
std
::
wstring
s1
=
rgce1
.
getAssembledFormula
();
std
::
wstring
s1
=
rgce1
.
getAssembledFormula
();
std
::
wstring
s2
=
rgce1
.
getAssembledFormula
();
std
::
wstring
s2
=
rgce1
.
getAssembledFormula
();
CP_XML_NODE
(
L"formula"
)
if
(
!
s1
.
empty
()
||
!
s2
.
empty
())
{
{
if
(
!
s1
.
empty
())
CP_XML_NODE
(
L"formula"
)
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s1
);
{
else
if
(
!
s2
.
empty
())
if
(
!
s1
.
empty
())
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s2
);
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s1
);
else
if
(
!
s2
.
empty
())
CP_XML_STREAM
()
<<
xml
::
utils
::
replace_text_to_xml
(
s2
);
}
}
}
}
}
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXAddl.cpp
View file @
e1ca5a53
...
@@ -23,7 +23,7 @@ BaseObjectPtr SXAddl::clone()
...
@@ -23,7 +23,7 @@ BaseObjectPtr SXAddl::clone()
void
SXAddl
::
writeFields
(
CFRecord
&
record
)
void
SXAddl
::
writeFields
(
CFRecord
&
record
)
{
{
#pragma message("####################### SXAddl record is not implemented")
#pragma message("####################### SXAddl record is not implemented")
Log
::
error
(
"SXAddl record is not implemented."
);
//
Log::error("SXAddl record is not implemented.");
//record << some_value;
//record << some_value;
}
}
...
@@ -31,7 +31,7 @@ void SXAddl::writeFields(CFRecord& record)
...
@@ -31,7 +31,7 @@ void SXAddl::writeFields(CFRecord& record)
void
SXAddl
::
readFields
(
CFRecord
&
record
)
void
SXAddl
::
readFields
(
CFRecord
&
record
)
{
{
#pragma message("####################### SXAddl record is not implemented")
#pragma message("####################### SXAddl record is not implemented")
Log
::
error
(
"SXAddl record is not implemented."
);
//
Log::error("SXAddl record is not implemented.");
//record >> some_value;
//record >> some_value;
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVDEx.cpp
View file @
e1ca5a53
...
@@ -31,7 +31,7 @@ void SXVDEx::writeFields(CFRecord& record)
...
@@ -31,7 +31,7 @@ void SXVDEx::writeFields(CFRecord& record)
void
SXVDEx
::
readFields
(
CFRecord
&
record
)
void
SXVDEx
::
readFields
(
CFRecord
&
record
)
{
{
#pragma message("####################### SXVDEx record is not implemented")
#pragma message("####################### SXVDEx record is not implemented")
Log
::
error
(
"SXVDEx record is not implemented."
);
//
Log::error("SXVDEx record is not implemented.");
//record >> some_value;
//record >> some_value;
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXVI.cpp
View file @
e1ca5a53
...
@@ -31,7 +31,7 @@ void SXVI::writeFields(CFRecord& record)
...
@@ -31,7 +31,7 @@ void SXVI::writeFields(CFRecord& record)
void
SXVI
::
readFields
(
CFRecord
&
record
)
void
SXVI
::
readFields
(
CFRecord
&
record
)
{
{
#pragma message("####################### SXVI record is not implemented")
#pragma message("####################### SXVI record is not implemented")
Log
::
error
(
"SXVI record is not implemented."
);
//
Log::error("SXVI record is not implemented.");
//record >> some_value;
//record >> some_value;
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Sxvd.cpp
View file @
e1ca5a53
...
@@ -31,7 +31,7 @@ void Sxvd::writeFields(CFRecord& record)
...
@@ -31,7 +31,7 @@ void Sxvd::writeFields(CFRecord& record)
void
Sxvd
::
readFields
(
CFRecord
&
record
)
void
Sxvd
::
readFields
(
CFRecord
&
record
)
{
{
#pragma message("####################### Sxvd record is not implemented")
#pragma message("####################### Sxvd record is not implemented")
Log
::
error
(
"Sxvd record is not implemented."
);
//
Log::error("Sxvd record is not implemented.");
//record >> some_value;
//record >> some_value;
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
record
.
skipNunBytes
(
record
.
getDataSize
()
-
record
.
getRdPtr
());
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFColor.cpp
View file @
e1ca5a53
...
@@ -25,15 +25,13 @@ BiffStructurePtr CFColor::clone()
...
@@ -25,15 +25,13 @@ BiffStructurePtr CFColor::clone()
void
CFColor
::
store
(
CFRecord
&
record
)
void
CFColor
::
store
(
CFRecord
&
record
)
{
{
#pragma message("####################### CFColor record has no BiffStructure::store() implemented")
Log
::
error
(
" Error!!! CFColor record has no BiffStructure::store() implemented."
);
//record << something;
}
}
void
CFColor
::
load
(
CFRecord
&
record
)
void
CFColor
::
load
(
CFRecord
&
record
)
{
{
record
>>
xclrType
;
record
>>
xclrType
;
switch
(
xclrType
.
type
)
switch
(
xclrType
.
type
)
{
{
case
XColorType
:
:
XCLRINDEXED
:
case
XColorType
:
:
XCLRINDEXED
:
...
@@ -50,7 +48,6 @@ void CFColor::load(CFRecord& record)
...
@@ -50,7 +48,6 @@ void CFColor::load(CFRecord& record)
record
.
skipNunBytes
(
4
);
// ignored
record
.
skipNunBytes
(
4
);
// ignored
break
;
break
;
default:
default:
throw
;
// EXCEPT::RT::WrongBiffRecord("Unsupported type of XColorType.", record.getTypeString());
break
;
break
;
}
}
record
>>
numTint
;
record
>>
numTint
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFColor.h
View file @
e1ca5a53
...
@@ -22,11 +22,11 @@ public:
...
@@ -22,11 +22,11 @@ public:
virtual
void
load
(
CFRecord
&
record
);
virtual
void
load
(
CFRecord
&
record
);
virtual
void
store
(
CFRecord
&
record
);
virtual
void
store
(
CFRecord
&
record
);
XColorType
xclrType
;
XColorType
xclrType
;
ColorICV
icv
;
ColorICV
icv
;
LongRGBA
rgb
;
LongRGBA
rgb
;
ColorTheme
theme
;
ColorTheme
theme
;
double
numTint
;
double
numTint
;
};
};
}
// namespace XLS
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.cpp
0 → 100644
View file @
e1ca5a53
#include "CFDatabar.h"
#include <Binary/CFRecord.h>
namespace
XLS
{
BiffStructurePtr
CFDatabar
::
clone
()
{
return
BiffStructurePtr
(
new
CFDatabar
(
*
this
));
}
void
CFDatabar
::
store
(
CFRecord
&
record
)
{
}
void
CFDatabar
::
load
(
CFRecord
&
record
)
{
record
.
skipNunBytes
(
3
);
// unused
unsigned
char
flags
;
record
>>
flags
;
fRightToLeft
=
GETBIT
(
flags
,
0
);
fShowValue
=
GETBIT
(
flags
,
1
);
record
>>
iPercentMin
>>
iPercentMax
;
record
>>
color
;
cfvoDB1
.
load
(
record
);
cfvoDB2
.
load
(
record
);
}
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFDatabar.h
0 → 100644
View file @
e1ca5a53
#pragma once
#include "BiffStructure.h"
#include "CFVO.h"
#include "CFColor.h"
namespace
XLS
{
class
CFRecord
;
class
CFDatabar
:
public
BiffStructure
{
BASE_STRUCTURE_DEFINE_CLASS_NAME
(
CFDatabar
)
public:
BiffStructurePtr
clone
();
static
const
ElementType
type
=
typeCFMultistate
;
//todoooo
virtual
void
load
(
CFRecord
&
record
);
virtual
void
store
(
CFRecord
&
record
);
unsigned
char
iPercentMin
;
unsigned
char
iPercentMax
;
bool
fShowValue
;
bool
fRightToLeft
;
CFColor
color
;
CFVO
cfvoDB1
;
CFVO
cfvoDB2
;
};
typedef
boost
::
shared_ptr
<
CFDatabar
>
CFDatabarPtr
;
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/CFVO.h
View file @
e1ca5a53
...
@@ -19,10 +19,9 @@ public:
...
@@ -19,10 +19,9 @@ public:
virtual
void
load
(
CFRecord
&
record
);
virtual
void
load
(
CFRecord
&
record
);
virtual
void
store
(
CFRecord
&
record
);
virtual
void
store
(
CFRecord
&
record
);
private:
unsigned
char
cfvoType
;
unsigned
char
cfvoType
;
CFVOParsedFormula
fmla
;
CFVOParsedFormula
fmla
;
double
numValue
;
double
numValue
;
};
};
typedef
boost
::
shared_ptr
<
CFVO
>
CFVOPtr
;
typedef
boost
::
shared_ptr
<
CFVO
>
CFVOPtr
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
View file @
e1ca5a53
...
@@ -120,10 +120,7 @@ OfficeArtRecordPtr OfficeArtContainer::CreateOfficeArt(unsigned short type)
...
@@ -120,10 +120,7 @@ OfficeArtRecordPtr OfficeArtContainer::CreateOfficeArt(unsigned short type)
art_record
=
OfficeArtRecordPtr
(
new
OfficeArtTertiaryFOPT
);
art_record
=
OfficeArtRecordPtr
(
new
OfficeArtTertiaryFOPT
);
break
;
break
;
default:
default:
{
break
;
Log
::
warning
(
std
::
wstring
(
L"Unknown OfficeArt record of type 0x"
)
+
STR
::
int2hex_wstr
(
type
,
sizeof
(
type
)));
}
break
;
}
}
return
art_record
;
return
art_record
;
}
}
...
@@ -151,28 +148,32 @@ void OfficeArtContainer::loadFields(XLS::CFRecord& record)
...
@@ -151,28 +148,32 @@ void OfficeArtContainer::loadFields(XLS::CFRecord& record)
if
(
record
.
getRdPtr
()
!=
child_beginning_ptr
+
rh_child
.
recLen
)
if
(
record
.
getRdPtr
()
!=
child_beginning_ptr
+
rh_child
.
recLen
)
{
{
size_t
record_pos
=
record
.
getRdPtr
();
OfficeArtRecordHeader
rh_test
;
record
>>
rh_test
;
record
.
RollRdPtrBack
(
8
);
//sizeof(OfficeArtRecordHeader)
OfficeArtRecordPtr
test_officeArt
=
CreateOfficeArt
(
rh_test
.
recType
);
if
(
record
.
getRdPtr
()
<
child_beginning_ptr
+
rh_child
.
recLen
)
if
(
record
.
getRdPtr
()
<
child_beginning_ptr
+
rh_child
.
recLen
)
{
{
Log
::
warning
(
STR
::
int2wstr
(
child_beginning_ptr
+
rh_child
.
recLen
-
record
.
getRdPtr
(),
10
)
+
if
(
record_pos
+
8
<
child_beginning_ptr
+
rh_child
.
recLen
)
L" unsigned chars were not processed while reading from OfficeArt record of type 0x"
+
{
STR
::
int2hex_wstr
(
rh_child
.
recType
,
sizeof
(
rh_child
.
recType
)));
Log
::
warning
(
STR
::
int2wstr
(
child_beginning_ptr
+
rh_child
.
recLen
-
record_pos
,
10
)
+
record
.
skipNunBytes
(
child_beginning_ptr
+
rh_child
.
recLen
-
record
.
getRdPtr
());
L" unsigned chars were not processed while reading from OfficeArt record of type 0x"
+
STR
::
int2hex_wstr
(
rh_child
.
recType
,
sizeof
(
rh_child
.
recType
)));
}
if
(
child_beginning_ptr
+
rh_child
.
recLen
-
record_pos
==
8
&&
test_officeArt
)
record
.
skipNunBytes
(
8
);
}
}
else
if
(
record
.
getRdPtr
()
>
child_beginning_ptr
+
rh_child
.
recLen
)
else
if
(
record
.
getRdPtr
()
>
child_beginning_ptr
+
rh_child
.
recLen
)
{
{
//throw EXCEPT::RT::WrongBiffRecord("Wrong data parsed in OfficeArt record of type 0x" +
//STR::int2hex_wstr(rh_child.recType, sizeof(rh_child.recType)), record.getTypeString());
Log
::
warning
(
std
::
wstring
(
L"Wrong data parsed in OfficeArt record of type 0x"
)
+
Log
::
warning
(
std
::
wstring
(
L"Wrong data parsed in OfficeArt record of type 0x"
)
+
STR
::
int2hex_wstr
(
rh_child
.
recType
,
sizeof
(
rh_child
.
recType
)));
STR
::
int2hex_wstr
(
rh_child
.
recType
,
sizeof
(
rh_child
.
recType
)));
//Calculadora.xls
//Calculadora.xls
//test next record !!!
//test next record !!!
size_t
record_pos
=
record
.
getRdPtr
();
OfficeArtRecordHeader
rh_test
;
record
>>
rh_test
;
record
.
RollRdPtrBack
(
8
);
//sizeof(OfficeArtRecordHeader)
OfficeArtRecordPtr
test_officeArt
=
CreateOfficeArt
(
rh_test
.
recType
);
if
(
!
test_officeArt
)
if
(
!
test_officeArt
)
{
{
record
.
RollRdPtrBack
(
record_pos
-
(
child_beginning_ptr
+
rh_child
.
recLen
));
record
.
RollRdPtrBack
(
record_pos
-
(
child_beginning_ptr
+
rh_child
.
recLen
));
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT12_bu.cpp
View file @
e1ca5a53
...
@@ -67,7 +67,8 @@ const bool CONDFMT12::loadContent(BinProcessor& proc)
...
@@ -67,7 +67,8 @@ const bool CONDFMT12::loadContent(BinProcessor& proc)
}
}
int
CONDFMT12
::
serialize
(
std
::
wostream
&
stream
)
int
CONDFMT12
::
serialize
(
std
::
wostream
&
stream
)
{
{
if
(
!
m_CondFmt12
)
return
0
;
if
(
!
m_CondFmt12
)
return
0
;
if
(
m_arCF12
.
size
()
<
1
)
return
0
;
CP_XML_WRITER
(
stream
)
CP_XML_WRITER
(
stream
)
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/CONDFMT_bu.cpp
View file @
e1ca5a53
...
@@ -69,7 +69,8 @@ const bool CONDFMT::loadContent(BinProcessor& proc)
...
@@ -69,7 +69,8 @@ const bool CONDFMT::loadContent(BinProcessor& proc)
}
}
int
CONDFMT
::
serialize
(
std
::
wostream
&
stream
)
int
CONDFMT
::
serialize
(
std
::
wostream
&
stream
)
{
{
if
(
!
m_CondFmt
)
return
0
;
if
(
!
m_CondFmt
)
return
0
;
if
(
m_arCF
.
size
()
<
1
)
return
0
;
CP_XML_WRITER
(
stream
)
CP_XML_WRITER
(
stream
)
{
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
View file @
e1ca5a53
...
@@ -93,6 +93,104 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin
...
@@ -93,6 +93,104 @@ CHARTSHEETCONTENT = [WriteProtect] [SheetExt] [WebPub] *HFPicture PAGESETUP Prin
*/
*/
const
bool
ChartSheetSubstream
::
loadContent
(
BinProcessor
&
proc
)
const
bool
ChartSheetSubstream
::
loadContent
(
BinProcessor
&
proc
)
{
{
// pGlobalWorkbookInfo = proc.getGlobalWorkbookInfo();
//
// if(!proc.mandatory<BOF>())
// {
// return false;
// }
// int count = 0 ;
//
// proc.optional<WriteProtect>();
// proc.optional<SheetExt>();
// proc.optional<WebPub>();
// proc.repeated<HFPicture>(0, 0);
// proc.mandatory<PAGESETUP>();
// proc.mandatory<PrintSize>();
// proc.optional<HeaderFooter>();
//
// if (proc.optional<BACKGROUND>())
// {
// m_BACKGROUND = elements_.back();
// elements_.pop_back();
// }
//
// count = proc.repeated<Fbi>(0, 0);
// while(count > 0)
// {
// m_arFbi.insert(m_arFbi.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
// count = proc.repeated<Fbi2>(0, 0);
//
// while(count > 0 && m_arFbi.empty())//???
// {
// m_arFbi.insert(m_arFbi.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// proc.optional<ClrtClient>();
// proc.optional<PROTECTION_COMMON>();
// proc.optional<Palette>();
// proc.optional<SXViewLink>();
// proc.optional<PivotChartBits>();
// proc.optional<SBaseRef>();
//
// MsoDrawingGroup mso_drawing_group(true);
// proc.optional(mso_drawing_group);
//
// OBJECTS objects(true);
// if (proc.mandatory(objects))
// {
// m_OBJECTSCHART = elements_.back();
// elements_.pop_back();
// }
//
// proc.mandatory<Units>();
// if ( proc.mandatory<CHARTFORMATS>() )
// {
// m_CHARTFORMATS = elements_.back();
// elements_.pop_back();
//
// recalc((CHARTFORMATS*)m_CHARTFORMATS.get());
// }
// if ( proc.mandatory<SERIESDATA>() )
// {
// m_SERIESDATA = elements_.back();
// elements_.pop_back();
//
// recalc((SERIESDATA*)m_SERIESDATA.get());
// }
//
// count = proc.repeated<WINDOW>(0, 0);
// while(count > 0)
// {
// m_arWINDOW.insert(m_arWINDOW.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// count = proc.repeated<CUSTOMVIEW>(0, 0);
// while(count > 0)
// {
// m_arCUSTOMVIEW.insert(m_arCUSTOMVIEW.begin(), elements_.back());
// elements_.pop_back();
// count--;
// }
//
// proc.optional<CodeName>();
// proc.optional<CRTMLFRT>();
//
//#pragma message("####################### Some trash records may be skipped here")
// proc.SeekToEOF(); // Thus we skip problems with the trash at the end of the stream (found in Domens.xls)
//
// proc.mandatory<EOF_T>();
//
// return true;
//------------------------------------------------------------------------------
pGlobalWorkbookInfo
=
proc
.
getGlobalWorkbookInfo
();
pGlobalWorkbookInfo
=
proc
.
getGlobalWorkbookInfo
();
int
count
=
0
;
int
count
=
0
;
...
@@ -106,7 +204,9 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
...
@@ -106,7 +204,9 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
{
{
CFRecordType
::
TypeId
type
=
proc
.
getNextRecordType
();
CFRecordType
::
TypeId
type
=
proc
.
getNextRecordType
();
if
(
type
==
rt_NONE
)
break
;
//Log::warning(CFRecordType::getStringById(type));
if
(
type
==
rt_NONE
||
type
==
rt_BOF
)
break
;
if
(
type
==
rt_EOF
)
if
(
type
==
rt_EOF
)
{
{
proc
.
mandatory
<
EOF_T
>
();
proc
.
mandatory
<
EOF_T
>
();
...
@@ -248,14 +348,6 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
...
@@ -248,14 +348,6 @@ const bool ChartSheetSubstream::loadContent(BinProcessor& proc)
}
}
}
}
#pragma message("####################### Some trash records may be skipped here")
proc
.
SeekToEOF
();
// Thus we skip problems with the trash at the end of the stream (found in Domens.xls)
proc
.
mandatory
<
EOF_T
>
();
return
true
;
return
true
;
}
}
...
...
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
View file @
e1ca5a53
...
@@ -3145,6 +3145,14 @@
...
@@ -3145,6 +3145,14 @@
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFColor.h"
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFColor.h"
>
>
</File>
</File>
<File
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFDatabar.cpp"
>
</File>
<File
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFDatabar.h"
>
</File>
<File
<File
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFExNonCF12.cpp"
RelativePath=
"..\XlsFormat\Logic\Biff_structures\CFExNonCF12.cpp"
>
>
...
...
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