git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'edcd53bbbba9f94e21f43fd03d3a2febcc2b1564'
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
output
/
Text.java
diff --git
a/src/be/nikiroo/fanfix/output/Text.java
b/src/be/nikiroo/fanfix/output/Text.java
index ee72385b32220c479e1e03ad2d8a378f59539e49..4a45e5430fba9465b1e92a590bcae9cc18b28360 100644
(file)
--- a/
src/be/nikiroo/fanfix/output/Text.java
+++ b/
src/be/nikiroo/fanfix/output/Text.java
@@
-17,6
+17,7
@@
import be.nikiroo.fanfix.data.Story;
class Text extends BasicOutput {
protected BufferedWriter writer;
protected File targetDir;
class Text extends BasicOutput {
protected BufferedWriter writer;
protected File targetDir;
+ private boolean nextParaIsCover = true;
@Override
public File process(Story story, File targetDir, String targetName)
@Override
public File process(Story story, File targetDir, String targetName)
@@
-104,8
+105,16
@@
class Text extends BasicOutput {
protected void writeParagraphHeader(Paragraph para) throws IOException {
if (para.getType() == ParagraphType.IMAGE) {
File file = new File(targetDir, getCurrentImageBestName(true));
protected void writeParagraphHeader(Paragraph para) throws IOException {
if (para.getType() == ParagraphType.IMAGE) {
File file = new File(targetDir, getCurrentImageBestName(true));
- Instance.getCache().saveAsImage(para.getContentImage(), file);
+ try {
+ Instance.getCache().saveAsImage(para.getContentImage(), file,
+ nextParaIsCover);
+ } catch (IOException e) {
+ Instance.getTraceHandler().error(
+ new IOException("Cannot save an image", e));
+ }
}
}
+
+ nextParaIsCover = false;
}
@Override
}
@Override