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
5c3b05f4
Commit
5c3b05f4
authored
Sep 30, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocFormatReader - fix bugs user files
parent
43cee9c3
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
865 additions
and
19 deletions
+865
-19
ASCOfficeDocFile/DocDocxConverter/CharacterPropertiesMapping.cpp
...ceDocFile/DocDocxConverter/CharacterPropertiesMapping.cpp
+5
-1
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
+3
-0
ASCOfficeDocFile/DocDocxConverter/StyleSheet.cpp
ASCOfficeDocFile/DocDocxConverter/StyleSheet.cpp
+3
-3
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
+5
-1
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
+831
-1
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
+4
-0
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
...fFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
+8
-5
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
...ficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
+6
-8
No files found.
ASCOfficeDocFile/DocDocxConverter/CharacterPropertiesMapping.cpp
View file @
5c3b05f4
...
...
@@ -607,7 +607,11 @@ namespace DocFileFormat
{
if
(
istd
<
styleSheet
->
Styles
->
size
()
)
{
CharacterPropertyExceptions
*
baseChpx
=
styleSheet
->
Styles
->
at
(
istd
)
->
chpx
;
StyleSheetDescription
*
style
=
styleSheet
->
Styles
->
at
(
istd
);
if
(
!
style
)
break
;
CharacterPropertyExceptions
*
baseChpx
=
style
->
chpx
;
if
(
baseChpx
!=
NULL
)
{
...
...
ASCOfficeDocFile/DocDocxConverter/DocumentMapping.cpp
View file @
5c3b05f4
...
...
@@ -95,6 +95,9 @@ namespace DocFileFormat
}
current
++
;
}
if
(
current
+
1
>=
m_document
->
SectionPlex
->
CharacterPositions
.
size
())
current
=
m_document
->
SectionPlex
->
CharacterPositions
.
size
()
-
2
;
return
m_document
->
SectionPlex
->
CharacterPositions
[
current
+
1
];
}
bool
DocumentMapping
::
isSectionEnd
(
int
cp
)
...
...
ASCOfficeDocFile/DocDocxConverter/StyleSheet.cpp
View file @
5c3b05f4
...
...
@@ -71,7 +71,7 @@ namespace DocFileFormat
RELEASEARRAYOBJECTS
(
stshi
);
//create list of STDs
this
->
Styles
=
new
std
::
vector
<
StyleSheetDescription
*>
();
Styles
=
new
std
::
vector
<
StyleSheetDescription
*>
();
for
(
int
i
=
0
;
i
<
this
->
stshi
->
cstd
;
i
++
)
{
...
...
@@ -84,13 +84,13 @@ namespace DocFileFormat
unsigned
char
*
std
=
tableReader
.
ReadBytes
(
cbStd
,
true
);
//parse the STD bytes
this
->
Styles
->
push_back
(
new
StyleSheetDescription
(
std
,
cbStd
,
(
int
)
this
->
stshi
->
cbSTDBaseInFile
,
dataStream
,
fib
->
m_bOlderVersion
)
);
Styles
->
push_back
(
new
StyleSheetDescription
(
std
,
cbStd
,
(
int
)
this
->
stshi
->
cbSTDBaseInFile
,
dataStream
,
fib
->
m_bOlderVersion
)
);
RELEASEARRAYOBJECTS
(
std
);
}
else
{
this
->
Styles
->
push_back
(
NULL
);
Styles
->
push_back
(
NULL
);
}
}
}
...
...
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
View file @
5c3b05f4
...
...
@@ -45,7 +45,7 @@
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"..\..\..\..\..\Common\OfficeDrawing;"..\..\..\..\..\DesktopEditor\freetype-2.5.2\include";..\..\..\..\..\Common\OfficeDrawing\Shapes"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_
;DONT_WRITE_EMBEDDED_FONTS
"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
...
...
@@ -378,6 +378,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
</File>
<File
RelativePath=
"..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp"
>
...
...
ASCOfficeDocFile/Win32/OfficeDocFile_VS2005.sln
View file @
5c3b05f4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
View file @
5c3b05f4
...
...
@@ -340,6 +340,10 @@
<References>
</References>
<Files>
<File
RelativePath=
"..\..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp"
>
</File>
<File
RelativePath=
"..\..\..\build\bin\icu\win_32\icuuc.lib"
>
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXPictureAnchorReader.h
View file @
5c3b05f4
...
...
@@ -68,11 +68,13 @@ public:
int
nWidth
=
PROP_DEF
;
int
nHeight
=
PROP_DEF
;
int
nLeft
=
PROP_DEF
;
int
nTop
=
PROP_DEF
;
if
(
m_ooxAnchor
->
m_oSimplePos
.
IsInit
())
{
int
nLeft
=
m_ooxAnchor
->
m_oSimplePos
->
m_oX
.
ToTwips
()
;
int
nTop
=
m_ooxAnchor
->
m_oSimplePos
->
m_oY
.
ToTwips
();
nLeft
=
m_ooxAnchor
->
m_oSimplePos
->
m_oX
.
ToTwips
()
;
nTop
=
m_ooxAnchor
->
m_oSimplePos
->
m_oY
.
ToTwips
();
}
if
(
m_ooxAnchor
->
m_oExtent
.
IsInit
()
)
...
...
@@ -210,6 +212,7 @@ public:
if
(
m_ooxAnchor
->
m_oPositionV
->
m_oPosOffset
.
IsInit
())
oOutput
.
m_nTop
=
m_ooxAnchor
->
m_oPositionV
->
m_oPosOffset
->
ToTwips
();
}
if
(
m_ooxAnchor
->
m_oWrapNone
.
IsInit
())
oOutput
.
m_nWrapType
=
3
;
if
(
m_ooxAnchor
->
m_oWrapSquare
.
IsInit
())
...
...
@@ -305,12 +308,12 @@ public:
if
(
PROP_DEF
!=
nWidth
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nWidthGoal
)
{
int
nNewScale
=
(
int
)(
100
*
(
1.0
*
nWidth
/
oOutput
.
m_oPicture
->
m_nWidthGoal
));
oOutput
.
m_oPicture
->
m_dScaleX
=
nNewScale
;
oOutput
.
m_oPicture
->
m_dScaleX
=
nNewScale
;
}
if
(
PROP_DEF
!=
nHeight
&&
PROP_DEF
!=
oOutput
.
m_oPicture
->
m_nHeightGoal
)
{
int
nNewScale
=
(
int
)(
100
*
(
1.0
*
nHeight
/
oOutput
.
m_oPicture
->
m_nHeightGoal
));
oOutput
.
m_oPicture
->
m_dScaleY
=
nNewScale
;
oOutput
.
m_oPicture
->
m_dScaleY
=
nNewScale
;
}
return
true
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
View file @
5c3b05f4
...
...
@@ -663,10 +663,8 @@ bool OOXShapeReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
if
(
m_vmlElement
->
m_oCoordSize
.
IsInit
())
{
// shapeType content only size
if
(
oOutput
->
m_nGroupLeft
!=
PROP_DEF
)
oOutput
->
m_nGroupRight
=
oOutput
->
m_nGroupLeft
+
m_vmlElement
->
m_oCoordSize
->
GetX
();
if
(
oOutput
->
m_nGroupTop
!=
PROP_DEF
)
oOutput
->
m_nGroupBottom
=
oOutput
->
m_nGroupTop
+
m_vmlElement
->
m_oCoordSize
->
GetY
();
oOutput
->
m_nGroupRight
=
(
oOutput
->
m_nGroupLeft
!=
PROP_DEF
?
oOutput
->
m_nGroupLeft
:
0
)
+
m_vmlElement
->
m_oCoordSize
->
GetX
();
oOutput
->
m_nGroupBottom
=
(
oOutput
->
m_nGroupTop
!=
PROP_DEF
?
oOutput
->
m_nGroupTop
:
0
)
+
m_vmlElement
->
m_oCoordSize
->
GetY
();
}
if
(
m_vmlElement
->
m_oConnectorType
.
IsInit
())
...
...
@@ -725,14 +723,14 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapeGroupPtr& oOut
if
(
m_vmlGroup
->
m_oCoordOrigin
.
IsInit
()
)
{
oOutput
->
m_nGroupLeft
=
m_vmlGroup
->
m_oCoordOrigin
->
GetX
();
oOutput
->
m_nGroupTop
=
m_vmlGroup
->
m_oCoordOrigin
->
GetY
();
oOutput
->
m_nGroupLeft
=
m_vmlGroup
->
m_oCoordOrigin
->
GetX
();
oOutput
->
m_nGroupTop
=
m_vmlGroup
->
m_oCoordOrigin
->
GetY
();
}
if
(
m_vmlGroup
->
m_oCoordSize
.
IsInit
())
{
oOutput
->
m_nGroupRight
=
oOutput
->
m_nGroupLeft
+
m_vmlGroup
->
m_oCoordSize
->
GetX
();
oOutput
->
m_nGroupBottom
=
oOutput
->
m_nGroupTop
+
m_vmlGroup
->
m_oCoordSize
->
GetY
();
oOutput
->
m_nGroupRight
=
(
oOutput
->
m_nGroupLeft
!=
PROP_DEF
?
oOutput
->
m_nGroupLeft
:
0
)
+
m_vmlGroup
->
m_oCoordSize
->
GetX
();
oOutput
->
m_nGroupBottom
=
(
oOutput
->
m_nGroupTop
!=
PROP_DEF
?
oOutput
->
m_nGroupTop
:
0
)
+
m_vmlGroup
->
m_oCoordSize
->
GetY
();
}
for
(
int
i
=
0
;
i
<
m_vmlGroup
->
m_arrItems
.
size
()
;
i
++
)
...
...
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