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
208a1592
Commit
208a1592
authored
Apr 21, 2016
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[mobile] сборка скриптов для таблиц
parent
8293e48b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
cell/native/native.js
cell/native/native.js
+32
-32
No files found.
cell/native/native.js
View file @
208a1592
...
...
@@ -2707,7 +2707,7 @@ function asc_ReadCBorder(s, p) {
return
null
;
}
function
asc_ReadAdjustPrint
(
s
,
p
)
{
var
adjustPrint
=
new
asc
.
asc_CAdjustPrint
();
var
adjustPrint
=
new
window
[
"
Asc
"
]
.
asc_CAdjustPrint
();
var
next
=
true
;
while
(
next
)
...
...
@@ -2915,7 +2915,7 @@ function asc_ReadCHyperLink(_params, _cursor) {
return
_settings
;
}
function
asc_ReadAddFormatTableOptions
(
s
,
p
)
{
var
format
=
new
asc
.
AddFormatTableOptions
();
var
format
=
new
window
[
"
Asc
"
]
.
AddFormatTableOptions
();
var
next
=
true
;
while
(
next
)
...
...
@@ -3261,7 +3261,7 @@ function OfflineEditor () {
return
;
var
BB
=
drawing
.
bbox
.
seriesBBox
;
var
range
=
asc
.
Range
(
BB
.
c1
,
BB
.
r1
,
BB
.
c2
,
BB
.
r2
,
true
);
var
range
=
window
[
"
Asc
"
]
.
Range
(
BB
.
c1
,
BB
.
r1
,
BB
.
c2
,
BB
.
r2
,
true
);
worksheet
.
arrActiveChartsRanges
.
push
(
range
);
worksheet
.
isChartAreaEditMode
=
true
;
worksheet
.
_drawSelection
();
...
...
@@ -3482,9 +3482,9 @@ function OfflineEditor () {
_graphics
.
SetIntegerGrid
(
false
);
};
var
asc_Range
=
asc
.
Range
;
var
asc_round
=
asc
.
round
;
var
asc_typeof
=
asc
.
typeOf
;
var
asc_Range
=
window
[
"
Asc
"
]
.
Range
;
var
asc_round
=
window
[
"
Asc
"
]
.
round
;
var
asc_typeof
=
window
[
"
Asc
"
]
.
typeOf
;
/**
* header styles
...
...
@@ -3508,7 +3508,7 @@ function OfflineEditor () {
var
kNone
=
"
none
"
;
asc
.
WorksheetView
.
prototype
.
__drawColumnHeaders
=
function
(
drawingCtx
,
start
,
end
,
style
,
offsetXForDraw
,
offsetYForDraw
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawColumnHeaders
=
function
(
drawingCtx
,
start
,
end
,
style
,
offsetXForDraw
,
offsetYForDraw
)
{
if
(
undefined
===
drawingCtx
&&
false
===
this
.
model
.
sheetViews
[
0
].
asc_getShowRowColHeaders
())
return
;
...
...
@@ -3545,7 +3545,7 @@ function OfflineEditor () {
}
};
asc
.
WorksheetView
.
prototype
.
__drawHeader
=
function
(
drawingCtx
,
x
,
y
,
w
,
h
,
style
,
isColHeader
,
index
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawHeader
=
function
(
drawingCtx
,
x
,
y
,
w
,
h
,
style
,
isColHeader
,
index
)
{
// Для отрисовки невидимого столбца/строки
var
isZeroHeader
=
false
;
if
(
-
1
!==
index
)
{
...
...
@@ -3644,7 +3644,7 @@ function OfflineEditor () {
}
};
asc
.
WorksheetView
.
prototype
.
__drawRowHeaders
=
function
(
drawingCtx
,
start
,
end
,
style
,
offsetXForDraw
,
offsetYForDraw
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawRowHeaders
=
function
(
drawingCtx
,
start
,
end
,
style
,
offsetXForDraw
,
offsetYForDraw
)
{
if
(
undefined
===
drawingCtx
&&
false
===
this
.
model
.
sheetViews
[
0
].
asc_getShowRowColHeaders
())
return
;
...
...
@@ -3681,13 +3681,13 @@ function OfflineEditor () {
}
};
asc
.
WorksheetView
.
prototype
.
__drawGrid
=
function
(
drawingCtx
,
c1
,
r1
,
c2
,
r2
,
leftFieldInPt
,
topFieldInPt
,
width
,
height
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawGrid
=
function
(
drawingCtx
,
c1
,
r1
,
c2
,
r2
,
leftFieldInPt
,
topFieldInPt
,
width
,
height
)
{
var
range
=
new
asc_Range
(
c1
,
r1
,
c2
,
r2
);
this
.
_prepareCellTextMetricsCache
(
range
);
this
.
_drawGrid
(
drawingCtx
,
range
,
leftFieldInPt
,
topFieldInPt
,
width
,
height
);
};
asc
.
WorksheetView
.
prototype
.
__drawCellsAndBorders
=
function
(
drawingCtx
,
c1
,
r1
,
c2
,
r2
,
offsetXForDraw
,
offsetYForDraw
,
istoplayer
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawCellsAndBorders
=
function
(
drawingCtx
,
c1
,
r1
,
c2
,
r2
,
offsetXForDraw
,
offsetYForDraw
,
istoplayer
)
{
var
range
=
new
asc_Range
(
c1
,
r1
,
c2
,
r2
);
if
(
false
===
istoplayer
)
{
...
...
@@ -3721,7 +3721,7 @@ function OfflineEditor () {
this
.
visibleRange
=
oldrange
;
};
asc
.
WorksheetView
.
prototype
.
__selection
=
function
(
c1
,
r1
,
c2
,
r2
,
isFrozen
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__selection
=
function
(
c1
,
r1
,
c2
,
r2
,
isFrozen
)
{
var
native_selection
=
[];
...
...
@@ -3730,7 +3730,7 @@ function OfflineEditor () {
this
.
visibleRange
=
new
asc_Range
(
c1
,
r1
,
c2
,
r2
);
isFrozen
=
!!
isFrozen
;
if
(
asc
[
"
editor
"
].
isStartAddShape
||
this
.
objectRender
.
selectedGraphicObjectsExists
())
{
if
(
window
[
"
Asc
"
]
[
"
editor
"
].
isStartAddShape
||
this
.
objectRender
.
selectedGraphicObjectsExists
())
{
//if (this.isChartAreaEditMode) {
// this._drawFormulaRanges(this.arrActiveChartsRanges);
//}
...
...
@@ -4090,7 +4090,7 @@ function OfflineEditor () {
//}
};
asc
.
WorksheetView
.
prototype
.
__changeSelectionTopLeft
=
function
(
x
,
y
,
isCoord
,
isSelectMode
,
isTopLeft
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__changeSelectionTopLeft
=
function
(
x
,
y
,
isCoord
,
isSelectMode
,
isTopLeft
)
{
//var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange;
var
isMoveActiveCellToLeftTop
=
false
;
...
...
@@ -4157,13 +4157,13 @@ function OfflineEditor () {
return
this
.
_calcActiveRangeOffset
(
x
,
y
);
};
asc
.
WorksheetView
.
prototype
.
__chartsRanges
=
function
(
ranges
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__chartsRanges
=
function
(
ranges
)
{
if
(
ranges
)
{
return
this
.
__drawFormulaRanges
(
ranges
,
0
,
0
,
Asc
.
c_oAscSelectionType
.
RangeChart
);
}
if
(
asc
[
"
editor
"
].
isStartAddShape
||
this
.
objectRender
.
selectedGraphicObjectsExists
())
{
if
(
window
[
"
Asc
"
]
[
"
editor
"
].
isStartAddShape
||
this
.
objectRender
.
selectedGraphicObjectsExists
())
{
if
(
this
.
isChartAreaEditMode
&&
this
.
arrActiveChartsRanges
.
length
)
{
return
this
.
__drawFormulaRanges
(
this
.
arrActiveChartsRanges
,
0
,
0
,
Asc
.
c_oAscSelectionType
.
RangeChart
);
}
...
...
@@ -4172,7 +4172,7 @@ function OfflineEditor () {
return
null
;
};
asc
.
WorksheetView
.
prototype
.
__drawFormulaRanges
=
function
(
arrRanges
,
offsetX
,
offsetY
,
rangetype
)
{
window
[
"
Asc
"
]
.
WorksheetView
.
prototype
.
__drawFormulaRanges
=
function
(
arrRanges
,
offsetX
,
offsetY
,
rangetype
)
{
var
ranges
=
[],
i
=
0
,
type
=
0
,
left
=
0
,
right
=
0
,
top
=
0
,
bottom
=
0
;
var
addt
,
addl
,
addr
,
addb
,
colsCount
=
this
.
cols
.
length
-
1
,
rowsCount
=
this
.
rows
.
length
-
1
;
var
defaultWidth
=
this
.
model
.
getDefaultWidth
();
...
...
@@ -4886,7 +4886,7 @@ function OfflineEditor () {
var
imageUrl
=
options
[
0
];
function
ascCvtRatio
(
fromUnits
,
toUnits
)
{
return
asc
.
getCvtRatio
(
fromUnits
,
toUnits
,
objectRender
.
getContext
().
getPPIX
());
return
window
[
"
Asc
"
]
.
getCvtRatio
(
fromUnits
,
toUnits
,
objectRender
.
getContext
().
getPPIX
());
}
function
ptToMm
(
val
)
{
return
val
*
ascCvtRatio
(
1
,
3
);
...
...
@@ -5017,7 +5017,7 @@ function OfflineEditor () {
var
bottom
=
params
[
4
];
function
ascCvtRatio
(
fromUnits
,
toUnits
)
{
return
asc
.
getCvtRatio
(
fromUnits
,
toUnits
,
objectRender
.
getContext
().
getPPIX
());
return
window
[
"
Asc
"
]
.
getCvtRatio
(
fromUnits
,
toUnits
,
objectRender
.
getContext
().
getPPIX
());
}
function
ptToMm
(
val
)
{
return
val
*
ascCvtRatio
(
1
,
3
);
...
...
@@ -5115,7 +5115,7 @@ function OfflineEditor () {
// STYLE MANAGER
asc
.
asc_CStylesPainter
.
prototype
.
generateStylesAll
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
window
[
"
Asc
"
]
.
asc_CStylesPainter
.
prototype
.
generateStylesAll
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
var
pxTomm
=
1.0
;
// 72.0 / 96.0;
...
...
@@ -5134,9 +5134,9 @@ function OfflineEditor () {
this
.
generateDefaultStyles
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
);
this
.
generateDocumentStyles
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
);
};
asc
.
asc_CStylesPainter
.
prototype
.
generateDefaultStyles
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
window
[
"
Asc
"
]
.
asc_CStylesPainter
.
prototype
.
generateDefaultStyles
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
var
cellStyles
=
cellStylesAll
.
DefaultStyles
;
var
oGraphics
=
new
asc
.
DrawingContext
({
canvas
:
null
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
oGraphics
=
new
window
[
"
Asc
"
]
.
DrawingContext
({
canvas
:
null
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
oStyle
,
oCustomStyle
;
var
styleIndex
=
0
;
for
(
var
i
=
0
;
i
<
cellStyles
.
length
;
++
i
)
{
...
...
@@ -5154,9 +5154,9 @@ function OfflineEditor () {
++
styleIndex
;
}
};
asc
.
asc_CStylesPainter
.
prototype
.
generateDocumentStyles
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
window
[
"
Asc
"
]
.
asc_CStylesPainter
.
prototype
.
generateDocumentStyles
=
function
(
cellStylesAll
,
fmgrGraphics
,
oFont
,
stringRenderer
)
{
var
cellStyles
=
cellStylesAll
.
CustomStyles
;
var
oGraphics
=
new
asc
.
DrawingContext
({
canvas
:
null
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
oGraphics
=
new
window
[
"
Asc
"
]
.
DrawingContext
({
canvas
:
null
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
oStyle
;
var
styleIndex
=
10000
;
for
(
var
i
=
0
;
i
<
cellStyles
.
length
;
++
i
)
{
...
...
@@ -5171,7 +5171,7 @@ function OfflineEditor () {
++
styleIndex
;
}
};
asc
.
asc_CStylesPainter
.
prototype
.
drawStyle
=
function
(
oGraphics
,
stringRenderer
,
oStyle
,
sStyleName
,
nIndex
)
{
window
[
"
Asc
"
]
.
asc_CStylesPainter
.
prototype
.
drawStyle
=
function
(
oGraphics
,
stringRenderer
,
oStyle
,
sStyleName
,
nIndex
)
{
var
oColor
=
oStyle
.
getFill
();
if
(
null
!==
oColor
)
{
...
...
@@ -5202,7 +5202,7 @@ function OfflineEditor () {
var
oFontColor
=
fc
!==
null
?
fc
:
new
AscCommon
.
CColor
(
0
,
0
,
0
);
var
format
=
oStyle
.
getFont
();
// Для размера шрифта делаем ограничение для превью в 16pt (у Excel 18pt, но и высота превью больше 22px)
var
oFont
=
new
asc
.
FontProperties
(
format
.
fn
,
(
16
<
format
.
fs
)
?
16
:
format
.
fs
,
format
.
b
,
format
.
i
,
format
.
u
,
format
.
s
);
var
oFont
=
new
window
[
"
Asc
"
]
.
FontProperties
(
format
.
fn
,
(
16
<
format
.
fs
)
?
16
:
format
.
fs
,
format
.
b
,
format
.
i
,
format
.
u
,
format
.
s
);
var
width_padding
=
3
;
// 4 * 72 / 96
...
...
@@ -5221,10 +5221,10 @@ function OfflineEditor () {
var
styleThumbnailWidth
=
Math
.
floor
(
92.0
*
pxToMM
);
var
styleThumbnailHeight
=
Math
.
floor
(
48.0
*
pxToMM
);
asc
.
WorkbookView
.
prototype
=
Object
.
create
(
asc
.
WorkbookView
.
prototype
);
asc
.
WorkbookView
.
prototype
.
constructor
=
asc
.
WorkbookView
;
window
[
"
Asc
"
].
WorkbookView
.
prototype
=
Object
.
create
(
window
[
"
Asc
"
]
.
WorkbookView
.
prototype
);
window
[
"
Asc
"
].
WorkbookView
.
prototype
.
constructor
=
window
[
"
Asc
"
]
.
WorkbookView
;
asc
.
WorkbookView
.
prototype
.
af_getTablePictures
=
function
(
wb
,
fmgrGraphics
,
oFont
)
{
window
[
"
Asc
"
]
.
WorkbookView
.
prototype
.
af_getTablePictures
=
function
(
wb
,
fmgrGraphics
,
oFont
)
{
window
[
'
native
'
].
SetStylesType
(
1
);
...
...
@@ -5290,7 +5290,7 @@ function OfflineEditor () {
}
return
result
;
};
asc
.
WorkbookView
.
prototype
.
af_getSmallIconTable
=
function
(
canvas
,
style
,
fmgrGraphics
,
oFont
)
{
window
[
"
Asc
"
]
.
WorkbookView
.
prototype
.
af_getSmallIconTable
=
function
(
canvas
,
style
,
fmgrGraphics
,
oFont
)
{
var
ctx
=
new
Asc
.
DrawingContext
({
canvas
:
canvas
,
units
:
0
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
styleOptions
=
style
;
...
...
@@ -5860,7 +5860,7 @@ function offline_mouse_down(x, y, pin, isViewerMode, isFormulaEditMode, isRangeR
ws
.
startCellMoveResizeRange
=
null
;
var
rangeChange
=
new
asc
.
Range
(
resizeRange
[
0
],
resizeRange
[
1
],
resizeRange
[
2
],
resizeRange
[
3
]);
var
rangeChange
=
new
window
[
"
Asc
"
]
.
Range
(
resizeRange
[
0
],
resizeRange
[
1
],
resizeRange
[
2
],
resizeRange
[
3
]);
var
target
=
{
formulaRange
:
rangeChange
,
row
:
ct
.
row
,
//isChartRange ? ct.row : targetRow,
...
...
@@ -5917,7 +5917,7 @@ function offline_mouse_move(x, y, isViewerMode, isRangeResize, isChartRange, ind
if
(
!
isViewerMode
)
{
var
ct
=
ws
.
getCursorTypeFromXY
(
x
,
y
,
isViewerMode
);
var
rangeChange
=
new
asc
.
Range
(
resizeRange
[
0
],
resizeRange
[
1
],
resizeRange
[
2
],
resizeRange
[
3
]);
var
rangeChange
=
new
window
[
"
Asc
"
]
.
Range
(
resizeRange
[
0
],
resizeRange
[
1
],
resizeRange
[
2
],
resizeRange
[
3
]);
var
target
=
{
//formulaRange: rangeChange,
row
:
isChartRange
?
ct
.
row
:
targetRow
,
...
...
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