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
e13bc441
Commit
e13bc441
authored
Apr 13, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://github.com/ONLYOFFICE/core
into develop
parents
56cefcb1
6f860c17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
X2tConverter/test/batch_convert/x2t_test/mainwindow.cpp
X2tConverter/test/batch_convert/x2t_test/mainwindow.cpp
+19
-3
No files found.
X2tConverter/test/batch_convert/x2t_test/mainwindow.cpp
View file @
e13bc441
...
...
@@ -348,6 +348,7 @@ public:
CConverter
*
GetNextConverter
();
void
OnConvertFile
(
CConverter
*
pConverter
,
int
nCode
);
void
Start
(
int
nCores
);
void
Cancel
();
};
class
CConverter
:
public
NSThreads
::
CBaseThread
...
...
@@ -371,6 +372,7 @@ public:
COfficeFileFormatChecker
oChecker
;
if
(
!
oChecker
.
isOfficeFile
(
m_file
))
{
m_bRunThread
=
FALSE
;
m_pInternal
->
OnConvertFile
(
this
,
-
1
);
return
0
;
}
...
...
@@ -380,6 +382,7 @@ public:
std
::
map
<
int
,
bool
>::
iterator
find
=
m_pInternal
->
m_formats
.
find
(
nFormat
);
if
(
find
==
m_pInternal
->
m_formats
.
end
())
{
m_bRunThread
=
FALSE
;
m_pInternal
->
OnConvertFile
(
this
,
-
1
);
return
0
;
}
...
...
@@ -574,7 +577,6 @@ public:
CConverter
*
CInternalWorker
::
GetNextConverter
()
{
CTemporaryCS
oCS
(
&
m_oCS
);
if
(
m_nCurrent
>=
m_nCount
)
return
NULL
;
...
...
@@ -600,6 +602,8 @@ void CInternalWorker::OnConvertFile(CConverter* pConverter, int nCode)
void
CInternalWorker
::
Start
(
int
nCores
)
{
CTemporaryCS
oCS
(
&
m_oCS
);
int
nSizeInit
=
nCores
;
if
(
nSizeInit
>
m_nCount
)
nSizeInit
=
m_nCount
;
...
...
@@ -608,6 +612,12 @@ void CInternalWorker::Start(int nCores)
GetNextConverter
();
}
void
CInternalWorker
::
Cancel
()
{
CTemporaryCS
oCS
(
&
m_oCS
);
m_nCount
=
m_nCurrent
;
}
MainWindow
::
MainWindow
(
QWidget
*
parent
)
:
QMainWindow
(
parent
),
ui
(
new
Ui
::
MainWindow
)
...
...
@@ -794,6 +804,12 @@ void MainWindow::pushButtonDirectoryClicked()
void
MainWindow
::
pushButtonConvertClicked
()
{
if
(
ui
->
pushButtonConvert
->
text
()
==
"CANCEL"
)
{
m_pWorker
->
Cancel
();
return
;
}
std
::
wstring
sProcess
=
NSFile
::
GetProcessDirectory
();
if
(
!
NSDirectory
::
Exists
(
sProcess
+
L"/fonts"
))
NSDirectory
::
CreateDirectory
(
sProcess
+
L"/fonts"
);
...
...
@@ -810,7 +826,7 @@ void MainWindow::pushButtonConvertClicked()
m_pWorker
->
m_pParser
->
Start
(
0
);
ui
->
pushButtonConvert
->
set
Enabled
(
false
);
ui
->
pushButtonConvert
->
set
Text
(
"CANCEL"
);
}
void
MainWindow
::
send_onDirectoryChecked
()
...
...
@@ -829,7 +845,7 @@ void MainWindow::slot_onFileConverted(int nProgress)
if
(
nProgress
==
m_pWorker
->
m_nCount
)
{
ui
->
pushButtonConvert
->
set
Enabled
(
true
);
ui
->
pushButtonConvert
->
set
Text
(
"CONVERT"
);
ui
->
progressBar
->
setVisible
(
false
);
}
}
...
...
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