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
8ba9ad44
Commit
8ba9ad44
authored
Jan 16, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into Feature/special_paste
parents
1ad4a1b8
a14badcf
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
399 additions
and
300 deletions
+399
-300
cell/graphics/DrawingContext.js
cell/graphics/DrawingContext.js
+5
-0
cell/graphics/pdfprinter.js
cell/graphics/pdfprinter.js
+9
-1
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+83
-53
cell/native/DrawingContext.js
cell/native/DrawingContext.js
+5
-0
cell/native/native.js
cell/native/native.js
+1
-1
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+264
-243
common/apiCommon.js
common/apiCommon.js
+2
-0
word/Editor/Document.js
word/Editor/Document.js
+15
-0
word/Editor/Sections.js
word/Editor/Sections.js
+5
-0
word/Editor/Spelling.js
word/Editor/Spelling.js
+8
-0
word/api.js
word/api.js
+2
-2
No files found.
cell/graphics/DrawingContext.js
View file @
8ba9ad44
...
...
@@ -776,6 +776,11 @@
return
this
;
};
DrawingContext
.
prototype
.
setLineDash
=
function
(
segments
)
{
this
.
ctx
.
setLineDash
(
segments
);
return
this
;
};
DrawingContext
.
prototype
.
fillRect
=
function
(
x
,
y
,
w
,
h
)
{
var
r
=
this
.
_calcRect
(
x
,
y
,
w
,
h
);
this
.
ctx
.
fillRect
(
r
.
x
,
r
.
y
,
r
.
w
,
r
.
h
);
...
...
cell/graphics/pdfprinter.js
View file @
8ba9ad44
...
...
@@ -214,6 +214,14 @@ CPdfPrinter.prototype =
this
.
DocumentRenderer
.
p_width
(
val
*
1000
*
vector_koef
);
return
this
;
},
setLineDash
:
function
(
params
)
{
var
tmp
=
[];
for
(
var
i
=
0
;
i
<
params
.
length
;
++
i
)
{
tmp
.
push
(
params
[
i
]
*
vector_koef
);
}
return
this
.
DocumentRenderer
.
p_dash
(
tmp
);
},
setLineCap
:
function
(
cap
)
{
return
this
;
...
...
@@ -458,7 +466,7 @@ CPdfPrinter.prototype =
},
p_dash
:
function
(
params
)
{
// TODO:
return
this
.
DocumentRenderer
.
p_dash
(
params
);
},
// brush methods
b_color1
:
function
(
r
,
g
,
b
,
a
)
...
...
cell/model/WorkbookElems.js
View file @
8ba9ad44
...
...
@@ -856,19 +856,18 @@ Fill.prototype =
}
}
};
var
g_oBorderPropProperties
=
{
s
:
0
,
c
:
1
var
g_oBorderPropProperties
=
{
s
:
0
,
c
:
1
};
function
BorderProp
()
{
this
.
Properties
=
g_oBorderPropProperties
;
this
.
s
=
c_oAscBorderStyles
.
None
;
this
.
w
=
c_oAscBorderWidth
.
None
;
this
.
c
=
g_oColorManager
.
getThemeColor
(
1
);
}
BorderProp
.
prototype
=
{
setStyle
:
function
(
style
)
{
function
BorderProp
()
{
this
.
Properties
=
g_oBorderPropProperties
;
this
.
s
=
c_oAscBorderStyles
.
None
;
this
.
w
=
c_oAscBorderWidth
.
None
;
this
.
c
=
g_oColorManager
.
getThemeColor
(
1
);
}
BorderProp
.
prototype
.
setStyle
=
function
(
style
)
{
this
.
s
=
style
;
switch
(
this
.
s
)
{
case
c_oAscBorderStyles
.
Thin
:
...
...
@@ -894,63 +893,94 @@ BorderProp.prototype = {
this
.
w
=
c_oAscBorderWidth
.
None
;
break
;
}
},
getRgbOrNull
:
function
()
{
};
BorderProp
.
prototype
.
getDashSegments
=
function
()
{
var
res
;
switch
(
this
.
s
)
{
case
c_oAscBorderStyles
.
Hair
:
res
=
[
1
,
1
];
break
;
case
c_oAscBorderStyles
.
Dotted
:
res
=
[
2
,
2
];
break
;
case
c_oAscBorderStyles
.
DashDotDot
:
case
c_oAscBorderStyles
.
MediumDashDotDot
:
res
=
[
3
,
3
,
3
,
3
,
9
,
3
];
break
;
case
c_oAscBorderStyles
.
DashDot
:
case
c_oAscBorderStyles
.
MediumDashDot
:
case
c_oAscBorderStyles
.
SlantDashDot
:
res
=
[
3
,
3
,
9
,
3
];
break
;
case
c_oAscBorderStyles
.
Dashed
:
res
=
[
3
,
1
];
break
;
case
c_oAscBorderStyles
.
MediumDashed
:
res
=
[
9
,
3
];
break
;
case
c_oAscBorderStyles
.
Thin
:
case
c_oAscBorderStyles
.
Medium
:
case
c_oAscBorderStyles
.
Thick
:
case
c_oAscBorderStyles
.
Double
:
default
:
res
=
[];
break
;
}
return
res
;
};
BorderProp
.
prototype
.
getRgbOrNull
=
function
()
{
var
nRes
=
null
;
if
(
null
!=
this
.
c
)
if
(
null
!=
this
.
c
)
{
nRes
=
this
.
c
.
getRgb
();
}
return
nRes
;
},
isEmpty
:
function
()
{
};
BorderProp
.
prototype
.
isEmpty
=
function
()
{
return
c_oAscBorderStyles
.
None
===
this
.
s
;
},
isEqual
:
function
(
val
)
{
};
BorderProp
.
prototype
.
isEqual
=
function
(
val
)
{
return
this
.
s
===
val
.
s
&&
g_oColorManager
.
isEqual
(
this
.
c
,
val
.
c
);
},
clone
:
function
()
{
};
BorderProp
.
prototype
.
clone
=
function
()
{
var
res
=
new
BorderProp
();
res
.
merge
(
this
);
return
res
;
},
merge
:
function
(
oBorderProp
)
{
if
(
null
!=
oBorderProp
.
s
&&
c_oAscBorderStyles
.
None
!==
oBorderProp
.
s
)
{
};
BorderProp
.
prototype
.
merge
=
function
(
oBorderProp
)
{
if
(
null
!=
oBorderProp
.
s
&&
c_oAscBorderStyles
.
None
!==
oBorderProp
.
s
)
{
this
.
s
=
oBorderProp
.
s
;
this
.
w
=
oBorderProp
.
w
;
if
(
null
!=
oBorderProp
.
c
)
if
(
null
!=
oBorderProp
.
c
)
{
this
.
c
=
oBorderProp
.
c
;
}
}
},
getType
:
function
()
{
};
BorderProp
.
prototype
.
getType
=
function
()
{
return
UndoRedoDataTypes
.
StyleBorderProp
;
},
getProperties
:
function
()
{
};
BorderProp
.
prototype
.
getProperties
=
function
()
{
return
this
.
Properties
;
},
getProperty
:
function
(
nType
)
{
switch
(
nType
)
{
case
this
.
Properties
.
s
:
return
this
.
s
;
break
;
case
this
.
Properties
.
c
:
return
this
.
c
;
break
;
};
BorderProp
.
prototype
.
getProperty
=
function
(
nType
)
{
switch
(
nType
)
{
case
this
.
Properties
.
s
:
return
this
.
s
;
break
;
case
this
.
Properties
.
c
:
return
this
.
c
;
break
;
}
},
setProperty
:
function
(
nType
,
value
)
{
switch
(
nType
)
{
case
this
.
Properties
.
s
:
this
.
setStyle
(
value
);
break
;
case
this
.
Properties
.
c
:
this
.
c
=
value
;
break
;
};
BorderProp
.
prototype
.
setProperty
=
function
(
nType
,
value
)
{
switch
(
nType
)
{
case
this
.
Properties
.
s
:
this
.
setStyle
(
value
);
break
;
case
this
.
Properties
.
c
:
this
.
c
=
value
;
break
;
}
}
};
};
var
g_oBorderProperties
=
{
l
:
0
,
t
:
1
,
...
...
cell/native/DrawingContext.js
View file @
8ba9ad44
...
...
@@ -775,6 +775,11 @@
this
.
ctx
.
lineJoin
=
join
;
return
this
;
};
DrawingContext
.
prototype
.
setLineDash
=
function
(
segments
)
{
//TODO:
return
this
;
};
DrawingContext
.
prototype
.
fillRect
=
function
(
x
,
y
,
w
,
h
)
{
var
r
=
this
.
_calcRect
(
x
,
y
,
w
,
h
);
...
...
cell/native/native.js
View file @
8ba9ad44
...
...
@@ -7592,7 +7592,7 @@ window["Asc"]["spreadsheet_api"].prototype.openDocument = function(sData) {
t
.
DocumentLoadComplete
=
true
;
t
.
asc_CheckGuiControlColors
();
t
.
sendColorThemes
();
t
.
sendColorThemes
(
_api
.
wbModel
.
theme
);
t
.
asc_ApplyColorScheme
(
false
);
t
.
sendStandartTextures
();
...
...
cell/view/WorksheetView.js
View file @
8ba9ad44
This diff is collapsed.
Click to expand it.
common/apiCommon.js
View file @
8ba9ad44
...
...
@@ -3415,6 +3415,8 @@
prot
[
"
get_UserId
"
]
=
prot
.
get_UserId
;
prot
[
"
get_HaveChanges
"
]
=
prot
.
get_HaveChanges
;
prot
[
"
get_LockedObjectType
"
]
=
prot
.
get_LockedObjectType
;
prot
[
"
get_FootnoteText
"
]
=
prot
.
get_FootnoteText
;
prot
[
"
get_FootnoteNumber
"
]
=
prot
.
get_FootnoteNumber
;
window
[
"
Asc
"
][
"
asc_CUserInfo
"
]
=
window
[
"
Asc
"
].
asc_CUserInfo
=
asc_CUserInfo
;
prot
=
asc_CUserInfo
.
prototype
;
...
...
word/Editor/Document.js
View file @
8ba9ad44
...
...
@@ -527,6 +527,7 @@ function CDocumentPageSection()
this
.
YLimit2
=
0
;
this
.
Columns
=
[];
this
.
ColumnsSep
=
false
;
this
.
IterationsCount
=
0
;
this
.
CurrentY
=
0
;
...
...
@@ -670,6 +671,10 @@ CDocumentPageColumn.prototype.Reset = function()
this
.
XLimit
=
0
;
this
.
YLimit
=
0
;
};
CDocumentPageColumn
.
prototype
.
IsEmpty
=
function
()
{
return
this
.
Empty
;
};
function
CDocumentPage
()
{
...
...
@@ -2184,6 +2189,7 @@ CDocument.prototype.Recalculate_Page = function()
{
Page
.
Sections
[
0
].
Columns
[
ColumnIndex
]
=
new
CDocumentPageColumn
();
}
Page
.
Sections
[
0
].
ColumnsSep
=
SectPr
.
Get_ColumnsSep
();
}
var
Count
=
this
.
Content
.
length
;
...
...
@@ -2545,6 +2551,7 @@ CDocument.prototype.Recalculate_PageColumn = function()
NewPageSection
.
EndPos
=
Index
;
NewPageSection
.
Y
=
SectionY
+
0.001
;
NewPageSection
.
YLimit
=
true
===
PageSection
.
Is_CalculatingSectionBottomLine
()
?
PageSection
.
YLimit2
:
RealYLimit
;
NewPageSection
.
ColumnsSep
=
NextSectInfo
.
SectPr
.
Get_ColumnsSep
();
Page
.
Sections
[
_SectionIndex
]
=
NewPageSection
;
var
ColumnsCount
=
NextSectInfo
.
SectPr
.
Get_ColumnsCount
();
...
...
@@ -3620,6 +3627,14 @@ CDocument.prototype.Draw = function(nPageInd
var
ColumnStartPos
=
Column
.
Pos
;
var
ColumnEndPos
=
Column
.
EndPos
;
if
(
true
===
PageSection
.
ColumnsSep
&&
ColumnIndex
>
0
&&
!
Column
.
IsEmpty
())
{
var
SepX
=
(
Column
.
X
+
PageSection
.
Columns
[
ColumnIndex
-
1
].
XLimit
)
/
2
;
pGraphics
.
p_color
(
0
,
0
,
0
,
255
);
pGraphics
.
drawVerLine
(
c_oAscLineDrawingRule
.
Left
,
SepX
,
PageSection
.
Y
,
PageSection
.
YLimit
,
0.75
*
g_dKoef_pt_to_mm
);
}
// Плавающие объекты не должны попадать в клип колонок
var
FlowElements
=
[];
...
...
word/Editor/Sections.js
View file @
8ba9ad44
...
...
@@ -665,6 +665,11 @@ CSectionPr.prototype =
return
this
.
Columns
.
Get_ColumnSpace
(
ColIndex
);
},
Get_ColumnsSep
:
function
()
{
return
this
.
Columns
.
Sep
;
},
Set_Columns_EqualWidth
:
function
(
Equal
)
{
if
(
Equal
!==
this
.
Columns
.
Equal
)
...
...
word/Editor/Spelling.js
View file @
8ba9ad44
...
...
@@ -309,6 +309,14 @@ CParaSpellChecker.prototype =
Add
:
function
(
StartPos
,
EndPos
,
Word
,
Lang
)
{
if
(
Word
.
length
>
0
)
{
if
(
Word
.
charAt
(
Word
.
length
-
1
)
==
'
\'
'
)
Word
=
Word
.
substr
(
0
,
Word
.
length
-
1
);
if
(
Word
.
charAt
(
0
)
==
'
\'
'
)
Word
=
Word
.
substr
(
1
);
}
var
SpellCheckerEl
=
new
CParaSpellCheckerElement
(
StartPos
,
EndPos
,
Word
,
Lang
);
this
.
Paragraph
.
Add_SpellCheckerElement
(
SpellCheckerEl
);
this
.
Elements
.
push
(
SpellCheckerEl
);
...
...
word/api.js
View file @
8ba9ad44
...
...
@@ -8501,7 +8501,7 @@ background-repeat: no-repeat;\
CHeaderProp
.
prototype
[
'
put_DifferentEvenOdd
'
]
=
CHeaderProp
.
prototype
.
put_DifferentEvenOdd
;
CHeaderProp
.
prototype
[
'
get_LinkToPrevious
'
]
=
CHeaderProp
.
prototype
.
get_LinkToPrevious
;
CHeaderProp
.
prototype
[
'
get_Locked
'
]
=
CHeaderProp
.
prototype
.
get_Locked
;
window
[
'
Asc
'
][
'
CMailMergeSendData
'
]
=
CMailMergeSendData
;
window
[
'
Asc
'
][
'
CMailMergeSendData
'
]
=
window
[
'
Asc
'
].
CMailMergeSendData
=
CMailMergeSendData
;
CMailMergeSendData
.
prototype
[
'
get_From
'
]
=
CMailMergeSendData
.
prototype
.
get_From
;
CMailMergeSendData
.
prototype
[
'
put_From
'
]
=
CMailMergeSendData
.
prototype
.
put_From
;
CMailMergeSendData
.
prototype
[
'
get_To
'
]
=
CMailMergeSendData
.
prototype
.
get_To
;
...
...
@@ -8522,7 +8522,7 @@ background-repeat: no-repeat;\
CMailMergeSendData
.
prototype
[
'
put_RecordCount
'
]
=
CMailMergeSendData
.
prototype
.
put_RecordCount
;
CMailMergeSendData
.
prototype
[
'
get_UserId
'
]
=
CMailMergeSendData
.
prototype
.
get_UserId
;
CMailMergeSendData
.
prototype
[
'
put_UserId
'
]
=
CMailMergeSendData
.
prototype
.
put_UserId
;
window
[
'
Asc
'
][
'
CAscFootnotePr
'
]
=
CAscFootnotePr
;
window
[
'
Asc
'
][
'
CAscFootnotePr
'
]
=
window
[
'
Asc
'
].
CAscFootnotePr
=
CAscFootnotePr
;
CAscFootnotePr
.
prototype
[
'
get_Pos
'
]
=
CAscFootnotePr
.
prototype
.
get_Pos
;
CAscFootnotePr
.
prototype
[
'
put_Pos
'
]
=
CAscFootnotePr
.
prototype
.
put_Pos
;
CAscFootnotePr
.
prototype
[
'
get_NumStart
'
]
=
CAscFootnotePr
.
prototype
.
get_NumStart
;
...
...
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