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
79212c99
Commit
79212c99
authored
Dec 16, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CreateColorFromRGB to api builder
delete duplicate colors
parent
64269ce0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
16 deletions
+11
-16
cell/apiBuilder.js
cell/apiBuilder.js
+4
-14
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+5
-1
common/apiCommon.js
common/apiCommon.js
+2
-1
No files found.
cell/apiBuilder.js
View file @
79212c99
...
...
@@ -103,16 +103,6 @@
this
.
color
=
color
;
}
/**
* Class representing RGB color
* @constructor
*/
function
ApiRGBColor
(
r
,
g
,
b
)
{
ApiRGBColor
.
superclass
.
constructor
.
call
(
this
,
new
Asc
.
asc_CColor
(
r
,
g
,
b
));
}
AscCommon
.
extendClass
(
ApiRGBColor
,
ApiColor
);
/**
* Returns an object that represents the active sheet
* @memberof Api
...
...
@@ -133,10 +123,10 @@
* @param {byte} r
* @param {byte} g
* @param {byte} b
* @returns {Api
RGB
Color}
* @returns {ApiColor}
*/
Api
.
prototype
.
Create
RGBColor
=
function
(
r
,
g
,
b
)
{
return
new
Api
RGBColor
(
r
,
g
,
b
);
Api
.
prototype
.
Create
ColorFromRGB
=
function
(
r
,
g
,
b
)
{
return
new
Api
Color
(
AscCommonExcel
.
createRgbColor
(
r
,
g
,
b
)
);
};
/**
...
...
@@ -891,7 +881,7 @@
Api
.
prototype
[
"
GetActiveSheet
"
]
=
Api
.
prototype
.
GetActiveSheet
;
Api
.
prototype
[
"
CreateNewHistoryPoint
"
]
=
Api
.
prototype
.
CreateNewHistoryPoint
;
Api
.
prototype
[
"
Create
RGBColor
"
]
=
Api
.
prototype
.
CreateRGBColor
;
Api
.
prototype
[
"
Create
ColorFromRGB
"
]
=
Api
.
prototype
.
CreateColorFromRGB
;
ApiWorksheet
.
prototype
[
"
GetActiveCell
"
]
=
ApiWorksheet
.
prototype
.
GetActiveCell
;
ApiWorksheet
.
prototype
[
"
SetName
"
]
=
ApiWorksheet
.
prototype
.
SetName
;
...
...
cell/model/WorkbookElems.js
View file @
79212c99
...
...
@@ -123,6 +123,9 @@ function shiftSort(a, b, offset)
}
return
nRes
;
}
function
createRgbColor
(
r
,
g
,
b
)
{
return
new
RgbColor
((
r
<<
16
)
+
(
g
<<
8
)
+
b
);
}
var
g_oRgbColorProperties
=
{
rgb
:
0
};
...
...
@@ -365,7 +368,7 @@ function CorrectAscColor(asc_color)
}
default
:
{
ret
=
new
RgbColor
((
asc_color
.
asc_getR
()
<<
16
)
+
(
asc_color
.
asc_getG
()
<<
8
)
+
asc_color
.
asc_getB
());
ret
=
createRgbColor
(
asc_color
.
asc_getR
(),
asc_color
.
asc_getG
(),
asc_color
.
asc_getB
());
}
}
return
ret
;
...
...
@@ -7795,6 +7798,7 @@ function getCurrencyFormat(opt_cultureInfo, opt_fraction, opt_currency, opt_curr
window
[
'
AscCommonExcel
'
].
map_themeExcel_to_themePresentation
=
map_themeExcel_to_themePresentation
;
window
[
'
AscCommonExcel
'
].
shiftGetBBox
=
shiftGetBBox
;
window
[
'
AscCommonExcel
'
].
RgbColor
=
RgbColor
;
window
[
'
AscCommonExcel
'
].
createRgbColor
=
createRgbColor
;
window
[
'
AscCommonExcel
'
].
ThemeColor
=
ThemeColor
;
window
[
'
AscCommonExcel
'
].
CorrectAscColor
=
CorrectAscColor
;
window
[
'
AscCommonExcel
'
].
Fragment
=
Fragment
;
...
...
common/apiCommon.js
View file @
79212c99
...
...
@@ -856,6 +856,7 @@
}
};
/** @constructor */
function
asc_CColor
()
{
this
.
type
=
c_oAscColor
.
COLOR_TYPE_SRGB
;
this
.
value
=
null
;
...
...
@@ -886,7 +887,7 @@
}
asc_CColor
.
prototype
=
{
asc_getR
:
function
()
{
constructor
:
asc_CColor
,
asc_getR
:
function
()
{
return
this
.
r
},
asc_putR
:
function
(
v
)
{
this
.
r
=
v
;
...
...
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