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
93fdcd09
Commit
93fdcd09
authored
Apr 21, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/Drawings/Format/Image to function-closure
parent
14505fe7
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
14 deletions
+28
-14
build/configs/webexcel.json
build/configs/webexcel.json
+1
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+1
-1
build/configs/webword.json
build/configs/webword.json
+1
-1
cell/model/DrawingObjects/Format/ImagePrototype.js
cell/model/DrawingObjects/Format/ImagePrototype.js
+1
-0
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+3
-3
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+1
-1
common/Drawings/Format/Image.js
common/Drawings/Format/Image.js
+12
-1
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+1
-1
common/editorscommon.js
common/editorscommon.js
+1
-1
common/wordcopypaste.js
common/wordcopypaste.js
+1
-1
slide/Editor/Format/ImagePrototype.js
slide/Editor/Format/ImagePrototype.js
+1
-0
slide/Editor/Format/Slide.js
slide/Editor/Format/Slide.js
+2
-2
word/Editor/GraphicObjects/Format/ImagePrototype.js
word/Editor/GraphicObjects/Format/ImagePrototype.js
+1
-0
word/Editor/SerializeCommon.js
word/Editor/SerializeCommon.js
+1
-1
No files found.
build/configs/webexcel.json
View file @
93fdcd09
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/charts.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
...
@@ -95,7 +96,6 @@
...
@@ -95,7 +96,6 @@
"../common/Drawings/TrackObjects/MoveTracks.js"
,
"../common/Drawings/TrackObjects/MoveTracks.js"
,
"../common/Drawings/CommonController.js"
,
"../common/Drawings/CommonController.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
"../common/Drawings/Format/TextBody.js"
,
"../common/Drawings/Format/TextBody.js"
,
...
...
build/configs/webpowerpoint.json
View file @
93fdcd09
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/charts.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
...
@@ -82,7 +83,6 @@
...
@@ -82,7 +83,6 @@
"../common/Drawings/CommonController.js"
,
"../common/Drawings/CommonController.js"
,
"../cell/view/DrawingObjectsController.js"
,
"../cell/view/DrawingObjectsController.js"
,
"../slide/Editor/DrawingObjectsController.js"
,
"../slide/Editor/DrawingObjectsController.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
...
...
build/configs/webword.json
View file @
93fdcd09
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Format.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Shape.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Path.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/charts.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
...
@@ -57,7 +58,6 @@
...
@@ -57,7 +58,6 @@
"../common/Drawings/DrawingObjectsHandlers.js"
,
"../common/Drawings/DrawingObjectsHandlers.js"
,
"../common/Drawings/Hit.js"
,
"../common/Drawings/Hit.js"
,
"../common/Drawings/Joined.js"
,
"../common/Drawings/Joined.js"
,
"../common/Drawings/Format/Image.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/GroupShape.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartSpace.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
"../common/Drawings/Format/ChartFormat.js"
,
...
...
cell/model/DrawingObjects/Format/ImagePrototype.js
View file @
93fdcd09
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Import
// Import
var
CShape
=
AscFormat
.
CShape
;
var
CShape
=
AscFormat
.
CShape
;
var
CImageShape
=
AscFormat
.
CImageShape
;
CImageShape
.
prototype
.
addToDrawingObjects
=
CShape
.
prototype
.
addToDrawingObjects
;
CImageShape
.
prototype
.
addToDrawingObjects
=
CShape
.
prototype
.
addToDrawingObjects
;
CImageShape
.
prototype
.
setDrawingObjects
=
CShape
.
prototype
.
setDrawingObjects
;
CImageShape
.
prototype
.
setDrawingObjects
=
CShape
.
prototype
.
setDrawingObjects
;
...
...
common/Charts/DrawingObjects.js
View file @
93fdcd09
...
@@ -1777,7 +1777,7 @@ function DrawingObjects() {
...
@@ -1777,7 +1777,7 @@ function DrawingObjects() {
if
(
graphicObject
&&
ctx
)
{
if
(
graphicObject
&&
ctx
)
{
// Image
// Image
if
(
graphicObject
instanceof
CImageShape
)
if
(
graphicObject
instanceof
AscFormat
.
CImageShape
)
printImage
(
graphicObject
,
ctx
,
top
,
left
);
printImage
(
graphicObject
,
ctx
,
top
,
left
);
// Shape
// Shape
else
if
(
graphicObject
instanceof
AscFormat
.
CShape
)
else
if
(
graphicObject
instanceof
AscFormat
.
CShape
)
...
@@ -1793,7 +1793,7 @@ function DrawingObjects() {
...
@@ -1793,7 +1793,7 @@ function DrawingObjects() {
// Print functions
// Print functions
function
printImage
(
graphicObject
,
ctx
,
top
,
left
)
{
function
printImage
(
graphicObject
,
ctx
,
top
,
left
)
{
if
(
(
graphicObject
instanceof
CImageShape
)
&&
graphicObject
&&
ctx
)
{
if
(
(
graphicObject
instanceof
AscFormat
.
CImageShape
)
&&
graphicObject
&&
ctx
)
{
// Save
// Save
var
tx
=
graphicObject
.
transform
.
tx
;
var
tx
=
graphicObject
.
transform
.
tx
;
var
ty
=
graphicObject
.
transform
.
ty
;
var
ty
=
graphicObject
.
transform
.
ty
;
...
@@ -1872,7 +1872,7 @@ function DrawingObjects() {
...
@@ -1872,7 +1872,7 @@ function DrawingObjects() {
for
(
var
i
=
0
;
i
<
graphicObject
.
arrGraphicObjects
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
graphicObject
.
arrGraphicObjects
.
length
;
i
++
)
{
var
graphicItem
=
graphicObject
.
arrGraphicObjects
[
i
];
var
graphicItem
=
graphicObject
.
arrGraphicObjects
[
i
];
if
(
graphicItem
instanceof
CImageShape
)
if
(
graphicItem
instanceof
AscFormat
.
CImageShape
)
printImage
(
graphicItem
,
ctx
,
top
,
left
);
printImage
(
graphicItem
,
ctx
,
top
,
left
);
else
if
(
graphicItem
instanceof
AscFormat
.
CShape
)
else
if
(
graphicItem
instanceof
AscFormat
.
CShape
)
...
...
common/Drawings/CommonController.js
View file @
93fdcd09
...
@@ -7011,7 +7011,7 @@ DrawingObjectsController.prototype =
...
@@ -7011,7 +7011,7 @@ DrawingObjectsController.prototype =
createImage
:
function
(
rasterImageId
,
x
,
y
,
extX
,
extY
)
createImage
:
function
(
rasterImageId
,
x
,
y
,
extX
,
extY
)
{
{
var
image
=
new
CImageShape
();
var
image
=
new
AscFormat
.
CImageShape
();
image
.
setSpPr
(
new
AscFormat
.
CSpPr
());
image
.
setSpPr
(
new
AscFormat
.
CSpPr
());
image
.
spPr
.
setParent
(
image
);
image
.
spPr
.
setParent
(
image
);
image
.
spPr
.
setGeometry
(
AscFormat
.
CreateGeometry
(
"
rect
"
));
image
.
spPr
.
setGeometry
(
AscFormat
.
CreateGeometry
(
"
rect
"
));
...
...
common/Drawings/Format/Image.js
View file @
93fdcd09
"
use strict
"
;
"
use strict
"
;
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
// Import
// Import
var
CShape
=
AscFormat
.
CShape
;
var
CShape
=
AscFormat
.
CShape
;
...
@@ -1016,3 +1022,8 @@ CImageShape.prototype =
...
@@ -1016,3 +1022,8 @@ CImageShape.prototype =
{
{
}
}
};
};
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
AscFormat
'
].
CImageShape
=
CImageShape
;
})(
window
);
common/Shapes/Serialize.js
View file @
93fdcd09
...
@@ -5168,7 +5168,7 @@ function BinaryPPTYLoader()
...
@@ -5168,7 +5168,7 @@ function BinaryPPTYLoader()
{
{
var
s
=
this
.
stream
;
var
s
=
this
.
stream
;
var
pic
=
new
CImageShape
(
this
.
TempMainObject
);
var
pic
=
new
AscFormat
.
CImageShape
(
this
.
TempMainObject
);
pic
.
setBDeleted
(
false
);
pic
.
setBDeleted
(
false
);
...
...
common/editorscommon.js
View file @
93fdcd09
...
@@ -2080,7 +2080,7 @@ CTableId.prototype.Read_Class_FromBinary = function(Reader)
...
@@ -2080,7 +2080,7 @@ CTableId.prototype.Read_Class_FromBinary = function(Reader)
case
AscDFH
.
historyitem_type_Shape
:
Element
=
new
AscFormat
.
CShape
();
break
;
case
AscDFH
.
historyitem_type_Shape
:
Element
=
new
AscFormat
.
CShape
();
break
;
case
AscDFH
.
historyitem_type_DispUnits
:
Element
=
new
CDispUnits
();
break
;
case
AscDFH
.
historyitem_type_DispUnits
:
Element
=
new
CDispUnits
();
break
;
case
AscDFH
.
historyitem_type_GroupShape
:
Element
=
new
CGroupShape
();
break
;
case
AscDFH
.
historyitem_type_GroupShape
:
Element
=
new
CGroupShape
();
break
;
case
AscDFH
.
historyitem_type_ImageShape
:
Element
=
new
CImageShape
();
break
;
case
AscDFH
.
historyitem_type_ImageShape
:
Element
=
new
AscFormat
.
CImageShape
();
break
;
case
AscDFH
.
historyitem_type_Geometry
:
Element
=
new
AscFormat
.
Geometry
();
break
;
case
AscDFH
.
historyitem_type_Geometry
:
Element
=
new
AscFormat
.
Geometry
();
break
;
case
AscDFH
.
historyitem_type_Path
:
Element
=
new
AscFormat
.
Path
();
break
;
case
AscDFH
.
historyitem_type_Path
:
Element
=
new
AscFormat
.
Path
();
break
;
case
AscDFH
.
historyitem_type_TextBody
:
Element
=
new
CTextBody
();
break
;
case
AscDFH
.
historyitem_type_TextBody
:
Element
=
new
CTextBody
();
break
;
...
...
common/wordcopypaste.js
View file @
93fdcd09
...
@@ -2014,7 +2014,7 @@ CopyProcessor.prototype =
...
@@ -2014,7 +2014,7 @@ CopyProcessor.prototype =
{
{
this
.
oPresentationWriter
.
WriteShape
(
oGraphicObj
);
this
.
oPresentationWriter
.
WriteShape
(
oGraphicObj
);
}
}
else
if
(
oGraphicObj
instanceof
CImageShape
)
else
if
(
oGraphicObj
instanceof
AscFormat
.
CImageShape
)
{
{
this
.
oPresentationWriter
.
WriteImage
(
oGraphicObj
);
this
.
oPresentationWriter
.
WriteImage
(
oGraphicObj
);
}
}
...
...
slide/Editor/Format/ImagePrototype.js
View file @
93fdcd09
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Import
// Import
var
CShape
=
AscFormat
.
CShape
;
var
CShape
=
AscFormat
.
CShape
;
var
CImageShape
=
AscFormat
.
CImageShape
;
CImageShape
.
prototype
.
addToDrawingObjects
=
CShape
.
prototype
.
addToDrawingObjects
;
CImageShape
.
prototype
.
addToDrawingObjects
=
CShape
.
prototype
.
addToDrawingObjects
;
CImageShape
.
prototype
.
setDrawingObjects
=
CShape
.
prototype
.
setDrawingObjects
;
CImageShape
.
prototype
.
setDrawingObjects
=
CShape
.
prototype
.
setDrawingObjects
;
...
...
slide/Editor/Format/Slide.js
View file @
93fdcd09
...
@@ -221,7 +221,7 @@ Slide.prototype =
...
@@ -221,7 +221,7 @@ Slide.prototype =
_index
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
idx
;
_index
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
idx
;
_type
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
type
;
_type
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
type
;
}
}
if
(
_glyph
instanceof
CImageShape
)
if
(
_glyph
instanceof
AscFormat
.
CImageShape
)
{
{
_index
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
idx
;
_index
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
idx
;
_type
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
type
;
_type
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
type
;
...
@@ -284,7 +284,7 @@ Slide.prototype =
...
@@ -284,7 +284,7 @@ Slide.prototype =
{
{
_type
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
type
;
_type
=
_glyph
.
nvSpPr
.
nvPr
.
ph
.
type
;
}
}
if
(
_glyph
instanceof
CImageShape
)
if
(
_glyph
instanceof
AscFormat
.
CImageShape
)
{
{
_type
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
type
;
_type
=
_glyph
.
nvPicPr
.
nvPr
.
ph
.
type
;
}
}
...
...
word/Editor/GraphicObjects/Format/ImagePrototype.js
View file @
93fdcd09
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
// Import
// Import
var
CShape
=
AscFormat
.
CShape
;
var
CShape
=
AscFormat
.
CShape
;
var
CImageShape
=
AscFormat
.
CImageShape
;
CImageShape
.
prototype
.
Get_Theme
=
CShape
.
prototype
.
Get_Theme
;
CImageShape
.
prototype
.
Get_Theme
=
CShape
.
prototype
.
Get_Theme
;
CImageShape
.
prototype
.
Get_ColorMap
=
CShape
.
prototype
.
Get_ColorMap
;
CImageShape
.
prototype
.
Get_ColorMap
=
CShape
.
prototype
.
Get_ColorMap
;
...
...
word/Editor/SerializeCommon.js
View file @
93fdcd09
...
@@ -436,7 +436,7 @@ function CPPTXContentLoader()
...
@@ -436,7 +436,7 @@ function CPPTXContentLoader()
{
{
var
s
=
this
.
stream
;
var
s
=
this
.
stream
;
var
pic
=
new
CImageShape
();
var
pic
=
new
AscFormat
.
CImageShape
();
pic
.
setBDeleted
(
false
);
pic
.
setBDeleted
(
false
);
pic
.
setParent
(
this
.
TempMainObject
==
null
?
this
.
ParaDrawing
:
null
);
pic
.
setParent
(
this
.
TempMainObject
==
null
?
this
.
ParaDrawing
:
null
);
...
...
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