compile fix

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24407 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2008-04-21 06:53:00 +00:00
parent b271b9f0f6
commit 3e729d8743
5 changed files with 7 additions and 6 deletions

View File

@ -186,8 +186,7 @@ QString browseRelFile(QString const & filename, QString const & refpath,
QString const & label1, QString const & dir1, QString const & label1, QString const & dir1,
QString const & label2, QString const & dir2) QString const & label2, QString const & dir2)
{ {
QString const fname = toqstr(makeAbsPath( QString const fname = makeAbsPath(filename, refpath);
fromqstr(filename), fromqstr(refpath)).absFilename());
QString const outname = QString const outname =

View File

@ -175,7 +175,7 @@ bool GuiPrint::initialiseParams(string const &)
{ {
/// get global printer parameters /// get global printer parameters
params_ = PrinterParams(); params_ = PrinterParams();
params_.file_name = changeExtension(buffer().absFileName(), params_.file_name = support::changeExtension(buffer().absFileName(),
lyxrc.print_file_extension); lyxrc.print_file_extension);
setButtonsValid(true); // so that the user can press Ok setButtonsValid(true); // so that the user can press Ok

View File

@ -340,7 +340,8 @@ void GuiRef::updateRefs()
{ {
refs_.clear(); refs_.clear();
string const name = theBufferList().getFileNames()[bufferCO->currentIndex()]; string const name = theBufferList().getFileNames()[bufferCO->currentIndex()];
Buffer const * buf = theBufferList().getBuffer(makeAbsPath(name).absFilename()); Buffer const * buf = theBufferList().getBuffer(
support::makeAbsPath(name).absFilename());
buf->getLabelList(refs_); buf->getLabelList(refs_);
sortCB->setEnabled(!refs_.empty()); sortCB->setEnabled(!refs_.empty());
refsLW->setEnabled(!refs_.empty()); refsLW->setEnabled(!refs_.empty());

View File

@ -1331,7 +1331,7 @@ void GuiView::importDocument(string const & argument)
return; return;
// get absolute path of file // get absolute path of file
FileName const fullname(makeAbsPath(filename)); FileName const fullname(support::makeAbsPath(filename));
FileName const lyxfile(support::changeExtension(fullname.absFilename(), ".lyx")); FileName const lyxfile(support::changeExtension(fullname.absFilename(), ".lyx"));
@ -1493,7 +1493,7 @@ bool GuiView::renameBuffer(Buffer & b, docstring const & newname)
if (!newname.empty()) { if (!newname.empty()) {
// FIXME UNICODE // FIXME UNICODE
fname = makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename()); fname = support::makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename());
} else { } else {
// Switch to this Buffer. // Switch to this Buffer.
setBuffer(&b); setBuffer(&b);

View File

@ -126,6 +126,7 @@ QString addExtension(QString const & name, QString const & extension);
/// Return the extension of the file (not including the .) /// Return the extension of the file (not including the .)
QString getExtension(QString const & name); QString getExtension(QString const & name);
QString makeAbsPath(QString const & relpath, QString const & base); QString makeAbsPath(QString const & relpath, QString const & base);
QString changeExtension(QString const & oldname, QString const & ext);
} // namespace lyx } // namespace lyx