Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
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
onlyoffice_core
Commits
c93a6e85
Commit
c93a6e85
authored
May 11, 2016
by
Oleg Korshul
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
изменения для билдера как для сборщика
parent
672f2ed3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
23 deletions
+50
-23
DesktopEditor/doctrenderer/docbuilder.cpp
DesktopEditor/doctrenderer/docbuilder.cpp
+50
-23
No files found.
DesktopEditor/doctrenderer/docbuilder.cpp
View file @
c93a6e85
...
...
@@ -356,9 +356,9 @@ namespace NSDoctRenderer
public:
CArray
<
std
::
wstring
>
m_arrFiles
;
std
::
wstring
m_st
rDoctSDK
;
std
::
wstring
m_st
rPpttSDK
;
std
::
wstring
m_st
rXlstSDK
;
std
::
vector
<
std
::
wstring
>
m_a
rDoctSDK
;
std
::
vector
<
std
::
wstring
>
m_a
rPpttSDK
;
std
::
vector
<
std
::
wstring
>
m_a
rXlstSDK
;
std
::
wstring
m_strEditorType
;
std
::
wstring
m_strFilePath
;
...
...
@@ -420,30 +420,17 @@ namespace NSDoctRenderer
}
}
m_strDoctSDK
=
L""
;
m_strPpttSDK
=
L""
;
m_strXlstSDK
=
L""
;
XmlUtils
::
CXmlNode
oNodeSdk
=
oNode
.
ReadNode
(
L"DoctSdk"
);
if
(
oNodeSdk
.
IsValid
())
m_strDoctSDK
=
oNodeSdk
.
GetText
(
);
LoadSDK_scripts
(
oNodeSdk
,
m_arDoctSDK
,
sConfigDir
);
oNodeSdk
=
oNode
.
ReadNode
(
L"PpttSdk"
);
if
(
oNodeSdk
.
IsValid
())
m_strPpttSDK
=
oNodeSdk
.
GetText
(
);
LoadSDK_scripts
(
oNodeSdk
,
m_arPpttSDK
,
sConfigDir
);
oNodeSdk
=
oNode
.
ReadNode
(
L"XlstSdk"
);
if
(
oNodeSdk
.
IsValid
())
m_strXlstSDK
=
oNodeSdk
.
GetText
();
if
(
!
NSFile
::
CFileBinary
::
Exists
(
m_strDoctSDK
))
m_strDoctSDK
=
sConfigDir
+
m_strDoctSDK
;
if
(
!
NSFile
::
CFileBinary
::
Exists
(
m_strPpttSDK
))
m_strPpttSDK
=
sConfigDir
+
m_strPpttSDK
;
if
(
!
NSFile
::
CFileBinary
::
Exists
(
m_strXlstSDK
))
m_strXlstSDK
=
sConfigDir
+
m_strXlstSDK
;
LoadSDK_scripts
(
oNodeSdk
,
m_arXlstSDK
,
sConfigDir
);
CheckFonts
(
bIsCheckSystemFonts
);
...
...
@@ -459,6 +446,37 @@ namespace NSDoctRenderer
CloseFile
();
}
void
LoadSDK_scripts
(
XmlUtils
::
CXmlNode
&
oNode
,
std
::
vector
<
std
::
wstring
>&
_files
,
const
std
::
wstring
&
strConfigDir
)
{
XmlUtils
::
CXmlNodes
oNodes
;
if
(
oNode
.
GetNodes
(
L"file"
,
oNodes
))
{
int
nCount
=
oNodes
.
GetCount
();
XmlUtils
::
CXmlNode
_node
;
for
(
int
i
=
0
;
i
<
nCount
;
++
i
)
{
oNodes
.
GetAt
(
i
,
_node
);
std
::
wstring
strFilePath
=
_node
.
GetText
();
if
(
NSFile
::
CFileBinary
::
Exists
(
strFilePath
)
&&
!
NSFile
::
CFileBinary
::
Exists
(
strConfigDir
+
strFilePath
))
_files
.
push_back
(
strFilePath
);
else
_files
.
push_back
(
strConfigDir
+
strFilePath
);
}
}
else
{
std
::
wstring
strFilePath
=
oNode
.
GetText
();
if
(
NSFile
::
CFileBinary
::
Exists
(
strFilePath
)
&&
!
NSFile
::
CFileBinary
::
Exists
(
strConfigDir
+
strFilePath
))
_files
.
push_back
(
strFilePath
);
else
_files
.
push_back
(
strConfigDir
+
strFilePath
);
}
}
void
CheckFonts
(
bool
bIsCheckSystemFonts
)
{
CArray
<
std
::
string
>
strFonts
;
...
...
@@ -975,22 +993,24 @@ namespace NSDoctRenderer
std
::
string
GetScript
()
{
std
::
vector
<
std
::
wstring
>*
arSdkFiles
=
NULL
;
std
::
wstring
sResourceFile
;
switch
(
m_nFileType
)
{
case
0
:
{
sResourceFile
=
m_st
rDoctSDK
;
arSdkFiles
=
&
m_a
rDoctSDK
;
break
;
}
case
1
:
{
sResourceFile
=
m_st
rPpttSDK
;
arSdkFiles
=
&
m_a
rPpttSDK
;
break
;
}
case
2
:
{
sResourceFile
=
m_st
rXlstSDK
;
arSdkFiles
=
&
m_a
rXlstSDK
;
break
;
}
default:
...
...
@@ -1004,7 +1024,14 @@ namespace NSDoctRenderer
strScript
+=
"
\n\n
"
;
}
strScript
+=
ReadScriptFile
(
sResourceFile
);
if
(
NULL
!=
arSdkFiles
)
{
for
(
std
::
vector
<
std
::
wstring
>::
iterator
i
=
arSdkFiles
->
begin
();
i
!=
arSdkFiles
->
end
();
i
++
)
{
strScript
+=
ReadScriptFile
(
*
i
);
strScript
+=
"
\n\n
"
;
}
}
if
(
m_nFileType
==
2
)
strScript
+=
"
\n
$.ready();"
;
...
...
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