Commit 5700503e authored by Alexey.Musinov's avatar Alexey.Musinov

fix build converter ios

parent d01b1e7d
......@@ -33,6 +33,7 @@
6967B1C11E27B4B800A129E2 /* RtfWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B1991E27B4B800A129E2 /* RtfWriter.cpp */; };
6967B1C21E27B4B800A129E2 /* OOXDocumentWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B19F1E27B4B800A129E2 /* OOXDocumentWriter.cpp */; };
6967B1C31E27B4B800A129E2 /* OOXWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6967B1A81E27B4B800A129E2 /* OOXWriter.cpp */; };
69ACB6D31E7A983400096E94 /* svg_parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69ACB6D11E7A983400096E94 /* svg_parser.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -167,6 +168,8 @@
6967B1C61E27B81B00A129E2 /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringBuilder.h; path = ../../../../DesktopEditor/common/StringBuilder.h; sourceTree = "<group>"; };
6967B1C71E27B89400A129E2 /* PPTShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PPTShape.h; path = ../../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/PPTShape/PPTShape.h; sourceTree = "<group>"; };
6967B1C81E27B8F900A129E2 /* BaseShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BaseShape.h; path = ../../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/BaseShape.h; sourceTree = "<group>"; };
69ACB6D11E7A983400096E94 /* svg_parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = svg_parser.cpp; path = ../../../../ASCOfficeOdfFile/src/odf/svg_parser.cpp; sourceTree = "<group>"; };
69ACB6D21E7A983400096E94 /* svg_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = svg_parser.h; path = ../../../../ASCOfficeOdfFile/src/odf/svg_parser.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -208,6 +211,7 @@
6967B13D1E27B4B800A129E2 /* Reader */ = {
isa = PBXGroup;
children = (
69ACB6D01E7A982B00096E94 /* odf */,
6967B13E1E27B4B800A129E2 /* OOXAbstractNumReader.h */,
6967B13F1E27B4B800A129E2 /* OOXAppReader.h */,
6967B1401E27B4B800A129E2 /* OOXBorderReader.h */,
......@@ -355,6 +359,15 @@
name = common;
sourceTree = "<group>";
};
69ACB6D01E7A982B00096E94 /* odf */ = {
isa = PBXGroup;
children = (
69ACB6D11E7A983400096E94 /* svg_parser.cpp */,
69ACB6D21E7A983400096E94 /* svg_parser.h */,
);
name = odf;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
......@@ -419,6 +432,7 @@
6967B1B61E27B4B800A129E2 /* RtfField.cpp in Sources */,
6967B1BB1E27B4B800A129E2 /* RtfParagraph.cpp in Sources */,
6967B1AC1E27B4B800A129E2 /* OOXDrawingGraphicReader.cpp in Sources */,
69ACB6D31E7A983400096E94 /* svg_parser.cpp in Sources */,
6967B1AD1E27B4B800A129E2 /* OOXHeaderReader.cpp in Sources */,
6967B1B31E27B4B800A129E2 /* RtfBookmark.cpp in Sources */,
6967B1C11E27B4B800A129E2 /* RtfWriter.cpp in Sources */,
......@@ -547,6 +561,7 @@
PPT_DEF,
_IOS,
DONT_WRITE_EMBEDDED_FONTS,
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
......@@ -579,6 +594,7 @@
PPT_DEF,
_IOS,
DONT_WRITE_EMBEDDED_FONTS,
AVS_USE_CONVERT_PPTX_TOCUSTOM_VML,
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
......
......@@ -344,9 +344,9 @@ namespace NExtractTools
else return AVS_FILEUTILS_ERROR_CONVERT;
}
return pptx_dir2pptt_bin(sTempUnpackedPPTX, sTo, params);
return pptx_dir2pptt_bin(sTempUnpackedPPTX, sTo, sTemp, params);
}
int pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params)
int pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params)
{
// convert unzipped pptx to unzipped pptt
CPPTXFile *pptx_file = new CPPTXFile(NULL, NULL, NULL, NULL);
......@@ -355,21 +355,10 @@ namespace NExtractTools
if (pptx_file)
{
#if defined(_WIN32) || defined (_WIN64)
BSTR bstrFontPath = SysAllocString(params.getFontPath().c_str());
BSTR bstrTempUnpackedPPTX = SysAllocString(sFrom.c_str());
BSTR bstrTo = SysAllocString(sTo.c_str());
pptx_file->SetFontDir (bstrFontPath);
nRes = (S_OK == pptx_file->OpenFileToPPTY (bstrTempUnpackedPPTX, bstrTo)) ? nRes : AVS_FILEUTILS_ERROR_CONVERT;
SysFreeString(bstrFontPath);
SysFreeString(bstrTempUnpackedPPTX);
SysFreeString(bstrTo);
#else
pptx_file->put_TempDirectory(sTemp);
pptx_file->SetFontDir (params.getFontPath());
nRes = (S_OK == pptx_file->OpenFileToPPTY (sFrom, sTo)) ? nRes : AVS_FILEUTILS_ERROR_CONVERT;
#endif
delete pptx_file;
}
......@@ -378,8 +367,8 @@ namespace NExtractTools
// pptx -> pptt
int pptx2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params)
{
std::wstring sResultPpttDir = sTemp + FILE_SEPARATOR_STR + L"pptt_unpacked";
std::wstring sTempPpttFileEditor = sResultPpttDir + FILE_SEPARATOR_STR + L"Editor.bin";
std::wstring sResultPpttDir = sTemp + FILE_SEPARATOR_STR + _T("pptt_unpacked");
std::wstring sTempPpttFileEditor = sResultPpttDir + FILE_SEPARATOR_STR + _T("Editor.bin");
NSDirectory::CreateDirectory(sResultPpttDir);
......@@ -388,7 +377,7 @@ namespace NExtractTools
{
// zip pptt folder to output file
COfficeUtils oCOfficeUtils(NULL);
nRes = (S_OK == oCOfficeUtils.CompressFileOrDirectory (sResultPpttDir, sTo, -1)) ? nRes : AVS_FILEUTILS_ERROR_CONVERT;
nRes = (S_OK == oCOfficeUtils.CompressFileOrDirectory (sResultPpttDir, sTo)) ? nRes : AVS_FILEUTILS_ERROR_CONVERT;
}
return nRes;
}
......@@ -2175,15 +2164,15 @@ namespace NExtractTools
}
else if(AVS_OFFICESTUDIO_FILE_CANVAS_PRESENTATION == nFormatTo)
{
nRes = pptx_dir2pptt_bin(sFrom, sTo, params);
nRes = pptx_dir2pptt_bin(sFrom, sTo, sTemp, params);
}
else
{
std::wstring sPpttDir = sTemp + FILE_SEPARATOR_STR + L"pptt_unpacked";
std::wstring sPpttDir = sTemp + FILE_SEPARATOR_STR + _T("pptt_unpacked");
NSDirectory::CreateDirectory(sPpttDir);
std::wstring sTFile = sPpttDir + FILE_SEPARATOR_STR + L"Editor.bin";
std::wstring sTFile = sPpttDir + FILE_SEPARATOR_STR + _T("Editor.bin");
nRes = pptx_dir2pptt_bin(sFrom, sTFile, params);
nRes = pptx_dir2pptt_bin(sFrom, sTFile, sTemp, params);
if(SUCCEEDED_X2T(nRes))
{
nRes = fromPpttBin(sTFile, sTo, nFormatTo, sTemp, sThemeDir, bFromChanges, bPaid, params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment