if file exists → fileloader.cpp FileLoader::FileLoader(const QString & fileName)
fileLoader->testFile() return int -1 if the file doesn't exist or any other error has occurred, 0 for the old Format, 1 for the new Format, 2 for EPS and PS files, 3 for SVG files and 4 for PDF files (based on the extension).
Questions:
Get the Scribus code over, that allows to read a current .SLA file into memory
scribus.cpp ScribusMainWindow::loadDoc(QString fileName)
if file exists →
fileloader.cpp FileLoader::FileLoader(const QString & fileName)
fileLoader->testFile()
return int -1 if the file doesn't exist or any other error has occurred, 0 for the old Format, 1 for the new Format, 2 for EPS and PS files, 3 for SVG files and 4 for PDF files (based on the extension).new ScribusDoc()
:fileLoader->loadFile(doc)
:read the scribus preferences:
QList::const_iterator it;
if (findFormat(m_fileType, it))
{
switch (m_fileType)
{
case FORMATID_SLA13XIMPORT:
case FORMATID_SLA134IMPORT:
case FORMATID_SLA150IMPORT:
{
it->setupTargets(currDoc, 0, currDoc->scMW(), currDoc->scMW()->mainWindowProgressBar, &(prefsManager->appPrefs.fontPrefs.AvailFonts));
ret=it->loadFile(m_fileName, LoadSavePlugin::lfCreateDoc);
}
break;
FileFormat
(theit
above) is defined inloadsaveplugin.cpp
plugins/fileloader/scribus150format/scribus150format.h/.cpp
plugins/fileloader/scribus134format/scribus134format.h/.cpp
Scribus150Format::loadFile()
: