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
0fc749f8
Commit
0fc749f8
authored
Aug 21, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release/v5.0.0' into develop
parents
c0a061f2
03267ba2
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
31 deletions
+48
-31
ASCOfficeOdfFile/src/odf/styles.cpp
ASCOfficeOdfFile/src/odf/styles.cpp
+13
-2
ASCOfficeOdfFile/src/odf/table_xlsx.cpp
ASCOfficeOdfFile/src/odf/table_xlsx.cpp
+10
-18
ASCOfficePPTFile/PptFormatTest/PptFormatTest.vcproj
ASCOfficePPTFile/PptFormatTest/PptFormatTest.vcproj
+1
-1
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/ppt2pptxshapeconverter.h
...rawing/Shapes/BaseShape/PPTShape/ppt2pptxshapeconverter.h
+2
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
+11
-6
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFExtGradient.cpp
.../source/XlsFormat/Logic/Biff_structures/XFExtGradient.cpp
+4
-1
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFExtNoFRT.cpp
...le2/source/XlsFormat/Logic/Biff_structures/XFExtNoFRT.cpp
+3
-1
DesktopEditor/raster/Metafile/Emf/EmfFile.cpp
DesktopEditor/raster/Metafile/Emf/EmfFile.cpp
+4
-2
No files found.
ASCOfficeOdfFile/src/odf/styles.cpp
View file @
0fc749f8
...
...
@@ -1274,16 +1274,27 @@ void style_page_layout_properties::xlsx_serialize(std::wostream & strm, oox::xls
{
if
(
horizontal_margins
.
fo_margin_left_
&&
horizontal_margins
.
fo_margin_left_
->
get_type
()
==
odf_types
::
length_or_percent
::
Length
)
CP_XML_ATTR
(
L"left"
,
horizontal_margins
.
fo_margin_left_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"left"
,
0
);
if
(
horizontal_margins
.
fo_margin_right_
&&
horizontal_margins
.
fo_margin_right_
->
get_type
()
==
odf_types
::
length_or_percent
::
Length
)
CP_XML_ATTR
(
L"right"
,
horizontal_margins
.
fo_margin_right_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"right"
,
0
);
if
(
vertical_margins
.
fo_margin_top_
&&
vertical_margins
.
fo_margin_top_
->
get_type
()
==
odf_types
::
length_or_percent
::
Length
)
CP_XML_ATTR
(
L"top"
,
vertical_margins
.
fo_margin_top_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"top"
,
1.025
);
if
(
vertical_margins
.
fo_margin_bottom_
&&
vertical_margins
.
fo_margin_bottom_
->
get_type
()
==
odf_types
::
length_or_percent
::
Length
)
CP_XML_ATTR
(
L"bottom"
,
vertical_margins
.
fo_margin_bottom_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"bottom"
,
1.025
);
CP_XML_ATTR
(
L"header"
,
vertical_margins
.
fo_margin_top_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
CP_XML_ATTR
(
L"footer"
,
vertical_margins
.
fo_margin_bottom_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
if
(
vertical_margins
.
fo_margin_top_
)
CP_XML_ATTR
(
L"header"
,
vertical_margins
.
fo_margin_top_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"header"
,
0.7875
);
if
(
vertical_margins
.
fo_margin_bottom_
)
CP_XML_ATTR
(
L"footer"
,
vertical_margins
.
fo_margin_bottom_
->
get_length
().
get_value_unit
(
odf_types
::
length
::
inch
));
else
CP_XML_ATTR
(
L"footer"
,
0.7875
);
}
}
if
(
attlist_
.
fo_page_width_
||
attlist_
.
fo_page_height_
||
attlist_
.
style_print_orientation_
)
...
...
ASCOfficeOdfFile/src/odf/table_xlsx.cpp
View file @
0fc749f8
...
...
@@ -264,28 +264,20 @@ void table_rows::xlsx_convert(oox::xlsx_conversion_context & Context)
table_table_rows_
->
xlsx_convert
(
Context
);
else
{
if
(
table_table_row_
.
size
()
>
1
)
while
(
table_table_row_
.
size
()
>
1
)
{
//check 2 last rows for repeate > 65000 & 1024
table_table_row
*
row_last
=
dynamic_cast
<
table_table_row
*>
(
table_table_row_
[
table_table_row_
.
size
()
-
1
].
get
());
table_table_row
*
row_last_1
=
dynamic_cast
<
table_table_row
*>
(
table_table_row_
[
table_table_row_
.
size
()
-
2
].
get
());
if
(
row_last
->
empty_content_cells
()
&&
row_last_1
->
empty_content_cells
())
{
if
(
row_last
->
attlist_
.
table_number_rows_repeated_
>
1000
&&
row_last_1
->
attlist_
.
table_number_rows_repeated_
>
1000
||
row_last_1
->
attlist_
.
table_number_rows_repeated_
>
0xf000
)
{
std
::
wstring
style
=
row_last
->
attlist_
.
table_style_name_
.
get_value_or
(
L""
);
std
::
wstring
style_1
=
row_last
->
attlist_
.
table_style_name_
.
get_value_or
(
L""
);
if
(
style
==
style_1
)
//check for empty also ????
{
row_last_1
->
attlist_
.
table_number_rows_repeated_
=
1024
;
table_table_row_
.
pop_back
();
}
}
}
std
::
wstring
style
=
row_last
->
attlist_
.
table_style_name_
.
get_value_or
(
L""
);
std
::
wstring
style_1
=
row_last
->
attlist_
.
table_style_name_
.
get_value_or
(
L""
);
if
(
style
!=
style_1
)
break
;
if
(
row_last_1
->
empty_content_cells
()
==
false
)
break
;
if
(
row_last
->
empty_content_cells
()
==
false
)
break
;
row_last_1
->
attlist_
.
table_number_rows_repeated_
+=
row_last
->
attlist_
.
table_number_rows_repeated_
;
table_table_row_
.
pop_back
();
}
for
(
size_t
i
=
0
;
i
<
table_table_row_
.
size
();
i
++
)
{
...
...
ASCOfficePPTFile/PptFormatTest/PptFormatTest.vcproj
View file @
0fc749f8
...
...
@@ -44,7 +44,7 @@
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"..
\..\Common\OfficeDrawing;"..\..\DesktopEditor\freetype-2.5.2\include";..\..\Common\OfficeDrawing\Shapes
"
AdditionalIncludeDirectories=
"..
/../DesktopEditor/xml/build/vs2005;../../DesktopEditor/xml/libxml2/include
"
PreprocessorDefinitions=
"_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
...
...
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/ppt2pptxshapeconverter.h
View file @
0fc749f8
...
...
@@ -2122,6 +2122,8 @@ namespace NSGuidesVML
for
(
size_t
nIndex
=
0
;
nIndex
<
oArray
.
size
();
++
nIndex
)
{
if
(
oPath
.
m_arParts
.
size
()
<=
nIndex
)
break
;
const
CPartPath
&
oPart
=
oPath
.
m_arParts
[
nIndex
];
m_lWidth
=
oPart
.
width
;
m_lHeight
=
oPart
.
height
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
View file @
0fc749f8
...
...
@@ -166,23 +166,28 @@ namespace PPTX
pWriter
->
WriteBYTE
(
1
);
pWriter
->
EndRecord
();
DocWrapper
::
FontProcessor
fp
;
NSBinPptxRW
::
CDrawingConverter
oDrawingConverter
;
DocWrapper
::
FontProcessor
oFontProcessor
;
NSBinPptxRW
::
CDrawingConverter
oDrawingConverter
;
BinDocxRW
::
CDocxSerializer
oDocxSerializer
;
NSBinPptxRW
::
CBinaryFileWriter
*
old_writer
=
oDrawingConverter
.
m_pBinaryWriter
;
NSCommon
::
smart_ptr
<
OOX
::
IFileContainer
>
old_rels
=
*
pWriter
->
m_pCurrentContainer
;
BinDocxRW
::
CDocxSerializer
*
old_serial
=
pWriter
->
m_pMainDocument
;
oDrawingConverter
.
m_pBinaryWriter
=
pWriter
;
oDocxSerializer
.
m_pParamsWriter
=
new
BinDocxRW
::
ParamsWriter
(
pWriter
,
&
oFontProcessor
,
&
oDrawingConverter
,
NULL
);
BinDocxRW
::
ParamsWriter
oParamsWriter
(
pWriter
,
&
fp
,
&
oDrawingConverter
,
NULL
);
BinDocxRW
::
BinaryFileWriter
oBinaryFileWriter
(
oParamsWriter
);
pWriter
->
m_pMainDocument
=
&
oDocxSerializer
;
BinDocxRW
::
BinaryFileWriter
oBinaryFileWriter
(
*
oDocxSerializer
.
m_pParamsWriter
);
pWriter
->
StartRecord
(
2
);
oBinaryFileWriter
.
intoBindoc
(
oox_unpacked
.
GetPath
());
pWriter
->
EndRecord
();
oDrawingConverter
.
m_pBinaryWriter
=
old_writer
;
*
pWriter
->
m_pCurrentContainer
=
old_rels
;
*
pWriter
->
m_pCurrentContainer
=
old_rels
;
pWriter
->
m_pMainDocument
=
old_serial
;
}
else
if
(
office_checker
.
nFileType
==
AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX
)
//if ( std::wstring::npos != sProgID.find(L"Excel.Sheet")) //"ET.Xlsx.6" !!!
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFExtGradient.cpp
View file @
0fc749f8
...
...
@@ -46,7 +46,10 @@ BiffStructurePtr XFExtGradient::clone()
void
XFExtGradient
::
load
(
CFRecord
&
record
)
{
record
>>
gradient
>>
cGradStops
;
for
(
size_t
i
=
0
;
i
<
cGradStops
;
++
i
)
if
(
cGradStops
>
256
)
cGradStops
=
256
;
for
(
size_t
i
=
0
;
!
record
.
isEOF
()
&&
i
<
cGradStops
;
++
i
)
{
GradStop
grad_stop
;
record
>>
grad_stop
;
...
...
ASCOfficeXlsFile2/source/XlsFormat/Logic/Biff_structures/XFExtNoFRT.cpp
View file @
0fc749f8
...
...
@@ -61,8 +61,10 @@ void XFExtNoFRT::load(CFRecord& record)
unsigned
short
cexts
;
record
>>
cexts
;
for
(
unsigned
short
i
=
0
;
!
record
.
isEOF
()
&&
i
<
cexts
;
++
i
)
for
(
unsigned
short
i
=
0
;
i
<
cexts
;
++
i
)
{
if
(
record
.
checkFitReadSafe
(
4
)
==
false
)
break
;
ExtProp
prop
;
record
>>
prop
;
rgExt
.
push_back
(
prop
);
...
...
DesktopEditor/raster/Metafile/Emf/EmfFile.cpp
View file @
0fc749f8
...
...
@@ -189,13 +189,15 @@ static const struct ActionNamesEmf
do
{
if
(
m_oStream
.
CanRead
()
<
8
)
if
(
m_oStream
.
IsEof
())
break
;
if
(
m_oStream
.
CanRead
()
<
8
)
return
SetError
();
m_oStream
>>
ulType
;
m_oStream
>>
ulSize
;
if
(
ulSize
<
1
)
if
(
ulSize
<
1
)
continue
;
m_ulRecordPos
=
m_oStream
.
Tell
();
...
...
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