diff --git a/ChromiumBasedEditors/lib/AscDocumentsCore_linux.pro b/ChromiumBasedEditors/lib/AscDocumentsCore_linux.pro index eb89d437..45b0526b 100644 --- a/ChromiumBasedEditors/lib/AscDocumentsCore_linux.pro +++ b/ChromiumBasedEditors/lib/AscDocumentsCore_linux.pro @@ -22,8 +22,7 @@ DEFINES += \ XPS_USE_DYNAMIC_LIBRARY \ HTMLRENDERER_USE_DYNAMIC_LIBRARY -LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lkernel -lgraphics -lhunspell -LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader -lPdfWriter -lDjVuFile -lXpsFile -lHtmlRenderer -lUnicodeConverter -looxmlsignature +ADD_DEPENDENCY(graphics, kernel, UnicodeConverter, PdfWriter, PdfReader, XpsFile, DjVuFile, HtmlRenderer, hunspell, ooxmlsignature) # ------------------------------------------------------ DEFINES += DOCUMENTSCORE_OPENSSL_SUPPORT diff --git a/ChromiumBasedEditors/lib/AscDocumentsCore_win.pro b/ChromiumBasedEditors/lib/AscDocumentsCore_win.pro index 7f5c4bc8..2cce7632 100644 --- a/ChromiumBasedEditors/lib/AscDocumentsCore_win.pro +++ b/ChromiumBasedEditors/lib/AscDocumentsCore_win.pro @@ -17,8 +17,7 @@ DEFINES += \ XPS_USE_DYNAMIC_LIBRARY \ HTMLRENDERER_USE_DYNAMIC_LIBRARY -LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lkernel -lgraphics -lhunspell -LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lPdfReader -lPdfWriter -lDjVuFile -lXpsFile -lHtmlRenderer -lUnicodeConverter -looxmlsignature +ADD_DEPENDENCY(graphics, kernel, UnicodeConverter, PdfWriter, PdfReader, XpsFile, DjVuFile, HtmlRenderer, hunspell, ooxmlsignature) LIBS += -lCrypt32 # ------------------------------------------------------ diff --git a/ChromiumBasedEditors/lib/src/cefview.cpp b/ChromiumBasedEditors/lib/src/cefview.cpp index a2612cca..58017b6f 100644 --- a/ChromiumBasedEditors/lib/src/cefview.cpp +++ b/ChromiumBasedEditors/lib/src/cefview.cpp @@ -659,7 +659,7 @@ public: // данные для печати CPrintData m_oPrintData; - int m_nPrintParameters; + std::string m_sPrintParameters; // ссылка для view std::wstring m_strUrl; @@ -796,7 +796,7 @@ public: m_pWidgetImpl = NULL; m_pCefView = NULL; - m_nPrintParameters = 0; + m_sPrintParameters = ""; m_bIsSaving = false; m_bIsSavingCrypto = false; @@ -2101,9 +2101,9 @@ public: // для редакторов - вызывает asc_nativePrint NSEditorApi::CAscMenuEvent* pEvent = new NSEditorApi::CAscMenuEvent(); pEvent->m_nType = ASC_MENU_EVENT_TYPE_CEF_PRINT_START; - m_pParent->m_pInternal->m_nPrintParameters = 0; + m_pParent->m_pInternal->m_sPrintParameters = ""; if (args->GetSize() == 1) - m_pParent->m_pInternal->m_nPrintParameters = args->GetInt(0); + m_pParent->m_pInternal->m_sPrintParameters = args->GetString(0); m_pParent->Apply(pEvent); return true; } @@ -4958,8 +4958,8 @@ void CCefView::Apply(NSEditorApi::CAscMenuEvent* pEvent) } case ASC_MENU_EVENT_TYPE_CEF_PRINT_START: { - int nPrintParameters = m_pInternal->m_nPrintParameters; - m_pInternal->m_nPrintParameters = 0; + std::string sPrintParameters = m_pInternal->m_sPrintParameters; + m_pInternal->m_sPrintParameters = ""; if (m_pInternal) { if (this->GetType() == cvwtEditor) @@ -5008,8 +5008,8 @@ void CCefView::Apply(NSEditorApi::CAscMenuEvent* pEvent) if (!bIsNativePrint) { CefRefPtr message = CefProcessMessage::Create("print"); - if (0 != nPrintParameters) - message->GetArgumentList()->SetInt(0, nPrintParameters); + if ("" != sPrintParameters) + message->GetArgumentList()->SetString(0, sPrintParameters); browser->SendProcessMessage(PID_RENDERER, message); } else diff --git a/ChromiumBasedEditors/lib/src/cefwrapper/client_renderer_wrapper.cpp b/ChromiumBasedEditors/lib/src/cefwrapper/client_renderer_wrapper.cpp index 387c2538..a31b4041 100644 --- a/ChromiumBasedEditors/lib/src/cefwrapper/client_renderer_wrapper.cpp +++ b/ChromiumBasedEditors/lib/src/cefwrapper/client_renderer_wrapper.cpp @@ -1020,7 +1020,7 @@ DE.controllers.Main.DisableVersionHistory(); \ CefRefPtr browser = CefV8Context::GetCurrentContext()->GetBrowser(); CefRefPtr message = CefProcessMessage::Create("print"); if (arguments.size() == 1) - message->GetArgumentList()->SetInt(0, (*arguments.begin())->GetIntValue()); + message->GetArgumentList()->SetString(0, (*arguments.begin())->GetStringValue()); browser->SendProcessMessage(PID_BROWSER, message); return true; } @@ -3372,7 +3372,7 @@ window.AscDesktopEditor.InitJSContext();", curFrame->GetURL(), 0); sCode += "else if (window[\"editor\"]) { window[\"editor\"][\"asc_nativePrint\"](undefined, undefined"; if (message->GetArgumentList()->GetSize() == 1) - sCode += (", " + std::to_string(message->GetArgumentList()->GetInt(0))); + sCode += (", " + (message->GetArgumentList()->GetString(0).ToString())); sCode += "); }"; _frame->ExecuteJavaScript(sCode, _frame->GetURL(), 0); diff --git a/ChromiumBasedEditors/lib/src/fileconverter.h b/ChromiumBasedEditors/lib/src/fileconverter.h index ea99499f..0c49afc1 100644 --- a/ChromiumBasedEditors/lib/src/fileconverter.h +++ b/ChromiumBasedEditors/lib/src/fileconverter.h @@ -988,17 +988,14 @@ public: } m_oInfo.m_sDocumentInfo = L""; - int nDoctRendererParam = 0; + oBuilder.WriteString(L"{"); + oBuilder.WriteEncodeXmlString(L"\"spreadsheetLayout\":{\"fitToWidth\":1,\"fitToHeight\":1}"); if (m_bIsRetina) - nDoctRendererParam |= 0x01; - if (true) // печать пдф (лист = страница) - nDoctRendererParam |= 0x02; + oBuilder.WriteEncodeXmlString(L",\"printOptions\":{\"retina\":1}"); + oBuilder.WriteString(L"}"); - nDoctRendererParam |= 0x04; // disable fast doctrenderer (no rights to dump common information) - - oBuilder.WriteString(L""); - oBuilder.WriteString(std::to_wstring(nDoctRendererParam)); - oBuilder.WriteString(L""); + // disable cache + oBuilder.WriteString(L"1"); oBuilder.WriteString(L""); diff --git a/HtmlFile/Internal/Internal.pro b/HtmlFile/Internal/Internal.pro index b235bb12..a3b01263 100644 --- a/HtmlFile/Internal/Internal.pro +++ b/HtmlFile/Internal/Internal.pro @@ -11,7 +11,7 @@ include($$CORE_ROOT_DIR/Common/base.pri) include($$CORE_ROOT_DIR/Common/3dParty/icu/icu.pri) include($$CORE_ROOT_DIR/../desktop-sdk/ChromiumBasedEditors/lib/AscDocumentsCore_base.pri) -LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter -lkernel -lgraphics +ADD_DEPENDENCY(graphics, kernel, UnicodeConverter) DESTDIR=$$CORE_BUILDS_LIBRARIES_PATH