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