|
|
|
@ -2204,11 +2204,13 @@ void CSMDoc::Document::createBase()
|
|
|
|
|
|
|
|
|
|
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
|
|
|
|
const std::vector< boost::filesystem::path >& files, bool new_,
|
|
|
|
|
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir)
|
|
|
|
|
: mSavePath (savePath), mContentFiles (files), mNew (new_), mTools (mData), mResDir(resDir),
|
|
|
|
|
const boost::filesystem::path& savePath, const boost::filesystem::path& resDir,
|
|
|
|
|
ToUTF8::FromType encoding)
|
|
|
|
|
: mSavePath (savePath), mContentFiles (files), mNew (new_), mData (encoding), mTools (mData),
|
|
|
|
|
mResDir(resDir),
|
|
|
|
|
mProjectPath ((configuration.getUserDataPath() / "projects") /
|
|
|
|
|
(savePath.filename().string() + ".project")),
|
|
|
|
|
mSaving (*this, mProjectPath)
|
|
|
|
|
mSaving (*this, mProjectPath, encoding)
|
|
|
|
|
{
|
|
|
|
|
if (mContentFiles.empty())
|
|
|
|
|
throw std::runtime_error ("Empty content file sequence");
|
|
|
|
|