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
c08c960c
Commit
c08c960c
authored
Jun 30, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
02ece25a
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
320 additions
and
27 deletions
+320
-27
ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp
...eXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/AreaFormat.h
...XlsFile2/source/XlsFormat/Logic/Biff_records/AreaFormat.h
+1
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.cpp
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.cpp
+20
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.h
+16
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.cpp
+1
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.h
...ficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.h
+4
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.cpp
+24
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.h
...fficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.h
+22
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.cpp
...lsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.cpp
+66
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.h
...eXlsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.h
+57
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/Xnum.h
...iceXlsFile2/source/XlsFormat/Logic/Biff_structures/Xnum.h
+2
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.cpp
+7
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.h
+2
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
+49
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
+3
-0
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
...iceXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
+7
-5
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXRANGE.cpp
...ceXlsFile2/source/XlsFormat/Logic/Biff_unions/SXRANGE.cpp
+30
-0
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
+8
-0
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Binary/CFStreamCacheReader.cpp
View file @
c08c960c
...
...
@@ -66,7 +66,7 @@ CFRecordPtr CFStreamCacheReader::getNextRecord(const CFRecordType::TypeId desira
{
CFRecordType
::
TypeString
rec_name
=
records_cache
.
front
()
->
getTypeString
();
//
Log::warning(rec_name);
Log
::
warning
(
rec_name
);
if
(
desirable_type
==
rt_MsoDrawingGroup
)
// объединяем rt_MsoDrawingGroup + rt_Continue в один блок
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/AreaFormat.h
View file @
c08c960c
...
...
@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include
<Logic/Biff_structures/LongRGB.h>
#include
"../Biff_structures/LongRGB.h"
namespace
XLS
{
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.cpp
View file @
c08c960c
...
...
@@ -30,27 +30,41 @@
*
*/
#include "SX
F
DB.h"
#include "SXDB.h"
namespace
XLS
{
SX
FDB
::
SXF
DB
()
SX
DB
::
SX
DB
()
{
}
SX
FDB
::~
SXF
DB
()
SX
DB
::~
SX
DB
()
{
}
BaseObjectPtr
SX
F
DB
::
clone
()
BaseObjectPtr
SXDB
::
clone
()
{
return
BaseObjectPtr
(
new
SX
F
DB
(
*
this
));
return
BaseObjectPtr
(
new
SXDB
(
*
this
));
}
void
SX
F
DB
::
readFields
(
CFRecord
&
record
)
void
SXDB
::
readFields
(
CFRecord
&
record
)
{
unsigned
short
flags
,
unused2
;
record
>>
crdbdb
>>
idstm
>>
flags
>>
unused2
>>
cfdbdb
>>
cfdbTot
>>
crdbUsed
>>
vsType
>>
cchWho
;
if
(
cchWho
>
0
&&
cchWho
<
0xffff
)
{
rgb
.
setSize
(
cchWho
);
record
>>
rgb
;
}
fSaveData
=
GETBIT
(
flags
,
0
);
fInvalid
=
GETBIT
(
flags
,
1
);
fRefreshOnLoad
=
GETBIT
(
flags
,
2
);
fOptimizeCache
=
GETBIT
(
flags
,
3
);
fBackgroundQuery
=
GETBIT
(
flags
,
4
);
fEnableRefresh
=
GETBIT
(
flags
,
5
);
}
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDB.h
View file @
c08c960c
...
...
@@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace
XLS
{
...
...
@@ -50,6 +51,21 @@ public:
static
const
ElementType
type
=
typeSXDB
;
_INT32
crdbdb
;
unsigned
short
idstm
;
bool
fSaveData
;
bool
fInvalid
;
bool
fRefreshOnLoad
;
bool
fOptimizeCache
;
bool
fBackgroundQuery
;
bool
fEnableRefresh
;
short
cfdbdb
;
short
cfdbTot
;
unsigned
short
crdbUsed
;
short
vsType
;
unsigned
short
cchWho
;
XLUnicodeStringNoCch
rgb
;
};
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.cpp
View file @
c08c960c
...
...
@@ -51,6 +51,7 @@ BaseObjectPtr SXDBEx::clone()
void
SXDBEx
::
readFields
(
CFRecord
&
record
)
{
record
>>
numDate
>>
cSxFormula
;
}
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXDBEx.h
View file @
c08c960c
...
...
@@ -32,7 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/Xnum.h"
namespace
XLS
{
...
...
@@ -51,6 +51,9 @@ public:
static
const
ElementType
type
=
typeSXDBEx
;
DateAsNum
numDate
;
_UINT32
cSxFormula
;
//count formulas
};
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.cpp
View file @
c08c960c
...
...
@@ -30,27 +30,45 @@
*
*/
#include "SXDB.h"
#include "SX
F
DB.h"
namespace
XLS
{
SX
DB
::
SX
DB
()
SX
FDB
::
SXF
DB
()
{
}
SX
DB
::~
SX
DB
()
SX
FDB
::~
SXF
DB
()
{
}
BaseObjectPtr
SXDB
::
clone
()
BaseObjectPtr
SX
F
DB
::
clone
()
{
return
BaseObjectPtr
(
new
SXDB
(
*
this
));
return
BaseObjectPtr
(
new
SX
F
DB
(
*
this
));
}
void
SXDB
::
readFields
(
CFRecord
&
record
)
void
SX
F
DB
::
readFields
(
CFRecord
&
record
)
{
unsigned
short
flags
;
record
>>
flags
>>
ifdbParent
>>
ifdbBase
>>
citmUnq
>>
csxoper
>>
cisxoper
>>
catm
;
record
>>
stFieldName
;
fAllAtoms
=
GETBIT
(
flags
,
0
);
fSomeUnhashed
=
GETBIT
(
flags
,
1
);
fUsed
=
GETBIT
(
flags
,
2
);
fHasParent
=
GETBIT
(
flags
,
3
);
fRangeGroup
=
GETBIT
(
flags
,
4
);
fNumField
=
GETBIT
(
flags
,
5
);
fTextEtcField
=
GETBIT
(
flags
,
7
);
fnumMinMaxValid
=
GETBIT
(
flags
,
8
);
fShortIitms
=
GETBIT
(
flags
,
9
);
fNonDates
=
GETBIT
(
flags
,
10
);
fDateInField
=
GETBIT
(
flags
,
11
);
fServerBased
=
GETBIT
(
flags
,
13
);
fCantGetUniqueItems
=
GETBIT
(
flags
,
14
);
fCalculatedField
=
GETBIT
(
flags
,
15
);
}
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SXFDB.h
View file @
c08c960c
...
...
@@ -32,6 +32,7 @@
#pragma once
#include "BiffRecord.h"
#include "../Biff_structures/BiffString.h"
namespace
XLS
{
...
...
@@ -50,7 +51,27 @@ public:
static
const
ElementType
type
=
typeSXFDB
;
bool
fAllAtoms
;
bool
fSomeUnhashed
;
bool
fUsed
;
bool
fHasParent
;
bool
fRangeGroup
;
bool
fNumField
;
bool
fTextEtcField
;
bool
fnumMinMaxValid
;
bool
fShortIitms
;
bool
fNonDates
;
bool
fDateInField
;
bool
fServerBased
;
bool
fCantGetUniqueItems
;
bool
fCalculatedField
;
unsigned
short
ifdbParent
;
unsigned
short
ifdbBase
;
unsigned
short
citmUnq
;
unsigned
short
csxoper
;
unsigned
short
cisxoper
;
unsigned
short
catm
;
XLUnicodeString
stFieldName
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.cpp
0 → 100644
View file @
c08c960c
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "SxIsxoper.h"
namespace
XLS
{
SxIsxoper
::
SxIsxoper
()
{
}
SxIsxoper
::~
SxIsxoper
()
{
}
BaseObjectPtr
SxIsxoper
::
clone
()
{
return
BaseObjectPtr
(
new
SxIsxoper
(
*
this
));
}
void
SxIsxoper
::
readFields
(
CFRecord
&
record
)
{
int
size
=
(
record
.
getDataSize
()
-
record
.
getRdPtr
())
/
2
;
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
unsigned
short
val
;
record
>>
val
;
rgSxIsxoper
.
push_back
(
val
);
}
}
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/SxIsxoper.h
0 → 100644
View file @
c08c960c
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "BiffRecordContinued.h"
namespace
XLS
{
class
SxIsxoper
:
public
BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
SxIsxoper
)
BASE_OBJECT_DEFINE_CLASS_NAME
(
SxIsxoper
)
public:
SxIsxoper
();
~
SxIsxoper
();
BaseObjectPtr
clone
();
void
readFields
(
CFRecord
&
record
);
static
const
ElementType
type
=
typeSxIsxoper
;
std
::
vector
<
unsigned
short
>
rgSxIsxoper
;
};
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/Xnum.h
View file @
c08c960c
...
...
@@ -62,5 +62,7 @@ public:
}
data
;
};
typedef
Xnum
DateAsNum
;
}
// namespace XLS
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.cpp
View file @
c08c960c
...
...
@@ -62,11 +62,15 @@ const bool DBB::loadContent(BinProcessor& proc)
m_SXDBB
=
elements_
.
back
();
elements_
.
pop_back
();
}
if
(
proc
.
optional
<
SXOPER
>
())
int
count
=
proc
.
repeated
<
SXOPER
>
(
0
,
0
);
while
(
count
--
)
{
m_SXOPER
=
elements_
.
back
();
elements_
.
pop_back
();
m_arSXOPER
.
push_back
(
elements_
.
front
());
elements_
.
pop_front
();
}
if
(
!
m_SXDBB
&&
m_arSXOPER
.
empty
())
return
false
;
return
true
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/DBB.h
View file @
c08c960c
...
...
@@ -49,8 +49,8 @@ public:
static
const
ElementType
type
=
typeDBB
;
BaseObjectPtr
m_SXDBB
;
BaseObjectPtr
m_
SXOPER
;
BaseObjectPtr
m_SXDBB
;
std
::
vector
<
BaseObjectPtr
>
m_ar
SXOPER
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.cpp
View file @
c08c960c
...
...
@@ -38,10 +38,31 @@
#include "../Biff_records/SXFDB.h"
#include "../Biff_records/SXFDBType.h"
#include "../Biff_records/SxIsxoper.h"
namespace
XLS
{
// (*GRPSXOPER [SXRANGE / *(SxIsxoper *Continue)])
class
Parenthesis_FDB
:
public
ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME
(
Parenthesis_FDB
)
public:
BaseObjectPtr
clone
()
{
return
BaseObjectPtr
(
new
Parenthesis_FDB
(
*
this
));
}
const
bool
loadContent
(
BinProcessor
&
proc
)
{
int
count
=
proc
.
repeated
<
SXOPER
>
(
0
,
0
);
if
(
!
proc
.
optional
<
SXRANGE
>
())
{
count
=
proc
.
repeated
<
SxIsxoper
>
(
0
,
0
);
}
return
true
;
};
};
FDB
::
FDB
()
{
...
...
@@ -82,12 +103,39 @@ const bool FDB::loadContent(BinProcessor& proc)
m_SXFMLA
=
elements_
.
back
();
elements_
.
pop_back
();
}
else
if
(
proc
.
optional
<
Parenthesis_FDB
>
())
{
int
count
=
elements_
.
size
();
while
(
count
>
0
)
{
SXOPER
*
oper
=
dynamic_cast
<
SXOPER
*>
(
elements_
.
front
().
get
());
if
(
oper
)
{
m_arGRPSXOPER
.
push_back
(
elements_
.
front
());
}
else
{
SXRANGE
*
range
=
dynamic_cast
<
SXRANGE
*>
(
elements_
.
front
().
get
());
if
(
range
)
m_SXRANGE
=
elements_
.
front
();
else
{
SxIsxoper
*
isOper
=
dynamic_cast
<
SxIsxoper
*>
(
elements_
.
front
().
get
());
if
(
isOper
)
m_arSxIsxoper
.
push_back
(
elements_
.
front
());
}
}
elements_
.
pop_front
();
count
--
;
}
}
int
count
=
proc
.
repeated
<
SXOPER
>
(
0
,
0
);
while
(
count
--
)
{
m_arSRCSXOPER
.
push_back
(
elements_
.
front
());
elements_
.
pop_front
();
}
}
return
true
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/FDB.h
View file @
c08c960c
...
...
@@ -54,6 +54,9 @@ public:
BaseObjectPtr
m_SXFMLA
;
std
::
vector
<
BaseObjectPtr
>
m_arSRCSXOPER
;
std
::
vector
<
BaseObjectPtr
>
m_arGRPSXOPER
;
BaseObjectPtr
m_SXRANGE
;
std
::
vector
<
BaseObjectPtr
>
m_arSxIsxoper
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXOPER.cpp
View file @
c08c960c
...
...
@@ -61,21 +61,23 @@ const bool SXOPER::loadContent(BinProcessor& proc)
if
(
proc
.
optional
<
SxNil
>
())
{
}
if
(
proc
.
optional
<
SXNum
>
())
else
if
(
proc
.
optional
<
SXNum
>
())
{
}
if
(
proc
.
optional
<
SxBool
>
())
else
if
(
proc
.
optional
<
SxBool
>
())
{
}
if
(
proc
.
optional
<
SxErr
>
())
else
if
(
proc
.
optional
<
SxErr
>
())
{
}
if
(
proc
.
optional
<
SXString
>
())
else
if
(
proc
.
optional
<
SXString
>
())
{
}
if
(
proc
.
optional
<
SXDtr
>
())
else
if
(
proc
.
optional
<
SXDtr
>
())
{
}
else
return
false
;
return
true
;
}
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/SXRANGE.cpp
View file @
c08c960c
...
...
@@ -40,6 +40,32 @@
namespace
XLS
{
// (3SXNum / (2SXDtr SXInt)
class
Parenthesis_SXRANGE
:
public
ABNFParenthesis
{
BASE_OBJECT_DEFINE_CLASS_NAME
(
Parenthesis_SXRANGE
)
public:
BaseObjectPtr
clone
()
{
return
BaseObjectPtr
(
new
Parenthesis_SXRANGE
(
*
this
));
}
const
bool
loadContent
(
BinProcessor
&
proc
)
{
int
count
=
proc
.
repeated
<
SXNum
>
(
0
,
3
);
if
(
count
<
1
)
{
count
=
proc
.
repeated
<
SXDtr
>
(
0
,
2
);
if
(
count
<
1
)
return
false
;
if
(
proc
.
optional
<
SXInt
>
())
count
++
;
}
return
(
count
==
3
);
};
};
SXRANGE
::
SXRANGE
()
{
...
...
@@ -64,6 +90,10 @@ const bool SXRANGE::loadContent(BinProcessor& proc)
m_SXRng
=
elements_
.
back
();
elements_
.
pop_back
();
if
(
proc
.
optional
<
Parenthesis_SXRANGE
>
())
{
}
return
true
;
}
...
...
ASCOfficeXlsFile2/source/win32/XlsFormat.vcproj
View file @
c08c960c
...
...
@@ -2597,6 +2597,14 @@
RelativePath=
"..\XlsFormat\Logic\Biff_records\SXInt.h"
>
</File>
<File
RelativePath=
"..\XlsFormat\Logic\Biff_records\SxIsxoper.cpp"
>
</File>
<File
RelativePath=
"..\XlsFormat\Logic\Biff_records\SxIsxoper.h"
>
</File>
<File
RelativePath=
"..\XlsFormat\Logic\Biff_records\SxItm.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