Merge pull request #930 from ONLYOFFICE/release/v7.5.0

Merge branch 'release/v7.5.0' into develop
This commit is contained in:
Oleg Kozhukharenko
2023-08-18 13:51:39 +03:00
committed by GitHub
14 changed files with 527 additions and 9 deletions

View File

@ -173,7 +173,7 @@ window.DialogConnect = function(params) {
_require_portal_info(protocol + portal, provider).then(
_callback,
obj => {
if ( obj.status == 'error' && obj.response.status == 404 ) {
if ( obj.status == 'error' && (obj.response.status == 404 || obj.response.statusCode == 404) ) {
protocol = protocol == "https://" ? "http://" : "https://";
return _require_portal_info(protocol + portal, provider);
} else _callback(obj);
@ -262,6 +262,12 @@ window.DialogConnect = function(params) {
}
},
error: function(e, status, error) {
// AscSimpleRequest
// include/base/internal/cef_net_error_list.h
// A connection attempt was refused.
// NET_ERROR(CONNECTION_REFUSED, -102)
if ( e.statusCode == -102 ) e.statusCode = 404;
reject({status:status, response:e});
}
});

View File

@ -0,0 +1,137 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ONLYOFFICE Release Notes</title>
<style type="text/css">
/* variables */
:root {
--color-black: #141923;
--color-white: #fff;
--color-gray-100: #f7fafc;
--color-gray-200: #edf2f7;
--color-gray-300: #e2e8f0;
--color-gray-400: #cbd5e0;
--color-gray-500: #a0aec0;
--color-gray-600: #718096;
--color-gray-700: #4a5568;
--color-gray-800: #2d3748;
--color-gray-900: #1a202c;
}
body {
background: var(--color-white);
color: var(--color-gray-800);
font: 12px "Lucida Grande", "Lucida Sans Unicode", Verdana, Lucida, Helvetica, sans-serif;
}
h1, h2, h3 {
color: var(--color-gray-800);
font-weight: normal;
font-style: normal;
}
h1 {
font-size: 1.7em;
}
h2 {
font-size: 1.4em;
font-weight: lighter;
}
h4 {
font-size: 1.2em;
font-weight: lighter;
}
code {
background: var(--color-gray-200);
font-family: monospace;
padding: 1px 5px;
}
ul {
padding: 7.5.0 20px;
}
li {
margin-left: 20px;
margin-bottom: 0.2em;
padding: 0;
}
hr {
margin: 20px 0;
border: var(--color-gray-400) solid 0.5px;
}
.releasedate {
color: var(--color-gray-600);
font-weight: lighter;
}
/* prefers light mode */
@media (prefers-color-scheme: dark) {
body {
background: var(--color-gray-900);
color: var(--color-gray-200);
}
h1, h2, h3 {
color: var(--color-white);
}
code {
background: var(--color-gray-800);
color: var(--color-gray-200);
}
.releasedate {
color: var(--color-gray-600);
}
}
</style>
</head>
<body>
<div class="version">
<h1>ONLYOFFICE 7.5.0<span class="releasedate"> - {{DATE}}</span></h1>
<h2>New Features</h2>
<h4>All Editors</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Document Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Spreadsheet Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Presentation Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Forms</h4>
<ul>
<li>TODO</li>
</ul>
<h2>Fixes</h2>
<h4>All Editors</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Document Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Spreadsheet Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Presentation Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Forms</h4>
<ul>
<li>TODO</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,137 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>История изменений ONLYOFFICE</title>
<style type="text/css">
/* variables */
:root {
--color-black: #141923;
--color-white: #fff;
--color-gray-100: #f7fafc;
--color-gray-200: #edf2f7;
--color-gray-300: #e2e8f0;
--color-gray-400: #cbd5e0;
--color-gray-500: #a0aec0;
--color-gray-600: #718096;
--color-gray-700: #4a5568;
--color-gray-800: #2d3748;
--color-gray-900: #1a202c;
}
body {
background: var(--color-white);
color: var(--color-gray-800);
font: 12px "Lucida Grande", "Lucida Sans Unicode", Verdana, Lucida, Helvetica, sans-serif;
}
h1, h2, h3 {
color: var(--color-gray-800);
font-weight: normal;
font-style: normal;
}
h1 {
font-size: 1.7em;
}
h2 {
font-size: 1.4em;
font-weight: lighter;
}
h4 {
font-size: 1.2em;
font-weight: lighter;
}
code {
background: var(--color-gray-200);
font-family: monospace;
padding: 1px 5px;
}
ul {
padding: 7.5.0 20px;
}
li {
margin-left: 20px;
margin-bottom: 0.2em;
padding: 0;
}
hr {
margin: 20px 0;
border: var(--color-gray-400) solid 0.5px;
}
.releasedate {
color: var(--color-gray-600);
font-weight: lighter;
}
/* prefers light mode */
@media (prefers-color-scheme: dark) {
body {
background: var(--color-gray-900);
color: var(--color-gray-200);
}
h1, h2, h3 {
color: var(--color-white);
}
code {
background: var(--color-gray-800);
color: var(--color-gray-200);
}
.releasedate {
color: var(--color-gray-600);
}
}
</style>
</head>
<body>
<div class="version">
<h1>ONLYOFFICE 7.5.0<span class="releasedate"> - {{DATE}}</span></h1>
<h2>Новые функции</h2>
<h4>Все редакторы</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор документов</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор таблиц</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор презентаций</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Формы</h4>
<ul>
<li>TODO</li>
</ul>
<h2>Исправления</h2>
<h4>Все редакторы</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор документов</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор таблиц</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор презентаций</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Формы</h4>
<ul>
<li>TODO</li>
</ul>
</div>
</body>
</html>

View File

@ -70,6 +70,7 @@
#define UPDATE_PATH TEXT("/" REG_APP_NAME "Updates")
#define BACKUP_PATH TEXT("/" REG_APP_NAME "Backup")
#define PROVIDERS_PATH TEXT("/providers")
#define SUCCES_UNPACKED TEXT("/success_unpacked.txt")
using std::vector;
@ -506,6 +507,25 @@ void CSvcManager::startReplacingFiles()
}
#endif
// Merging provider folders
{
tstring err;
std::list<tstring> old_providers, new_providers;
if (NS_File::GetFilesList(tmpPath + PROVIDERS_PATH, &old_providers, err, true, true)) {
if (NS_File::GetFilesList(appPath + PROVIDERS_PATH, &new_providers, err, true, true)) {
for (auto &path : old_providers) {
if (std::find(new_providers.begin(), new_providers.end(), path) == new_providers.end()) {
if (!NS_File::replaceFolder(tmpPath + PROVIDERS_PATH + path, appPath + PROVIDERS_PATH + path)) {
NS_Logger::WriteLog(TEXT("An error occurred while replace providers: ") + NS_Utils::GetLastErrorAsString());
}
}
}
} else
NS_Logger::WriteLog(DEFAULT_ERROR_MESSAGE + TEXT(" ") + err);
} else
NS_Logger::WriteLog(DEFAULT_ERROR_MESSAGE + TEXT(" ") + err);
}
// Remove Backup dir
NS_File::removeDirRecursively(tmpPath);

