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
7e0749dd
Commit
7e0749dd
authored
May 12, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
partly fix bug #18056
parent
9f2324d2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
191 additions
and
56 deletions
+191
-56
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
+2
-1
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
...ficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
+62
-47
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
+20
-4
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/CustomGeomShape.h
...ditor/Drawing/Shapes/BaseShape/PPTShape/CustomGeomShape.h
+92
-2
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/PPTShape.cpp
...ile/Editor/Drawing/Shapes/BaseShape/PPTShape/PPTShape.cpp
+2
-2
ASCOfficeXlsFile2/source/XlsXlsxConverter/ShapeType.h
ASCOfficeXlsFile2/source/XlsXlsxConverter/ShapeType.h
+13
-0
No files found.
ASCOfficePPTFile/PPTFormatLib/PPTXWriter/ShapeWriter.cpp
View file @
7e0749dd
...
...
@@ -1226,7 +1226,8 @@ std::wstring NSPresentationEditor::CShapeWriter::ConvertShape()
}
m_oWriter
.
WriteString
(
std
::
wstring
(
L">"
));
m_oWriter
.
WriteString
(
L"<a:off x=
\"
"
+
std
::
to_wstring
((
int
)
m_pShapeElement
->
m_rcBoundsOriginal
.
left
)
+
L"
\"
y=
\"
"
+
std
::
to_wstring
((
int
)
m_pShapeElement
->
m_rcBoundsOriginal
.
top
)
+
L"
\"
/>"
);
m_oWriter
.
WriteString
(
L"<a:off x=
\"
"
+
std
::
to_wstring
((
int
)
m_pShapeElement
->
m_rcBoundsOriginal
.
left
)
+
L"
\"
y=
\"
"
+
std
::
to_wstring
((
int
)
m_pShapeElement
->
m_rcBoundsOriginal
.
top
)
+
L"
\"
/>"
);
int
width
=
m_pShapeElement
->
m_rcBoundsOriginal
.
right
-
m_pShapeElement
->
m_rcBoundsOriginal
.
left
;
int
height
=
m_pShapeElement
->
m_rcBoundsOriginal
.
bottom
-
m_pShapeElement
->
m_rcBoundsOriginal
.
top
;
...
...
ASCOfficePPTFile/PPTFormatLib/Records/Drawing/ShapeContainer.h
View file @
7e0749dd
...
...
@@ -871,65 +871,80 @@ public:
switch
(
pProperty
->
m_ePID
)
{
// здесь просто применяем проперти...
// geometry ----------------------------------------------------
// top, left, right, bottom logic
case
NSOfficeDrawing
:
:
metroBlob
:
{
//альтернатива в формате oox
//NSFile::CFileBinary f;
//f.CreateFileW(L"d:\\test.zip");
//f.WriteFile(pProperty->m_pOptions, pProperty->m_lValue);
//f.CloseFile();
}
break
;
{
//альтернатива в формате oox
//NSFile::CFileBinary f;
//f.CreateFileW(L"d:\\test.zip");
//f.WriteFile(pProperty->m_pOptions, pProperty->m_lValue);
//f.CloseFile();
}
break
;
case
NSOfficeDrawing
:
:
geoRight
:
{
if
(
0
<
pProperty
->
m_lValue
)
pParentShape
->
m_dWidthLogic
=
(
double
)(
pProperty
->
m_lValue
);
}
break
;
{
if
(
0
<
pProperty
->
m_lValue
)
pParentShape
->
m_dWidthLogic
=
(
double
)(
pProperty
->
m_lValue
);
}
break
;
case
NSOfficeDrawing
:
:
geoBottom
:
{
if
(
0
<
pProperty
->
m_lValue
)
pParentShape
->
m_dHeightLogic
=
(
double
)(
pProperty
->
m_lValue
);
}
break
;
// shapePath
{
if
(
0
<
pProperty
->
m_lValue
)
pParentShape
->
m_dHeightLogic
=
(
double
)(
pProperty
->
m_lValue
);
}
break
;
case
NSOfficeDrawing
:
:
shapePath
:
{
pShape
->
m_oCustomVML
.
SetPath
((
RulesType
)
pProperty
->
m_lValue
);
pShape
->
m_bCustomShape
=
true
;
}
break
;
// segmentsInfo
{
pShape
->
m_oCustomVML
.
SetPath
((
RulesType
)
pProperty
->
m_lValue
);
pShape
->
m_bCustomShape
=
true
;
}
break
;
case
NSOfficeDrawing
:
:
pSegmentInfo
:
{
if
(
pProperty
->
m_bComplex
)
{
if
(
pProperty
->
m_bComplex
)
{
pShape
->
m_oCustomVML
.
LoadSegments
(
pProperty
);
pShape
->
m_bCustomShape
=
true
;
}
}
break
;
// verticesInfo
pShape
->
m_oCustomVML
.
LoadSegments
(
pProperty
);
pShape
->
m_bCustomShape
=
true
;
}
}
break
;
case
NSOfficeDrawing
:
:
pVertices
:
{
if
(
pProperty
->
m_bComplex
)
{
if
(
pProperty
->
m_bComplex
)
{
pShape
->
m_oCustomVML
.
LoadVertices
(
pProperty
);
pShape
->
m_bCustomShape
=
true
;
}
}
break
;
pShape
->
m_oCustomVML
.
LoadVertices
(
pProperty
);
pShape
->
m_bCustomShape
=
true
;
}
}
break
;
case
NSOfficeDrawing
:
:
pConnectionSites
:
{
if
(
pProperty
->
m_bComplex
)
{
pShape
->
m_oCustomVML
.
LoadConnectionSites
(
pProperty
);
}
}
break
;
case
NSOfficeDrawing
:
:
pConnectionSitesDir
:
{
if
(
pProperty
->
m_bComplex
)
{
pShape
->
m_oCustomVML
.
LoadConnectionSitesDir
(
pProperty
);
}
}
break
;
case
NSOfficeDrawing
:
:
pGuides
:
{
if
(
pProperty
->
m_bComplex
/* && pShape->m_eType != sptNotchedCircularArrow*/
)
{
//Тікбұрышты үшбұрыштарды.ppt - slide 25
pShape
->
m_oCustomVML
.
LoadGuides
(
pProperty
);
}
}
break
;
case
NSOfficeDrawing
:
:
pInscribe
:
{
if
(
pProperty
->
m_bComplex
)
{
if
(
pProperty
->
m_bComplex
&&
pShape
->
m_eType
!=
sptNotchedCircularArrow
)
{
//Тікбұрышты үшбұрыштарды.ppt - slide 25
pShape
->
m_oCustomVML
.
LoadGuides
(
pProperty
);
}
}
break
;
pShape
->
m_oCustomVML
.
LoadInscribe
(
pProperty
);
}
}
break
;
case
NSOfficeDrawing
:
:
pAdjustHandles
:
{
if
(
pProperty
->
m_bComplex
)
{
if
(
pProperty
->
m_bComplex
)
{
pShape
->
m_oCustomVML
.
LoadAHs
(
pProperty
);
}
}
break
;
pShape
->
m_oCustomVML
.
LoadAHs
(
pProperty
);
}
}
break
;
case
NSOfficeDrawing
:
:
adjustValue
:
case
NSOfficeDrawing
:
:
adjust2Value
:
case
NSOfficeDrawing
:
:
adjust3Value
:
...
...
ASCOfficePPTFile/PPTFormatLib/Win32/PPTFormatLib.vcproj
View file @
7e0749dd
...
...
@@ -994,10 +994,6 @@
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Metric.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\PPTShape.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Slide.h"
>
...
...
@@ -1030,6 +1026,26 @@
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\XmlWriter.h"
>
</File>
<Filter
Name=
"ppt shapes"
>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\customgeomshape.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\elementsettings.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\formula.h"
>
</File>
<File
RelativePath=
"..\..\..\ASCOfficePPTXFile\Editor\Drawing\Shapes\BaseShape\PPTShape\PPTShape.h"
>
</File>
</Filter>
</Filter>
<Filter
Name=
"OOXWriter"
...
...
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/CustomGeomShape.h
View file @
7e0749dd
...
...
@@ -488,6 +488,9 @@ namespace NSCustomVML
std
::
vector
<
CSegment
>
m_arSegments
;
std
::
vector
<
CGuide
>
m_arGuides
;
std
::
vector
<
LONG
>*
m_pAdjustValues
;
std
::
vector
<
Aggplus
::
POINT
>
m_arConnectionSites
;
std
::
vector
<
Aggplus
::
RECT
>
m_arInscribe
;
std
::
vector
<
double
>
m_arConnectionSitesDir
;
bool
m_bIsVerticesPresent
;
bool
m_bIsPathPresent
;
...
...
@@ -496,7 +499,7 @@ namespace NSCustomVML
CPen
m_oPen
;
public:
CCustomVML
()
:
m_
arVertices
(),
m_arSegments
(),
m_arGuides
(),
m_
pAdjustValues
(
NULL
)
CCustomVML
()
:
m_pAdjustValues
(
NULL
)
{
m_ePath
=
rtCurveTo
/*rtLineTo*/
;
...
...
@@ -579,6 +582,63 @@ namespace NSCustomVML
m_arVertices
.
push_back
(
oPoint
);
}
}
void
LoadConnectionSitesDir
(
CProperty
*
pProperty
)
{
NSOfficeDrawing
::
CBinaryReader
oReader
(
pProperty
->
m_pOptions
,
pProperty
->
m_lValue
);
m_arConnectionSitesDir
.
clear
();
WORD
lCount
=
(
WORD
)(
pProperty
->
m_lValue
/
4
);
for
(
WORD
lIndex
=
0
;
lIndex
<
lCount
;
++
lIndex
)
{
DWORD
v
=
oReader
.
ReadLONG
();
double
val
=
(
double
)((
WORD
)(
v
>>
16
)
+
((
WORD
)(
v
)
/
65536.0
));
m_arConnectionSitesDir
.
push_back
(
val
);
}
}
void
LoadConnectionSites
(
CProperty
*
pProperty
)
{
NSOfficeDrawing
::
CBinaryReader
oReader
(
pProperty
->
m_pOptions
,
pProperty
->
m_lValue
);
m_arConnectionSites
.
clear
();
WORD
lCount
=
(
WORD
)(
pProperty
->
m_lValue
/
8
);
if
(
pProperty
->
m_bIsTruncated
)
{
lCount
=
(
WORD
)(
pProperty
->
m_lValue
/
4
);
}
for
(
WORD
lIndex
=
0
;
lIndex
<
lCount
;
++
lIndex
)
{
Aggplus
::
POINT
oPoint
;
if
(
pProperty
->
m_bIsTruncated
)
{
oPoint
.
x
=
(
short
)
oReader
.
ReadWORD
();
oPoint
.
y
=
(
short
)
oReader
.
ReadWORD
();
}
else
{
oPoint
.
x
=
oReader
.
ReadLONG
();
oPoint
.
y
=
oReader
.
ReadLONG
();
}
LONG
lMinF
=
(
LONG
)
0x80000000
;
LONG
lMaxF
=
(
LONG
)
0x8000007F
;
if
(
lMinF
<=
oPoint
.
x
)
{
int
nGuideIndex
=
(
DWORD
)
oPoint
.
x
-
0x80000000
;
bool
b
=
false
;
}
if
(
lMinF
<=
oPoint
.
y
)
{
int
nGuideIndex
=
(
DWORD
)
oPoint
.
y
-
0x80000000
;
bool
b
=
false
;
}
m_arConnectionSites
.
push_back
(
oPoint
);
}
}
void
LoadVertices
(
CProperty
*
pProperty
)
{
NSOfficeDrawing
::
CBinaryReader
oReader
(
pProperty
->
m_pOptions
,
pProperty
->
m_lValue
);
...
...
@@ -704,8 +764,38 @@ namespace NSCustomVML
oInfo
.
Read
(
oReader
);
m_arGuides
.
push_back
(
oInfo
);
}
}
void
LoadInscribe
(
CProperty
*
pProperty
)
{
NSOfficeDrawing
::
CBinaryReader
oReader
(
pProperty
->
m_pOptions
,
pProperty
->
m_lValue
);
m_arInscribe
.
clear
();
WORD
lCount
=
(
WORD
)(
pProperty
->
m_lValue
/
16
);
if
(
pProperty
->
m_bIsTruncated
)
{
lCount
=
(
WORD
)(
pProperty
->
m_lValue
/
8
);
}
for
(
WORD
lIndex
=
0
;
lIndex
<
lCount
;
++
lIndex
)
{
Aggplus
::
RECT
oRect
;
if
(
pProperty
->
m_bIsTruncated
)
{
oRect
.
left
=
(
short
)
oReader
.
ReadWORD
();
oRect
.
right
=
(
short
)
oReader
.
ReadWORD
();
oRect
.
top
=
(
short
)
oReader
.
ReadWORD
();
oRect
.
bottom
=
(
short
)
oReader
.
ReadWORD
();
}
else
{
oRect
.
left
=
(
short
)
oReader
.
ReadLONG
();
oRect
.
right
=
(
short
)
oReader
.
ReadLONG
();
oRect
.
top
=
(
short
)
oReader
.
ReadLONG
();
oRect
.
bottom
=
(
short
)
oReader
.
ReadLONG
();
}
m_arInscribe
.
push_back
(
oRect
);
}
}
void
LoadAdjusts
(
LONG
lIndex
,
LONG
lValue
)
{
if
(
NULL
==
m_pAdjustValues
)
...
...
ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/PPTShape.cpp
View file @
7e0749dd
...
...
@@ -47,10 +47,10 @@ CPPTShape* CPPTShape::CreateByType(PPTShapes::ShapeType type)
CPPTShape
*
pShape
=
NULL
;
switch
(
type
)
{
// msosptNotchedCircularArrow
0x00000064 A value that SHOULD NOT be used.
// msosptNotchedCircularArrow
0x00000064 A value that SHOULD NOT be used.
// msosptHostControl 0x000000C9 A value that SHOULD NOT be used.
case
sptNotchedCircularArrow
:
//
case sptNotchedCircularArrow:
case
sptHostControl
:
{
pShape
=
new
CPPTShape
();
pShape
->
m_eType
=
type
;
break
;
}
case
0
:
{
pShape
=
new
CRectangleType
();
break
;
}
...
...
ASCOfficeXlsFile2/source/XlsXlsxConverter/ShapeType.h
View file @
7e0749dd
...
...
@@ -251,6 +251,19 @@ namespace oox
case
msosptRectangle
:
return
L"rect"
;
case
msosptEllipse
:
return
L"ellipse"
;
case
msosptLine
:
return
L"line"
;
case
msosptActionButtonBlank
:
return
L"actionButtonBlank"
;
case
msosptActionButtonHome
:
return
L"actionButtonHome"
;
case
msosptActionButtonHelp
:
return
L"actionButtonHelp"
;
case
msosptActionButtonInformation
:
return
L"actionButtonInformation"
;
case
msosptActionButtonForwardNext
:
return
L"actionButtonForwardNext"
;
case
msosptActionButtonBackPrevious
:
return
L"actionButtonBackPrevious"
;
case
msosptActionButtonEnd
:
return
L"actionButtonEnd"
;
case
msosptActionButtonBeginning
:
return
L"actionButtonBeginning"
;
case
msosptActionButtonReturn
:
return
L"actionButtonReturn"
;
case
msosptActionButtonDocument
:
return
L"actionButtonDocument"
;
case
msosptActionButtonSound
:
return
L"actionButtonSound"
;
case
msosptActionButtonMovie
:
return
L"actionButtonMovie"
;
case
msosptLeftArrow
:
return
L"leftArrow"
;
}
return
L""
;
}
...
...
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