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
600e299f
Commit
600e299f
authored
Apr 26, 2017
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented drawing a rect on moving mouse over a class CBlockLevelSdt.
parent
192124e8
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
105 additions
and
5 deletions
+105
-5
word/Editor/Document.js
word/Editor/Document.js
+8
-4
word/Editor/DocumentContent.js
word/Editor/DocumentContent.js
+8
-0
word/Editor/DocumentContentElementBase.js
word/Editor/DocumentContentElementBase.js
+4
-1
word/Editor/DocumentControllerBase.js
word/Editor/DocumentControllerBase.js
+4
-0
word/Editor/DrawingsController.js
word/Editor/DrawingsController.js
+8
-0
word/Editor/Footnotes.js
word/Editor/Footnotes.js
+9
-0
word/Editor/HeaderFooterController.js
word/Editor/HeaderFooterController.js
+6
-0
word/Editor/LogicDocumentController.js
word/Editor/LogicDocumentController.js
+4
-0
word/Editor/Paragraph.js
word/Editor/Paragraph.js
+3
-0
word/Editor/StructuredDocumentTags/BlockLevel.js
word/Editor/StructuredDocumentTags/BlockLevel.js
+22
-0
word/Editor/Table.js
word/Editor/Table.js
+10
-0
word/Editor/Table/TableCell.js
word/Editor/Table/TableCell.js
+19
-0
No files found.
word/Editor/Document.js
View file @
600e299f
...
...
@@ -15023,6 +15023,13 @@ CDocument.prototype.controller_IsInBlockLevelSdt = function()
return
null
;
};
CDocument
.
prototype
.
controller_DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
)
{
var
ContentPos
=
this
.
Internal_GetContentPosByXY
(
X
,
Y
,
PageAbs
);
var
Item
=
this
.
Content
[
ContentPos
];
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
PageAbs
);
Item
.
DrawContentControlsHover
(
X
,
Y
,
ElementPageIndex
);
};
//----------------------------------------------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------------------------------------------
...
...
@@ -15145,10 +15152,7 @@ CDocument.prototype.DrawContentControls = function(PageAbs, MouseX, MouseY, Mous
}
else
if
(
PageAbs
===
MousePage
)
{
var
ContentPos
=
this
.
Internal_GetContentPosByXY
(
MouseX
,
MouseY
,
MousePage
);
var
Item
=
this
.
Content
[
ContentPos
];
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
MouseX
,
MouseY
,
MousePage
);
//Item.DrawContentControls(MouseX, MouseY, MousePage);
this
.
Controller
.
DrawContentControlsHover
(
MouseX
,
MouseY
,
MousePage
);
}
};
...
...
word/Editor/DocumentContent.js
View file @
600e299f
...
...
@@ -8491,6 +8491,14 @@ CDocumentContent.prototype.IsInBlockLevelSdt = function(oBlockLevelSdt)
return
oBlockLevelSdt
;
};
CDocumentContent
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
var
ContentPos
=
this
.
Internal_GetContentPosByXY
(
X
,
Y
,
CurPage
);
var
Item
=
this
.
Content
[
ContentPos
];
var
ElementPageIndex
=
this
.
private_GetElementPageIndexByXY
(
ContentPos
,
X
,
Y
,
CurPage
);
Item
.
DrawContentControlsHover
(
X
,
Y
,
ElementPageIndex
);
};
function
CDocumentContentStartState
(
DocContent
)
{
...
...
word/Editor/DocumentContentElementBase.js
View file @
600e299f
...
...
@@ -573,7 +573,10 @@ CDocumentContentElementBase.prototype.GetSelectionAnchorPos = function()
};
CDocumentContentElementBase
.
prototype
.
IsInBlockLevelSdt
=
function
(
oBlockLevelSdt
)
{
return
this
.
Content
.
IsInBlockLevelSdt
(
this
);
return
null
;
};
CDocumentContentElementBase
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
};
//----------------------------------------------------------------------------------------------------------------------
// Функции для работы с номерами страниц
...
...
word/Editor/DocumentControllerBase.js
View file @
600e299f
...
...
@@ -737,3 +737,7 @@ CDocumentControllerBase.prototype.RemoveTextSelection = function(){};
* @returns {CBlockLevelSdt?}
*/
CDocumentControllerBase
.
prototype
.
IsInBlockLevelSdt
=
function
(){
return
null
;};
/**
* Рисуем выделение контейнер, когда проводим мышкой над ним
*/
CDocumentControllerBase
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
){};
\ No newline at end of file
word/Editor/DrawingsController.js
View file @
600e299f
...
...
@@ -525,3 +525,11 @@ CDrawingsController.prototype.IsInBlockLevelSdt = function()
return
null
;
};
CDrawingsController
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
)
{
var
oTargetTextObject
=
AscFormat
.
getTargetTextObject
(
this
.
DrawingObjects
);
if
(
oTargetTextObject
)
return
oTargetTextObject
.
DrawContentControlsHover
(
X
,
Y
,
0
);
return
null
;
};
\ No newline at end of file
word/Editor/Footnotes.js
View file @
600e299f
...
...
@@ -3225,6 +3225,15 @@ CFootnotesController.prototype.IsInBlockLevelSdt = function()
return
null
;
};
CFootnotesController
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
)
{
var
oResult
=
this
.
private_GetFootnoteByXY
(
X
,
Y
,
PageAbs
);
if
(
oResult
)
{
var
oFootnote
=
oResult
.
Footnote
;
oFootnote
.
DrawContentControlsHover
(
X
,
Y
,
oResult
.
FootnotePageIndex
);
}
};
function
CFootEndnotePageColumn
()
...
...
word/Editor/HeaderFooterController.js
View file @
600e299f
...
...
@@ -489,3 +489,9 @@ CHdrFtrController.prototype.IsInBlockLevelSdt = function()
return
null
;
};
CHdrFtrController
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
)
{
var
CurHdrFtr
=
this
.
HdrFtr
.
CurHdrFtr
;
if
(
null
!=
CurHdrFtr
)
return
CurHdrFtr
.
Content
.
DrawContentControlsHover
(
X
,
Y
,
CurHdrFtr
.
Content
.
Get_StartPage_Relative
());
};
\ No newline at end of file
word/Editor/LogicDocumentController.js
View file @
600e299f
...
...
@@ -382,3 +382,7 @@ CLogicDocumentController.prototype.IsInBlockLevelSdt = function()
{
return
this
.
LogicDocument
.
controller_IsInBlockLevelSdt
();
};
CLogicDocumentController
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
PageAbs
)
{
this
.
LogicDocument
.
controller_DrawContentControlsHover
(
X
,
Y
,
PageAbs
);
};
\ No newline at end of file
word/Editor/Paragraph.js
View file @
600e299f
...
...
@@ -12098,6 +12098,9 @@ Paragraph.prototype.IsInBlockLevelSdt = function(oBlockLevelSdt)
{
return
oBlockLevelSdt
;
};
Paragraph
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
};
var
pararecalc_0_All
=
0
;
var
pararecalc_0_None
=
1
;
...
...
word/Editor/StructuredDocumentTags/BlockLevel.js
View file @
600e299f
...
...
@@ -567,6 +567,28 @@ CBlockLevelSdt.prototype.IsInBlockLevelSdt = function(oBlockLevelSdt)
{
return
this
.
Content
.
IsInBlockLevelSdt
(
this
);
};
CBlockLevelSdt
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
this
.
Content
.
DrawContentControlsHover
(
X
,
Y
,
CurPage
);
var
oDrawingDocument
=
this
.
LogicDocument
.
Get_DrawingDocument
();
var
oRects
=
{};
for
(
var
nCurPage
=
0
,
nPagesCount
=
this
.
GetPagesCount
();
nCurPage
<
nPagesCount
;
++
nCurPage
)
{
var
nPageAbs
=
this
.
Get_AbsolutePage
(
nCurPage
);
if
(
!
oRects
[
nPageAbs
])
oRects
[
nPageAbs
]
=
[];
var
oBounds
=
this
.
GetPageBounds
(
nCurPage
);
oRects
[
nPageAbs
].
push
({
X
:
oBounds
.
Left
,
Y
:
oBounds
.
Top
,
R
:
oBounds
.
Right
,
B
:
oBounds
.
Bottom
});
}
for
(
var
nPageAbs
in
oRects
)
{
oDrawingDocument
.
DrawContentControl
(
this
.
GetId
(),
c_oContentControlTrack
.
Hover
,
nPageAbs
,
oRects
[
nPageAbs
]);
}
};
CBlockLevelSdt
.
prototype
.
DrawContentControls
=
function
(
PageAbs
)
{
var
oDrawingDocument
=
this
.
LogicDocument
.
Get_DrawingDocument
();
...
...
word/Editor/Table.js
View file @
600e299f
...
...
@@ -12006,6 +12006,16 @@ CTable.prototype.IsInBlockLevelSdt = function(oBlockLevelSdt)
return
oBlockLevelSdt
;
};
CTable
.
prototype
.
DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
var
oPos
=
this
.
Internal_GetCellByXY
(
X
,
Y
,
CurPage
);
var
oRow
=
this
.
Content
[
oPos
.
Row
];
if
(
oRow
&&
oPos
.
Cell
<
oRow
.
Get_CellsCount
())
{
var
oCell
=
oRow
.
Get_Cell
(
oPos
.
Cell
);
oCell
.
Content_DrawContentControlsHover
(
X
,
Y
,
CurPage
-
oCell
.
Content
.
Get_StartPage_Relative
());
}
};
//----------------------------------------------------------------------------------------------------------------------
// Класс CTableLook
//----------------------------------------------------------------------------------------------------------------------
...
...
word/Editor/Table/TableCell.js
View file @
600e299f
...
...
@@ -1792,7 +1792,21 @@ CTableCell.prototype =
{
}
};
CTableCell
.
private_TransformXY
=
function
(
X
,
Y
)
{
// TODO: Везде, где идет такой код заменить на данную функцию
var
_X
=
X
,
_Y
=
Y
;
var
Transform
=
this
.
private_GetTextDirectionTransform
();
if
(
null
!==
Transform
)
{
Transform
=
global_MatrixTransformer
.
Invert
(
Transform
);
_X
=
Transform
.
TransformPointX
(
X
,
Y
);
_Y
=
Transform
.
TransformPointY
(
X
,
Y
);
}
return
{
X
:
_X
,
Y
:
_Y
};
};
CTableCell
.
prototype
.
Get_TopElement
=
function
()
{
if
(
this
.
Row
&&
this
.
Row
.
Table
)
...
...
@@ -1846,6 +1860,11 @@ CTableCell.prototype.Get_TopDocumentContent = function()
return
null
;
};
CTableCell
.
prototype
.
Content_DrawContentControlsHover
=
function
(
X
,
Y
,
CurPage
)
{
var
oPos
=
this
.
private_TransformXY
(
X
,
Y
);
this
.
Content
.
DrawContentControlsHover
(
oPos
.
X
,
oPos
.
Y
,
CurPage
);
};
function
CTableCellRecalculateObject
()
{
...
...
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