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
a61fe9f2
Commit
a61fe9f2
authored
Aug 26, 2016
by
Sergey Luzyanin
Committed by
GitHub
Aug 26, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #47 from ONLYOFFICE/release/v4.1.0
Release/v4.1.0
parents
609004ce
fada8909
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
204 additions
and
157 deletions
+204
-157
cell/api.js
cell/api.js
+24
-2
cell/model/DrawingObjects/ShapeDrawer.js
cell/model/DrawingObjects/ShapeDrawer.js
+2
-2
cell/model/Workbook.js
cell/model/Workbook.js
+22
-0
cell/model/clipboard.js
cell/model/clipboard.js
+1
-1
cell/utils/utils.js
cell/utils/utils.js
+1
-1
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+133
-148
common/apiBase.js
common/apiBase.js
+3
-0
common/commonDefines.js
common/commonDefines.js
+1
-0
common/plugins.js
common/plugins.js
+15
-1
word/Drawing/ShapeDrawer.js
word/Drawing/ShapeDrawer.js
+2
-2
No files found.
cell/api.js
View file @
a61fe9f2
...
...
@@ -3225,8 +3225,30 @@ var editor;
return
true
;
};
spreadsheet_api
.
prototype
.
asc_Recalculate
=
function
()
{
History
.
EndTransaction
();
this
.
_onUpdateAfterApplyChanges
();
History
.
EndTransaction
();
this
.
_onUpdateAfterApplyChanges
();
};
spreadsheet_api
.
prototype
.
pre_Paste
=
function
(
_fonts
,
_images
,
callback
)
{
var
oFontMap
=
{};
for
(
var
i
=
0
;
i
<
_fonts
.
length
;
++
i
){
oFontMap
[
_fonts
[
i
].
name
]
=
1
;
}
this
.
_loadFonts
(
oFontMap
,
function
()
{
var
aImages
=
[];
for
(
var
key
in
_images
){
if
(
_images
.
hasOwnProperty
(
key
)){
aImages
.
push
(
_images
[
key
])
}
}
if
(
aImages
.
length
>
0
)
{
window
[
"
Asc
"
][
"
editor
"
].
ImageLoader
.
LoadDocumentImages
(
aImages
,
null
);
}
callback
();
});
};
spreadsheet_api
.
prototype
.
_onEndLoadSdk
=
function
()
{
...
...
cell/model/DrawingObjects/ShapeDrawer.js
View file @
a61fe9f2
...
...
@@ -1590,7 +1590,7 @@ CShapeDrawer.prototype =
if
(
_max_delta
>
0.001
)
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
,
trans1
);
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
...
...
@@ -1616,7 +1616,7 @@ CShapeDrawer.prototype =
if
(
_max_delta
>
0.001
)
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
,
trans1
);
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
...
...
cell/model/Workbook.js
View file @
a61fe9f2
...
...
@@ -2507,6 +2507,18 @@ Workbook.prototype.generateFontMap2=function(){
aRes
.
push
(
new
AscFonts
.
CFont
(
i
,
0
,
""
,
0
));
return
aRes
;
};
Workbook
.
prototype
.
getAllImageUrls
=
function
(){
var
aImageUrls
=
[];
for
(
var
i
=
0
;
i
<
this
.
aWorksheets
.
length
;
++
i
){
this
.
aWorksheets
[
i
].
getAllImageUrls
(
aImageUrls
);
}
return
aImageUrls
;
};
Workbook
.
prototype
.
reassignImageUrls
=
function
(
oImages
){
for
(
var
i
=
0
;
i
<
this
.
aWorksheets
.
length
;
++
i
){
this
.
aWorksheets
[
i
].
reassignImageUrls
(
oImages
);
}
};
Workbook
.
prototype
.
recalcWB
=
function
(
isRecalcWB
){
//todo
if
(
this
.
dependencyFormulas
.
getNodesLength
()
>
0
)
{
...
...
@@ -3408,6 +3420,16 @@ Woorksheet.prototype.generateFontMap=function(oFontMap){
}
}
};
Woorksheet
.
prototype
.
getAllImageUrls
=
function
(
aImages
){
for
(
var
i
=
0
;
i
<
this
.
Drawings
.
length
;
++
i
){
this
.
Drawings
[
i
].
graphicObject
.
getAllRasterImages
(
aImages
);
}
};
Woorksheet
.
prototype
.
reassignImageUrls
=
function
(
oImages
){
for
(
var
i
=
0
;
i
<
this
.
Drawings
.
length
;
++
i
){
this
.
Drawings
[
i
].
graphicObject
.
Reassign_ImageUrls
(
oImages
);
}
};
Woorksheet
.
prototype
.
clone
=
function
(
sNewId
,
sName
,
tableNames
){
var
i
,
elem
,
range
;
var
oNewWs
=
new
Woorksheet
(
this
.
workbook
,
this
.
workbook
.
aWorksheets
.
length
,
sNewId
);
...
...
cell/model/clipboard.js
View file @
a61fe9f2
...
...
@@ -3589,7 +3589,7 @@
var
sSrc
=
oGraphicObj
.
getBase64Img
();
if
(
sSrc
.
length
>
0
)
{
sRes
+=
"
<img style=
\"
max-width:100%;
\"
width=
\"
"
+
Math
.
round
(
ParaItem
.
Extent
.
W
*
g_dKoef_mm_to_pix
)
+
"
\"
height=
\"
"
+
Math
.
round
(
ParaItem
.
Extent
.
H
*
g_dKoef_mm_to_pix
)
+
"
\"
src=
\"
"
+
sSrc
+
"
\"
/>
"
;
sRes
+=
"
<img style=
\"
max-width:100%;
\"
width=
\"
"
+
Math
.
round
(
ParaItem
.
Extent
.
W
*
AscCommon
.
g_dKoef_mm_to_pix
)
+
"
\"
height=
\"
"
+
Math
.
round
(
ParaItem
.
Extent
.
H
*
AscCommon
.
g_dKoef_mm_to_pix
)
+
"
\"
src=
\"
"
+
sSrc
+
"
\"
/>
"
;
break
;
}
// var _canvas = document.createElement('canvas');
...
...
cell/utils/utils.js
View file @
a61fe9f2
...
...
@@ -306,7 +306,7 @@
};
Range
.
prototype
.
isOneCell
=
function
()
{
return
this
.
r1
==
this
.
r2
&&
this
.
c1
==
this
.
c2
;
return
this
.
r1
==
=
this
.
r2
&&
this
.
c1
=
==
this
.
c2
;
};
Range
.
prototype
.
union
=
function
(
range
)
{
...
...
cell/view/WorksheetView.js
View file @
a61fe9f2
This diff is collapsed.
Click to expand it.
common/apiBase.js
View file @
a61fe9f2
...
...
@@ -1021,6 +1021,9 @@
baseEditorsApi
.
prototype
.
onKeyUp
=
function
(
e
)
{
};
baseEditorsApi
.
prototype
.
pre_Paste
=
function
(
_fonts
,
_images
,
callback
)
{
};
// System input
baseEditorsApi
.
prototype
.
SetTextBoxInputMode
=
function
(
bIsEnable
)
...
...
common/commonDefines.js
View file @
a61fe9f2
...
...
@@ -1053,6 +1053,7 @@
prot
=
c_oAscAdvancedOptionsID
;
prot
[
'
CSV
'
]
=
prot
.
CSV
;
prot
[
'
TXT
'
]
=
prot
.
TXT
;
prot
[
'
DRM
'
]
=
prot
.
DRM
;
window
[
'
Asc
'
][
'
c_oAscFontRenderingModeType
'
]
=
window
[
'
Asc
'
].
c_oAscFontRenderingModeType
=
c_oAscFontRenderingModeType
;
prot
=
c_oAscFontRenderingModeType
;
prot
[
'
noHinting
'
]
=
prot
.
noHinting
;
...
...
common/plugins.js
View file @
a61fe9f2
...
...
@@ -440,7 +440,21 @@
}
else
if
(
AscCommon
.
c_oEditorId
.
Spreadsheet
===
editorId
)
{
window
.
g_asc_plugins
.
api
.
asc_Recalculate
();
var
oApi
=
window
.
g_asc_plugins
.
api
;
var
oFonts
=
oApi
.
wbModel
.
_generateFontMap
();
var
aImages
=
oApi
.
wbModel
.
getAllImageUrls
();
var
oImages
=
{};
for
(
var
i
=
0
;
i
<
aImages
.
length
;
i
++
)
{
oImages
[
aImages
[
i
]]
=
aImages
[
i
];
}
window
.
g_asc_plugins
.
images_rename
=
oImages
;
AscCommon
.
Check_LoadingDataBeforePrepaste
(
window
.
g_asc_plugins
.
api
,
oFonts
,
oImages
,
function
(){
oApi
.
wbModel
.
reassignImageUrls
(
window
.
g_asc_plugins
.
images_rename
);
delete
window
.
g_asc_plugins
.
images_rename
;
window
.
g_asc_plugins
.
api
.
asc_Recalculate
();
});
}
}
}
...
...
word/Drawing/ShapeDrawer.js
View file @
a61fe9f2
...
...
@@ -1590,7 +1590,7 @@ CShapeDrawer.prototype =
if
(
_max_delta
>
0.001
)
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
,
trans1
);
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
headEnd
.
type
,
this
.
Ln
.
headEnd
.
GetWidth
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
.
Ln
.
headEnd
.
GetLen
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
...
...
@@ -1616,7 +1616,7 @@ CShapeDrawer.prototype =
if
(
_max_delta
>
0.001
)
{
this
.
Graphics
.
ArrayPoints
=
null
;
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
,
7
/
g_dKoef_mm_to_pix
),
this
,
trans1
);
DrawLineEnd
(
_x1
,
_y1
,
_x2
,
_y2
,
this
.
Ln
.
tailEnd
.
type
,
this
.
Ln
.
tailEnd
.
GetWidth
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
.
Ln
.
tailEnd
.
GetLen
(
_pen_w
,
7
/
AscCommon
.
g_dKoef_mm_to_pix
),
this
,
trans1
);
this
.
Graphics
.
ArrayPoints
=
arr
;
}
}
...
...
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