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
2dec9442
Commit
2dec9442
authored
Apr 25, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put_TextPrLang
parent
52326ec5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
3 deletions
+115
-3
common/Drawings/Format/CnxShape.js
common/Drawings/Format/CnxShape.js
+29
-0
common/Drawings/Format/Format.js
common/Drawings/Format/Format.js
+67
-0
common/HistoryCommon.js
common/HistoryCommon.js
+4
-3
slide/api.js
slide/api.js
+15
-0
No files found.
common/Drawings/Format/CnxShape.js
0 → 100644
View file @
2dec9442
/**
* Created by Sergey.Luzyanin on 4/25/2017.
*/
(
function
(
undefined
){
function
CBaseParams
()
{
this
.
aAdj
=
[];
//{"@adjName": value};
this
.
posX
=
null
;
this
.
posY
=
null
;
this
.
extX
=
null
;
this
.
extY
=
null
;
this
.
flipH
=
null
;
this
.
flipV
=
null
;
this
.
rot
=
null
;
}
function
CConnectionShape
()
{
AscFormat
.
CShape
.
call
(
this
);
}
CConnectionShape
.
prototype
=
Object
.
create
(
AscFormat
.
CShape
.
prototype
);
CConnectionShape
.
prototype
.
constructor
=
CConnectionShape
;
CConnectionShape
.
prototype
.
calculateBaseParams
=
function
(
startPos
,
endPos
){
}
})();
\ No newline at end of file
common/Drawings/Format/Format.js
View file @
2dec9442
...
...
@@ -161,6 +161,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
drawingConstructorsMap
[
AscDFH
.
historyitem_ThemeSetColorScheme
]
=
ClrScheme
;
drawingConstructorsMap
[
AscDFH
.
historyitem_ThemeSetFontScheme
]
=
FontScheme
;
drawingConstructorsMap
[
AscDFH
.
historyitem_ThemeSetFmtScheme
]
=
FmtScheme
;
drawingConstructorsMap
[
AscDFH
.
historyitem_UniNvPr_SetUniSpPr
]
=
CNvUniSpPr
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_DefaultShapeDefinition_SetSpPr
]
=
CChangesDrawingsObject
;
...
...
@@ -183,6 +184,7 @@ var asc_CShapeProperty = Asc.asc_CShapeProperty;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_UniNvPr_SetCNvPr
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_UniNvPr_SetUniPr
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_UniNvPr_SetNvPr
]
=
CChangesDrawingsObject
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_UniNvPr_SetUniSpPr
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ShapeStyle_SetLnRef
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ShapeStyle_SetFillRef
]
=
CChangesDrawingsObjectNoId
;
AscDFH
.
changesFactory
[
AscDFH
.
historyitem_ShapeStyle_SetFontRef
]
=
CChangesDrawingsObjectNoId
;
...
...
@@ -4832,11 +4834,70 @@ Ph.prototype =
}
};
function
CNvUniSpPr
()
{
this
.
locks
=
null
;
this
.
stCnxIdx
=
null
;
this
.
stCnxId
=
null
;
this
.
endCnxIdx
=
null
;
this
.
endCnxId
=
null
;
}
CNvUniSpPr
.
prototype
.
Write_ToBinary
=
function
(
w
){
if
(
AscFormat
.
isRealNumber
(
this
.
locks
)){
w
.
WriteBool
(
true
);
w
.
WriteLong
(
this
.
locks
);
}
else
{
w
.
WriteBool
(
false
);
}
w
.
WriteLong
(
this
.
locks
);
if
(
AscFormat
.
isRealNumber
(
this
.
stCnxIdx
)
&&
AscFormat
.
isRealNumber
(
this
.
stCnxId
)){
w
.
WriteBool
(
true
);
w
.
WriteLong
(
this
.
stCnxIdx
);
w
.
WriteLong
(
this
.
stCnxId
);
}
else
{
w
.
WriteBool
(
false
);
}
if
(
AscFormat
.
isRealNumber
(
this
.
endCnxIdx
)
&&
AscFormat
.
isRealNumber
(
this
.
endCnxId
)){
w
.
WriteBool
(
true
);
w
.
WriteLong
(
this
.
endCnxIdx
);
w
.
WriteLong
(
this
.
endCnxId
);
}
else
{
w
.
WriteBool
(
false
);
}
};
CNvUniSpPr
.
prototype
.
Read_FromBinary
=
function
(
r
){
var
bCnx
=
r
.
GetBool
();
if
(
bCnx
){
this
.
locks
=
r
.
GetLong
();
}
else
{
this
.
locks
=
null
;
}
bCnx
=
r
.
GetBool
();
if
(
bCnx
){
this
.
stCnxIdx
=
r
.
GetLong
();
this
.
stCnxId
=
r
.
GetLong
();
}
else
{
this
.
stCnxIdx
=
r
.
GetLong
();
this
.
stCnxId
=
r
.
GetLong
();
}
};
function
UniNvPr
()
{
this
.
cNvPr
=
new
CNvPr
();
this
.
UniPr
=
null
;
this
.
nvPr
=
new
NvPr
();
this
.
nvUniSpPr
=
CNvUniSpPr
();
this
.
Id
=
g_oIdCounter
.
Get_NewId
();
g_oTableId
.
Add
(
this
,
this
.
Id
);
...
...
@@ -4862,6 +4923,11 @@ UniNvPr.prototype =
this
.
cNvPr
=
cNvPr
;
},
setUniSpPr
:
function
(
pr
){
History
.
Add
(
new
CChangesDrawingsObjectNoId
(
this
,
AscDFH
.
historyitem_UniNvPr_SetUniSpPr
,
this
.
UniPr
,
pr
));
this
.
nvUniSpPr
=
pr
;
},
setUniPr
:
function
(
uniPr
)
{
History
.
Add
(
new
CChangesDrawingsObject
(
this
,
AscDFH
.
historyitem_UniNvPr_SetUniPr
,
this
.
UniPr
,
uniPr
));
...
...
@@ -10469,6 +10535,7 @@ function CorrectUniColor(asc_color, unicolor, flag)
window
[
'
AscFormat
'
].
CreateUnifillFromAscColor
=
CreateUnifillFromAscColor
;
window
[
'
AscFormat
'
].
CorrectUniColor
=
CorrectUniColor
;
window
[
'
AscFormat
'
].
deleteDrawingBase
=
deleteDrawingBase
;
window
[
'
AscFormat
'
].
CNvUniSpPr
=
CNvUniSpPr
;
window
[
'
AscFormat
'
].
builder_CreateShape
=
builder_CreateShape
;
...
...
common/HistoryCommon.js
View file @
2dec9442
...
...
@@ -1773,6 +1773,7 @@
window
[
'
AscDFH
'
].
historyitem_UniNvPr_SetCNvPr
=
window
[
'
AscDFH
'
].
historyitem_type_UniNvPr
|
1
;
window
[
'
AscDFH
'
].
historyitem_UniNvPr_SetUniPr
=
window
[
'
AscDFH
'
].
historyitem_type_UniNvPr
|
2
;
window
[
'
AscDFH
'
].
historyitem_UniNvPr_SetNvPr
=
window
[
'
AscDFH
'
].
historyitem_type_UniNvPr
|
3
;
window
[
'
AscDFH
'
].
historyitem_UniNvPr_SetUniSpPr
=
window
[
'
AscDFH
'
].
historyitem_type_UniNvPr
|
4
;
window
[
'
AscDFH
'
].
historyitem_StyleRef_SetIdx
=
window
[
'
AscDFH
'
].
historyitem_type_StyleRef
|
1
;
window
[
'
AscDFH
'
].
historyitem_StyleRef_SetColor
=
window
[
'
AscDFH
'
].
historyitem_type_StyleRef
|
2
;
...
...
slide/api.js
View file @
2dec9442
...
...
@@ -2372,6 +2372,20 @@ background-repeat: no-repeat;\
this
.
UpdateInterfaceState
();
}
};
asc_docs_api
.
prototype
.
put_TextPrLang
=
function
(
value
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Paragraph_Content
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_SetTextLang
);
this
.
WordControl
.
m_oLogicDocument
.
AddToParagraph
(
new
AscCommonWord
.
ParaTextPr
({
Lang
:
{
Val
:
value
}}));
this
.
WordControl
.
m_oLogicDocument
.
Spelling
.
Check_CurParas
();
//if (true === this.isMarkerFormat)
// this.sync_MarkerFormatCallback(false);
}
};
asc_docs_api
.
prototype
.
put_TextPrBold
=
function
(
value
)
{
if
(
editor
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Drawing_Props
)
===
false
)
...
...
@@ -6763,6 +6777,7 @@ background-repeat: no-repeat;\
asc_docs_api
.
prototype
[
'
sync_SearchEndCallback
'
]
=
asc_docs_api
.
prototype
.
sync_SearchEndCallback
;
asc_docs_api
.
prototype
[
'
put_TextPrFontName
'
]
=
asc_docs_api
.
prototype
.
put_TextPrFontName
;
asc_docs_api
.
prototype
[
'
put_TextPrFontSize
'
]
=
asc_docs_api
.
prototype
.
put_TextPrFontSize
;
asc_docs_api
.
prototype
[
'
put_TextPrLang
'
]
=
asc_docs_api
.
prototype
.
put_TextPrLang
;
asc_docs_api
.
prototype
[
'
put_TextPrBold
'
]
=
asc_docs_api
.
prototype
.
put_TextPrBold
;
asc_docs_api
.
prototype
[
'
put_TextPrItalic
'
]
=
asc_docs_api
.
prototype
.
put_TextPrItalic
;
asc_docs_api
.
prototype
[
'
put_TextPrUnderline
'
]
=
asc_docs_api
.
prototype
.
put_TextPrUnderline
;
...
...
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