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
f79ac124
Commit
f79ac124
authored
8 years ago
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added rFonts
parent
a7a8a799
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
11 deletions
+47
-11
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+47
-11
No files found.
slide/Editor/Format/Presentation.js
View file @
f79ac124
...
...
@@ -5114,7 +5114,7 @@ CPresentation.prototype =
//-----------------------------------------------------------------------------------
// Функции для работы с textbox
//-----------------------------------------------------------------------------------
TextBox_Put
:
function
(
sText
)
TextBox_Put
:
function
(
sText
,
rFonts
)
{
// Отключаем пересчет, включим перед последним добавлением. Поскольку,
// у нас все добавляется в 1 параграф, так можно делать.
...
...
@@ -5122,19 +5122,55 @@ CPresentation.prototype =
if
(
AscCommon
.
CollaborativeEditing
.
Is_Fast
()
||
editor
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
changestype_Drawing_Props
)
===
false
)
{
History
.
Create_NewPoint
(
AscDFH
.
historydescription_Presentation_ParagraphAdd
);
var
Count
=
sText
.
length
;
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
if
(
Index
===
Count
-
1
)
if
(
!
rFonts
){
var
Count
=
sText
.
length
;
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
if
(
Index
===
Count
-
1
)
this
.
TurnOffRecalc
=
false
;
var
_char
=
sText
.
charAt
(
Index
);
if
(
"
"
==
_char
)
this
.
Paragraph_Add
(
new
ParaSpace
(
1
));
else
this
.
Paragraph_Add
(
new
ParaText
(
_char
));
// На случай, если Count = 0
this
.
TurnOffRecalc
=
false
;
}
}
else
{
if
(
this
.
Slides
[
this
.
CurPage
]){
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
CreateDocContent
();
var
_char
=
sText
.
charAt
(
Index
);
if
(
"
"
==
_char
)
this
.
Paragraph_Add
(
new
ParaSpace
(
1
));
else
this
.
Paragraph_Add
(
new
ParaText
(
_char
));
var
oTargetContent
=
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
getTargetDocContent
(
true
);
if
(
oTargetContent
){
var
Para
=
oTargetContent
.
Get_CurrentParagraph
();
if
(
null
===
Para
)
return
;
var
RunPr
=
Para
.
Get_TextPr
();
if
(
null
===
RunPr
||
undefined
===
RunPr
)
RunPr
=
new
CTextPr
();
// На случай, если Count = 0
this
.
TurnOffRecalc
=
false
;
RunPr
.
RFonts
=
rFonts
;
var
Run
=
new
ParaRun
(
Para
);
Run
.
Set_Pr
(
RunPr
);
var
Count
=
sText
.
length
;
for
(
var
Index
=
0
;
Index
<
Count
;
Index
++
)
{
var
_char
=
sText
.
charAt
(
Index
);
if
(
"
"
==
_char
)
Run
.
Add_ToContent
(
Index
,
new
ParaSpace
(),
false
);
else
Run
.
Add_ToContent
(
Index
,
new
ParaText
(
_char
),
false
);
}
Para
.
Add
(
Run
);
}
this
.
Slides
[
this
.
CurPage
].
graphicObjects
.
startRecalculate
();
}
}
}
this
.
Document_UpdateUndoRedoState
();
...
...
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