Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
d5602650
Commit
d5602650
authored
Jul 07, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/4.0.1' into develop
parents
016d7315
345dee37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
3 deletions
+89
-3
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+64
-3
common/apiCommon.js
common/apiCommon.js
+25
-0
No files found.
common/Drawings/CommonController.js
View file @
d5602650
...
...
@@ -586,7 +586,7 @@ function CheckSpPrXfrm2(object)
function
getObjectsByTypesFromArr
(
arr
,
bGrouped
)
{
var
ret
=
{
shapes
:
[],
images
:
[],
groups
:
[],
charts
:
[],
tables
:
[]};
var
ret
=
{
shapes
:
[],
images
:
[],
groups
:
[],
charts
:
[],
tables
:
[]
,
oleObjects
:
[]
};
var
selected_objects
=
arr
;
for
(
var
i
=
0
;
i
<
selected_objects
.
length
;
++
i
)
{
...
...
@@ -600,11 +600,15 @@ function getObjectsByTypesFromArr(arr, bGrouped)
break
;
}
case
AscDFH
.
historyitem_type_ImageShape
:
case
AscDFH
.
historyitem_type_OleObject
:
{
ret
.
images
.
push
(
drawing
);
break
;
}
case
AscDFH
.
historyitem_type_OleObject
:
{
ret
.
oleObjects
.
push
(
drawing
);
break
;
}
case
AscDFH
.
historyitem_type_GroupShape
:
{
ret
.
groups
.
push
(
drawing
);
...
...
@@ -614,7 +618,8 @@ function getObjectsByTypesFromArr(arr, bGrouped)
ret
.
shapes
=
ret
.
shapes
.
concat
(
by_types
.
shapes
);
ret
.
images
=
ret
.
images
.
concat
(
by_types
.
images
);
ret
.
charts
=
ret
.
charts
.
concat
(
by_types
.
charts
);
ret
.
tables
=
ret
.
tables
.
concat
(
by_types
.
charts
);
ret
.
tables
=
ret
.
tables
.
concat
(
by_types
.
tables
);
ret
.
oleObjects
=
ret
.
oleObjects
.
concat
(
by_types
.
oleObjects
);
}
break
;
}
...
...
@@ -2437,6 +2442,17 @@ DrawingObjectsController.prototype =
}
objects_by_type
.
charts
[
i
].
checkDrawingBaseCoords
();
}
for
(
i
=
0
;
i
<
objects_by_type
.
oleObjects
.
length
;
++
i
)
{
CheckSpPrXfrm
(
objects_by_type
.
oleObjects
[
i
]);
objects_by_type
.
oleObjects
[
i
].
spPr
.
xfrm
.
setExtX
(
props
.
Width
);
objects_by_type
.
oleObjects
[
i
].
spPr
.
xfrm
.
setExtY
(
props
.
Height
);
if
(
objects_by_type
.
oleObjects
[
i
].
group
)
{
checkObjectInArray
(
aGroups
,
objects_by_type
.
oleObjects
[
i
].
group
.
getMainGroup
());
}
objects_by_type
.
oleObjects
[
i
].
checkDrawingBaseCoords
();
}
}
}
...
...
@@ -6614,6 +6630,51 @@ DrawingObjectsController.prototype =
}
break
;
}
case
AscDFH
.
historyitem_type_OleObject
:
{
var
pluginData
=
new
Asc
.
CPluginData
();
pluginData
.
setAttribute
(
"
data
"
,
drawing
.
m_sData
);
pluginData
.
setAttribute
(
"
guid
"
,
drawing
.
m_sApplicationId
);
pluginData
.
setAttribute
(
"
width
"
,
drawing
.
extX
);
pluginData
.
setAttribute
(
"
height
"
,
drawing
.
extY
);
pluginData
.
setAttribute
(
"
widthPix
"
,
drawing
.
m_nPixWidth
);
pluginData
.
setAttribute
(
"
heightPix
"
,
drawing
.
m_nPixHeight
);
pluginData
.
setAttribute
(
"
objectId
"
,
drawing
.
Id
);
new_image_props
=
{
ImageUrl
:
null
,
w
:
drawing
.
extX
,
h
:
drawing
.
extY
,
locked
:
locked
,
x
:
drawing
.
x
,
y
:
drawing
.
y
,
lockAspect
:
lockAspect
,
pluginGuid
:
drawing
.
m_sApplicationId
,
pluginData
:
pluginData
};
if
(
!
image_props
)
image_props
=
new_image_props
;
else
{
image_props
.
ImageUrl
=
null
;
if
(
image_props
.
w
!=
null
&&
image_props
.
w
!==
new_image_props
.
w
)
image_props
.
w
=
null
;
if
(
image_props
.
h
!=
null
&&
image_props
.
h
!==
new_image_props
.
h
)
image_props
.
h
=
null
;
if
(
image_props
.
x
!=
null
&&
image_props
.
x
!==
new_image_props
.
x
)
image_props
.
x
=
null
;
if
(
image_props
.
y
!=
null
&&
image_props
.
y
!==
new_image_props
.
y
)
image_props
.
y
=
null
;
if
(
image_props
.
locked
||
new_image_props
.
locked
)
image_props
.
locked
=
true
;
if
(
image_props
.
lockAspect
||
new_image_props
.
lockAspect
)
image_props
.
lockAspect
=
false
;
new_image_props
.
pluginGuid
=
null
;
new_image_props
.
pluginData
=
undefined
;
}
break
;
}
case
AscDFH
.
historyitem_type_ChartSpace
:
{
var
type_subtype
=
drawing
.
getTypeSubType
();
...
...
common/apiCommon.js
View file @
d5602650
...
...
@@ -1745,6 +1745,10 @@
this
.
severalChartStyles
=
obj
.
severalChartStyles
!=
undefined
?
obj
.
severalChartStyles
:
undefined
;
this
.
verticalTextAlign
=
obj
.
verticalTextAlign
!=
undefined
?
obj
.
verticalTextAlign
:
undefined
;
this
.
vert
=
obj
.
vert
!=
undefined
?
obj
.
vert
:
undefined
;
//oleObjects
this
.
pluginGuid
=
obj
.
pluginGuid
!=
undefined
?
obj
.
pluginGuid
:
undefined
;
this
.
pluginData
=
obj
.
pluginData
!=
undefined
?
obj
.
pluginData
:
undefined
;
}
else
{
this
.
CanBeFlow
=
true
;
...
...
@@ -1775,6 +1779,10 @@
this
.
severalChartStyles
=
undefined
;
this
.
verticalTextAlign
=
undefined
;
this
.
vert
=
undefined
;
//oleObjects
this
.
pluginGuid
=
undefined
;
this
.
pluginData
=
undefined
;
}
}
...
...
@@ -1912,6 +1920,23 @@
return
new
asc_CImageSize
(
parseInt
(
_w
),
parseInt
(
_h
),
bIsCorrect
);
}
return
new
asc_CImageSize
(
50
,
50
,
false
);
},
//oleObjects
asc_getPluginGuid
:
function
(){
return
this
.
pluginGuid
;
},
asc_putPluginGuid
:
function
(
v
){
this
.
pluginGuid
=
v
;
},
asc_getPluginData
:
function
(){
return
this
.
pluginData
;
},
asc_putPluginData
:
function
(
v
){
this
.
pluginData
=
v
;
}
};
...
...
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