Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
6df0f114
Commit
6df0f114
authored
Aug 10, 2011
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All exported document will be checked against absolut path
parent
0edf49ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
1 deletion
+23
-1
UBExportDocument.cpp
src/adaptors/UBExportDocument.cpp
+5
-0
UBWebPublisher.cpp
src/adaptors/UBWebPublisher.cpp
+6
-0
UniboardSankoreTransition.cpp
src/transition/UniboardSankoreTransition.cpp
+9
-1
UniboardSankoreTransition.h
src/transition/UniboardSankoreTransition.h
+3
-0
No files found.
src/adaptors/UBExportDocument.cpp
View file @
6df0f114
...
...
@@ -25,6 +25,8 @@
#include "quazip.h"
#include "quazipfile.h"
#include "transition/UniboardSankoreTransition.h"
#include "core/memcheck.h"
UBExportDocument
::
UBExportDocument
(
QObject
*
parent
)
...
...
@@ -64,6 +66,9 @@ void UBExportDocument::persist(UBDocumentProxy* pDocumentProxy)
void
UBExportDocument
::
persistsDocument
(
UBDocumentProxy
*
pDocumentProxy
,
QString
filename
)
{
UniboardSankoreTransition
document
;
QString
documentPath
(
pDocumentProxy
->
persistencePath
());
document
.
checkDocumentDirectory
(
documentPath
);
QuaZip
zip
(
filename
);
zip
.
setFileNameCodec
(
"UTF-8"
);
...
...
src/adaptors/UBWebPublisher.cpp
View file @
6df0f114
...
...
@@ -21,6 +21,8 @@
#include "core/memcheck.h"
#include "transition/UniboardSankoreTransition.h"
UBWebPublisher
::
UBWebPublisher
(
QObject
*
parent
)
:
UBExportAdaptor
(
parent
)
{
...
...
@@ -45,6 +47,10 @@ void UBWebPublisher::persist(UBDocumentProxy* pDocumentProxy)
if
(
!
pDocumentProxy
)
return
;
UniboardSankoreTransition
document
;
QString
documentPath
(
pDocumentProxy
->
persistencePath
());
document
.
checkDocumentDirectory
(
documentPath
);
UBDocumentPublisher
*
publisher
=
new
UBDocumentPublisher
(
pDocumentProxy
,
this
);
// the publisher will self delete when publication finishes
publisher
->
publish
();
...
...
src/transition/UniboardSankoreTransition.cpp
View file @
6df0f114
...
...
@@ -65,6 +65,15 @@ void UniboardSankoreTransition::rollbackDocumentsTransition(QFileInfoList& fileI
}
}
bool
UniboardSankoreTransition
::
checkDocumentDirectory
(
QString
&
documentDirectoryPath
)
{
bool
result
=
true
;
result
=
updateSankoreHRef
(
documentDirectoryPath
);
QString
sankoreWidgetPath
=
documentDirectoryPath
+
"/widgets"
;
result
&=
updateIndexWidget
(
sankoreWidgetPath
);
return
result
;
}
void
UniboardSankoreTransition
::
documentTransition
()
{
if
(
QFileInfo
(
mUniboardSourceDirectory
).
exists
()
||
QFileInfo
(
mOldSankoreDirectory
).
exists
()){
...
...
@@ -206,7 +215,6 @@ bool UniboardSankoreTransition::updateSankoreHRef(QString& sankoreDocumentPath)
QFileInfoList
fileInfoList
=
UBFileSystemUtils
::
allElementsInDirectory
(
sankoreDocumentPath
);
QFileInfoList
::
iterator
fileInfo
;
QString
sankoreDocumentDirectory
=
UBSettings
::
uniboardDocumentDirectory
();
for
(
fileInfo
=
fileInfoList
.
begin
();
fileInfo
!=
fileInfoList
.
end
()
&&
result
;
fileInfo
+=
1
)
{
if
(
fileInfo
->
fileName
().
endsWith
(
"svg"
)){
...
...
src/transition/UniboardSankoreTransition.h
View file @
6df0f114
...
...
@@ -38,6 +38,9 @@ class UniboardSankoreTransition : public QObject
public
:
explicit
UniboardSankoreTransition
(
QObject
*
parent
=
0
);
~
UniboardSankoreTransition
();
bool
checkDocumentDirectory
(
QString
&
documentDirectoryPath
);
void
documentTransition
();
bool
checkPage
(
QString
&
sankorePagePath
);
bool
updateSankoreHRef
(
QString
&
sankoreDocumentPath
);
...
...
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