Changeset 27554

Show
Ignore:
Timestamp:
11/16/08 16:07:51 (2 months ago)
Author:
switt
Message:

introduce new converter variable $$d to pass output directory pathname to converter programs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lyx-devel/trunk/src/graphics/GraphicsConverter.cpp

    r25822 r27554  
    346346 
    347347        // The conversion commands may contain these tokens that need to be 
    348         // changed to infile, infile_base, outfile respectively. 
    349         string const token_from = "$$i"; 
    350         string const token_base = "$$b"; 
    351         string const token_to   = "$$o"; 
     348        // changed to infile, infile_base, outfile and output directory respectively. 
     349        string const token_from  = "$$i"; 
     350        string const token_base  = "$$b"; 
     351        string const token_to    = "$$o"; 
     352        string const token_todir = "$$d"; 
    352353 
    353354        EdgePath::const_iterator it  = edgepath.begin(); 
     
    368369                                << quoteName(infile_base, quote_python) << ")\n" 
    369370                          "outfile = utf8ToDefaultEncoding(" 
    370                                 << quoteName(outfile, quote_python) << ")\n"; 
     371                                << quoteName(outfile, quote_python) << ")\n" 
     372                          "outdir  = os.path.dirname(outfile)\n" ; 
    371373 
    372374                // See comment about extra " quotes above (although that 
    373375                // applies only for the first loop run here). 
    374376                string command = conv.command; 
    375                 command = subst(command, token_from, "' + '\"' + infile + '\"' + '"); 
    376                 command = subst(command, token_base, "' + '\"' + infile_base + '\"' + '"); 
    377                 command = subst(command, token_to,   "' + '\"' + outfile + '\"' + '"); 
     377                command = subst(command, token_from,  "' + '\"' + infile + '\"' + '"); 
     378                command = subst(command, token_base,  "' + '\"' + infile_base + '\"' + '"); 
     379                command = subst(command, token_to,    "' + '\"' + outfile + '\"' + '"); 
     380                command = subst(command, token_todir, "' + '\"' + outdir + '\"' + '"); 
    378381                command = libScriptSearch(command, quote_python); 
    379382