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
0a3d87e1
Commit
0a3d87e1
authored
Aug 09, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ed9ad629
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
64 deletions
+59
-64
common/Local/common.js
common/Local/common.js
+14
-1
common/editorscommon.js
common/editorscommon.js
+1
-35
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+1
-1
slide/Local/api.js
slide/Local/api.js
+0
-24
slide/api.js
slide/api.js
+30
-2
word/Drawing/documentrenderer.js
word/Drawing/documentrenderer.js
+13
-1
No files found.
common/Local/common.js
View file @
0a3d87e1
...
...
@@ -244,7 +244,20 @@ window["DesktopOfflineAppDocumentSignatures"] = function(_json)
_editor
.
signatures
=
[];
var
_signatures
=
JSON
.
parse
(
_json
);
var
_signatures
=
null
;
try
{
_signatures
=
JSON
.
parse
(
_json
);
}
catch
(
err
)
{
return
;
}
if
(
!
_signatures
)
return
;
var
_count
=
_signatures
[
"
count
"
];
var
_data
=
_signatures
[
"
data
"
];
var
_sign
;
...
...
common/editorscommon.js
View file @
0a3d87e1
...
...
@@ -384,39 +384,6 @@
}
return
false
;
}
function
Utf8ArrayToStr
(
array
)
{
var
out
,
i
,
len
,
c
;
var
char2
,
char3
;
out
=
""
;
len
=
array
.
length
;
i
=
0
;
while
(
i
<
len
)
{
c
=
array
[
i
++
];
switch
(
c
>>
4
)
{
case
0
:
case
1
:
case
2
:
case
3
:
case
4
:
case
5
:
case
6
:
case
7
:
// 0xxxxxxx
out
+=
String
.
fromCharCode
(
c
);
break
;
case
12
:
case
13
:
// 110x xxxx 10xx xxxx
char2
=
array
[
i
++
];
out
+=
String
.
fromCharCode
(((
c
&
0x1F
)
<<
6
)
|
(
char2
&
0x3F
));
break
;
case
14
:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2
=
array
[
i
++
];
char3
=
array
[
i
++
];
out
+=
String
.
fromCharCode
(((
c
&
0x0F
)
<<
12
)
|
((
char2
&
0x3F
)
<<
6
)
|
((
char3
&
0x3F
)
<<
0
));
break
;
}
}
return
out
;
}
function
openFileCommand
(
binUrl
,
changesUrl
,
Signature
,
callback
)
{
var
bError
=
false
,
oResult
=
new
OpenFileResult
(),
bEndLoadFile
=
false
,
bEndLoadChanges
=
false
;
...
...
@@ -449,8 +416,7 @@
if
(
oResult
.
bSerFormat
)
{
oResult
.
data
=
stream
;
}
else
{
//todo arraybuffer
oResult
.
data
=
Utf8ArrayToStr
(
stream
.
data
);
oResult
.
data
=
stream
;
}
}
else
{
bError
=
true
;
...
...
slide/Drawing/DrawingDocument.js
View file @
0a3d87e1
...
...
@@ -1737,7 +1737,7 @@ function CDrawingDocument()
}
var
x_pix
=
(
__x
*
g_dKoef_mm_to_pix
+
10
+
(
_word_control
.
m_oMainParent
.
AbsolutePosition
.
L
+
_word_control
.
m_oNotesContainer
.
AbsolutePosition
.
L
)
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
__y
*
g_dKoef_mm_to_pix
+
10
+
(
_word_control
.
m_oMainParent
.
AbsolutePosition
.
T
+
_word_control
.
m_oNotesContainer
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
)
>>
0
;
var
y_pix
=
(
__y
*
g_dKoef_mm_to_pix
+
(
_word_control
.
m_oMainParent
.
AbsolutePosition
.
T
+
_word_control
.
m_oNotesContainer
.
AbsolutePosition
.
T
)
*
g_dKoef_mm_to_pix
)
>>
0
;
return
{
X
:
x_pix
,
Y
:
y_pix
,
Error
:
false
};
}
...
...
slide/Local/api.js
View file @
0a3d87e1
...
...
@@ -283,27 +283,3 @@ Asc['asc_docs_api'].prototype.asc_setAdvancedOptions = function(idOption, option
}
};
Asc
[
'
asc_docs_api
'
].
prototype
[
"
asc_setAdvancedOptions
"
]
=
Asc
[
'
asc_docs_api
'
].
prototype
.
asc_setAdvancedOptions
;
Asc
[
'
asc_docs_api
'
].
prototype
.
DemonstrationReporterStart
=
function
(
startObject
)
{
this
.
reporterStartObject
=
startObject
;
window
[
"
AscDesktopEditor
"
][
"
startReporter
"
](
window
.
location
.
ref
);
};
Asc
[
'
asc_docs_api
'
].
prototype
.
DemonstrationReporterEnd
=
function
()
{
window
[
"
AscDesktopEditor
"
][
"
endReporter
"
]();
};
Asc
[
'
asc_docs_api
'
].
prototype
.
sendToReporter
=
function
(
value
)
{
window
[
"
AscDesktopEditor
"
][
"
sendToReporter
"
](
value
);
};
Asc
[
'
asc_docs_api
'
].
prototype
.
sendFromReporter
=
function
(
value
)
{
window
[
"
AscDesktopEditor
"
][
"
sendFromReporter
"
](
value
);
};
Asc
[
'
asc_docs_api
'
].
prototype
[
"
sendFromReporter
"
]
=
Asc
[
'
asc_docs_api
'
].
prototype
.
sendFromReporter
;
\ No newline at end of file
slide/api.js
View file @
0a3d87e1
...
...
@@ -5860,10 +5860,11 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
.
StartDemonstration
=
function
(
div_id
,
slidestart_num
,
reporterStartObject
)
{
if
(
reporterStartObject
&&
!
this
.
isReporterMode
)
var
is_reporter
=
(
reporterStartObject
&&
!
this
.
isReporterMode
);
if
(
is_reporter
)
this
.
DemonstrationReporterStart
(
reporterStartObject
);
if
(
this
.
reporterWindow
)
if
(
is_reporter
&&
(
this
.
reporterWindow
||
window
[
"
AscDesktopEditor
"
])
)
this
.
WordControl
.
DemonstrationManager
.
StartWaitReporter
(
div_id
,
slidestart_num
,
true
);
else
this
.
WordControl
.
DemonstrationManager
.
Start
(
div_id
,
slidestart_num
,
true
);
...
...
@@ -5881,6 +5882,12 @@ background-repeat: no-repeat;\
{
this
.
reporterStartObject
=
startObject
;
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
startReporter
"
](
window
.
location
.
href
);
return
;
}
var
dualScreenLeft
=
(
window
.
screenLeft
!=
undefined
)
?
window
.
screenLeft
:
screen
.
left
;
var
dualScreenTop
=
(
window
.
screenTop
!=
undefined
)
?
window
.
screenTop
:
screen
.
top
;
...
...
@@ -5906,6 +5913,12 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
.
DemonstrationReporterEnd
=
function
()
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
endReporter
"
]();
return
;
}
if
(
!
this
.
reporterWindow
)
return
;
...
...
@@ -5995,12 +6008,24 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
.
sendToReporter
=
function
(
value
)
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
sendToReporter
"
](
value
);
return
;
}
if
(
this
.
reporterWindow
)
this
.
reporterWindow
.
postMessage
(
value
,
"
*
"
);
};
asc_docs_api
.
prototype
.
sendFromReporter
=
function
(
value
)
{
if
(
window
[
"
AscDesktopEditor
"
])
{
window
[
"
AscDesktopEditor
"
][
"
sendFromReporter
"
](
value
);
return
;
}
window
.
postMessage
(
value
,
"
*
"
);
};
...
...
@@ -7217,6 +7242,9 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
[
"
asc_OnHideContextMenu
"
]
=
asc_docs_api
.
prototype
.
asc_OnHideContextMenu
;
asc_docs_api
.
prototype
[
"
asc_OnShowContextMenu
"
]
=
asc_docs_api
.
prototype
.
asc_OnShowContextMenu
;
asc_docs_api
.
prototype
[
"
DemonstrationReporterMessages
"
]
=
asc_docs_api
.
prototype
.
DemonstrationReporterMessages
;
asc_docs_api
.
prototype
[
"
DemonstrationToReporterMessages
"
]
=
asc_docs_api
.
prototype
.
DemonstrationToReporterMessages
;
window
[
'
Asc
'
][
'
asc_CCommentData
'
]
=
window
[
'
Asc
'
].
asc_CCommentData
=
asc_CCommentData
;
asc_CCommentData
.
prototype
[
'
asc_getText
'
]
=
asc_CCommentData
.
prototype
.
asc_getText
;
...
...
word/Drawing/documentrenderer.js
View file @
0a3d87e1
...
...
@@ -194,6 +194,18 @@ function CStream(data, size)
function
CreateDocumentData
(
szSrc
)
{
var
isBase64
=
false
;
if
(
typeof
(
szSrc
)
==
"
string
"
||
szSrc
instanceof
String
){
isBase64
=
true
;
}
var
stream
=
null
;
if
(
!
isBase64
)
{
stream
=
new
CStream
(
szSrc
.
data
,
szSrc
.
size
);
return
stream
;
}
var
srcLen
=
szSrc
.
length
;
var
nWritten
=
0
;
...
...
@@ -216,7 +228,7 @@ function CreateDocumentData(szSrc)
return
null
;
var
pointer
=
g_memory
.
Alloc
(
dstLen
);
var
stream
=
new
CStream
(
pointer
.
data
,
dstLen
);
stream
=
new
CStream
(
pointer
.
data
,
dstLen
);
stream
.
obj
=
pointer
.
obj
;
var
dstPx
=
stream
.
data
;
...
...
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