mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Fix bug 49392
This commit is contained in:
@ -1701,14 +1701,14 @@ std::wstring GenerateUUID()
|
||||
return sstream.str();
|
||||
}
|
||||
|
||||
HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sCoreFile, const std::wstring& sDst)
|
||||
HRESULT CFb2File::FromHtml(const std::wstring& sHtmlFile, const std::wstring& sCoreFile, const std::wstring& sDst, const std::wstring& sInpTitle)
|
||||
{
|
||||
NSStringUtils::CStringBuilder oDocument;
|
||||
oDocument.WriteString(L"<?xml version=\"1.0\" encoding=\"UTF-8\"?><FictionBook xmlns=\"http://www.gribuser.ru/xml/fictionbook/2.0\" xmlns:l=\"http://www.w3.org/1999/xlink\"><description>");
|
||||
// description
|
||||
// title-info
|
||||
oDocument.WriteString(L"<title-info>");
|
||||
std::wstring sBookTitle = NSFile::GetFileName(sDst);
|
||||
std::wstring sBookTitle = sInpTitle.empty() ? NSFile::GetFileName(sDst) : sInpTitle;
|
||||
std::wstring sAuthor = sBookTitle;
|
||||
std::wstring sAnnotation, sKeywords;
|
||||
std::wstring sLanguage = L"en-EN", sVersion = L"1.0";
|
||||
|
||||
@ -31,7 +31,7 @@ public:
|
||||
bool IsFb2File(const std::wstring& sFile);
|
||||
void SetTmpDirectory(const std::wstring& sFolder);
|
||||
HRESULT Open(const std::wstring& sPath, const std::wstring& sDirectory, CFb2Params* oParams = NULL);
|
||||
HRESULT FromHtml(const std::wstring& sHtmlFile, const std::wstring& sCoreFile, const std::wstring& sDst);
|
||||
HRESULT FromHtml(const std::wstring& sHtmlFile, const std::wstring& sCoreFile, const std::wstring& sDst, const std::wstring& sInpTitle);
|
||||
};
|
||||
|
||||
#endif // _FB2FILE_FB2FILE_H
|
||||
|
||||
Reference in New Issue
Block a user