Line 0
Link Here
|
|
|
1 |
--- pdf2djvu.cc.orig 2013-05-30 22:22:26.000000000 +0200 |
2 |
+++ pdf2djvu.cc 2013-10-19 16:11:38.078951359 +0200 |
3 |
@@ -212,7 +212,7 @@ |
4 |
|
5 |
Command &operator <<(Command &command, const Component &component) |
6 |
{ |
7 |
- command << *component.file; |
8 |
+ command << std::string(*component.file); |
9 |
return command; |
10 |
} |
11 |
|
12 |
@@ -980,7 +980,7 @@ |
13 |
{ |
14 |
debug(3) << _("creating document outline with `djvused`") << std::endl; |
15 |
DjVuCommand djvused("djvused"); |
16 |
- djvused << "-s" << "-f" << outlines_sed_file << this->index_file; |
17 |
+ djvused << "-s" << "-f" << std::string(outlines_sed_file) << std::string(this->index_file); |
18 |
djvused(); // djvused -s -f <outlines-sed-file> <index-djvu-file> |
19 |
} |
20 |
|
21 |
@@ -991,7 +991,7 @@ |
22 |
{ |
23 |
debug(3) << _("setting metadata with `djvused`") << std::endl; |
24 |
DjVuCommand djvused("djvused"); |
25 |
- djvused << "-s" << "-f" << metadata_sed_file << this->index_file; |
26 |
+ djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file); |
27 |
djvused(); // djvused -s -f <metadata-sed-file> <index-djvu-file> |
28 |
} |
29 |
else |
30 |
@@ -1025,7 +1025,7 @@ |
31 |
dummy_components.push_back(this->components[i]); |
32 |
this->do_create(dummy_components); |
33 |
DjVuCommand djvused("djvused"); |
34 |
- djvused << "-s" << "-f" << dummy_sed_file << this->index_file; |
35 |
+ djvused << "-s" << "-f" << std::string(dummy_sed_file) << std::string(this->index_file); |
36 |
djvused(); // djvused -s -f <dummy-sed-file> <output-djvu-file> |
37 |
dummy_components.pop_back(); |
38 |
} |
39 |
@@ -1033,7 +1033,7 @@ |
40 |
dummy_components.push_back(this->components[size - 1]); |
41 |
this->do_create(dummy_components); |
42 |
DjVuCommand djvused("djvused"); |
43 |
- djvused << "-s" << "-f" << metadata_sed_file << this->index_file; |
44 |
+ djvused << "-s" << "-f" << std::string(metadata_sed_file) << std::string(this->index_file); |
45 |
djvused(); // djvused -s -f <metadata-sed-file> <output-djvu-file> |
46 |
/* Finally, recreate the index. */ |
47 |
this->do_create(this->components, true /* include shared annotations */); |
48 |
@@ -1089,8 +1089,8 @@ |
49 |
{ |
50 |
this->converter |
51 |
<< "-b" |
52 |
- << *this->index_file |
53 |
- << this->output_file; |
54 |
+ << std::string(*this->index_file) |
55 |
+ << std::string(this->output_file); |
56 |
this->converter(); // djvmcvt -b <output-djvu-file> <index-djvu-file> |
57 |
this->index_file.reset(NULL); |
58 |
} |
59 |
@@ -1122,7 +1122,7 @@ |
60 |
} |
61 |
bzz_file.close(); |
62 |
DjVuCommand bzz("bzz"); |
63 |
- bzz << "-e" << bzz_file << "-"; |
64 |
+ bzz << "-e" << std::string(bzz_file) << "-"; |
65 |
bzz(index_file); |
66 |
} |
67 |
size = this->index_file.size(); |
68 |
@@ -1498,7 +1498,7 @@ |
69 |
csepdjvu << "-q" << config.bg_slices; |
70 |
if (config.text == config.TEXT_LINES) |
71 |
csepdjvu << "-t"; |
72 |
- csepdjvu << sep_file << component; |
73 |
+ csepdjvu << std::string(sep_file) << component; |
74 |
csepdjvu(); |
75 |
} |
76 |
const bool should_have_fgbz = has_background || has_foreground || nonwhite_background_color; |
77 |
@@ -1528,7 +1528,7 @@ |
78 |
TemporaryFile pbm_file; |
79 |
debug(3) << _("encoding monochrome image with `cjb2`") << std::endl; |
80 |
DjVuCommand cjb2("cjb2"); |
81 |
- cjb2 << "-losslevel" << config.loss_level << pbm_file << sjbz_file; |
82 |
+ cjb2 << "-losslevel" << config.loss_level << std::string(pbm_file) << std::string(sjbz_file); |
83 |
pbm_file << "P4 " << width << " " << height << std::endl; |
84 |
pdf::Pixmap bmp(outm->has_skipped_elements() ? out1.get() : outm.get()); |
85 |
pbm_file << bmp; |
86 |
@@ -1543,7 +1543,7 @@ |
87 |
TemporaryFile ppm_file; |
88 |
debug(3) << _("creating new background image with `c44`") << std::endl; |
89 |
DjVuCommand c44("c44"); |
90 |
- c44 << "-slice" << "97" << ppm_file << c44_file; |
91 |
+ c44 << "-slice" << "97" << std::string(ppm_file) << std::string(c44_file); |
92 |
int bg_width = (width + 11) / 12; |
93 |
int bg_height = (height + 11) / 12; |
94 |
ppm_file << "P6 " << bg_width << " " << bg_height << " 255" << std::endl; |
95 |
@@ -1560,7 +1560,7 @@ |
96 |
{ /* Replace previous (dummy) BG44 chunk with the newly created one: */ |
97 |
debug(3) << _("recovering image chunks with `djvuextract`") << std::endl; |
98 |
DjVuCommand djvuextract("djvuextract"); |
99 |
- djvuextract << c44_file << std::string("BG44=") + std::string(bg44_file); |
100 |
+ djvuextract << std::string(c44_file) << std::string("BG44=") + std::string(bg44_file); |
101 |
djvuextract(config.verbose < 3); |
102 |
} |
103 |
} |
104 |
@@ -1601,7 +1601,7 @@ |
105 |
{ /* Add per-page non-raster data into the DjVu file: */ |
106 |
debug(3) << _("adding non-raster data with `djvused`") << std::endl; |
107 |
DjVuCommand djvused("djvused"); |
108 |
- djvused << component << "-s" << "-f" << sed_file; |
109 |
+ djvused << component << "-s" << "-f" << std::string(sed_file); |
110 |
djvused(); |
111 |
} |
112 |
{ |