Skip to content

Commit

Permalink
For bug 65400
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Feb 14, 2024
1 parent ae8b458 commit 0a9356f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions DesktopEditor/graphics/pro/js/before.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
base.replaceInFile("./xml/src/xmllight_private.h", "#include \"../../common/", "#include \"../../../../../common/")
base.replaceInFile("./xml/src/xmllight_private.h", "#include \"../../../UnicodeConverter/", "#include \"../../../../../../UnicodeConverter/")
base.replaceInFile("./xml/include/xmlutils.h", "#include \"../../common/", "#include \"../../../../../common/")
base.replaceInFile("./xml/libxml2/globals.c", "int xmlGetWarningsDefaultValue = 1;", "int xmlGetWarningsDefaultValue = 0;")
base.replaceInFile("./xml/libxml2/globals.c", "static int xmlGetWarningsDefaultValueThrDef = 1;", "static int xmlGetWarningsDefaultValueThrDef = 0;")

if not base.is_dir("freetype-2.10.4"):
base.copy_dir("../../../freetype-2.10.4", "./freetype-2.10.4")
Expand Down
2 changes: 1 addition & 1 deletion DesktopEditor/graphics/pro/js/drawingfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"LIBXML_READER_ENABLED", "LIBXML_PUSH_ENABLED", "LIBXML_HTML_ENABLED",
"LIBXML_XPATH_ENABLED", "LIBXML_OUTPUT_ENABLED", "LIBXML_C14N_ENABLED",
"LIBXML_SAX1_ENABLED", "LIBXML_TREE_ENABLED", "LIBXML_XPTR_ENABLED",
"IN_LIBXML", "LIBXML_STATIC", "BUILD_ZLIB_AS_SOURCES",
"XML_ERROR_DISABLE_MODE", "IN_LIBXML", "LIBXML_STATIC", "BUILD_ZLIB_AS_SOURCES",
"_ARM_ALIGN_",
"_tcsnicmp=strncmp", "_lseek=lseek", "_getcwd=getcwd",
"NO_CONSOLE_IO", "USE_EXTERNAL_JPEG2000", "USE_JPIP", "OPJ_STATIC", "FONT_ENGINE_DISABLE_FILESYSTEM",
Expand Down
7 changes: 6 additions & 1 deletion DjVuFile/DjVuFileImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,12 @@ XmlUtils::CXmlNode CDjVuFileImplementation::ParseText(GP<DjVuImage> pPage)
XmlUtils::CXmlNode hiddenText;
XmlUtils::CXmlNode pageColumn;
XmlUtils::CXmlNode region;
hiddenText.FromXmlStringA(NSDjvu::MakeCString(pageText));
std::string sPageText = NSDjvu::MakeCString(pageText);
if (!hiddenText.FromXmlStringA(sPageText))
{
std::wstring sPageTextW = UTF8_TO_U(sPageText);
hiddenText.FromXmlString(sPageTextW);
}
hiddenText.GetNode(L"PAGECOLUMN", pageColumn);
pageColumn.GetNode(L"REGION", region);
region.GetNode(L"PARAGRAPH", paragraph);
Expand Down
6 changes: 3 additions & 3 deletions HtmlRenderer/include/HTMLRendererText.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#ifndef _ASC_HTMLRENDERER3_H_
#define _ASC_HTMLRENDERER3_H_
#ifndef _ASC_HTMLRENDERER3_TEXT_H_
#define _ASC_HTMLRENDERER3_TEXT_H_

#include "../../DesktopEditor/graphics/IRenderer.h"
#include "../../DesktopEditor/graphics/pro/officedrawingfile.h"
Expand Down Expand Up @@ -187,4 +187,4 @@ namespace NSHtmlRenderer
};
}

#endif // _ASC_HTMLRENDERER3_H_
#endif // _ASC_HTMLRENDERER3_TEXT_H_
7 changes: 1 addition & 6 deletions Test/Applications/gradient/Gradient/Gradient.pro
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,5 @@ PWD_ROOT_DIR = $$PWD
CORE_ROOT_DIR = $$PWD/../../../../../core
include($$CORE_ROOT_DIR/Common/base.pri)

ADD_DEPENDENCY(kernel, graphics, UnicodeConverter)
ADD_DEPENDENCY(PdfReader)
ADD_DEPENDENCY(HtmlRenderer)
ADD_DEPENDENCY(kernel, graphics, UnicodeConverter, HtmlRenderer, PdfFile)
core_linux:include($$CORE_ROOT_DIR/Common/3dParty/icu/icu.pri)

LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lkernel -lgraphics

2 changes: 1 addition & 1 deletion Test/Applications/gradient/Gradient/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "../../../../DesktopEditor/graphics/pro/Graphics.h"
#include "../../../../DesktopEditor/fontengine/ApplicationFontsWorker.h"
#include "../../../../DesktopEditor/common/Directory.h"
#include "../../../../PdfReader/PdfReader.h"
#include "../../../../PdfFile/PdfFile.h"

std::vector<Point> drawCircle1(int n, double cx, double cy, double r) {
std::vector<Point> res;
Expand Down

0 comments on commit 0a9356f

Please sign in to comment.