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
18ff92f2
Commit
18ff92f2
authored
Jun 28, 2016
by
alexey.musinov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/sdkjs
into develop
parents
6d22a5ba
6123d3a5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
126 additions
and
77 deletions
+126
-77
cell/model/autofilters.js
cell/model/autofilters.js
+6
-0
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+13
-2
common/apiBase.js
common/apiBase.js
+1
-1
common/apiCommon.js
common/apiCommon.js
+7
-1
common/commonDefines.js
common/commonDefines.js
+29
-1
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+65
-71
word/api.js
word/api.js
+5
-1
No files found.
cell/model/autofilters.js
View file @
18ff92f2
...
...
@@ -553,7 +553,13 @@
if
(
filterObj
.
filter
.
TableStyleInfo
!==
undefined
)
autoFilter
=
filterObj
.
filter
.
AutoFilter
;
if
(
!
autoFilter
)
{
autoFilter
=
new
AscCommonExcel
.
AutoFilter
();
autoFilter
.
Ref
=
currentFilter
.
Ref
.
clone
();
filterObj
.
filter
.
AutoFilter
=
autoFilter
;
}
var
newFilterColumn
;
if
(
filterObj
.
index
!==
null
)
{
...
...
common/Drawings/Format/Format.js
View file @
18ff92f2
...
...
@@ -11611,6 +11611,7 @@ function CreateAscStroke(ln, _canChangeArrows)
break
;
}
}
}
...
...
@@ -11650,7 +11651,12 @@ function CreateAscStroke(ln, _canChangeArrows)
{
ret
.
asc_putLineendstyle
(
LineEndType
.
None
);
}
if
(
AscFormat
.
isRealNumber
(
ln
.
prstDash
)){
ret
.
prstDash
=
ln
.
prstDash
;
}
else
{
ret
.
prstDash
=
Asc
.
c_oDashType
.
solid
;
}
if
(
true
===
_canChangeArrows
)
ret
.
canChangeArrows
=
true
;
...
...
@@ -11739,7 +11745,12 @@ function CorrectUniStroke(asc_stroke, unistroke, flag)
ret
.
tailEnd
.
w
=
2
-
((
_end_size
/
3
)
>>
0
);
ret
.
tailEnd
.
len
=
2
-
(
_end_size
%
3
);
}
if
(
AscFormat
.
isRealNumber
(
asc_stroke
.
prstDash
)){
ret
.
prstDash
=
asc_stroke
.
prstDash
;
}
else
{
ret
.
prstDash
=
Asc
.
c_oDashType
.
solid
;
}
return
ret
;
}
...
...
common/apiBase.js
View file @
18ff92f2
...
...
@@ -867,7 +867,7 @@
// Offline mode
baseEditorsApi
.
prototype
.
asc_isOffline
=
function
()
{
return
false
;
return
(
window
.
location
.
protocol
.
indexOf
(
"
file
"
)
==
0
)
?
true
:
false
;
};
baseEditorsApi
.
prototype
.
asc_getUrlType
=
function
(
url
)
{
...
...
common/apiCommon.js
View file @
18ff92f2
...
...
@@ -2022,6 +2022,7 @@
this
.
type
=
null
;
this
.
width
=
null
;
this
.
color
=
null
;
this
.
prstDash
=
null
;
this
.
LineJoin
=
null
;
this
.
LineCap
=
null
;
...
...
@@ -2057,7 +2058,10 @@
asc_getLineendsize
:
function
(){
return
this
.
LineEndSize
;},
asc_putLineendsize
:
function
(
v
){
this
.
LineEndSize
=
v
;},
asc_getCanChangeArrows
:
function
(){
return
this
.
canChangeArrows
;}
asc_getCanChangeArrows
:
function
(){
return
this
.
canChangeArrows
;},
asc_putPrstDash
:
function
(
v
){
this
.
prstDash
=
v
;},
asc_getPrstDash
:
function
(){
return
this
.
prstDash
;}
};
// цвет. может быть трех типов:
...
...
@@ -2868,6 +2872,8 @@
prot
[
"
get_lineendsize
"
]
=
prot
[
"
asc_getLineendsize
"
]
=
prot
.
asc_getLineendsize
;
prot
[
"
put_lineendsize
"
]
=
prot
[
"
asc_putLineendsize
"
]
=
prot
.
asc_putLineendsize
;
prot
[
"
get_canChangeArrows
"
]
=
prot
[
"
asc_getCanChangeArrows
"
]
=
prot
.
asc_getCanChangeArrows
;
prot
[
"
put_prstDash
"
]
=
prot
[
"
asc_putPrstDash
"
]
=
prot
.
asc_putPrstDash
;
prot
[
"
get_prstDash
"
]
=
prot
[
"
asc_getPrstDash
"
]
=
prot
.
asc_getPrstDash
;
window
[
"
AscCommon
"
].
CAscColorScheme
=
CAscColorScheme
;
prot
=
CAscColorScheme
.
prototype
;
...
...
common/commonDefines.js
View file @
18ff92f2
...
...
@@ -812,6 +812,20 @@ var c_oAscPrintDefaultSettings = {
CustomMode
:
3
};
var
c_oDashType
=
{
dash
:
0
,
dashDot
:
1
,
dot
:
2
,
lgDash
:
3
,
lgDashDot
:
4
,
lgDashDotDot
:
5
,
solid
:
6
,
sysDash
:
7
,
sysDashDot
:
8
,
sysDashDotDot
:
9
,
sysDot
:
10
};
var
c_oAscEncodings
=
[
[
0
,
28596
,
"
ISO-8859-6
"
,
"
Arabic (ISO 8859-6)
"
],
[
1
,
720
,
"
DOS-720
"
,
"
Arabic (OEM 720)
"
],
...
...
@@ -1399,7 +1413,21 @@ window['Asc']['c_oAscMaxCellOrCommentLength'] = window['Asc'].c_oAscMaxCellOrCom
prot
[
'
DeleteRows
'
]
=
prot
.
DeleteRows
;
prot
[
'
DeleteTable
'
]
=
prot
.
DeleteTable
;
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
Asc
'
][
'
c_oDashType
'
]
=
window
[
'
Asc
'
].
c_oDashType
=
c_oDashType
;
prot
=
c_oDashType
;
prot
[
'
dash
'
]
=
prot
.
dash
;
prot
[
'
dashDot
'
]
=
prot
.
dashDot
;
prot
[
'
dot
'
]
=
prot
.
dot
;
prot
[
'
lgDash
'
]
=
prot
.
lgDash
;
prot
[
'
lgDashDot
'
]
=
prot
.
lgDashDot
;
prot
[
'
lgDashDotDot
'
]
=
prot
.
lgDashDotDot
;
prot
[
'
solid
'
]
=
prot
.
solid
;
prot
[
'
sysDash
'
]
=
prot
.
sysDash
;
prot
[
'
sysDashDot
'
]
=
prot
.
sysDashDot
;
prot
[
'
sysDashDotDot
'
]
=
prot
.
sysDashDotDot
;
prot
[
'
sysDot
'
]
=
prot
.
sysDot
;
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
"
AscCommon
"
].
g_cCharDelimiter
=
g_cCharDelimiter
;
window
[
"
AscCommon
"
].
bDate1904
=
false
;
window
[
"
AscCommon
"
].
c_oAscAdvancedOptionsAction
=
c_oAscAdvancedOptionsAction
;
...
...
word/Editor/Footnotes.js
View file @
18ff92f2
...
...
@@ -580,6 +580,33 @@ CFootnotesController.prototype.private_GetFootnotesOnPage = function(PageAbs, St
oFootnotes
[
oFootnote
.
Get_Id
()]
=
oFootnote
;
}
};
CFootnotesController
.
prototype
.
private_OnNotValidActionForFootnotes
=
function
()
{
// Пока ничего не делаем, если надо будет выдавать сообщение, то обработать нужно будет здесь.
};
CFootnotesController
.
prototype
.
private_IsOnFootnoteSelected
=
function
()
{
var
nCounter
=
0
;
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
nCounter
++
;
if
(
nCounter
>
1
)
return
false
;
}
return
true
;
};
CFootnotesController
.
prototype
.
private_CheckFootnotesSelectionBeforeAction
=
function
()
{
if
(
true
!==
this
.
private_IsOnFootnoteSelected
()
||
null
===
this
.
CurFootnote
)
{
this
.
private_OnNotValidActionForFootnotes
();
return
false
;
}
return
true
;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Controller area
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -603,108 +630,75 @@ CFootnotesController.prototype.GetCurPage = function()
};
CFootnotesController
.
prototype
.
AddNewParagraph
=
function
(
bRecalculate
,
bForceAdd
)
{
var
bRetValue
=
false
;
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
bRetValue
=
this
.
CurFootnote
.
Add_NewParagraph
(
bRecalculate
,
bForceAdd
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
false
;
return
bRetValue
;
return
this
.
CurFootnote
.
Add_NewParagraph
(
bRecalculate
,
bForceAdd
)
;
};
CFootnotesController
.
prototype
.
AddInlineImage
=
function
(
nW
,
nH
,
oImage
,
oChart
,
bFlow
)
{
var
bRetValue
=
false
;
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
bRetValue
=
this
.
CurFootnote
.
Add_InlineImage
(
nW
,
nH
,
oImage
,
oChart
,
bFlow
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
false
;
return
bRetValue
;
return
this
.
CurFootnote
.
Add_InlineImage
(
nW
,
nH
,
oImage
,
oChart
,
bFlow
)
;
};
CFootnotesController
.
prototype
.
AddOleObject
=
function
(
W
,
H
,
nWidthPix
,
nHeightPix
,
Img
,
Data
,
sApplicationId
)
{
var
bRetValue
=
false
;
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
bRetValue
=
this
.
CurFootnote
.
Add_OleObject
(
W
,
H
,
nWidthPix
,
nHeightPix
,
Img
,
Data
,
sApplicationId
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
false
;
return
bRetValue
;
return
this
.
CurFootnote
.
Add_OleObject
(
W
,
H
,
nWidthPix
,
nHeightPix
,
Img
,
Data
,
sApplicationId
)
;
};
CFootnotesController
.
prototype
.
AddTextArt
=
function
(
nStyle
)
{
var
bRetValue
=
false
;
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
bRetValue
=
this
.
CurFootnote
.
Add_TextArt
(
nStyle
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
false
;
return
bRetValue
;
return
this
.
CurFootnote
.
Add_TextArt
(
nStyle
)
;
};
CFootnotesController
.
prototype
.
EditChart
=
function
(
Chart
)
{
// TODO: Реализовать
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
;
this
.
CurFootnote
.
Edit_Chart
(
Chart
);
};
CFootnotesController
.
prototype
.
AddInlineTable
=
function
(
Cols
,
Rows
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
{
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Add_InlineTable
(
Cols
,
Rows
);
}
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
;
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Add_InlineTable
(
Cols
,
Rows
);
};
CFootnotesController
.
prototype
.
ClearParagraphFormatting
=
function
()
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
{
}
else
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
if
(
null
!==
this
.
CurFootnote
)
this
.
Cur
Footnote
.
Paragraph_ClearFormatting
();
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
o
Footnote
.
Paragraph_ClearFormatting
();
}
};
CFootnotesController
.
prototype
.
AddToParagraph
=
function
(
oItem
,
bRecalculate
)
{
// TODO: Доделать селект и курсор
if
(
true
===
this
.
Selection
.
Use
)
if
(
oItem
instanceof
ParaTextPr
)
{
for
(
var
sId
in
this
.
Selection
.
Footnotes
)
{
var
oFootnote
=
this
.
Selection
.
Footnotes
[
sId
];
oFootnote
.
Paragraph_Add
(
oItem
,
false
);
}
if
(
false
!==
bRecalculate
)
{
this
.
LogicDocument
.
Recalculate
();
}
}
else
{
if
(
false
===
this
.
private_CheckFootnotesSelectionBeforeAction
())
return
;
if
(
null
!==
this
.
CurFootnote
)
this
.
CurFootnote
.
Paragraph_Add
(
oItem
,
bRecalculate
);
}
...
...
word/api.js
View file @
18ff92f2
...
...
@@ -655,7 +655,8 @@
asc_docs_api
.
prototype
.
SetReaderModeOnly
=
function
()
{
this
.
isOnlyReaderMode
=
true
;
this
.
ImageLoader
.
bIsAsyncLoadDocumentImages
=
false
;
if
(
this
.
ImageLoader
)
this
.
ImageLoader
.
bIsAsyncLoadDocumentImages
=
false
;
};
asc_docs_api
.
prototype
.
IncreaseReaderFontSize
=
function
()
...
...
@@ -7875,6 +7876,9 @@ background-repeat: no-repeat;\
this
.
asc_setDrawCollaborationMarks
(
this
.
tmpCoMarksDraw
);
asc_docs_api
.
superclass
.
_onEndLoadSdk
.
call
(
this
);
if
(
this
.
isOnlyReaderMode
)
this
.
ImageLoader
.
bIsAsyncLoadDocumentImages
=
false
;
};
asc_docs_api
.
prototype
.
asc_Recalculate
=
function
(
bIsUpdateInterface
)
...
...
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