Buffer::Buffer(string const & file, bool ronly)
: paragraph(0), lyx_clean(true), bak_clean(true),
unnamed(false), dep_clean(0), read_only(ronly),
- filename(file), users(0)
+ filename_(file), users(0)
{
lyxerr[Debug::INFO] << "Buffer::Buffer()" << endl;
// filename = file;
- filepath = OnlyPath(file);
+ filepath_ = OnlyPath(file);
// paragraph = 0;
// lyx_clean = true;
// bak_clean = true;
string const Buffer::getLatexName(bool no_path) const
{
- string const name = ChangeExtension(MakeLatexName(filename), ".tex");
+ string const name = ChangeExtension(MakeLatexName(fileName()), ".tex");
if (no_path)
return OnlyFilename(name);
else
void Buffer::setFileName(string const & newfile)
{
- filename = MakeAbsPath(newfile);
- filepath = OnlyPath(filename);
- setReadonly(IsFileWriteable(filename) == 0);
+ filename_ = MakeAbsPath(newfile);
+ filepath_ = OnlyPath(filename_);
+ setReadonly(IsFileWriteable(filename_) == 0);
updateTitles();
}
}
InsetMinipage * mini = new InsetMinipage;
mini->pos(static_cast<InsetMinipage::Position>(par->params().pextraAlignment()));
- mini->width(par->params().pextraWidth());
+ mini->pageWidth(LyXLength(par->params().pextraWidth()));
if (!par->params().pextraWidthp().empty()) {
- lyxerr << "WP:" << mini->width() << endl;
- mini->width(tostr(par->params().pextraWidthp())+"%");
+ lyxerr << "WP:" << mini->pageWidth().asString() << endl;
+ mini->pageWidth(LyXLength((par->params().pextraWidthp())+"%"));
}
Paragraph * op = mini->firstParagraph();
mini->inset.paragraph(par);
InsetMinipage * mini = new InsetMinipage;
mini->pos(static_cast<InsetMinipage::Position>(minipar->params().pextraAlignment()));
- mini->width(minipar->params().pextraWidth());
+ mini->pageWidth(LyXLength(minipar->params().pextraWidth()));
if (!par->params().pextraWidthp().empty()) {
- lyxerr << "WP:" << mini->width() << endl;
- mini->width(tostr(par->params().pextraWidthp())+"%");
+ lyxerr << "WP:" << mini->pageWidth().asString() << endl;
+ mini->pageWidth(LyXLength((par->params().pextraWidthp())+"%"));
}
mini->inset.paragraph(minipar);
} else if (tmptok == "Formula") {
inset = new InsetFormula;
} else if (tmptok == "Figure") { // Backward compatibility
- inset = new InsetFig(100, 100, *this);
- //inset = new InsetGraphics;
+// inset = new InsetFig(100, 100, *this);
+ inset = new InsetGraphics;
} else if (tmptok == "Graphics") {
inset = new InsetGraphics;
} else if (tmptok == "Info") {// backwards compatibility
// warnings, only cerr.
// Needed for autosave in background or panic save (Matthias 120496)
- if (read_only && (fname == filename)) {
+ if (read_only && (fname == fileName())) {
// Here we should come with a question if we should
// perform the write anyway.
if (flag)
if ((in == 0) || !in->forceDefaultParagraphs(in)) {
LyXLayout const & layout =
textclasslist.Style(params.textclass, par->layout);
-
- if (layout.intitle) {
+
+ if (layout.intitle) {
if (already_title) {
lyxerr <<"Error in latexParagraphs: You"
" should not mix title layouts"
" with normal ones." << endl;
} else
was_title = true;
- } else if (was_title && !already_title) {
+ } else if (was_title && !already_title) {
ofs << "\\maketitle\n";
texrow.newline();
already_title = true;
// get LaTeX-Filename
string const name = getLatexName();
- string path = OnlyPath(filename);
+ string path = filePath();
string const org_path = path;
if (lyxrc.use_tempdir || !IsDirWriteable(path)) {
makeLaTeXFile(name, org_path, false);
TeXErrors terr;
- Chktex chktex(lyxrc.chktex_command, name, filepath);
+ Chktex chktex(lyxrc.chktex_command, name, filePath());
int res = chktex.run(terr); // run chktex
if (res == -1) {