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
8608d0aa
Commit
8608d0aa
authored
Mar 29, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XlsFormat - исправление ошибок по результатам тестирования
parent
d0a0d896
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
216 additions
and
147 deletions
+216
-147
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
+45
-45
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.h
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.h
+9
-4
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
+47
-47
ASCOfficeOdfFileW/win32/OfficeOdfFileW.cpp
ASCOfficeOdfFileW/win32/OfficeOdfFileW.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
+12
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Obj.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/Obj.cpp
+0
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DXFPat.cpp
...lsFile2/source/XlsFormat/Logic/Biff_structures/DXFPat.cpp
+10
-7
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtClientAnchorSheet.cpp
...ogic/Biff_structures/ODRAW/OfficeArtClientAnchorSheet.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
...Format/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
+5
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFProp.cpp
...lsFile2/source/XlsFormat/Logic/Biff_structures/XFProp.cpp
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/AXES.cpp
...fficeXlsFile2/source/XlsFormat/Logic/Biff_unions/AXES.cpp
+3
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/AXISPARENT_bu.cpp
...ile2/source/XlsFormat/Logic/Biff_unions/AXISPARENT_bu.cpp
+3
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SERIESAXIS.cpp
...lsFile2/source/XlsFormat/Logic/Biff_unions/SERIESAXIS.cpp
+46
-15
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
...ceXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
+27
-10
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
...iceXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
+1
-0
ASCOfficeXlsFile2/win32/ASCOfficeXlsFile2.sln
ASCOfficeXlsFile2/win32/ASCOfficeXlsFile2.sln
+3
-1
No files found.
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
View file @
8608d0aa
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.h
View file @
8608d0aa
...
...
@@ -4,11 +4,11 @@
/* File created by MIDL compiler version 7.00.0555 */
/* at T
hu Feb 25 16:45:2
8 2016
/* at T
ue Mar 29 15:32:0
8 2016
*/
/* Compiler settings for .\ASCOfficeOdfFileW.idl:
Oicf, W1, Zp8, env=Win
32 (32b run), target_arch=X86
7.00.0555
protocol : dce , ms_ext, c_ext
Oicf, W1, Zp8, env=Win
64 (32b run), target_arch=AMD64
7.00.0555
protocol : dce , ms_ext, c_ext
, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
...
...
@@ -21,12 +21,17 @@
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 4
40
#define __REQUIRED_RPCNDR_H_VERSION__ 4
75
#endif
#include "rpc.h"
#include "rpcndr.h"
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __ASCOfficeOdfFileW_h__
#define __ASCOfficeOdfFileW_h__
...
...
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
View file @
8608d0aa
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFileW/win32/OfficeOdfFileW.cpp
View file @
8608d0aa
...
...
@@ -2,7 +2,7 @@
#include "stdafx.h"
#include "OfficeOdfFileW.h"
#include "../../
ASCOfficeUtils/ASCOfficeUtilsLib
/OfficeUtils.h"
#include "../../
OfficeUtils/src
/OfficeUtils.h"
#include <string>
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Lbl.cpp
View file @
8608d0aa
...
...
@@ -150,8 +150,18 @@ void Lbl::readFields(CFRecord& record)
record
.
skipNunBytes
(
4
);
Name_bin
.
setSize
(
cch
);
// this is to process built-in string values
record
>>
Name_bin
;
if
(
record
.
getGlobalWorkbookInfo
()
->
Version
<
0x600
)
{
LPAnsiStringNoCch
s
;
s
.
setSize
(
cch
);
record
>>
s
;
Name_bin
=
s
;
}
else
{
Name_bin
.
setSize
(
cch
);
// this is to process built-in string values
record
>>
Name_bin
;
}
rgce
.
load
(
record
,
cce
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Obj.cpp
View file @
8608d0aa
...
...
@@ -285,16 +285,6 @@ void Obj::readFields(CFRecord& record)
}
}
//else if ( OBJ_Chart == cmo.ot)
//{
// record.skipNunBytes(18);
// if (nNameLen > 0)
// {
// record >> old_version.name;
// }
// record.skipNunBytes(nMacrosSize);
//}
else
if
(
OBJ_Text
==
cmo
.
ot
)
{
TxO
*
txO
=
new
TxO
(
mso_drawing_
);
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/DXFPat.cpp
View file @
8608d0aa
...
...
@@ -67,13 +67,8 @@ int DXFPat::serialize(std::wostream & stream)
case
16
:
CP_XML_ATTR
(
L"patternType"
,
L"thinDiagCross"
);
break
;
//Thin diagonal crosshatch
case
17
:
CP_XML_ATTR
(
L"patternType"
,
L"gray125"
);
break
;
//12.5% gray
case
18
:
CP_XML_ATTR
(
L"patternType"
,
L"gray0625"
);
break
;
//6.25% gray
}
}
if
(
!
parent
->
icvBNinch
)
{
CP_XML_NODE
(
L"bgColor"
)
{
CP_XML_ATTR
(
L"indexed"
,
icvBackground
);
default:
CP_XML_ATTR
(
L"patternType"
,
L"solid"
);
}
}
if
(
!
parent
->
icvFNinch
)
...
...
@@ -83,7 +78,15 @@ int DXFPat::serialize(std::wostream & stream)
{
CP_XML_ATTR
(
L"indexed"
,
icvForeground
);
}
}
if
(
!
parent
->
icvBNinch
)
{
CP_XML_NODE
(
L"bgColor"
)
{
CP_XML_ATTR
(
L"indexed"
,
icvBackground
);
}
}
}
}
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtClientAnchorSheet.cpp
View file @
8608d0aa
...
...
@@ -88,10 +88,10 @@ void OfficeArtClientAnchorSheet::calculate()
if
(
sheet_info
.
customColumnsWidth
.
find
(
colR
)
!=
sheet_info
.
customColumnsWidth
.
end
())
{
column_width
=
sheet_info
.
customColumnsWidth
[
colR
];
column_width
=
sheet_info
.
customColumnsWidth
[
colR
]
/
1024.
;
}
else
column_width
=
sheet_info
.
defaultColumnWidth
;
column_width
=
sheet_info
.
defaultColumnWidth
/
1024.
;
width
=
(
double
)(((
256.
*
column_width
+
(
int
)(
128.
/
Digit_Width
))
/
256.
)
*
Digit_Width
)
*
72
/
96.
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/ODRAW/OfficeArtContainer.cpp
View file @
8608d0aa
...
...
@@ -131,6 +131,11 @@ void OfficeArtContainer::loadFields(XLS::CFRecord& record)
case
TertiaryFOPT
:
art_record
=
OfficeArtRecordPtr
(
new
OfficeArtTertiaryFOPT
);
break
;
default:
{
Log
::
warning
(
std
::
wstring
(
L"Unknown OfficeArt record of type 0x"
)
+
STR
::
int2hex_wstr
(
rh_child
.
recType
,
sizeof
(
rh_child
.
recType
)));
}
break
;
}
if
(
art_record
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFProp.cpp
View file @
8608d0aa
...
...
@@ -207,6 +207,8 @@ void XFProp::serialize_attr(CP_ATTR_NODE)
case
16
:
CP_XML_ATTR
(
L"patternType"
,
L"thinDiagCross"
);
break
;
//Thin diagonal crosshatch
case
17
:
CP_XML_ATTR
(
L"patternType"
,
L"gray125"
);
break
;
//12.5% gray
case
18
:
CP_XML_ATTR
(
L"patternType"
,
L"gray0625"
);
break
;
//6.25% gray
default:
CP_XML_ATTR
(
L"patternType"
,
L"solid"
);
}
}
if
(
xfPropType
==
3
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/AXES.cpp
View file @
8608d0aa
...
...
@@ -102,6 +102,7 @@ BaseObjectPtr AXES::clone()
// AXES = [IVAXIS DVAXIS [SERIESAXIS] / DVAXIS DVAXIS] *3ATTACHEDLABEL [PlotArea FRAME]
const
bool
AXES
::
loadContent
(
BinProcessor
&
proc
)
{
bool
res
=
false
;
if
(
proc
.
optional
<
Parenthesis_AXES_1
>
())
{
int
count
=
elements_
.
size
();
...
...
@@ -159,6 +160,7 @@ const bool AXES::loadContent(BinProcessor& proc)
elements_
.
pop_front
();
count
--
;
}
res
=
true
;
}
int
count
=
proc
.
repeated
<
ATTACHEDLABEL
>
(
0
,
3
);
...
...
@@ -180,7 +182,7 @@ const bool AXES::loadContent(BinProcessor& proc)
elements_
.
pop_back
();
}
return
true
;
return
res
;
}
int
AXES
::
serialize
(
std
::
wostream
&
_stream
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/AXISPARENT_bu.cpp
View file @
8608d0aa
...
...
@@ -46,13 +46,14 @@ const bool AXISPARENT::loadContent(BinProcessor& proc)
elements_
.
pop_back
();
}
if
(
proc
.
optional
<
AXES
>
())
int
count
=
proc
.
repeated
<
AXES
>
(
0
,
0
);
if
(
count
>
0
)
{
m_AXES
=
elements_
.
back
();
elements_
.
pop_back
();
}
int
count
=
proc
.
repeated
<
CRT
>
(
1
,
4
);
count
=
proc
.
repeated
<
CRT
>
(
1
,
4
);
while
(
count
>
0
&&
!
elements_
.
empty
())
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SERIESAXIS.cpp
View file @
8608d0aa
...
...
@@ -48,23 +48,54 @@ const bool SERIESAXIS::loadContent(BinProcessor& proc)
m_Axis
=
elements_
.
back
();
elements_
.
pop_back
();
proc
.
mandatory
<
Begin
>
();
elements_
.
pop_back
();
if
(
proc
.
optional
<
CatSerRange
>
())
while
(
true
)
{
m_CatSerRange
=
elements_
.
back
();
elements_
.
pop_back
();
}
if
(
proc
.
mandatory
<
AXS
>
())
{
m_AXS
=
elements_
.
back
();
elements_
.
pop_back
();
}
proc
.
optional
<
CRTMLFRT
>
();
proc
.
mandatory
<
End
>
();
elements_
.
pop_back
();
CFRecordType
::
TypeId
type
=
proc
.
getNextRecordType
();
if
(
type
==
rt_NONE
)
break
;
if
(
type
==
rt_End
)
{
if
(
proc
.
mandatory
<
End
>
())
elements_
.
pop_back
();
break
;
}
switch
(
type
)
{
case
rt_Begin
:
{
if
(
proc
.
optional
<
Begin
>
())
elements_
.
pop_back
();
}
break
;
case
rt_CatSerRange
:
{
if
(
proc
.
optional
<
CatSerRange
>
())
{
m_CatSerRange
=
elements_
.
back
();
elements_
.
pop_back
();
}
}
break
;
case
rt_IFmtRecord
:
case
rt_Tick
:
case
rt_FontX
:
case
rt_AxisLine
:
{
if
(
proc
.
mandatory
<
AXS
>
())
{
m_AXS
=
elements_
.
back
();
elements_
.
pop_back
();
}
}
break
;
case
rt_CrtMlFrt
:
{
proc
.
optional
<
CRTMLFRT
>
();
}
break
;
default:
{
proc
.
SkipRecord
();
}
break
;
}
}
return
true
;
}
int
SERIESAXIS
::
serialize
(
std
::
wostream
&
_stream
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/ChartSheetSubstream.cpp
View file @
8608d0aa
...
...
@@ -263,7 +263,8 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
{
if
(
charts
==
NULL
)
return
;
AXISPARENT
*
parent0
=
dynamic_cast
<
AXISPARENT
*>
(
charts
->
m_arAXISPARENT
[
0
].
get
());
int
ind_AXIS
=
0
;
AXISPARENT
*
parent0
=
dynamic_cast
<
AXISPARENT
*>
(
charts
->
m_arAXISPARENT
[
ind_AXIS
].
get
());
int
iCrt
=
-
1
;
...
...
@@ -291,8 +292,15 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
iCrt
=
serCrt
->
id
;
if
(
iCrt
>
parent0
->
m_arCRT
.
size
()
&&
iCrt
<
0
)
while
((
parent0
->
m_arCRT
.
size
()
<=
iCrt
)
&&
(
ind_AXIS
<
charts
->
m_arAXISPARENT
.
size
())
&&
(
charts
->
m_arAXISPARENT
.
size
()
>
1
))
{
parent0
=
dynamic_cast
<
AXISPARENT
*>
(
charts
->
m_arAXISPARENT
[
++
ind_AXIS
].
get
());
}
if
(
iCrt
>=
parent0
->
m_arCRT
.
size
()
||
iCrt
<
0
)
continue
;
CRT
*
crt
=
dynamic_cast
<
CRT
*>
(
parent0
->
m_arCRT
[
iCrt
].
get
());
std
::
map
<
int
,
std
::
vector
<
int
>>::
iterator
it
=
m_mapTypeChart
.
find
(
iCrt
);
...
...
@@ -409,8 +417,11 @@ int ChartSheetSubstream::serialize_3D (std::wostream & _stream)
}
AXES
*
axes
=
dynamic_cast
<
AXES
*>
(
parent
->
m_AXES
.
get
());
wallSpPr
=
axes
->
m_Wall_FRAME
;
floorSpPr
=
axes
->
m_Floor_FRAME
;
if
(
axes
)
{
wallSpPr
=
axes
->
m_Wall_FRAME
;
floorSpPr
=
axes
->
m_Floor_FRAME
;
}
}
}
if
(
!
chart3D
)
return
0
;
...
...
@@ -714,15 +725,17 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
}
AXES
*
axes
=
dynamic_cast
<
AXES
*>
(
parent
->
m_AXES
.
get
());
for
(
int
a
=
0
;
a
<
axes
->
m_arAxesId
.
size
();
a
++
)
if
(
axes
)
{
CP_XML_NODE
(
L"c:axId"
)
for
(
int
a
=
0
;
a
<
axes
->
m_arAxesId
.
size
();
a
++
)
{
CP_XML_ATTR
(
L"val"
,
axes
->
m_arAxesId
[
a
].
first
);
CP_XML_NODE
(
L"c:axId"
)
{
CP_XML_ATTR
(
L"val"
,
axes
->
m_arAxesId
[
a
].
first
);
}
}
}
//else error complex_29s.xls
}
}
...
...
@@ -733,7 +746,11 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
AXES
*
axes
=
dynamic_cast
<
AXES
*>
(
parent
->
m_AXES
.
get
());
bool
secondary
=
ax_parent
->
iax
;
axes
->
serialize
(
CP_XML_STREAM
(),
secondary
);
if
(
axes
)
{
axes
->
serialize
(
CP_XML_STREAM
(),
secondary
);
}
//else error complex_29s.xls
}
if
(
PlotAreaFRAME
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/WorksheetSubstream.cpp
View file @
8608d0aa
...
...
@@ -176,6 +176,7 @@ const bool WorksheetSubstream::loadContent(BinProcessor& proc)
case
rt_Protect
:
proc
.
optional
<
PROTECTION_COMMON
>
();
break
;
case
rt_ScenMan
:
proc
.
optional
<
SCENARIOS
>
();
break
;
case
rt_Sort
:
case
rt_AutoFilterInfo
:
{
if
(
proc
.
optional
<
SORTANDFILTER
>
())
// Let it be optional
{
...
...
ASCOfficeXlsFile2/win32/ASCOfficeXlsFile2.sln
View file @
8608d0aa
...
...
@@ -16,7 +16,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XlsXlsxConverter", "..\sour
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeXlsFileTest", "..\ASCOfficeXlsFileTest\ASCOfficeXlsFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
ProjectSection(ProjectDependencies) = postProject
{4260FEDF-E1DA-447F-991B-62F17DF5533E} = {4260FEDF-E1DA-447F-991B-62F17DF5533E}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{CBEDD0D1-10A8-45C1-AF81-8492F40964CA} = {CBEDD0D1-10A8-45C1-AF81-8492F40964CA}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
...
...
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