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
20ea07cb
Commit
20ea07cb
authored
Apr 26, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move HatchPattern to common
common/Drawings/HatchPattern to function-closure
parent
f2e85de6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
14 deletions
+23
-14
build/configs/webexcel.json
build/configs/webexcel.json
+2
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+1
-1
build/configs/webword.json
build/configs/webword.json
+1
-1
cell/model/DrawingObjects/ShapeDrawer.js
cell/model/DrawingObjects/ShapeDrawer.js
+4
-4
common/Drawings/HatchPattern.js
common/Drawings/HatchPattern.js
+8
-0
common/Native/Wrappers/ShapeDrawer.js
common/Native/Wrappers/ShapeDrawer.js
+3
-3
word/Drawing/ShapeDrawer.js
word/Drawing/ShapeDrawer.js
+4
-4
No files found.
build/configs/webexcel.json
View file @
20ea07cb
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
"../common/CollaborativeEditingBase.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/Controls.js"
,
"../common/Controls.js"
,
"../common/Overlay.js"
,
"../common/Overlay.js"
,
"../common/Drawings/HatchPattern.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
"../cell/view/iscroll.js"
,
"../cell/view/iscroll.js"
,
...
@@ -71,7 +72,7 @@
...
@@ -71,7 +72,7 @@
"../common/wordcopypaste.js"
,
"../common/wordcopypaste.js"
,
"../cell/apiDefines.js"
,
"../cell/apiDefines.js"
,
"../word/Drawing/HatchPattern.js"
,
"../word/Drawing/WorkEvents.js"
,
"../word/Drawing/WorkEvents.js"
,
"../cell/document/empty-workbook.js"
,
"../cell/document/empty-workbook.js"
,
"../cell/utils/utils.js"
,
"../cell/utils/utils.js"
,
...
...
build/configs/webpowerpoint.json
View file @
20ea07cb
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
"../common/CollaborativeEditingBase.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/Controls.js"
,
"../common/Controls.js"
,
"../common/Overlay.js"
,
"../common/Overlay.js"
,
"../common/Drawings/HatchPattern.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
...
@@ -88,7 +89,6 @@
...
@@ -88,7 +89,6 @@
"../word/Editor/Common.js"
,
"../word/Editor/Common.js"
,
"../word/Editor/Sections.js"
,
"../word/Editor/Sections.js"
,
"../word/Editor/History.js"
,
"../word/Editor/History.js"
,
"../word/Drawing/HatchPattern.js"
,
"../word/Drawing/Graphics.js"
,
"../word/Drawing/Graphics.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../slide/Drawing/Transitions.js"
,
"../slide/Drawing/Transitions.js"
,
...
...
build/configs/webword.json
View file @
20ea07cb
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
"../common/CollaborativeEditingBase.js"
,
"../common/CollaborativeEditingBase.js"
,
"../common/Controls.js"
,
"../common/Controls.js"
,
"../common/Overlay.js"
,
"../common/Overlay.js"
,
"../common/Drawings/HatchPattern.js"
,
"../common/scroll.js"
,
"../common/scroll.js"
,
"../common/Scrolls/iscroll.js"
,
"../common/Scrolls/iscroll.js"
,
...
@@ -112,7 +113,6 @@
...
@@ -112,7 +113,6 @@
"../word/Editor/FontClassification.js"
,
"../word/Editor/FontClassification.js"
,
"../word/Editor/Spelling.js"
,
"../word/Editor/Spelling.js"
,
"../word/Drawing/Graphics.js"
,
"../word/Drawing/Graphics.js"
,
"../word/Drawing/HatchPattern.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../word/Drawing/ShapeDrawer.js"
,
"../word/Drawing/DrawingDocument.js"
,
"../word/Drawing/DrawingDocument.js"
,
"../word/Drawing/GraphicsEvents.js"
,
"../word/Drawing/GraphicsEvents.js"
,
...
...
cell/model/DrawingObjects/ShapeDrawer.js
View file @
20ea07cb
...
@@ -1003,7 +1003,7 @@ CShapeDrawer.prototype =
...
@@ -1003,7 +1003,7 @@ CShapeDrawer.prototype =
var
_ctx
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oContext
:
this
.
Graphics
.
m_oContext
;
var
_ctx
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oContext
:
this
.
Graphics
.
m_oContext
;
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -1013,7 +1013,7 @@ CShapeDrawer.prototype =
...
@@ -1013,7 +1013,7 @@ CShapeDrawer.prototype =
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
_test_pattern
=
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_test_pattern
=
AscCommon
.
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
patt
=
_ctx
.
createPattern
(
_test_pattern
.
Canvas
,
"
repeat
"
);
var
patt
=
_ctx
.
createPattern
(
_test_pattern
.
Canvas
,
"
repeat
"
);
_ctx
.
save
();
_ctx
.
save
();
...
@@ -1387,7 +1387,7 @@ CShapeDrawer.prototype =
...
@@ -1387,7 +1387,7 @@ CShapeDrawer.prototype =
var
_fill
=
this
.
UniFill
.
fill
;
var
_fill
=
this
.
UniFill
.
fill
;
if
(
_fill
.
type
==
c_oAscFill
.
FILL_TYPE_PATT
)
if
(
_fill
.
type
==
c_oAscFill
.
FILL_TYPE_PATT
)
{
{
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -1397,7 +1397,7 @@ CShapeDrawer.prototype =
...
@@ -1397,7 +1397,7 @@ CShapeDrawer.prototype =
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
_pattern
=
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_pattern
=
AscCommon
.
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_url64
=
""
;
var
_url64
=
""
;
try
try
...
...
word/Drawing
/HatchPattern.js
→
common/Drawings
/HatchPattern.js
View file @
20ea07cb
"
use strict
"
;
"
use strict
"
;
(
function
(
window
,
undefined
){
var
global_hatch_data
=
[
var
global_hatch_data
=
[
/* cross */
/* cross */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
...
@@ -749,3 +751,9 @@ function GetHatchBrush(name, r, g, b, a, br, bg, bb, ba)
...
@@ -749,3 +751,9 @@ function GetHatchBrush(name, r, g, b, a, br, bg, bb, ba)
global_hatch_brushes
[
name
]
=
_brush
;
global_hatch_brushes
[
name
]
=
_brush
;
return
_brush
;
return
_brush
;
}
}
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
].
global_hatch_names
=
global_hatch_names
;
window
[
'
AscCommon
'
].
GetHatchBrush
=
GetHatchBrush
;
})(
window
);
common/Native/Wrappers/ShapeDrawer.js
View file @
20ea07cb
...
@@ -906,7 +906,7 @@ CShapeDrawer.prototype =
...
@@ -906,7 +906,7 @@ CShapeDrawer.prototype =
}
}
case
Asc
.
c_oAscFill
.
FILL_TYPE_PATT
:
case
Asc
.
c_oAscFill
.
FILL_TYPE_PATT
:
{
{
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -1166,7 +1166,7 @@ CShapeDrawer.prototype =
...
@@ -1166,7 +1166,7 @@ CShapeDrawer.prototype =
var
_fill
=
this
.
UniFill
.
fill
;
var
_fill
=
this
.
UniFill
.
fill
;
if
(
_fill
.
type
==
Asc
.
c_oAscFill
.
FILL_TYPE_PATT
)
if
(
_fill
.
type
==
Asc
.
c_oAscFill
.
FILL_TYPE_PATT
)
{
{
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -1176,7 +1176,7 @@ CShapeDrawer.prototype =
...
@@ -1176,7 +1176,7 @@ CShapeDrawer.prototype =
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
_pattern
=
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_pattern
=
AscCommon
.
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_url64
=
""
;
var
_url64
=
""
;
try
try
...
...
word/Drawing/ShapeDrawer.js
View file @
20ea07cb
...
@@ -976,7 +976,7 @@ CShapeDrawer.prototype =
...
@@ -976,7 +976,7 @@ CShapeDrawer.prototype =
var
_ctx
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oContext
:
this
.
Graphics
.
m_oContext
;
var
_ctx
=
(
this
.
Graphics
.
IsTrack
===
true
)
?
this
.
Graphics
.
Graphics
.
m_oContext
:
this
.
Graphics
.
m_oContext
;
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -986,7 +986,7 @@ CShapeDrawer.prototype =
...
@@ -986,7 +986,7 @@ CShapeDrawer.prototype =
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
_test_pattern
=
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_test_pattern
=
AscCommon
.
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
patt
=
_ctx
.
createPattern
(
_test_pattern
.
Canvas
,
"
repeat
"
);
var
patt
=
_ctx
.
createPattern
(
_test_pattern
.
Canvas
,
"
repeat
"
);
_ctx
.
save
();
_ctx
.
save
();
...
@@ -1372,7 +1372,7 @@ CShapeDrawer.prototype =
...
@@ -1372,7 +1372,7 @@ CShapeDrawer.prototype =
var
_fill
=
this
.
UniFill
.
fill
;
var
_fill
=
this
.
UniFill
.
fill
;
if
(
_fill
.
type
==
c_oAscFill
.
FILL_TYPE_PATT
)
if
(
_fill
.
type
==
c_oAscFill
.
FILL_TYPE_PATT
)
{
{
var
_patt_name
=
global_hatch_names
[
_fill
.
ftype
];
var
_patt_name
=
AscCommon
.
global_hatch_names
[
_fill
.
ftype
];
if
(
undefined
==
_patt_name
)
if
(
undefined
==
_patt_name
)
_patt_name
=
"
cross
"
;
_patt_name
=
"
cross
"
;
...
@@ -1382,7 +1382,7 @@ CShapeDrawer.prototype =
...
@@ -1382,7 +1382,7 @@ CShapeDrawer.prototype =
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__fa
=
(
null
===
this
.
UniFill
.
transparent
)
?
_fc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
__ba
=
(
null
===
this
.
UniFill
.
transparent
)
?
_bc
.
A
:
255
;
var
_pattern
=
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_pattern
=
AscCommon
.
GetHatchBrush
(
_patt_name
,
_fc
.
R
,
_fc
.
G
,
_fc
.
B
,
__fa
,
_bc
.
R
,
_bc
.
G
,
_bc
.
B
,
__ba
);
var
_url64
=
""
;
var
_url64
=
""
;
try
try
...
...
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