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
c2efee77
Commit
c2efee77
authored
Oct 12, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete unused code (ext)
parent
52093641
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
46 deletions
+38
-46
cell/api.js
cell/api.js
+2
-2
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+36
-44
No files found.
cell/api.js
View file @
c2efee77
...
@@ -2591,8 +2591,8 @@ var editor;
...
@@ -2591,8 +2591,8 @@ var editor;
};
};
// Cell interface
// Cell interface
spreadsheet_api
.
prototype
.
asc_getCellInfo
=
function
(
bExt
)
{
spreadsheet_api
.
prototype
.
asc_getCellInfo
=
function
()
{
return
this
.
wb
.
getWorksheet
().
getSelectionInfo
(
!!
bExt
);
return
this
.
wb
.
getWorksheet
().
getSelectionInfo
();
};
};
// Получить координаты активной ячейки
// Получить координаты активной ячейки
...
...
cell/view/WorksheetView.js
View file @
c2efee77
...
@@ -6911,12 +6911,12 @@
...
@@ -6911,12 +6911,12 @@
parserHelp
.
get3DRef
(
this
.
model
.
getName
(),
sName
);
parserHelp
.
get3DRef
(
this
.
model
.
getName
(),
sName
);
};
};
WorksheetView
.
prototype
.
getSelectionInfo
=
function
(
bExt
)
{
WorksheetView
.
prototype
.
getSelectionInfo
=
function
()
{
return
this
.
objectRender
.
selectedGraphicObjectsExists
()
?
this
.
_getSelectionInfoObject
(
bExt
)
:
return
this
.
objectRender
.
selectedGraphicObjectsExists
()
?
this
.
_getSelectionInfoObject
()
:
this
.
_getSelectionInfoCell
(
bExt
);
this
.
_getSelectionInfoCell
();
};
};
WorksheetView
.
prototype
.
_getSelectionInfoCell
=
function
(
bExt
)
{
WorksheetView
.
prototype
.
_getSelectionInfoCell
=
function
()
{
var
c_opt
=
this
.
settings
.
cells
;
var
c_opt
=
this
.
settings
.
cells
;
var
selectionRange
=
this
.
model
.
selectionRange
;
var
selectionRange
=
this
.
model
.
selectionRange
;
var
cell
=
selectionRange
.
activeCell
;
var
cell
=
selectionRange
.
activeCell
;
...
@@ -7025,11 +7025,6 @@
...
@@ -7025,11 +7025,6 @@
cell_info
.
comments
=
this
.
cellCommentator
.
getComments
(
ar
.
c1
,
ar
.
r1
);
cell_info
.
comments
=
this
.
cellCommentator
.
getComments
(
ar
.
c1
,
ar
.
r1
);
cell_info
.
flags
.
merge
=
null
!==
range
.
hasMerged
();
cell_info
.
flags
.
merge
=
null
!==
range
.
hasMerged
();
if
(
bExt
)
{
cell_info
.
innertext
=
c
.
getValue
();
cell_info
.
numFormat
=
c
.
getNumFormatStr
();
}
var
sheetId
=
this
.
model
.
getId
();
var
sheetId
=
this
.
model
.
getId
();
// Пересчет для входящих ячеек в добавленные строки/столбцы
// Пересчет для входящих ячеек в добавленные строки/столбцы
var
isIntersection
=
this
.
_recalcRangeByInsertRowsAndColumns
(
sheetId
,
ar
);
var
isIntersection
=
this
.
_recalcRangeByInsertRowsAndColumns
(
sheetId
,
ar
);
...
@@ -7054,42 +7049,41 @@
...
@@ -7054,42 +7049,41 @@
objectInfo
.
flags
=
new
asc_CCellFlag
();
objectInfo
.
flags
=
new
asc_CCellFlag
();
var
graphicObjects
=
this
.
objectRender
.
getSelectedGraphicObjects
();
var
graphicObjects
=
this
.
objectRender
.
getSelectedGraphicObjects
();
if
(
graphicObjects
.
length
)
{
if
(
graphicObjects
.
length
)
{
objectInfo
.
flags
.
selectionType
=
this
.
objectRender
.
getGraphicSelectionType
(
graphicObjects
[
0
].
Id
);
objectInfo
.
flags
.
selectionType
=
this
.
objectRender
.
getGraphicSelectionType
(
graphicObjects
[
0
].
Id
);
}
}
var
textPr
=
this
.
objectRender
.
controller
.
getParagraphTextPr
();
var
textPr
=
this
.
objectRender
.
controller
.
getParagraphTextPr
();
var
theme
=
this
.
objectRender
.
controller
.
getTheme
();
var
theme
=
this
.
objectRender
.
controller
.
getTheme
();
if
(
textPr
&&
theme
&&
theme
.
themeElements
&&
theme
.
themeElements
.
fontScheme
)
{
if
(
textPr
&&
theme
&&
theme
.
themeElements
&&
theme
.
themeElements
.
fontScheme
)
{
if
(
textPr
.
FontFamily
)
{
if
(
textPr
.
FontFamily
)
{
textPr
.
FontFamily
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
FontFamily
.
Name
);
textPr
.
FontFamily
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
FontFamily
.
Name
);
}
}
if
(
textPr
.
RFonts
)
{
if
(
textPr
.
RFonts
)
{
if
(
textPr
.
RFonts
.
Ascii
)
{
if
(
textPr
.
RFonts
.
Ascii
)
{
textPr
.
RFonts
.
Ascii
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
Ascii
.
Name
);
textPr
.
RFonts
.
Ascii
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
Ascii
.
Name
);
}
}
if
(
textPr
.
RFonts
.
EastAsia
)
{
if
(
textPr
.
RFonts
.
EastAsia
)
{
textPr
.
RFonts
.
EastAsia
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
EastAsia
.
Name
);
textPr
.
RFonts
.
EastAsia
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
EastAsia
.
Name
);
}
}
if
(
textPr
.
RFonts
.
HAnsi
)
{
if
(
textPr
.
RFonts
.
HAnsi
)
{
textPr
.
RFonts
.
HAnsi
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
HAnsi
.
Name
);
textPr
.
RFonts
.
HAnsi
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
HAnsi
.
Name
);
}
}
if
(
textPr
.
RFonts
.
CS
)
{
if
(
textPr
.
RFonts
.
CS
)
{
textPr
.
RFonts
.
CS
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
CS
.
Name
);
textPr
.
RFonts
.
CS
.
Name
=
theme
.
themeElements
.
fontScheme
.
checkFont
(
textPr
.
RFonts
.
CS
.
Name
);
}
}
}
}
}
}
var
paraPr
=
this
.
objectRender
.
controller
.
getParagraphParaPr
();
var
paraPr
=
this
.
objectRender
.
controller
.
getParagraphParaPr
();
if
(
!
paraPr
&&
textPr
)
if
(
!
paraPr
&&
textPr
)
{
{
paraPr
=
new
CParaPr
();
paraPr
=
new
CParaPr
();
}
}
if
(
textPr
&&
paraPr
)
{
if
(
textPr
&&
paraPr
)
{
objectInfo
.
text
=
this
.
objectRender
.
controller
.
Get_SelectedText
(
true
);
objectInfo
.
text
=
this
.
objectRender
.
controller
.
Get_SelectedText
(
true
);
var
horAlign
=
"
center
"
;
var
horAlign
=
"
center
"
;
switch
(
paraPr
.
Jc
)
{
switch
(
paraPr
.
Jc
)
{
case
AscCommon
.
align_Left
:
case
AscCommon
.
align_Left
:
horAlign
=
"
left
"
;
horAlign
=
"
left
"
;
break
;
break
;
...
@@ -7106,8 +7100,8 @@
...
@@ -7106,8 +7100,8 @@
var
vertAlign
=
"
center
"
;
var
vertAlign
=
"
center
"
;
var
shape_props
=
this
.
objectRender
.
controller
.
getDrawingProps
().
shapeProps
;
var
shape_props
=
this
.
objectRender
.
controller
.
getDrawingProps
().
shapeProps
;
var
angle
=
null
;
var
angle
=
null
;
if
(
shape_props
)
{
if
(
shape_props
)
{
switch
(
shape_props
.
verticalTextAlign
)
{
switch
(
shape_props
.
verticalTextAlign
)
{
case
AscFormat
.
VERTICAL_ANCHOR_TYPE_BOTTOM
:
case
AscFormat
.
VERTICAL_ANCHOR_TYPE_BOTTOM
:
vertAlign
=
"
bottom
"
;
vertAlign
=
"
bottom
"
;
break
;
break
;
...
@@ -7121,7 +7115,7 @@
...
@@ -7121,7 +7115,7 @@
vertAlign
=
"
top
"
;
vertAlign
=
"
top
"
;
break
;
break
;
}
}
switch
(
shape_props
.
vert
)
{
switch
(
shape_props
.
vert
)
{
case
AscFormat
.
nVertTTvert
:
case
AscFormat
.
nVertTTvert
:
angle
=
90
;
angle
=
90
;
break
;
break
;
...
@@ -7148,29 +7142,27 @@
...
@@ -7148,29 +7142,27 @@
objectInfo
.
font
.
strikeout
=
textPr
.
Strikeout
;
objectInfo
.
font
.
strikeout
=
textPr
.
Strikeout
;
objectInfo
.
font
.
subscript
=
textPr
.
VertAlign
==
AscCommon
.
vertalign_SubScript
;
objectInfo
.
font
.
subscript
=
textPr
.
VertAlign
==
AscCommon
.
vertalign_SubScript
;
objectInfo
.
font
.
superscript
=
textPr
.
VertAlign
==
AscCommon
.
vertalign_SuperScript
;
objectInfo
.
font
.
superscript
=
textPr
.
VertAlign
==
AscCommon
.
vertalign_SuperScript
;
if
(
textPr
.
Color
)
{
if
(
textPr
.
Color
)
{
objectInfo
.
font
.
color
=
AscCommon
.
CreateAscColorCustom
(
textPr
.
Color
.
r
,
textPr
.
Color
.
g
,
textPr
.
Color
.
b
);
objectInfo
.
font
.
color
=
AscCommon
.
CreateAscColorCustom
(
textPr
.
Color
.
r
,
textPr
.
Color
.
g
,
textPr
.
Color
.
b
);
}
}
var
shapeHyperlink
=
this
.
objectRender
.
controller
.
getHyperlinkInfo
();
var
shapeHyperlink
=
this
.
objectRender
.
controller
.
getHyperlinkInfo
();
if
(
shapeHyperlink
&&
(
shapeHyperlink
instanceof
ParaHyperlink
)
)
{
if
(
shapeHyperlink
&&
(
shapeHyperlink
instanceof
ParaHyperlink
)
)
{
var
hyperlink
=
new
AscCommonExcel
.
Hyperlink
();
var
hyperlink
=
new
AscCommonExcel
.
Hyperlink
();
hyperlink
.
Tooltip
=
shapeHyperlink
.
ToolTip
;
hyperlink
.
Tooltip
=
shapeHyperlink
.
ToolTip
;
var
spl
=
shapeHyperlink
.
Value
.
split
(
"
!
"
);
var
spl
=
shapeHyperlink
.
Value
.
split
(
"
!
"
);
if
(
spl
.
length
===
2
)
{
if
(
spl
.
length
===
2
)
{
hyperlink
.
setLocation
(
shapeHyperlink
.
Value
);
hyperlink
.
setLocation
(
shapeHyperlink
.
Value
);
}
}
else
{
else
{
hyperlink
.
Hyperlink
=
shapeHyperlink
.
Value
;
hyperlink
.
Hyperlink
=
shapeHyperlink
.
Value
;
}
}
objectInfo
.
hyperlink
=
new
asc_CHyperlink
(
hyperlink
);
objectInfo
.
hyperlink
=
new
asc_CHyperlink
(
hyperlink
);
objectInfo
.
hyperlink
.
asc_setText
(
shapeHyperlink
.
Get_SelectedText
(
true
,
true
)
);
objectInfo
.
hyperlink
.
asc_setText
(
shapeHyperlink
.
Get_SelectedText
(
true
,
true
));
}
}
}
else
{
}
else
{
// Может быть не задано текста, поэтому выставим по умолчанию
// Может быть не задано текста, поэтому выставим по умолчанию
objectInfo
.
font
=
new
asc_CFont
();
objectInfo
.
font
=
new
asc_CFont
();
objectInfo
.
font
.
name
=
this
.
model
.
getDefaultFontName
();
objectInfo
.
font
.
name
=
this
.
model
.
getDefaultFontName
();
...
@@ -7178,7 +7170,7 @@
...
@@ -7178,7 +7170,7 @@
}
}
// Заливка не нужна как таковая
// Заливка не нужна как таковая
objectInfo
.
fill
=
new
asc_CFill
(
null
);
objectInfo
.
fill
=
new
asc_CFill
(
null
);
// ToDo locks
// ToDo locks
...
...
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