mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
fix bug #53873
This commit is contained in:
@ -36,8 +36,8 @@
|
||||
#include "./Reader/PPTFileReader.h"
|
||||
#include "./PPTXWriter/Converter.h"
|
||||
|
||||
#include "../../../Common/OfficeFileErrorDescription.h"
|
||||
#include "../../../OfficeUtils/src/OfficeUtils.h"
|
||||
#include "../../Common/OfficeFileErrorDescription.h"
|
||||
#include "../../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
#ifndef READMODE
|
||||
#define READMODE 1
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#include "ArtBlip.h"
|
||||
|
||||
#include "../../../DesktopEditor/common/Directory.h"
|
||||
#include "../../../../DesktopEditor/common/Directory.h"
|
||||
|
||||
#include "../../Reader/PPTDocumentInfo.h"
|
||||
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
#include "Encoding.h"
|
||||
#include "Utility.h"
|
||||
|
||||
#include "../../../Common/DocxFormat/Source/Base/unicode_util.h"
|
||||
#include "../../../UnicodeConverter/UnicodeConverter.h"
|
||||
#include "../../../UnicodeConverter/UnicodeConverter_Encodings.h"
|
||||
#include "../../../../Common/DocxFormat/Source/Base/unicode_util.h"
|
||||
#include "../../../../UnicodeConverter/UnicodeConverter.h"
|
||||
#include "../../../../UnicodeConverter/UnicodeConverter_Encodings.h"
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
#include <string.h>
|
||||
|
||||
@ -177,7 +177,7 @@ namespace Docx2Txt
|
||||
ListCount = (int)pNumbering->m_arrNum.size();
|
||||
|
||||
for (int i = 0; i < 9 * ListCount; i++)
|
||||
Lists.push_back(0);
|
||||
Lists.push_back(-1);
|
||||
}
|
||||
|
||||
if (!pDocument) return;
|
||||
@ -452,8 +452,6 @@ namespace Docx2Txt
|
||||
|
||||
if (listNum > 0 && pNumbering)
|
||||
{
|
||||
listNum--;
|
||||
|
||||
std::map<int, std::pair<int,size_t>>::iterator pFindNum = pNumbering->m_mapNum.find(listNum);
|
||||
if (pFindNum != pNumbering->m_mapNum.end())
|
||||
{
|
||||
@ -466,7 +464,7 @@ namespace Docx2Txt
|
||||
level--;
|
||||
for (int i = level + 1; i < 9; i++)
|
||||
{
|
||||
Lists[start + i] = 0;
|
||||
Lists[start + i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -524,8 +522,10 @@ namespace Docx2Txt
|
||||
|
||||
levelPrev = level;
|
||||
|
||||
if (reset) Lists[start + level] = startLvl.IsInit() ? *startLvl : 1;
|
||||
else Lists[start + level]++;
|
||||
if (reset || Lists[start + level] < 0)
|
||||
Lists[start + level] = startLvl.IsInit() ? *startLvl : 1;
|
||||
else
|
||||
Lists[start + level]++;
|
||||
|
||||
if (( ind_level >= 0 ) && ( abstractNum->m_arrLvl[ind_level] ))
|
||||
{
|
||||
@ -640,14 +640,16 @@ namespace Docx2Txt
|
||||
std::wstring Converter_Impl::IntToLowerLetter(int number)
|
||||
{
|
||||
number--;
|
||||
static const size_t r = (L'z' - L'a' + 1);
|
||||
if (number < 0) return L"";
|
||||
|
||||
static const size_t r = (L'z' - L'a' + 1);
|
||||
std::wstring res;
|
||||
size_t r0 = number / r;
|
||||
|
||||
if (r0 > 0)
|
||||
{
|
||||
std::wstring rest = IntToLowerLetter(number - r * r0);
|
||||
std::wstring res = IntToLowerLetter(r0-1) + rest;
|
||||
std::wstring rest = IntToLowerLetter(number - r * r0 + 1);
|
||||
std::wstring res = IntToLowerLetter(r0 - 1 + 1) + rest;
|
||||
return res;
|
||||
}
|
||||
else
|
||||
@ -659,14 +661,16 @@ namespace Docx2Txt
|
||||
std::wstring Converter_Impl::IntToUpperLetter(int number)
|
||||
{
|
||||
number--;
|
||||
if (number < 0) return L"";
|
||||
|
||||
static const size_t r = (L'Z' - L'A' + 1);
|
||||
std::wstring res;
|
||||
size_t r0 = number / r;
|
||||
|
||||
if (r0 > 0)
|
||||
{
|
||||
std::wstring rest = IntToUpperLetter(number - r * r0);
|
||||
std::wstring res = IntToUpperLetter(r0-1) + rest;
|
||||
std::wstring rest = IntToUpperLetter(number - r * r0 + 1);
|
||||
std::wstring res = IntToUpperLetter(r0 - 1 + 1) + rest;
|
||||
return res;
|
||||
}
|
||||
else
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "../Common/Utility.h"
|
||||
#include "TxtFile.h"
|
||||
|
||||
#include "../../../DesktopEditor/common/File.h"
|
||||
#include "../../../../DesktopEditor/common/File.h"
|
||||
|
||||
|
||||
namespace Txt
|
||||
|
||||
@ -75,6 +75,8 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_64\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_64\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
@ -104,7 +106,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
#include "../../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "MSOSHADECOLOR.h"
|
||||
#include "MSO_enums.h"
|
||||
|
||||
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/Enums.h"
|
||||
#include "../../../../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/Enums.h"
|
||||
#include "../../../../XlsXlsxConverter/ConvertShapes/GraphicsPath.h"
|
||||
#include "../../../../XlsXlsxConverter/ConvertShapes/FormulaShape.h"
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ QT -= core gui
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../core
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../base.pri)
|
||||
|
||||
|
||||
@ -75,6 +75,8 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_64\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_64\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
@ -143,12 +145,6 @@
|
||||
<ClInclude Include="..\source\CryptTransform.h" />
|
||||
<ClInclude Include="..\source\ECMACryptFile.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Common\3dParty\cryptopp\cryptlib.vcxproj">
|
||||
<Project>{3423ec9a-52e4-4a4d-9753-edebc38785ef}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
#pragma comment(lib, "../../../build/lib/win_64/DEBUG/kernel_network.lib")
|
||||
#pragma comment(lib, "../../../build/lib/win_64/DEBUG/kernel.lib")
|
||||
#pragma comment(lib, "../../../build/lib/win_64/DEBUG/UnicodeConverter.lib")
|
||||
#else
|
||||
#else
|
||||
#pragma comment(lib, "../../../build/lib/win_64/doctrenderer.lib")
|
||||
#pragma comment(lib, "../../../build/lib/win_64/HtmlRenderer.lib")
|
||||
#pragma comment(lib, "../../../build/lib/win_64/PdfReader.lib")
|
||||
@ -60,7 +60,7 @@
|
||||
#pragma comment(lib, "../../../build/lib/win_64/kernel.lib")
|
||||
#pragma comment(lib, "../../../build/lib/win_64/UnicodeConverter.lib")
|
||||
#endif
|
||||
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
|
||||
#pragma comment(lib, "../../../build/bin/icu/win_64/icuuc.lib")
|
||||
#elif defined (_WIN32)
|
||||
#if defined(_DEBUG)
|
||||
#pragma comment(lib, "../../../build/lib/win_32/DEBUG/doctrenderer.lib")
|
||||
|
||||
@ -76,6 +76,8 @@
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_64\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_64\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
@ -112,7 +114,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;__WORDSIZE=32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;FILE_FORMAT_CHECKER_WITH_MACRO;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;CRYPTOPP_DISABLE_ASM;DISABLE_TYPE_MISMATCH;CRYPTOPP_BOOL_ALIGN16_ENABLED;__WORDSIZE=32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -124,6 +126,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
<AdditionalOptions>/INCREMENTAL:NO %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -164,9 +167,12 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\BinReader\CustomXmlWriter.cpp" />
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\BinReader\FileWriter.cpp" />
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp" />
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp">
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\BinWriter\BinWriters.cpp">
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\ASCOfficeDocxFile2\DocWrapper\ChartWriter.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -210,6 +216,7 @@
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsxSerializerCom\Reader\CommonWriter.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -223,7 +230,9 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsxSerializerCom\Writer\BinaryReader.cpp" />
|
||||
<ClCompile Include="..\..\..\XlsxSerializerCom\Writer\BinaryReader.cpp">
|
||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\XlsxSerializerCom\Writer\CSVWriter.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
|
||||
Reference in New Issue
Block a user