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
033feeaf
Commit
033feeaf
authored
Nov 23, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #18178
parent
de336e5f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
17 deletions
+31
-17
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ObjProtect.h
...XlsFile2/source/XlsFormat/Logic/Biff_records/ObjProtect.h
+1
-3
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Protect.h
...iceXlsFile2/source/XlsFormat/Logic/Biff_records/Protect.h
+0
-2
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.cpp
...2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.cpp
+0
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.h
...le2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.h
+0
-4
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
.../source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
+18
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
+1
-6
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
...fficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
+9
-0
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
+2
-1
No files found.
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ObjProtect.h
View file @
033feeaf
...
...
@@ -36,8 +36,6 @@
namespace
XLS
{
// Logical representation of ObjProtect record in BIFF8
class
ObjProtect
:
public
BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
ObjProtect
)
...
...
@@ -51,7 +49,7 @@ public:
void
readFields
(
CFRecord
&
record
);
static
const
ElementType
type
=
typeObjProtect
;
static
const
ElementType
type
=
typeObjProtect
;
//-----------------------------
Boolean
<
unsigned
short
>
fLockObj
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/Protect.h
View file @
033feeaf
...
...
@@ -36,8 +36,6 @@
namespace
XLS
{
// Logical representation of Protect record in BIFF8
class
Protect
:
public
BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
Protect
)
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.cpp
View file @
033feeaf
...
...
@@ -44,7 +44,6 @@ ScenarioProtect::~ScenarioProtect()
{
}
BaseObjectPtr
ScenarioProtect
::
clone
()
{
return
BaseObjectPtr
(
new
ScenarioProtect
(
*
this
));
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_records/ScenarioProtect.h
View file @
033feeaf
...
...
@@ -36,8 +36,6 @@
namespace
XLS
{
// Logical representation of ScenarioProtect record in BIFF8
class
ScenarioProtect
:
public
BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO
(
ScenarioProtect
)
...
...
@@ -48,14 +46,12 @@ public:
BaseObjectPtr
clone
();
void
readFields
(
CFRecord
&
record
);
static
const
ElementType
type
=
typeScenarioProtect
;
//-----------------------------
Boolean
<
unsigned
short
>
fScenProtect
;
};
}
// namespace XLS
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_unions/PROTECTION_COMMON.cpp
View file @
033feeaf
...
...
@@ -83,10 +83,28 @@ const bool PROTECTION_COMMON::loadContent(BinProcessor& proc)
int
PROTECTION_COMMON
::
serialize
(
std
::
wostream
&
_stream
)
{
Protect
*
protect
=
dynamic_cast
<
Protect
*>
(
m_Protect
.
get
());
Password
*
password
=
dynamic_cast
<
Password
*>
(
m_Password
.
get
());
ScenarioProtect
*
scenario
=
dynamic_cast
<
ScenarioProtect
*>
(
m_ScenarioProtect
.
get
());
ObjProtect
*
object
=
dynamic_cast
<
ObjProtect
*>
(
m_ObjProtect
.
get
());
CP_XML_WRITER
(
_stream
)
{
CP_XML_NODE
(
L"sheetProtection"
)
{
if
(
protect
)
{
CP_XML_ATTR
(
L"sheet"
,
protect
->
fLock
);
}
if
(
object
)
{
CP_XML_ATTR
(
L"objects"
,
object
->
fLockObj
);
}
if
(
scenario
)
{
CP_XML_ATTR
(
L"scenarios"
,
scenario
->
fScenProtect
);
}
CP_XML_ATTR
(
L"selectLockedCells"
,
1
);
}
}
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/XlsConverter.cpp
View file @
033feeaf
...
...
@@ -493,7 +493,7 @@ void XlsConverter::convert_common (XLS::CommonSubstream* sheet)
if
(
sheet
->
m_PROTECTION
)
{
//
sheet->m_PROTECTION->serialize(xlsx_context->current_sheet().protection());
sheet
->
m_PROTECTION
->
serialize
(
xlsx_context
->
current_sheet
().
protection
());
}
if
(
sheet
->
m_COLUMNS
)
{
...
...
@@ -512,11 +512,6 @@ void XlsConverter::convert_common (XLS::CommonSubstream* sheet)
sheet
->
m_PAGESETUP
->
serialize
(
xlsx_context
->
current_sheet
().
pageProperties
());
}
for
(
size_t
i
=
0
;
i
<
sheet
->
m_arHFPictureDrawing
.
size
();
i
++
)
{
//convert(dynamic_cast<XLS::Note*>(sheet->sheet->m_arHFPictureDrawing[i].get(),
}
if
(
sheet
->
m_arCUSTOMVIEW
.
size
()
>
0
)
{
CP_XML_WRITER
(
xlsx_context
->
current_sheet
().
customViews
())
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.cpp
View file @
033feeaf
...
...
@@ -63,6 +63,7 @@ public:
std
::
wstringstream
conditionalFormatting_
;
std
::
wstringstream
picture_background_
;
std
::
wstringstream
dataValidations_
;
std
::
wstringstream
protection_
;
rels
rels_
;
...
...
@@ -166,6 +167,11 @@ std::wostream & xlsx_xml_worksheet::dataValidations()
{
return
impl_
->
dataValidations_
;
}
std
::
wostream
&
xlsx_xml_worksheet
::
protection
()
{
return
impl_
->
protection_
;
}
//-----------------------------------------------------------------
rels
&
xlsx_xml_worksheet
::
sheet_rels
()
{
...
...
@@ -209,6 +215,9 @@ void xlsx_xml_worksheet::write_to(std::wostream & strm)
{
CP_XML_STREAM
()
<<
impl_
->
sheetData_
.
str
();
}
CP_XML_STREAM
()
<<
impl_
->
protection_
.
str
();
//оказывается порядок нахождения элементов важен !!! (для office 2010)
//объединенные ячейки раньше чем гиперлинки !!!
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/xlsx_output_xml.h
View file @
033feeaf
...
...
@@ -71,7 +71,8 @@ public:
std
::
wostream
&
conditionalFormatting
();
std
::
wostream
&
picture_background
();
std
::
wostream
&
dataValidations
();
std
::
wostream
&
protection
();
rels
&
sheet_rels
();
//hyperlink, background image, external, media ...
void
write_to
(
std
::
wostream
&
strm
);
...
...
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