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
aa9b1036
Commit
aa9b1036
authored
Jul 05, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/4.0.1' into develop
parents
8c746dfa
02c70890
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
49 deletions
+88
-49
common/Shapes/Serialize.js
common/Shapes/Serialize.js
+61
-42
common/Shapes/SerializeWriter.js
common/Shapes/SerializeWriter.js
+21
-2
common/apiBase.js
common/apiBase.js
+3
-0
common/plugins.js
common/plugins.js
+3
-3
word/api.js
word/api.js
+0
-2
No files found.
common/Shapes/Serialize.js
View file @
aa9b1036
...
@@ -5940,6 +5940,9 @@ function BinaryPPTYLoader()
...
@@ -5940,6 +5940,9 @@ function BinaryPPTYLoader()
s
.
Skip2
(
1
);
// start attributes
s
.
Skip2
(
1
);
// start attributes
var
fMaxTopMargin
=
0
,
fMaxBottomMargin
=
0
,
fMaxTopBorder
=
0
,
fMaxBottomBorder
=
0
;
var
fRowHeight
=
5
;
while
(
true
)
while
(
true
)
{
{
var
_at
=
s
.
GetUChar
();
var
_at
=
s
.
GetUChar
();
...
@@ -5950,7 +5953,8 @@ function BinaryPPTYLoader()
...
@@ -5950,7 +5953,8 @@ function BinaryPPTYLoader()
{
{
case
0
:
case
0
:
{
{
row
.
Set_Height
(
s
.
GetULong
()
/
36000
,
Asc
.
linerule_AtLeast
);
fRowHeight
=
s
.
GetULong
()
/
36000
;
break
;
break
;
}
}
default
:
default
:
...
@@ -5961,53 +5965,68 @@ function BinaryPPTYLoader()
...
@@ -5961,53 +5965,68 @@ function BinaryPPTYLoader()
s
.
Skip2
(
5
);
// type + len
s
.
Skip2
(
5
);
// type + len
var
_count
=
s
.
GetULong
();
var
_count
=
s
.
GetULong
();
if
(
true
)
for
(
var
i
=
0
;
i
<
_count
;
i
++
)
{
{
for
(
var
i
=
0
;
i
<
_count
;
i
++
)
s
.
Skip2
(
1
);
{
var
bIsNoHMerge
=
this
.
ReadCell
(
row
.
Content
[
i
]);
s
.
Skip2
(
1
);
if
(
bIsNoHMerge
===
false
)
var
bIsNoHMerge
=
this
.
ReadCell
(
row
.
Content
[
i
]);
{
if
(
bIsNoHMerge
===
false
)
row
.
Remove_Cell
(
i
);
{
i
--
;
row
.
Remove_Cell
(
i
);
_count
--
;
i
--
;
}
_count
--
;
var
_gridCol
=
1
;
}
if
(
"
number
"
==
typeof
(
row
.
Content
[
i
].
Pr
.
GridSpan
))
var
_gridCol
=
1
;
{
if
(
"
number
"
==
typeof
(
row
.
Content
[
i
].
Pr
.
GridSpan
))
_gridCol
=
row
.
Content
[
i
].
Pr
.
GridSpan
;
{
}
_gridCol
=
row
.
Content
[
i
].
Pr
.
GridSpan
;
}
if
(
_gridCol
>
(
_count
-
i
))
if
(
_gridCol
>
(
_count
-
i
))
{
{
_gridCol
=
_count
-
i
;
_gridCol
=
_count
-
i
;
row
.
Content
[
i
].
Pr
.
GridSpan
=
_gridCol
;
row
.
Content
[
i
].
Pr
.
GridSpan
=
_gridCol
;
if
(
1
==
row
.
Content
[
i
].
Pr
.
GridSpan
)
if
(
1
==
row
.
Content
[
i
].
Pr
.
GridSpan
)
row
.
Content
[
i
].
Pr
.
GridSpan
=
undefined
;
row
.
Content
[
i
].
Pr
.
GridSpan
=
undefined
;
}
}
_gridCol
--
;
_gridCol
--
;
while
(
_gridCol
>
0
)
while
(
_gridCol
>
0
)
{
{
i
++
;
i
++
;
if
(
i
>=
_count
)
if
(
i
>=
_count
)
break
;
break
;
s
.
Skip2
(
1
);
s
.
Skip2
(
1
);
this
.
ReadCell
(
row
.
Content
[
i
]);
this
.
ReadCell
(
row
.
Content
[
i
]);
// удаляем
// удаляем
row
.
Remove_Cell
(
i
);
row
.
Remove_Cell
(
i
);
i
--
;
i
--
;
_count
--
;
_count
--
;
--
_gridCol
;
--
_gridCol
;
}
}
}
}
}
/*
for
(
i
=
0
;
i
<
row
.
Content
.
length
;
++
i
){
var
oCell
=
row
.
Content
[
i
];
var
oMargins
=
oCell
.
Get_Margins
();
if
(
oMargins
.
Bottom
.
W
>
fMaxBottomMargin
){
fMaxBottomMargin
=
oMargins
.
Bottom
.
W
;
}
if
(
oMargins
.
Top
.
W
>
fMaxTopMargin
){
fMaxTopMargin
=
oMargins
.
Top
.
W
;
}
var
oBorders
=
oCell
.
Get_Borders
();
if
(
oBorders
.
Top
.
Size
>
fMaxTopBorder
){
fMaxTopBorder
=
oBorders
.
Top
.
Size
;
}
if
(
oBorders
.
Bottom
.
Size
>
fMaxBottomBorder
){
fMaxBottomBorder
=
oBorders
.
Bottom
.
Size
;
}
}
row
.
Set_Height
(
Math
.
max
(
1
,
fRowHeight
-
fMaxTopMargin
-
fMaxBottomMargin
-
fMaxTopBorder
-
fMaxBottomBorder
),
Asc
.
linerule_AtLeast
);
/*
if (row.Content.length == _count)
if (row.Content.length == _count)
{
{
for (var i = 0; i < _count; i++)
for (var i = 0; i < _count; i++)
...
...
common/Shapes/SerializeWriter.js
View file @
aa9b1036
...
@@ -3161,8 +3161,27 @@ function CBinaryFileWriter()
...
@@ -3161,8 +3161,27 @@ function CBinaryFileWriter()
{
{
oThis
.
WriteUChar
(
g_nodeAttributeStart
);
oThis
.
WriteUChar
(
g_nodeAttributeStart
);
if
(
row
.
Pr
.
Height
!==
undefined
&&
row
.
Pr
.
Height
!=
null
)
if
(
row
.
Pr
.
Height
!==
undefined
&&
row
.
Pr
.
Height
!=
null
){
oThis
.
_WriteInt1
(
0
,
(
row
.
Pr
.
Height
.
Value
*
36000
)
>>
0
);
var
fMaxTopMargin
=
0
,
fMaxBottomMargin
=
0
,
fMaxTopBorder
=
0
,
fMaxBottomBorder
=
0
;
for
(
i
=
0
;
i
<
row
.
Content
.
length
;
++
i
){
var
oCell
=
row
.
Content
[
i
];
var
oMargins
=
oCell
.
Get_Margins
();
if
(
oMargins
.
Bottom
.
W
>
fMaxBottomMargin
){
fMaxBottomMargin
=
oMargins
.
Bottom
.
W
;
}
if
(
oMargins
.
Top
.
W
>
fMaxTopMargin
){
fMaxTopMargin
=
oMargins
.
Top
.
W
;
}
var
oBorders
=
oCell
.
Get_Borders
();
if
(
oBorders
.
Top
.
Size
>
fMaxTopBorder
){
fMaxTopBorder
=
oBorders
.
Top
.
Size
;
}
if
(
oBorders
.
Bottom
.
Size
>
fMaxBottomBorder
){
fMaxBottomBorder
=
oBorders
.
Bottom
.
Size
;
}
}
}
oThis
.
_WriteInt1
(
0
,
(
(
row
.
Pr
.
Height
.
Value
+
fMaxBottomMargin
+
fMaxTopMargin
+
fMaxTopBorder
+
fMaxBottomBorder
)
*
36000
)
>>
0
);
oThis
.
WriteUChar
(
g_nodeAttributeEnd
);
oThis
.
WriteUChar
(
g_nodeAttributeEnd
);
...
...
common/apiBase.js
View file @
aa9b1036
...
@@ -887,6 +887,7 @@
...
@@ -887,6 +887,7 @@
baseEditorsApi
.
prototype
.
_onEndLoadSdk
=
function
()
baseEditorsApi
.
prototype
.
_onEndLoadSdk
=
function
()
{
{
// init drag&drop
// init drag&drop
var
t
=
this
;
AscCommon
.
InitDragAndDrop
(
this
.
HtmlElement
,
function
(
error
,
files
)
AscCommon
.
InitDragAndDrop
(
this
.
HtmlElement
,
function
(
error
,
files
)
{
{
t
.
_uploadCallback
(
error
,
files
);
t
.
_uploadCallback
(
error
,
files
);
...
@@ -911,6 +912,8 @@
...
@@ -911,6 +912,8 @@
{
{
this
.
asc_enableKeyEvents
(
this
.
tmpFocus
);
this
.
asc_enableKeyEvents
(
this
.
tmpFocus
);
}
}
this
.
pluginsManager
=
Asc
.
createPluginsManager
(
this
);
};
};
baseEditorsApi
.
prototype
.
sendStandartTextures
=
function
()
baseEditorsApi
.
prototype
.
sendStandartTextures
=
function
()
...
...
common/plugins.js
View file @
aa9b1036
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
if
(
true
)
if
(
true
)
{
{
this
.
api
.
asc_fireCallback
(
"
asc_onPluginClose
"
);
this
.
api
.
sendEvent
(
"
asc_onPluginClose
"
);
var
_div
=
document
.
getElementById
(
"
plugin_iframe
"
);
var
_div
=
document
.
getElementById
(
"
plugin_iframe
"
);
if
(
_div
)
if
(
_div
)
_div
.
parentNode
.
removeChild
(
_div
);
_div
.
parentNode
.
removeChild
(
_div
);
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
if
(
this
.
current
.
variations
[
this
.
currentVariation
].
isVisual
&&
this
.
startData
.
getAttribute
(
"
resize
"
)
!==
true
)
if
(
this
.
current
.
variations
[
this
.
currentVariation
].
isVisual
&&
this
.
startData
.
getAttribute
(
"
resize
"
)
!==
true
)
{
{
this
.
api
.
asc_fireCallback
(
"
asc_onPluginShow
"
,
this
.
current
,
this
.
currentVariation
);
this
.
api
.
sendEvent
(
"
asc_onPluginShow
"
,
this
.
current
,
this
.
currentVariation
);
}
}
else
else
{
{
...
@@ -299,7 +299,7 @@
...
@@ -299,7 +299,7 @@
_pluginsInstall
[
"
pluginsData
"
].
push
(
this
.
plugins
[
i
].
serialize
());
_pluginsInstall
[
"
pluginsData
"
].
push
(
this
.
plugins
[
i
].
serialize
());
}
}
this
.
api
.
asc_fireCallback
(
"
asc_onPluginsInit
"
,
_pluginsInstall
);
this
.
api
.
sendEvent
(
"
asc_onPluginsInit
"
,
_pluginsInstall
);
},
},
startLongAction
:
function
()
startLongAction
:
function
()
...
...
word/api.js
View file @
aa9b1036
...
@@ -6652,7 +6652,6 @@ background-repeat: no-repeat;\
...
@@ -6652,7 +6652,6 @@ background-repeat: no-repeat;\
if
(
this
.
bInit_word_control
===
false
)
if
(
this
.
bInit_word_control
===
false
)
{
{
this
.
bInit_word_control
=
true
;
this
.
bInit_word_control
=
true
;
this
.
pluginsManager
=
Asc
.
createPluginsManager
(
this
);
this
.
asc_fireCallback
(
"
asc_onDocumentContentReady
"
);
this
.
asc_fireCallback
(
"
asc_onDocumentContentReady
"
);
}
}
}
}
...
@@ -6751,7 +6750,6 @@ background-repeat: no-repeat;\
...
@@ -6751,7 +6750,6 @@ background-repeat: no-repeat;\
if
(
false
===
this
.
isSaveFonts_Images
)
if
(
false
===
this
.
isSaveFonts_Images
)
{
{
this
.
bInit_word_control
=
true
;
this
.
bInit_word_control
=
true
;
this
.
pluginsManager
=
Asc
.
createPluginsManager
(
this
);
this
.
asc_fireCallback
(
"
asc_onDocumentContentReady
"
);
this
.
asc_fireCallback
(
"
asc_onDocumentContentReady
"
);
}
}
...
...
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