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
4e06ef33
Commit
4e06ef33
authored
Mar 22, 2017
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for bug 33808. 255 chars limit for download title.
parent
f38d7537
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
6 deletions
+12
-6
cell/api.js
cell/api.js
+1
-1
common/commonDefines.js
common/commonDefines.js
+2
-0
common/editorscommon.js
common/editorscommon.js
+7
-3
slide/api.js
slide/api.js
+1
-1
word/api.js
word/api.js
+1
-1
No files found.
cell/api.js
View file @
4e06ef33
...
...
@@ -726,7 +726,7 @@ var editor;
oAdditionalData
[
"
userid
"
]
=
this
.
documentUserId
;
oAdditionalData
[
"
jwt
"
]
=
this
.
CoAuthoringApi
.
get_jwt
();
oAdditionalData
[
"
outputformat
"
]
=
sFormat
;
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
sFormat
));
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
sFormat
)
,
Asc
.
c_nMaxDownloadTitleLen
);
if
(
DownloadType
.
Print
===
options
.
downloadType
)
{
oAdditionalData
[
"
inline
"
]
=
1
;
}
...
...
common/commonDefines.js
View file @
4e06ef33
...
...
@@ -44,6 +44,7 @@
var
c_oAscMaxColumnWidth
=
255
;
var
c_oAscMaxRowHeight
=
409
;
var
c_nMaxConversionTime
=
900000
;
//depends on config
var
c_nMaxDownloadTitleLen
=
255
;
//files type for Saving & DownloadAs
var
c_oAscFileType
=
{
...
...
@@ -1081,6 +1082,7 @@
window
[
'
Asc
'
][
'
c_oAscMaxColumnWidth
'
]
=
window
[
'
Asc
'
].
c_oAscMaxColumnWidth
=
c_oAscMaxColumnWidth
;
window
[
'
Asc
'
][
'
c_oAscMaxRowHeight
'
]
=
window
[
'
Asc
'
].
c_oAscMaxRowHeight
=
c_oAscMaxRowHeight
;
window
[
'
Asc
'
][
'
c_nMaxConversionTime
'
]
=
window
[
'
Asc
'
].
c_nMaxConversionTime
=
c_nMaxConversionTime
;
window
[
'
Asc
'
][
'
c_nMaxDownloadTitleLen
'
]
=
window
[
'
Asc
'
].
c_nMaxDownloadTitleLen
=
c_nMaxDownloadTitleLen
;
window
[
'
Asc
'
][
'
c_oAscFileType
'
]
=
window
[
'
Asc
'
].
c_oAscFileType
=
c_oAscFileType
;
prot
=
c_oAscFileType
;
prot
[
'
UNKNOWN
'
]
=
prot
.
UNKNOWN
;
...
...
common/editorscommon.js
View file @
4e06ef33
...
...
@@ -861,10 +861,14 @@ function GetFileExtension (sName) {
return
sName
.
substring
(
nIndex
+
1
).
toLowerCase
();
return
null
;
}
function
changeFileExtention
(
sName
,
sNewExt
)
{
function
changeFileExtention
(
sName
,
sNewExt
,
opt_lengthLimit
)
{
var
sOldExt
=
GetFileExtension
(
sName
);
if
(
sOldExt
)
{
return
sName
.
substring
(
0
,
sName
.
length
-
sOldExt
.
length
)
+
sNewExt
;
var
nIndexEnd
=
sOldExt
?
sName
.
length
-
sOldExt
.
length
-
1
:
sName
.
length
;
if
(
opt_lengthLimit
&&
nIndexEnd
+
sNewExt
.
length
+
1
>
opt_lengthLimit
)
{
nIndexEnd
=
opt_lengthLimit
-
sNewExt
.
length
-
1
;
}
if
(
nIndexEnd
<
sName
.
length
)
{
return
sName
.
substring
(
0
,
nIndexEnd
)
+
'
.
'
+
sNewExt
;
}
else
{
return
sName
+
'
.
'
+
sNewExt
;
}
...
...
slide/api.js
View file @
4e06ef33
...
...
@@ -6063,7 +6063,7 @@ background-repeat: no-repeat;\
oAdditionalData
[
"
userid
"
]
=
this
.
documentUserId
;
oAdditionalData
[
"
jwt
"
]
=
this
.
CoAuthoringApi
.
get_jwt
();
oAdditionalData
[
"
outputformat
"
]
=
filetype
;
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
filetype
));
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
filetype
)
,
Asc
.
c_nMaxDownloadTitleLen
);
oAdditionalData
[
"
savetype
"
]
=
AscCommon
.
c_oAscSaveTypes
.
CompleteAll
;
if
(
DownloadType
.
Print
===
options
.
downloadType
)
{
...
...
word/api.js
View file @
4e06ef33
...
...
@@ -6464,7 +6464,7 @@ background-repeat: no-repeat;\
oAdditionalData
[
"
userid
"
]
=
this
.
documentUserId
;
oAdditionalData
[
"
jwt
"
]
=
this
.
CoAuthoringApi
.
get_jwt
();
oAdditionalData
[
"
outputformat
"
]
=
filetype
;
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
filetype
));
oAdditionalData
[
"
title
"
]
=
AscCommon
.
changeFileExtention
(
this
.
documentTitle
,
AscCommon
.
getExtentionByFormat
(
filetype
)
,
Asc
.
c_nMaxDownloadTitleLen
);
oAdditionalData
[
"
savetype
"
]
=
AscCommon
.
c_oAscSaveTypes
.
CompleteAll
;
if
(
'
savefromorigin
'
===
command
)
{
...
...
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