View File

@ -160,7 +160,7 @@ namespace NS_File
app_path = parentPath(path);
}
bool GetFilesList(const string &path, list<string> *lst, string &error, bool ignore_locked)
bool GetFilesList(const string &path, list<string> *lst, string &error, bool ignore_locked, bool folders_only)
{
DIR *dir = opendir(path.c_str());
if (!dir) {
@ -185,12 +185,16 @@ namespace NS_File
if (S_ISDIR(info.st_mode)) {
if (ignore_locked && access(_path, R_OK) != 0)
continue;
if (folders_only) {
lst->push_back(string("/") + entry->d_name);
continue;
}
if (!GetFilesList(_path, lst, error, ignore_locked)) {
closedir(dir);
return false;
}
} else
if (S_ISREG(info.st_mode))
if (!folders_only && S_ISREG(info.st_mode))
lst->push_back(_path);
}

View File

@ -54,7 +54,7 @@ int ShowMessage(string str, bool showError = false);
namespace NS_File
{
void setAppPath(const string &path);
bool GetFilesList(const string &path, list<string> *lst, string &error, bool ignore_locked = false);
bool GetFilesList(const string &path, list<string> *lst, string &error, bool ignore_locked = false, bool folders_only = false);
bool readFile(const string &filePath, list<string> &linesList);
bool writeToFile(const string &filePath, list<string> &linesList);
bool runProcess(const string &fileName, const string &args);

View File

@ -86,7 +86,7 @@ namespace NS_Utils
namespace NS_File
{
bool GetFilesList(const wstring &path, list<wstring> *lst, wstring &error, bool ignore_locked)
bool GetFilesList(const wstring &path, list<wstring> *lst, wstring &error, bool ignore_locked, bool folders_only)
{
wstring searchPath = toNativeSeparators(path) + L"\\*";
if (searchPath.size() > MAX_PATH - 1) {
@ -107,12 +107,18 @@ namespace NS_File
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
if (!wcscmp(ffd.cFileName, L".") || !wcscmp(ffd.cFileName, L".."))
continue;
if (folders_only) {
lst->push_back(L"/" + wstring(ffd.cFileName));
continue;
}
if (!GetFilesList(path + L"/" + wstring(ffd.cFileName), lst, error, ignore_locked)) {
FindClose(hFind);
return false;
}
} else
lst->push_back(path + L"/" + wstring(ffd.cFileName));
} else {
if (!folders_only)
lst->push_back(path + L"/" + wstring(ffd.cFileName));
}
} while (FindNextFile(hFind, &ffd) != 0);

View File

@ -54,7 +54,7 @@ int ShowMessage(wstring str, bool showError = false);
namespace NS_File
{
bool GetFilesList(const wstring &path, list<wstring> *lst, wstring &error, bool ignore_locked = false);
bool GetFilesList(const wstring &path, list<wstring> *lst, wstring &error, bool ignore_locked = false, bool folders_only = false);
bool readFile(const wstring &filePath, list<wstring> &linesList);
bool writeToFile(const wstring &filePath, list<wstring> &linesList);
bool runProcess(const wstring &fileName, const wstring &args);

View File

@ -156,7 +156,7 @@ Name: no; MessagesFile: compiler:Languages\Norwegian.isl; LicenseFile: {#sBr
Name: uk; MessagesFile: compiler:Languages\Ukrainian.isl; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
Name: be; MessagesFile: compiler:Languages\Belarusian.isl; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
Name: gl; MessagesFile: compiler:Languages\Galician.isl; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
Name: si; MessagesFile: compiler:Languages\Sinhala.isl; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
Name: si; MessagesFile: compiler:Languages\Sinhala.islu; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
Name: zh_tw; MessagesFile: compiler:Languages\ChineseTraditional.isl; LicenseFile: {#sBrandingFolder}\common\package\license\{#LIC_FILE}.rtf;
[LangOptions]

View File

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ONLYOFFICE Desktop Editors Release Notes</title>
<style type="text/css">
body {
background: white;
font-size: 12px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Lucida, Helvetica, sans-serif;
}
h1, h2, h3 {
color: #7.5.00;
font-family: "Helvetica";
font-weight: normal;
font-style: normal;
}
h1 {
font-size: 18px;
}
h2 {
font-size: 16px;
}
h3 {
font-size: 14px;
}
a {
text-decoration: none;
}
code {
background: var(--color-gray-200);
font-family: monospace;
padding: 1px 5px;
}
.releasedate {
color: #888;
font-size: medium;
}
.version {
border-bottom: 1px solid #cfcfcf;
}
.more {
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="version">
<h1>ONLYOFFICE Desktop Editors 7.5.0<span class="releasedate"> - {{DATE}}</span></h1>
<h2>New Features</h2>
<h4>All Editors</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Document Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Spreadsheet Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Presentation Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Forms</h4>
<ul>
<li>TODO</li>
</ul>
<h2>Fixes</h2>
<h4>All Editors</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Document Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Spreadsheet Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Presentation Editor</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Forms</h4>
<ul>
<li>TODO</li>
</ul>
<div class="more"><a href="https://github.com/ONLYOFFICE/DesktopEditors/blob/master/CHANGELOG.md#750" target="_blank">and a little more...</a></div>
</div>
</body>
</html>

View File

@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>История изменений ONLYOFFICE Desktop Editors</title>
<style type="text/css">
body {
background: white;
font-size: 12px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Lucida, Helvetica, sans-serif;
}
h1, h2, h3 {
color: #7.5.00;
font-family: "Helvetica";
font-weight: normal;
font-style: normal;
}
h1 {
font-size: 18px;
}
h2 {
font-size: 16px;
}
h3 {
font-size: 14px;
}
a {
text-decoration: none;
}
code {
background: var(--color-gray-200);
font-family: monospace;
padding: 1px 5px;
}
.releasedate {
color: #888;
font-size: medium;
}
.version {
border-bottom: 1px solid #cfcfcf;
}
.more {
margin-bottom: 20px;
}
</style>
</head>
<body>
<div class="version">
<h1>ONLYOFFICE Desktop Editors 7.5.0<span class="releasedate"> - {{DATE}}</span></h1>
<h2>Новые функции</h2>
<h4>Все редакторы</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор документов</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор таблиц</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор презентаций</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Формы</h4>
<ul>
<li>TODO</li>
</ul>
<h2>Исправления</h2>
<h4>Все редакторы</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор документов</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор таблиц</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Редактор презентаций</h4>
<ul>
<li>TODO</li>
</ul>
<h4>Формы</h4>
<ul>
<li>TODO</li>
</ul>
<div class="more"><a href="https://github.com/ONLYOFFICE/DesktopEditors/blob/master/CHANGELOG.md#750" target="_blank">и прочее...</a></div>
</div>
</body>
</html>

View File

@ -82,6 +82,7 @@ auto getPaperSizeFromPageSize(PageSize page_size)->int
}
}
#ifndef __OS_WIN_XP
auto resetLegacyPrintDialog()->void
{
HKEY hKey = NULL;
@ -96,6 +97,7 @@ auto resetLegacyPrintDialog()->void
RegCloseKey(hKey);
}
}
#endif
struct PrintDialogCallback : public IPrintDialogCallback
{
@ -124,8 +126,10 @@ private:
return S_FALSE;
}
virtual HRESULT STDMETHODCALLTYPE InitDone() noexcept final {
#ifndef __OS_WIN_XP
if (m_dialog_was_changed && *m_dialog_was_changed) // Restore print dialog type
resetLegacyPrintDialog();
#endif
return S_FALSE;
}
virtual HRESULT STDMETHODCALLTYPE SelectionChange() noexcept final {
@ -308,6 +312,7 @@ QDialog::DialogCode PrintDialog::exec()
// Switch to legacy print dialog
bool dialog_was_changed = false;
#ifndef __OS_WIN_XP
if (Utils::getWinVersion() >= Utils::WinVer::Win11) {
HKEY hKey = NULL;
if (RegOpenKeyEx(HKEY_CURRENT_USER, PRINT_DIALOG_REG_KEY, 0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {
@ -323,6 +328,7 @@ QDialog::DialogCode PrintDialog::exec()
RegCloseKey(hKey);
}
}
#endif
// Init dialog
PRINTDLGEX dlg;
@ -397,8 +403,10 @@ QDialog::DialogCode PrintDialog::exec()
// if (dlg.hDC)
// DeleteDC(dlg.hDC);
} else {
#ifndef __OS_WIN_XP
if (dialog_was_changed) // Restore print dialog type
resetLegacyPrintDialog();
#endif
if (pDevMode)
GlobalFree(pDevMode);
}