mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
rename [io]docfstream to [io]fdocstream
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27530 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5981bea68d
commit
0778007050
@ -962,7 +962,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
|
||||
string const encoding = runparams.encoding->iconvName();
|
||||
LYXERR(Debug::LATEX, "makeLaTeXFile encoding: " << encoding << "...");
|
||||
|
||||
odocfstream ofs;
|
||||
ofdocstream ofs;
|
||||
try { ofs.reset(encoding); }
|
||||
catch (iconv_codecvt_facet_exception & e) {
|
||||
lyxerr << "Caught iconv exception: " << e.what() << endl;
|
||||
@ -1181,7 +1181,7 @@ void Buffer::makeDocBookFile(FileName const & fname,
|
||||
{
|
||||
LYXERR(Debug::LATEX, "makeDocBookFile...");
|
||||
|
||||
odocfstream ofs;
|
||||
ofdocstream ofs;
|
||||
if (!openFileWrite(ofs, fname))
|
||||
return;
|
||||
|
||||
|
@ -185,14 +185,14 @@ public:
|
||||
encoding associated to \p os. Therefore you must not call this
|
||||
method with a string stream if the output is supposed to go to a
|
||||
file. \code
|
||||
odocfstream ofs;
|
||||
ofdocstream ofs;
|
||||
ofs.open("test.tex");
|
||||
writeLaTeXSource(ofs, ...);
|
||||
ofs.close();
|
||||
\endcode is NOT equivalent to \code
|
||||
odocstringstream oss;
|
||||
writeLaTeXSource(oss, ...);
|
||||
odocfstream ofs;
|
||||
ofdocstream ofs;
|
||||
ofs.open("test.tex");
|
||||
ofs << oss.str();
|
||||
ofs.close();
|
||||
|
@ -67,7 +67,7 @@ int Chktex::scanLogFile(TeXErrors & terr)
|
||||
docstring token;
|
||||
// FIXME UNICODE
|
||||
// We have no idea what the encoding of the error file is
|
||||
idocfstream ifs(tmp.toFilesystemEncoding().c_str());
|
||||
ifdocstream ifs(tmp.toFilesystemEncoding().c_str());
|
||||
while (getline(ifs, token)) {
|
||||
docstring srcfile;
|
||||
docstring line;
|
||||
|
@ -556,7 +556,7 @@ void PreviewLoader::Impl::startLoading()
|
||||
|
||||
// we use the encoding of the buffer
|
||||
Encoding const & enc = buffer_.params().encoding();
|
||||
odocfstream of;
|
||||
ofdocstream of;
|
||||
try { of.reset(enc.iconvName()); }
|
||||
catch (iconv_codecvt_facet_exception & e) {
|
||||
LYXERR0("Caught iconv exception: " << e.what()
|
||||
|
@ -434,7 +434,7 @@ namespace {
|
||||
/// and further whitespace characters from the stream.
|
||||
/// @return true if a comma was found, false otherwise
|
||||
///
|
||||
bool removeWSAndComma(idocfstream & ifs) {
|
||||
bool removeWSAndComma(ifdocstream & ifs) {
|
||||
char_type ch;
|
||||
|
||||
if (!ifs)
|
||||
@ -477,7 +477,7 @@ namespace {
|
||||
///
|
||||
/// @return true if a string of length > 0 could be read.
|
||||
///
|
||||
bool readTypeOrKey(docstring & val, idocfstream & ifs,
|
||||
bool readTypeOrKey(docstring & val, ifdocstream & ifs,
|
||||
docstring const & delimChars, docstring const &illegalChars,
|
||||
charCase chCase) {
|
||||
|
||||
@ -532,7 +532,7 @@ namespace {
|
||||
/// the variable strings.
|
||||
/// @return true if reading was successfull (all single parts were delimited
|
||||
/// correctly)
|
||||
bool readValue(docstring & val, idocfstream & ifs, const VarMap & strings) {
|
||||
bool readValue(docstring & val, ifdocstream & ifs, const VarMap & strings) {
|
||||
|
||||
char_type ch;
|
||||
|
||||
@ -688,7 +688,7 @@ void InsetBibtex::fillWithBibKeys(BiblioInfo & keylist,
|
||||
support::FileNameList::const_iterator it = files.begin();
|
||||
support::FileNameList::const_iterator en = files.end();
|
||||
for (; it != en; ++ it) {
|
||||
idocfstream ifs(it->toFilesystemEncoding().c_str(),
|
||||
ifdocstream ifs(it->toFilesystemEncoding().c_str(),
|
||||
ios_base::in, buffer().params().encoding().iconvName());
|
||||
|
||||
char_type ch;
|
||||
|
@ -49,7 +49,7 @@ bool openFileWrite(ofstream & ofs, FileName const & fname)
|
||||
}
|
||||
|
||||
|
||||
bool openFileWrite(odocfstream & ofs, FileName const & fname)
|
||||
bool openFileWrite(ofdocstream & ofs, FileName const & fname)
|
||||
{
|
||||
return doOpenFileWrite(ofs, fname);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace lyx {
|
||||
namespace support { class FileName; }
|
||||
|
||||
bool openFileWrite(std::ofstream & ofs, support::FileName const & fname);
|
||||
bool openFileWrite(odocfstream & ofs, support::FileName const & fname);
|
||||
bool openFileWrite(ofdocstream & ofs, support::FileName const & fname);
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -34,7 +34,7 @@ namespace lyx {
|
||||
void writePlaintextFile(Buffer const & buf, FileName const & fname,
|
||||
OutputParams const & runparams)
|
||||
{
|
||||
odocfstream ofs;
|
||||
ofdocstream ofs;
|
||||
if (!openFileWrite(ofs, fname))
|
||||
return;
|
||||
writePlaintextFile(buf, ofs, runparams);
|
||||
|
@ -282,13 +282,13 @@ const char * iconv_codecvt_facet_exception::what() const throw()
|
||||
}
|
||||
|
||||
|
||||
idocfstream::idocfstream(string const & encoding) : base()
|
||||
ifdocstream::ifdocstream(string const & encoding) : base()
|
||||
{
|
||||
setEncoding(*this, encoding, in);
|
||||
}
|
||||
|
||||
|
||||
idocfstream::idocfstream(const char* s, ios_base::openmode mode,
|
||||
ifdocstream::ifdocstream(const char* s, ios_base::openmode mode,
|
||||
string const & encoding)
|
||||
: base()
|
||||
{
|
||||
@ -297,13 +297,13 @@ idocfstream::idocfstream(const char* s, ios_base::openmode mode,
|
||||
}
|
||||
|
||||
|
||||
odocfstream::odocfstream(): base()
|
||||
ofdocstream::ofdocstream(): base()
|
||||
{
|
||||
setEncoding(*this, "UTF-8", out);
|
||||
}
|
||||
|
||||
|
||||
odocfstream::odocfstream(const char* s, ios_base::openmode mode,
|
||||
ofdocstream::ofdocstream(const char* s, ios_base::openmode mode,
|
||||
string const & encoding)
|
||||
: base()
|
||||
{
|
||||
@ -312,7 +312,7 @@ odocfstream::odocfstream(const char* s, ios_base::openmode mode,
|
||||
}
|
||||
|
||||
|
||||
void odocfstream::reset(string const & encoding)
|
||||
void ofdocstream::reset(string const & encoding)
|
||||
{
|
||||
setEncoding(*this, encoding, out);
|
||||
}
|
||||
|
@ -42,26 +42,26 @@ typedef std::basic_ostream<char_type> odocstream;
|
||||
|
||||
/// File stream for reading UTF8-encoded files with automatic conversion to
|
||||
/// UCS4.
|
||||
class idocfstream : public std::basic_ifstream<char_type> {
|
||||
class ifdocstream : public std::basic_ifstream<char_type> {
|
||||
typedef std::basic_ifstream<char_type> base;
|
||||
public:
|
||||
idocfstream(std::string const & encoding = "UTF-8");
|
||||
explicit idocfstream(const char* s,
|
||||
ifdocstream(std::string const & encoding = "UTF-8");
|
||||
explicit ifdocstream(const char* s,
|
||||
std::ios_base::openmode mode = std::ios_base::in,
|
||||
std::string const & encoding = "UTF-8");
|
||||
~idocfstream() {}
|
||||
~ifdocstream() {}
|
||||
};
|
||||
|
||||
/// File stream for writing files in 8bit encoding \p encoding with automatic
|
||||
/// conversion from UCS4.
|
||||
class odocfstream : public std::basic_ofstream<char_type> {
|
||||
class ofdocstream : public std::basic_ofstream<char_type> {
|
||||
typedef std::basic_ofstream<char_type> base;
|
||||
public:
|
||||
odocfstream();
|
||||
explicit odocfstream(const char* s,
|
||||
ofdocstream();
|
||||
explicit ofdocstream(const char* s,
|
||||
std::ios_base::openmode mode = std::ios_base::out|std::ios_base::trunc,
|
||||
std::string const & encoding = "UTF-8");
|
||||
~odocfstream() {}
|
||||
~ofdocstream() {}
|
||||
///
|
||||
void reset(std::string const & encoding);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user