mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-03-03 09:11:45 +08:00
Compare commits
20 Commits
core-win-6
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| e26f836da7 | |||
| 69d2b12f53 | |||
| f2260748c8 | |||
| b59f84b262 | |||
| 3e5fed8482 | |||
| 538e477818 | |||
| b212e878c6 | |||
| 05694d13f3 | |||
| 1dd72c99a2 | |||
| 4b73e58693 | |||
| bee4f57dd3 | |||
| dd40e3e53c | |||
| d657ece017 | |||
| b21b1b8aaf | |||
| 09fb980060 | |||
| 142f9f57a3 | |||
| 28346c4571 | |||
| 9810087ee1 | |||
| 274c000ce7 | |||
| 9e6dd1fbb1 |
@ -61,7 +61,7 @@ namespace DocFileFormat
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
long Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
|
||||
_UINT32 Converter::Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress)
|
||||
{
|
||||
if (!doc || !docx) return S_FALSE;
|
||||
|
||||
@ -202,20 +202,18 @@ namespace DocFileFormat
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
long Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
|
||||
_UINT32 Converter::LoadAndConvert(const std::wstring& strSrcFile, const std::wstring& strDstDirectory, const std::wstring& password, const ProgressCallback* progress, bool &bMacros)
|
||||
{
|
||||
long result = S_FALSE;
|
||||
|
||||
WordDocument doc(progress, m_sTempFolder);
|
||||
WordprocessingDocument docx(strDstDirectory, &doc);
|
||||
|
||||
result = doc.LoadDocument(strSrcFile, password);
|
||||
_UINT32 result = doc.LoadDocument(strSrcFile, password);
|
||||
|
||||
if (result == S_OK)
|
||||
if (result == 0)
|
||||
{
|
||||
result = Convert(&doc, &docx, progress);
|
||||
|
||||
if (result == S_OK)
|
||||
if (result == 0)
|
||||
{
|
||||
docx.SaveDocument(bMacros);
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
@ -48,9 +49,9 @@ namespace DocFileFormat
|
||||
|
||||
std::wstring m_sTempFolder;
|
||||
|
||||
long LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
|
||||
_UINT32 LoadAndConvert(const std::wstring & strSrcFile, const std::wstring & strDstDirectory, const std::wstring & password, const ProgressCallback* progress, bool &bMacros);
|
||||
|
||||
private:
|
||||
long Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
|
||||
_UINT32 Convert(WordDocument* doc, WordprocessingDocument* docx, const ProgressCallback* progress);
|
||||
};
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ namespace DocFileFormat
|
||||
|
||||
namespace DocFileFormat
|
||||
{
|
||||
int WordDocument::LoadDocument(const std::wstring & fileName, const std::wstring & password)
|
||||
_UINT32 WordDocument::LoadDocument(const std::wstring & fileName, const std::wstring & password)
|
||||
{
|
||||
m_sFileName = fileName;
|
||||
m_sPassword = password;
|
||||
|
||||
@ -94,7 +94,7 @@ namespace DocFileFormat
|
||||
WordDocument (const ProgressCallback* pCallFunc, const std::wstring & tempFolder );
|
||||
virtual ~WordDocument();
|
||||
|
||||
int LoadDocument(const std::wstring & fileName, const std::wstring & password);
|
||||
_UINT32 LoadDocument(const std::wstring & fileName, const std::wstring & password);
|
||||
|
||||
int nWordVersion;
|
||||
int nDocumentCodePage;
|
||||
|
||||
@ -34,9 +34,9 @@
|
||||
#include "../DocDocxConverter/Converter.h"
|
||||
#include "../../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
HRESULT COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack)
|
||||
_UINT32 COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::wstring & docxDirectory, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack)
|
||||
{
|
||||
HRESULT hr = S_FALSE;
|
||||
_UINT32 hr = 0;
|
||||
|
||||
DocFileFormat::Converter docToDocx;
|
||||
docToDocx.m_sTempFolder = m_sTempFolder;
|
||||
@ -46,7 +46,7 @@ HRESULT COfficeDocFile::LoadFromFile(const std::wstring & docFile, const std::w
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack )
|
||||
_UINT32 COfficeDocFile::SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack )
|
||||
{
|
||||
return S_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -53,8 +53,8 @@ public:
|
||||
|
||||
std::wstring m_sTempFolder;
|
||||
|
||||
HRESULT LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack = NULL);
|
||||
HRESULT SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack = NULL);
|
||||
_UINT32 LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstFileName, const std::wstring & password, bool &bMacros, ProgressCallback *ffCallBack = NULL);
|
||||
_UINT32 SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcFileName, ProgressCallback *ffCallBack = NULL);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -85,7 +85,7 @@ namespace BinXlsxRW{
|
||||
sMediaPath = pathMediaDir.GetPath();
|
||||
sEmbedPath = pathEmbedDir.GetPath();
|
||||
}
|
||||
int CXlsxSerializer::loadFromFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedDir)
|
||||
_UINT32 CXlsxSerializer::loadFromFile(const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedDir)
|
||||
{
|
||||
std::wstring strFileInDir = NSSystemPath::GetDirectoryName(sSrcFileName);
|
||||
|
||||
@ -100,7 +100,7 @@ namespace BinXlsxRW{
|
||||
BinXlsxRW::BinaryFileReader oBinaryFileReader;
|
||||
return oBinaryFileReader.ReadFile(sSrcFileName, sDstPath, &oDrawingConverter, sXMLOptions);
|
||||
}
|
||||
int CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
|
||||
_UINT32 CXlsxSerializer::saveToFile(const std::wstring& sDstFileName, const std::wstring& sSrcPath, const std::wstring& sXMLOptions)
|
||||
{
|
||||
COfficeFontPicker* pFontPicker = new COfficeFontPicker();
|
||||
pFontPicker->Init(m_sFontDir);
|
||||
@ -136,7 +136,7 @@ namespace BinXlsxRW{
|
||||
oOfficeDrawingConverter.SetFontPicker(pFontPicker);
|
||||
|
||||
BinXlsxRW::BinaryFileWriter oBinaryFileWriter(fp);
|
||||
int result = oBinaryFileWriter.Open(sSrcPath, sDstFileName, pEmbeddedFontsManager, &oOfficeDrawingConverter, sXMLOptions, m_bIsNoBase64);
|
||||
_UINT32 result = oBinaryFileWriter.Open(sSrcPath, sDstFileName, pEmbeddedFontsManager, &oOfficeDrawingConverter, sXMLOptions, m_bIsNoBase64);
|
||||
|
||||
RELEASEOBJECT(pFontPicker);
|
||||
return result;
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#define XLSX_SERIALIZER
|
||||
|
||||
#include <string>
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
@ -62,8 +63,8 @@ namespace BinXlsxRW {
|
||||
|
||||
static void CreateXlsxFolders (const std::wstring& sXmlOptions, const std::wstring& sDstPath, std::wstring& sMediaPath, std::wstring& sEmbedPath);
|
||||
|
||||
int loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
|
||||
int saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
|
||||
_UINT32 loadFromFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions, const std::wstring& sMediaDir, const std::wstring& sEmbedPath);
|
||||
_UINT32 saveToFile (const std::wstring& sSrcFileName, const std::wstring& sDstPath, const std::wstring& sXMLOptions);
|
||||
|
||||
bool saveChart (NSBinPptxRW::CBinaryFileReader* pReader, long lLength, const std::wstring& sFilename, const long& lChartNumber);
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ HRESULT convert_single(std::wstring srcFileName)
|
||||
}
|
||||
_CP_LOG << L"[info] " << srcFileName << std::endl;
|
||||
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"password", NULL);
|
||||
nResult = ConvertODF2OOXml(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", srcTempPath2, L"", NULL);
|
||||
|
||||
if (srcTempPath != srcFileName)
|
||||
{
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include "../include/odf/odf_document.h"
|
||||
|
||||
int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
_UINT32 ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
{
|
||||
cpdoccore::oox::package::xlsx_document outputXlsx;
|
||||
cpdoccore::oox::xlsx_conversion_context conversionContext( &inputOdf);
|
||||
@ -56,7 +56,7 @@ int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
|
||||
outputXlsx.write(dstPath);
|
||||
return 0;
|
||||
}
|
||||
int ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
_UINT32 ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
{
|
||||
cpdoccore::oox::package::docx_document outputDocx;
|
||||
cpdoccore::oox::docx_conversion_context conversionContext(&inputOdf);
|
||||
@ -70,7 +70,7 @@ int ConvertOdt2Docx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
|
||||
|
||||
return 0;
|
||||
}
|
||||
int ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
_UINT32 ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
{
|
||||
cpdoccore::oox::package::pptx_document outputPptx;
|
||||
cpdoccore::oox::pptx_conversion_context conversionContext(&inputOdf);
|
||||
@ -83,9 +83,9 @@ int ConvertOdp2Pptx(cpdoccore::odf_reader::odf_document & inputOdf, const std::w
|
||||
|
||||
return 0;
|
||||
}
|
||||
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack)
|
||||
_UINT32 ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack)
|
||||
{
|
||||
int nResult = 0;
|
||||
_UINT32 nResult = 0;
|
||||
|
||||
try
|
||||
{
|
||||
@ -134,9 +134,9 @@ int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath,
|
||||
|
||||
}
|
||||
|
||||
int ConvertOTF2ODF(const std::wstring & srcPath)
|
||||
_UINT32 ConvertOTF2ODF(const std::wstring & srcPath)
|
||||
{
|
||||
int nResult = 0;
|
||||
_UINT32 nResult = 0;
|
||||
|
||||
std::wstring manifest_xml = srcPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
|
||||
std::wstring mimetype_xml = srcPath + FILE_SEPARATOR_STR + L"mimetype";
|
||||
|
||||
@ -31,10 +31,11 @@
|
||||
*/
|
||||
|
||||
#include "../../DesktopEditor/common/Types.h"
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
#include <string>
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
int ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack);
|
||||
_UINT32 ConvertODF2OOXml(const std::wstring & srcPath, const std::wstring & dstPath, const std::wstring & fontsPath, const std::wstring & tempPath, const std::wstring & password, const ProgressCallback* CallBack);
|
||||
|
||||
int ConvertOTF2ODF(const std::wstring & otfPath);
|
||||
_UINT32 ConvertOTF2ODF(const std::wstring & otfPath);
|
||||
|
||||
@ -589,12 +589,17 @@ void docx_conversion_context::reset_context_state()
|
||||
state_.in_run_ = false;
|
||||
state_.is_paragraph_keep_ = false;
|
||||
|
||||
state_.drawing_text_props_.clear();
|
||||
state_.text_properties_stack_.clear();
|
||||
|
||||
get_styles_context().text_style_ext().clear();
|
||||
}
|
||||
void docx_conversion_context::back_context_state()
|
||||
{
|
||||
state_ = keep_state_.back();
|
||||
keep_state_.pop_back();
|
||||
|
||||
get_styles_context().text_style_ext().clear();
|
||||
}
|
||||
|
||||
void docx_conversion_context::add_new_run(std::wstring parentStyleId)
|
||||
@ -1756,6 +1761,11 @@ void docx_conversion_context::serialize_list_properties(std::wostream & strm)
|
||||
}
|
||||
}
|
||||
|
||||
void docx_conversion_context::set_drawing_text_props (const std::wstring &props)
|
||||
{
|
||||
get_styles_context().text_style_ext() = props;
|
||||
}
|
||||
|
||||
void docx_conversion_context::add_delayed_element(odf_reader::office_element * Elm)
|
||||
{
|
||||
delayed_elements_.push_back(Elm);
|
||||
|
||||
@ -900,6 +900,8 @@ public:
|
||||
|
||||
table_content_context & get_table_content_context() { return table_content_context_;}
|
||||
|
||||
void set_drawing_text_props (const std::wstring &props);
|
||||
|
||||
void docx_convert_delayed ();
|
||||
void add_delayed_element (odf_reader::office_element * Elm);
|
||||
|
||||
@ -940,10 +942,10 @@ public:
|
||||
void add_alphabetical_index_text (odf_reader::office_element_ptr & elem);
|
||||
|
||||
void set_process_headers_footers(bool Val) { process_headers_footers_ = Val; }
|
||||
headers_footers & get_headers_footers() { return headers_footers_; }
|
||||
|
||||
headers_footers & get_headers_footers() { return headers_footers_; }
|
||||
header_footer_context & get_header_footer_context() { return header_footer_context_; }
|
||||
|
||||
drop_cap_context & get_drop_cap_context(){return drop_cap_context_;}
|
||||
drop_cap_context & get_drop_cap_context() {return drop_cap_context_;}
|
||||
|
||||
styles_map styles_map_;
|
||||
bool process_headers_footers_;
|
||||
@ -962,6 +964,8 @@ private:
|
||||
bool in_run_ = false;
|
||||
bool is_paragraph_keep_ = false;
|
||||
|
||||
std::wstring drawing_text_props_;
|
||||
|
||||
std::vector< const odf_reader::style_text_properties*> text_properties_stack_;
|
||||
}state_;
|
||||
std::vector<_context_state> keep_state_;
|
||||
|
||||
@ -231,7 +231,7 @@ void docx_serialize_image_child(std::wostream & strm, _docx_drawing & val)
|
||||
CP_XML_NODE(L"a:avLst");
|
||||
}
|
||||
|
||||
oox_serialize_ln(CP_XML_STREAM(),val.additional);
|
||||
oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ void oox_axis_content::oox_serialize_content(std::wostream & _Wostream)
|
||||
if (content_.dimension_ == L"y")
|
||||
CP_XML_ATTR(L"val",L"l");// "b" | "l" | "r" | "t"// == bottom left right top
|
||||
}
|
||||
//oox_serialize_ln(_Wostream,content_.graphic_properties_);
|
||||
//oox_serialize_ln(_Wostream, content_.graphic_properties_);
|
||||
|
||||
odf_reader::GetProperty(content_.properties_, L"num_format", strVal);
|
||||
odf_reader::GetProperty(content_.properties_, L"link-data-style-to-source", boolVal);
|
||||
|
||||
@ -198,7 +198,9 @@ std::wstringstream & styles_context::list_style()
|
||||
|
||||
void styles_context::docx_serialize_text_style(std::wostream & strm, std::wstring parenStyleId, std::wstring & strChange)
|
||||
{
|
||||
if (!text_style_.str().empty())
|
||||
const std::wstring & text_style_str = text_style_.str();
|
||||
|
||||
if (!text_style_str.empty() || !text_style_ext_.empty())
|
||||
{
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
@ -208,14 +210,17 @@ void styles_context::docx_serialize_text_style(std::wostream & strm, std::wstrin
|
||||
{
|
||||
CP_XML_STREAM() << L"<w:rStyle w:val=\"" << parenStyleId << L"\" />";
|
||||
}
|
||||
const std::wstring & test_str = text_style_.str();
|
||||
CP_XML_STREAM() << test_str;
|
||||
CP_XML_STREAM() << text_style_str;
|
||||
|
||||
if (!strChange.empty())//rPrChange
|
||||
{
|
||||
CP_XML_STREAM() << strChange;
|
||||
strChange.clear();
|
||||
}
|
||||
if (!text_style_ext_.empty())
|
||||
{
|
||||
CP_XML_STREAM() << text_style_ext_;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,6 +141,7 @@ public:
|
||||
|
||||
std::wstring & extern_node(){return extern_node_;}
|
||||
std::wstring & hlinkClick(){return hlinkClick_;}
|
||||
std::wstring & text_style_ext(){return text_style_ext_;}
|
||||
|
||||
const odf_reader::style_instance * get_current_processed_style() const { return current_processed_style_; }
|
||||
|
||||
@ -152,6 +153,7 @@ private:
|
||||
|
||||
std::wstring extern_node_;
|
||||
std::wstring hlinkClick_;
|
||||
std::wstring text_style_ext_;
|
||||
|
||||
std::wstringstream list_style_;
|
||||
std::wstringstream text_style_;
|
||||
|
||||
@ -124,8 +124,14 @@ static const std::wstring _ooxDashStyle[]=
|
||||
L"sysDashDotDot"
|
||||
};
|
||||
|
||||
void oox_serialize_ln(std::wostream & strm, const std::vector<odf_reader::_property> & prop, bool always_draw)
|
||||
void oox_serialize_ln(std::wostream & strm, const std::vector<odf_reader::_property> & prop, bool always_draw, const std::wstring &ns)
|
||||
{
|
||||
std::wstring ns_att = (ns == L"a" ? L"" : ns + L":");
|
||||
std::wstring ns_node = L"a:ln";
|
||||
|
||||
if (ns == L"w14")
|
||||
ns_node = L"w14:textOutline";
|
||||
|
||||
_CP_OPT(std::wstring) strStrokeColor;
|
||||
_CP_OPT(int) iStroke;
|
||||
_CP_OPT(double) dStrokeWidth;
|
||||
@ -143,30 +149,30 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf_reader::_prope
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"a:ln")
|
||||
CP_XML_NODE(ns_node)
|
||||
{
|
||||
std::wstring color, dash_style, fill = L"a:solidFill" ;
|
||||
std::wstring color, dash_style, fill = ns + L":solidFill" ;
|
||||
|
||||
if (strStrokeColor) color = *strStrokeColor;
|
||||
|
||||
if (iStroke)
|
||||
{
|
||||
if (iStroke.get() == 0 || bWordArt) fill = L"a:noFill";
|
||||
if (iStroke.get() == 0 || bWordArt) fill = ns + L":noFill";
|
||||
else dash_style = _ooxDashStyle[iStroke.get()];
|
||||
}
|
||||
|
||||
if ((dStrokeWidth) && (*dStrokeWidth >= 0) && fill != L"a:noFill")
|
||||
if ((dStrokeWidth) && (*dStrokeWidth >= 0) && fill != ns + L":noFill")
|
||||
{
|
||||
int val = dStrokeWidth.get() * 12700; //in emu (1 pt = 12700)
|
||||
if (val < 10) val = 12700;
|
||||
|
||||
CP_XML_ATTR(L"w", val);
|
||||
CP_XML_ATTR2(ns_att + L"w", val);
|
||||
if (color.length()<1)color = L"729FCF";
|
||||
}
|
||||
|
||||
CP_XML_NODE(fill)
|
||||
{
|
||||
if (fill != L"a:noFill")
|
||||
if (fill != ns + L":noFill")
|
||||
{
|
||||
if ( color.empty() )
|
||||
{
|
||||
@ -174,47 +180,49 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf_reader::_prope
|
||||
else color = L"FFFFFF";
|
||||
}
|
||||
|
||||
CP_XML_NODE(L"a:srgbClr")
|
||||
CP_XML_NODE(ns + L":srgbClr")
|
||||
{
|
||||
CP_XML_ATTR(L"val",color);
|
||||
CP_XML_ATTR2(ns_att + L"val",color);
|
||||
|
||||
if (dStrokeOpacity)
|
||||
{
|
||||
CP_XML_NODE(L"a:alpha")
|
||||
CP_XML_NODE(ns + L":alpha")
|
||||
{
|
||||
CP_XML_ATTR(L"val", (int)(*dStrokeOpacity * 1000));
|
||||
CP_XML_ATTR2(ns_att + L"val", (int)(*dStrokeOpacity * 1000));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fill != L"a:noFill")
|
||||
if (fill != ns + L":noFill")
|
||||
{
|
||||
_CP_OPT(std::wstring) strVal;
|
||||
|
||||
if (dash_style.length() > 0 && dash_style != L"solid")
|
||||
{
|
||||
CP_XML_NODE(L"a:prstDash"){CP_XML_ATTR(L"val", dash_style);}
|
||||
CP_XML_NODE(ns + L":prstDash"){CP_XML_ATTR2(ns_att + L"val", dash_style);}
|
||||
}
|
||||
odf_reader::GetProperty(prop,L"marker-start", strVal);
|
||||
if (strVal)
|
||||
{
|
||||
CP_XML_NODE(L"a:headEnd"){CP_XML_ATTR(L"type", strVal.get());}
|
||||
CP_XML_NODE(ns + L":headEnd"){CP_XML_ATTR2(ns_att + L"type", strVal.get());}
|
||||
}
|
||||
odf_reader::GetProperty(prop,L"marker-end",strVal);
|
||||
if (strVal)
|
||||
{
|
||||
CP_XML_NODE(L"a:tailEnd"){CP_XML_ATTR(L"type",strVal.get());}
|
||||
CP_XML_NODE(ns + L":tailEnd"){CP_XML_ATTR2(ns_att + L"type",strVal.get());}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void oox_serialize_aLst(std::wostream & strm, const std::vector<odf_reader::_property> & prop, const std::wstring & shapeGeomPreset)
|
||||
void oox_serialize_aLst(std::wostream & strm, const std::vector<odf_reader::_property> & prop, const std::wstring & shapeGeomPreset, const std::wstring &ns)
|
||||
{
|
||||
std::wstring ns_att = (ns == L"a" ? L"" : ns + L":");
|
||||
|
||||
CP_XML_WRITER(strm)
|
||||
{
|
||||
CP_XML_NODE(L"a:avLst")
|
||||
CP_XML_NODE(ns + L":avLst")
|
||||
{
|
||||
_CP_OPT(std::wstring) strModifiers;
|
||||
odf_reader::GetProperty(prop, L"oox-draw-modifiers", strModifiers);
|
||||
@ -268,20 +276,20 @@ void oox_serialize_aLst(std::wostream & strm, const std::vector<odf_reader::_pro
|
||||
{
|
||||
if (values[i].empty()) continue;
|
||||
|
||||
CP_XML_NODE(L"a:gd")
|
||||
CP_XML_NODE(ns + L":gd")
|
||||
{
|
||||
if (names.size() > i)
|
||||
{
|
||||
CP_XML_ATTR(L"name", names[i]);
|
||||
CP_XML_ATTR2(ns_att + L"name", names[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (values.size() > 1)
|
||||
CP_XML_ATTR(L"name", L"adj" + std::to_wstring(i + 1));
|
||||
CP_XML_ATTR2(ns_att + L"name", L"adj" + std::to_wstring(i + 1));
|
||||
else
|
||||
CP_XML_ATTR(L"name", L"adj");
|
||||
CP_XML_ATTR2(ns_att + L"name", L"adj");
|
||||
}
|
||||
CP_XML_ATTR(L"fmla", L"val " + values[i]);
|
||||
CP_XML_ATTR2(ns_att + L"fmla", L"val " + values[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,8 +118,8 @@ namespace oox {
|
||||
};
|
||||
typedef _CP_PTR(_oox_drawing) oox_drawing_ptr;
|
||||
|
||||
void oox_serialize_ln (std::wostream & strm, const std::vector<odf_reader::_property> & val, bool always_draw = false);
|
||||
void oox_serialize_aLst (std::wostream & strm, const std::vector<odf_reader::_property> & val, const std::wstring & shapeGeomPreset);
|
||||
void oox_serialize_ln (std::wostream & strm, const std::vector<odf_reader::_property> & val, bool always_draw = false, const std::wstring &ns = L"a");
|
||||
void oox_serialize_aLst (std::wostream & strm, const std::vector<odf_reader::_property> & val, const std::wstring & shapeGeomPreset, const std::wstring &ns = L"a");
|
||||
void oox_serialize_action (std::wostream & strm, const _action_desc & val);
|
||||
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ void oox_serialize_srgb(std::wostream & strm, const std::wstring &color, _CP_OPT
|
||||
{
|
||||
CP_XML_NODE(ns + L":alpha")
|
||||
{
|
||||
CP_XML_ATTR2(ns_att + L"val", std::to_wstring((int)opacity->get_value()*1000));// + L"%");
|
||||
CP_XML_ATTR2(ns_att + L"val", std::to_wstring((int)opacity->get_value() * 1000));// + L"%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ void pptx_serialize_chart(std::wostream & strm, _pptx_drawing & val)
|
||||
}
|
||||
val.serialize_xfrm(CP_XML_STREAM(), L"p", true);
|
||||
|
||||
//oox_serialize_ln(CP_XML_STREAM(),val.additional);
|
||||
//oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
|
||||
CP_XML_NODE(L"a:graphic")
|
||||
{
|
||||
@ -311,7 +311,7 @@ void pptx_serialize_table(std::wostream & strm, _pptx_drawing & val)
|
||||
}
|
||||
val.serialize_xfrm(CP_XML_STREAM(), L"p", true);
|
||||
|
||||
//oox_serialize_ln(CP_XML_STREAM(),val.additional);
|
||||
//oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
|
||||
CP_XML_NODE(L"a:graphic")
|
||||
{
|
||||
@ -352,7 +352,7 @@ void pptx_serialize_object(std::wostream & strm, _pptx_drawing & val)
|
||||
}
|
||||
val.serialize_xfrm(CP_XML_STREAM(), L"p", true);
|
||||
|
||||
//oox_serialize_ln(CP_XML_STREAM(),val.additional);
|
||||
//oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
|
||||
CP_XML_NODE(L"a:graphic")
|
||||
{
|
||||
|
||||
@ -252,7 +252,7 @@ void xlsx_serialize_chart(std::wostream & strm, _xlsx_drawing & val)
|
||||
CP_XML_NODE(L"xdr:cNvGraphicFramePr");
|
||||
}
|
||||
val.serialize_xfrm(CP_XML_STREAM(), L"xdr");
|
||||
//oox_serialize_ln(CP_XML_STREAM(),val.additional);
|
||||
//oox_serialize_ln(CP_XML_STREAM(), val.additional);
|
||||
|
||||
CP_XML_NODE(L"a:graphic")
|
||||
{
|
||||
|
||||
@ -284,7 +284,7 @@ void Compute_GradientFill(draw_gradient * image_style,oox::oox_gradient_fill_ptr
|
||||
|
||||
point.pos = 0;
|
||||
if (image_style->draw_start_color_) point.color_ref = image_style->draw_start_color_->get_hex_value();
|
||||
if (image_style->draw_start_intensity_) point.opacity = image_style->draw_start_intensity_->get_value();
|
||||
//if (image_style->draw_start_intensity_) point.opacity = image_style->draw_start_intensity_->get_value();
|
||||
|
||||
fill->colors.push_back(point);
|
||||
|
||||
@ -300,7 +300,7 @@ void Compute_GradientFill(draw_gradient * image_style,oox::oox_gradient_fill_ptr
|
||||
|
||||
point.pos = 0;
|
||||
if (image_style->draw_end_color_) point.color_ref = image_style->draw_end_color_->get_hex_value();
|
||||
if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
//if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
|
||||
fill->colors.push_back(point);
|
||||
|
||||
@ -312,7 +312,7 @@ void Compute_GradientFill(draw_gradient * image_style,oox::oox_gradient_fill_ptr
|
||||
|
||||
point.pos = 100;
|
||||
if (image_style->draw_end_color_) point.color_ref = image_style->draw_end_color_->get_hex_value();
|
||||
if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
//if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
|
||||
fill->colors.push_back(point);
|
||||
}break;
|
||||
@ -328,13 +328,13 @@ void Compute_GradientFill(draw_gradient * image_style,oox::oox_gradient_fill_ptr
|
||||
|
||||
point.pos = 0;
|
||||
if (image_style->draw_start_color_) point.color_ref = image_style->draw_start_color_->get_hex_value();
|
||||
if (image_style->draw_start_intensity_) point.opacity = image_style->draw_start_intensity_->get_value();
|
||||
//if (image_style->draw_start_intensity_) point.opacity = image_style->draw_start_intensity_->get_value();
|
||||
|
||||
fill->colors.push_back(point);
|
||||
|
||||
point.pos = 100;
|
||||
if (image_style->draw_end_color_) point.color_ref = image_style->draw_end_color_->get_hex_value();
|
||||
if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
//if (image_style->draw_end_intensity_) point.opacity = image_style->draw_end_intensity_->get_value();
|
||||
|
||||
fill->colors.push_back(point);
|
||||
|
||||
|
||||
@ -855,8 +855,7 @@ void common_draw_docx_convert(oox::docx_conversion_context & Context, union_comm
|
||||
}
|
||||
|
||||
if (drawing->styleWrap && drawing->styleWrap->get_type() == style_wrap::RunThrough
|
||||
&& styleRunThrough && styleRunThrough->get_type() == run_through::Background
|
||||
)
|
||||
&& styleRunThrough && styleRunThrough->get_type() == run_through::Background)
|
||||
{
|
||||
drawing-> behindDoc = L"1";
|
||||
}
|
||||
|
||||
@ -99,10 +99,32 @@ void draw_shape::common_docx_convert(oox::docx_conversion_context & Context)
|
||||
oox::_oox_fill fill;
|
||||
Compute_GraphicFill(graphicProp->common_draw_fill_attlist_, graphicProp->style_background_image_,
|
||||
Context.root()->odf_context().drawStyles(), fill);
|
||||
std::wstringstream strm;
|
||||
oox::oox_serialize_fill(strm, fill, L"w14");
|
||||
std::wstring textFill = strm.str();
|
||||
if ((fill.bitmap) && (fill.bitmap->rId.empty()))
|
||||
{
|
||||
std::wstring href = fill.bitmap->xlink_href_;
|
||||
fill.bitmap->rId = Context.get_mediaitems().add_or_find(href, oox::typeImage, fill.bitmap->isInternal, href);
|
||||
}
|
||||
|
||||
std::wstringstream strm_fill, strm_ln;
|
||||
oox::oox_serialize_fill(strm_fill, fill, L"w14");
|
||||
std::wstring textFill = strm_fill.str();
|
||||
|
||||
std::vector<_property> props;
|
||||
graphicProp->apply_to(props);
|
||||
|
||||
oox::oox_serialize_ln(strm_ln, props, false, L"w14");
|
||||
std::wstring textLn = strm_ln.str();
|
||||
|
||||
std::wstring text_props;
|
||||
if (!textLn.empty())
|
||||
{
|
||||
text_props += textLn;
|
||||
}
|
||||
if (!textFill.empty())
|
||||
{
|
||||
text_props += L"<w14:textFill>" + textFill + L"</w14:textFill>";
|
||||
}
|
||||
Context.set_drawing_text_props(text_props);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -200,7 +200,11 @@ odf_document::Impl::Impl(const std::wstring & srcPath, const std::wstring & temp
|
||||
|
||||
if (false == map_encryptions_.empty())
|
||||
{
|
||||
if (password.empty()) return;
|
||||
if (password.empty())
|
||||
{
|
||||
bError = true;
|
||||
return;
|
||||
}
|
||||
|
||||
//decrypt files
|
||||
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(tempPath);
|
||||
@ -286,17 +290,22 @@ bool odf_document::Impl::decrypt_folder (const std::wstring &password, const std
|
||||
bool result = true;
|
||||
for (size_t i = 0; i < arFiles.size(); ++i)
|
||||
{
|
||||
result = false;
|
||||
std::wstring sFileName = NSFile::GetFileName(arFiles[i]);
|
||||
|
||||
std::map<std::wstring, std::pair<office_element_ptr, int>>::iterator pFind = map_encryptions_.find(arFiles[i]);
|
||||
if ( pFind != map_encryptions_.end() )
|
||||
std::map<std::wstring, std::pair<office_element_ptr, int>>::iterator pFind;
|
||||
if (false == map_encryptions_.empty())
|
||||
{
|
||||
result = decrypt_file(password, arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName, pFind->second.first, pFind->second.second);
|
||||
|
||||
if (false == result)
|
||||
break;
|
||||
pFind = map_encryptions_.find(arFiles[i]);
|
||||
if ( pFind != map_encryptions_.end() )
|
||||
{
|
||||
result = decrypt_file(password, arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName, pFind->second.first, pFind->second.second);
|
||||
|
||||
if (false == result)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!result && false == map_encryptions_extra_.empty())
|
||||
{
|
||||
pFind = map_encryptions_extra_.find(arFiles[i]);
|
||||
if ( pFind != map_encryptions_.end() )
|
||||
@ -306,10 +315,11 @@ bool odf_document::Impl::decrypt_folder (const std::wstring &password, const std
|
||||
if (false == result)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSFile::CFileBinary::Copy(arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName);
|
||||
}
|
||||
}
|
||||
if (!result)
|
||||
{
|
||||
NSFile::CFileBinary::Copy(arFiles[i], dstPath + FILE_SEPARATOR_STR + sFileName);
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; result && i < arDirectories.size(); ++i)
|
||||
|
||||
@ -52,7 +52,7 @@ COfficePPTFile::~COfficePPTFile()
|
||||
CloseFile();
|
||||
}
|
||||
|
||||
long COfficePPTFile::OpenFile(const std::wstring & sFileName, const std::wstring & password, bool &bMacros)
|
||||
_UINT32 COfficePPTFile::OpenFile(const std::wstring & sFileName, const std::wstring & password, bool &bMacros)
|
||||
{
|
||||
CloseFile();
|
||||
|
||||
@ -103,14 +103,14 @@ bool COfficePPTFile::CloseFile()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros)
|
||||
_UINT32 COfficePPTFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros)
|
||||
{
|
||||
if (m_strTempDirectory.empty())
|
||||
{
|
||||
m_strTempDirectory = NSDirectory::GetTempPath();
|
||||
}
|
||||
|
||||
long nResult = OpenFile(sSrcFileName, password, bMacros);
|
||||
_UINT32 nResult = OpenFile(sSrcFileName, password, bMacros);
|
||||
if (nResult != S_OK)
|
||||
{
|
||||
CloseFile();
|
||||
|
||||
@ -66,9 +66,9 @@ public:
|
||||
return m_strTempDirectory;
|
||||
}
|
||||
|
||||
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros);
|
||||
_UINT32 LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring password, bool &bMacros);
|
||||
|
||||
long OpenFile(const std::wstring & fileName, const std::wstring & password, bool &bMacros);
|
||||
_UINT32 OpenFile(const std::wstring & fileName, const std::wstring & password, bool &bMacros);
|
||||
bool CloseFile();
|
||||
private:
|
||||
|
||||
|
||||
@ -74,9 +74,9 @@ public:
|
||||
|
||||
~CPPTXFile();
|
||||
|
||||
HRESULT LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions);
|
||||
_UINT32 LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions);
|
||||
|
||||
HRESULT SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions);
|
||||
_UINT32 SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions);
|
||||
|
||||
HRESULT get_TempDirectory(std::wstring* pVal);
|
||||
HRESULT put_TempDirectory(std::wstring newVal);
|
||||
@ -96,8 +96,9 @@ public:
|
||||
HRESULT SetThemesDir (std::wstring bsDir);
|
||||
HRESULT SetUseSystemFonts (bool useSystemFonts);
|
||||
void SetIsNoBase64 (bool bIsNoBase64);
|
||||
HRESULT OpenFileToPPTY (std::wstring bsInput, std::wstring bsOutput);
|
||||
HRESULT OpenDirectoryToPPTY (std::wstring bsInput, std::wstring bsOutput);
|
||||
HRESULT ConvertPPTYToPPTX (std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder);
|
||||
|
||||
_UINT32 OpenFileToPPTY (std::wstring bsInput, std::wstring bsOutput);
|
||||
_UINT32 OpenDirectoryToPPTY (std::wstring bsInput, std::wstring bsOutput);
|
||||
_UINT32 ConvertPPTYToPPTX (std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder);
|
||||
};
|
||||
#endif //ASC_OFFICE_PPTX_FILE
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "Editor/PPTXWriter.h"
|
||||
|
||||
#include "PPTXFormat/PPTXEvent.h"
|
||||
#include "../Common/OfficeFileErrorDescription.h"
|
||||
|
||||
CPPTXFile::CPPTXFile(extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg)
|
||||
{
|
||||
@ -82,20 +83,20 @@ CPPTXFile::~CPPTXFile()
|
||||
{
|
||||
RELEASEOBJECT(m_pPptxDocument);
|
||||
}
|
||||
HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions)
|
||||
_UINT32 CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath, std::wstring sXMLOptions)
|
||||
{
|
||||
std::wstring localTempDir(sDstPath);
|
||||
if(!localTempDir.empty())
|
||||
{
|
||||
bool res = NSDirectory::CreateDirectory(localTempDir);
|
||||
if (res == false) return S_FALSE;
|
||||
if (res == false) return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
|
||||
put_TempDirectory(sDstPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool res = NSDirectory::CreateDirectory(m_strTempDir);
|
||||
if (res == false) return S_FALSE;
|
||||
if (res == false) return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
localTempDir = m_strTempDir;
|
||||
|
||||
@ -103,7 +104,7 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
|
||||
if (m_pCallbackArg)
|
||||
{
|
||||
if(!m_fCallbackExtract(m_pCallbackArg, srcFileName , localTempDir))
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -116,19 +117,19 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
|
||||
if(!m_pPptxDocument->isValid(localTempDir))
|
||||
{
|
||||
RELEASEOBJECT(m_pPptxDocument);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
m_pPptxDocument->read(localTempDir, (PPTX::IPPTXEvent*)this);
|
||||
if(GetPercent() < 1000000)
|
||||
{
|
||||
RELEASEOBJECT(m_pPptxDocument);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
smart_ptr<PPTX::Presentation> presentation = m_pPptxDocument->Get(OOX::Presentation::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (!presentation.is_init())
|
||||
{
|
||||
NSDirectory::DeleteDirectory(m_strTempDir, false);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
|
||||
m_strDirectory = sSrcFileName;
|
||||
@ -136,12 +137,12 @@ HRESULT CPPTXFile::LoadFromFile(std::wstring sSrcFileName, std::wstring sDstPath
|
||||
if (-1 != nIndex)
|
||||
m_strDirectory = m_strDirectory.substr(0, nIndex);
|
||||
|
||||
return S_OK;
|
||||
return 0;
|
||||
}
|
||||
HRESULT CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions)
|
||||
_UINT32 CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath, std::wstring sXMLOptions)
|
||||
{
|
||||
if (NULL == m_pPptxDocument)
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
|
||||
OOX::CPath oPath;
|
||||
oPath.m_strFilename = std::wstring(sSrcPath);
|
||||
@ -149,7 +150,7 @@ HRESULT CPPTXFile::SaveToFile(std::wstring sDstFileName, std::wstring sSrcPath,
|
||||
|
||||
std::wstring srcFilePath = sSrcPath;
|
||||
std::wstring dstFileName = sDstFileName;
|
||||
return m_fCallbackCompress ? (m_fCallbackCompress(m_pCallbackArg, srcFilePath, dstFileName) ? S_OK : S_FALSE) : S_OK;
|
||||
return m_fCallbackCompress ? (m_fCallbackCompress(m_pCallbackArg, srcFilePath, dstFileName) ? 0 : AVS_FILEUTILS_ERROR_CONVERT) : 0;
|
||||
}
|
||||
HRESULT CPPTXFile::get_TempDirectory(std::wstring* pVal)
|
||||
{
|
||||
@ -237,7 +238,7 @@ void CPPTXFile::SetIsNoBase64(bool bIsNoBase64)
|
||||
{
|
||||
m_bIsNoBase64 = bIsNoBase64;
|
||||
}
|
||||
HRESULT CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
|
||||
_UINT32 CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
|
||||
{
|
||||
if (m_strTempDir.empty())
|
||||
{
|
||||
@ -268,14 +269,14 @@ HRESULT CPPTXFile::OpenFileToPPTY(std::wstring bsInput, std::wstring bsOutput)
|
||||
}
|
||||
std::wstring bsLocalInputTemp= pathLocalInputTemp.GetPath();
|
||||
|
||||
HRESULT hr = OpenDirectoryToPPTY(bsLocalInputTemp, bsOutput);
|
||||
_UINT32 hr = OpenDirectoryToPPTY(bsLocalInputTemp, bsOutput);
|
||||
|
||||
if (notDeleteInput == false)
|
||||
NSDirectory::DeleteDirectory(pathLocalInputTemp.GetPath());
|
||||
|
||||
return hr;
|
||||
}
|
||||
HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutput)
|
||||
_UINT32 CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutput)
|
||||
{
|
||||
OOX::CPath pathInputDirectory = bsInput;
|
||||
|
||||
@ -285,20 +286,20 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutp
|
||||
if (!m_pPptxDocument->isValid(pathInputDirectory.GetPath())) // true ???
|
||||
{
|
||||
RELEASEOBJECT(m_pPptxDocument);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
|
||||
m_pPptxDocument->read(pathInputDirectory.GetPath() + FILE_SEPARATOR_STR, (PPTX::IPPTXEvent*)this);
|
||||
if(GetPercent() < 1000000)
|
||||
{
|
||||
RELEASEOBJECT(m_pPptxDocument);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
smart_ptr<PPTX::Presentation> presentation = m_pPptxDocument->Get(OOX::Presentation::FileTypes::Presentation).smart_dynamic_cast<PPTX::Presentation>();
|
||||
if (!presentation.is_init())
|
||||
{
|
||||
NSDirectory::DeleteDirectory(m_strTempDir, false);
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
|
||||
m_strDirectory = pathInputDirectory.GetDirectory();
|
||||
@ -335,7 +336,7 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(std::wstring bsInput, std::wstring bsOutp
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder)//bsOutput и файл и директория может быть
|
||||
_UINT32 CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput, std::wstring bsThemesFolder)//bsOutput и файл и директория может быть
|
||||
{
|
||||
OOX::CPath pathLocalTempDirectory;
|
||||
|
||||
@ -368,14 +369,15 @@ HRESULT CPPTXFile::ConvertPPTYToPPTX(std::wstring bsInput, std::wstring bsOutput
|
||||
oWriter.OpenPPTY(pSrcBuffer, lFileSize, srcFolder, bsThemesFolder);
|
||||
|
||||
RELEASEARRAYOBJECTS(pSrcBuffer);
|
||||
HRESULT hRes = S_OK;
|
||||
|
||||
_UINT32 hRes = 0;
|
||||
|
||||
if (m_fCallbackCompress)
|
||||
{
|
||||
std::wstring strOutput = bsOutput;
|
||||
std::wstring strInput = pathLocalTempDirectory.GetPath();
|
||||
|
||||
hRes = m_fCallbackCompress(m_pCallbackArg, strInput, strOutput) ? S_OK : S_FALSE;
|
||||
hRes = m_fCallbackCompress(m_pCallbackArg, strInput, strOutput) ? 0 : AVS_FILEUTILS_ERROR_CONVERT;
|
||||
|
||||
NSDirectory::DeleteDirectory(strInput);
|
||||
}
|
||||
|
||||
@ -39,6 +39,8 @@
|
||||
#include "Writer/OOXWriter.h"
|
||||
#include "Reader/OOXReader.h"
|
||||
|
||||
#include "../../../Common/OfficeFileErrorDescription.h"
|
||||
|
||||
const double g_cdMaxReadRtfPercent = 0.70;
|
||||
const double g_cdMaxWriteRtfPercent = 0.30;
|
||||
const double g_cdMaxReadOoxPercent = 0.70;
|
||||
@ -50,7 +52,7 @@ const double g_cdMaxWriteOoxPercent = 0.30;
|
||||
#pragma comment(lib, "Gdi32.lib")
|
||||
#endif
|
||||
|
||||
HRESULT RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath )
|
||||
_UINT32 RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath )
|
||||
{
|
||||
m_bParseFirstItem = true;
|
||||
|
||||
@ -91,11 +93,11 @@ HRESULT RtfConvertationManager::ConvertRtfToOOX( std::wstring sSrcFileName, std:
|
||||
NSDirectory::DeleteDirectory(oWriter.m_sTempFolder);
|
||||
|
||||
if( true == succes )
|
||||
return S_OK;
|
||||
return 0;
|
||||
else
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
HRESULT RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath )
|
||||
_UINT32 RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath )
|
||||
{
|
||||
m_bParseFirstItem = true;
|
||||
|
||||
@ -127,8 +129,8 @@ HRESULT RtfConvertationManager::ConvertOOXToRtf( std::wstring sDstFileName, std:
|
||||
NSDirectory::DeleteDirectory(oReader.m_sTempFolder);
|
||||
NSDirectory::DeleteDirectory(oWriter.m_sTempFolder);
|
||||
|
||||
if( true == succes) return S_OK;
|
||||
return S_FALSE;
|
||||
if( true == succes) return 0;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
void RtfConvertationManager::OnCompleteItemRtf()
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
class OOXWriter;
|
||||
class OOXReader;
|
||||
@ -54,9 +55,9 @@ public:
|
||||
m_poRtfReader = NULL;
|
||||
}
|
||||
|
||||
long ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath);
|
||||
_UINT32 ConvertRtfToOOX( std::wstring sSrcFileName, std::wstring sDstPath);
|
||||
|
||||
long ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath);
|
||||
_UINT32 ConvertOOXToRtf( std::wstring sDstFileName, std::wstring sSrcPath);
|
||||
|
||||
void OnCompleteItemRtf();
|
||||
void OnCompleteItemOOX();
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/App.h"
|
||||
#include "../../../Common/DocxFormat/Source/DocxFormat/Core.h"
|
||||
#include "../../../DesktopEditor/common/SystemUtils.h"
|
||||
|
||||
#include "../../../Common/OfficeFileErrorDescription.h"
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
class CDrawingConverter;
|
||||
@ -106,10 +106,10 @@ static int ParseTxtOptions(const std::wstring & sXmlOptions)
|
||||
}
|
||||
|
||||
|
||||
HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions)
|
||||
_UINT32 CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions)
|
||||
{
|
||||
Writers::FileWriter *pDocxWriter = new Writers::FileWriter(sDstPath, L"", true, 1, false, NULL, L"");
|
||||
if (pDocxWriter == NULL) return S_FALSE;
|
||||
if (pDocxWriter == NULL) return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
|
||||
CreateDocxEmpty(sDstPath, pDocxWriter);
|
||||
|
||||
@ -127,7 +127,7 @@ HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const s
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
|
||||
pDocxWriter->m_oDocumentWriter.Write(); //overwrite document.xml
|
||||
@ -135,11 +135,11 @@ HRESULT CTxtXmlFile::txt_LoadFromFile(const std::wstring & sSrcFileName, const s
|
||||
delete pDocxWriter;
|
||||
pDocxWriter = NULL;
|
||||
|
||||
return S_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions)
|
||||
_UINT32 CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -170,10 +170,10 @@ HRESULT CTxtXmlFile::txt_SaveToFile(const std::wstring & sDstFileName, const std
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return S_FALSE;
|
||||
return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -51,8 +51,8 @@ class CTxtXmlFile : public TxtXml::ITxtXmlEvent
|
||||
public:
|
||||
virtual bool Progress(long ID, long Percent);
|
||||
|
||||
HRESULT txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions);
|
||||
HRESULT txt_SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions);
|
||||
_UINT32 txt_LoadFromFile(const std::wstring & sSrcFileName, const std::wstring & sDstPath, const std::wstring & sXMLOptions);
|
||||
_UINT32 txt_SaveToFile (const std::wstring & sDstFileName, const std::wstring & sSrcPath, const std::wstring & sXMLOptions);
|
||||
|
||||
CTxtXmlFile();
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include "../../../Common/OfficeFileErrorDescription.h"
|
||||
|
||||
|
||||
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const std::wstring & tempPath, const ProgressCallback* pCallBack, bool &bMacros)
|
||||
_UINT32 ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring & fontsPath, const std::wstring & tempPath, const ProgressCallback* pCallBack, bool &bMacros)
|
||||
{
|
||||
XlsConverter converter(srcFile, dstPath, password, fontsPath, tempPath, pCallBack, bMacros);
|
||||
|
||||
|
||||
@ -30,7 +30,8 @@
|
||||
*
|
||||
*/
|
||||
#include <string>
|
||||
#include "../../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
long ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const std::wstring & tempPath, const ProgressCallback* CallBack, bool & bMacros);
|
||||
_UINT32 ConvertXls2Xlsx(const std::wstring & srcFile, const std::wstring & dstPath, const std::wstring & password, const std::wstring& fontsPath, const std::wstring & tempPath, const ProgressCallback* CallBack, bool & bMacros);
|
||||
@ -34,9 +34,9 @@
|
||||
#include "../DesktopEditor/common/File.h"
|
||||
#include "../OfficeUtils/src/OfficeUtils.h"
|
||||
|
||||
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
#include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
|
||||
#endif
|
||||
//#if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
// #include "../ASCOfficePPTFile/PPTFormatLib/PPTFormatLib.h"
|
||||
//#endif
|
||||
|
||||
#include "3dParty/pole/pole.h"
|
||||
#include <algorithm>
|
||||
@ -362,17 +362,17 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & _fileName)
|
||||
}
|
||||
else if ( isPptFormatFile(&storage) )
|
||||
{
|
||||
#if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
COfficePPTFile pptFile;
|
||||
|
||||
bMacroEnabled = true;
|
||||
long nResult = pptFile.OpenFile(fileName, L"", bMacroEnabled);
|
||||
if (nResult != S_OK)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
pptFile.CloseFile();
|
||||
#endif
|
||||
//#if defined FILE_FORMAT_CHECKER_WITH_MACRO
|
||||
// COfficePPTFile pptFile;
|
||||
//
|
||||
// bMacroEnabled = true;
|
||||
// long nResult = pptFile.OpenFile(fileName, L"", bMacroEnabled);
|
||||
// if (nResult != S_OK)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
// pptFile.CloseFile();
|
||||
//#endif
|
||||
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_PPT;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -35,6 +35,10 @@
|
||||
#include "../common/Types.h"
|
||||
#include "../common/File.h"
|
||||
|
||||
#ifdef GetCharWidth
|
||||
#undef GetCharWidth
|
||||
#endif
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
@ -914,6 +918,25 @@ TFontCacheSizes CFontFile::GetChar(LONG lUnicode)
|
||||
return oSizes;
|
||||
}
|
||||
|
||||
double CFontFile::GetCharWidth(int gid)
|
||||
{
|
||||
if (!m_pFace)
|
||||
return 0;
|
||||
|
||||
if (0 != FT_Load_Glyph(m_pFace, gid, 40970))
|
||||
return 0;
|
||||
|
||||
FT_Glyph pGlyph = NULL;
|
||||
if (0 != FT_Get_Glyph(m_pFace->glyph, &pGlyph))
|
||||
return 0;
|
||||
|
||||
double dRet = (double)(m_pFace->glyph->linearHoriAdvance * m_dUnitsKoef / m_pFace->units_per_EM);
|
||||
|
||||
FT_Done_Glyph(pGlyph);
|
||||
|
||||
return dRet;
|
||||
}
|
||||
|
||||
INT CFontFile::GetString(CGlyphString& oString)
|
||||
{
|
||||
int nCountGlyph = oString.GetLength();
|
||||
|
||||
@ -239,6 +239,8 @@ public:
|
||||
int SetCMapForCharCode(long lUnicode, int *pnCMapIndex);
|
||||
int SetCMapForCharCode2(long lUnicode);
|
||||
|
||||
double GetCharWidth(int gid);
|
||||
|
||||
int GetKerning(FT_UInt unPrevGID, FT_UInt unGID);
|
||||
void SetStringGID(const INT& bGID);
|
||||
INT GetStringGID();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
@ -256,7 +256,7 @@ namespace NSCommon
|
||||
int nCount = 1;
|
||||
++tmp;
|
||||
|
||||
while (nMask == *tmp && tmp < tmpLast)
|
||||
while (tmp < tmpLast && nMask == *tmp)
|
||||
{
|
||||
++tmp;
|
||||
nCount++;
|
||||
@ -537,12 +537,13 @@ namespace NSCommon
|
||||
pRenderer->put_FontFaceIndex(lFaceIndex);
|
||||
pManager->LoadFontFromFile(strFontPath, lFaceIndex, 14, dDpi, dDpi);
|
||||
|
||||
bool bIsSymbol = FALSE;
|
||||
bool bIsSymbol = false;
|
||||
NSFonts::IFontFile* pFile = pManager->GetFile();
|
||||
|
||||
if (pManager->GetFile())
|
||||
{
|
||||
bIsSymbol = pManager->GetFile()->IsSymbolic(false);
|
||||
}
|
||||
if (pFile)
|
||||
bIsSymbol = pFile->IsSymbolic(false);
|
||||
|
||||
std::wstring sFontName = pPair->second.m_sName;
|
||||
|
||||
if (bIsSymbol)
|
||||
{
|
||||
@ -557,6 +558,45 @@ namespace NSCommon
|
||||
pRenderer->put_FontPath(pInfoCur->m_wsFontPath);
|
||||
pRenderer->put_FontFaceIndex(0);
|
||||
}
|
||||
else if (pFile)
|
||||
{
|
||||
int nFontNameLen = (int)sFontName.length();
|
||||
bool bIsPresentAll = true;
|
||||
|
||||
for (int nC = 0; nC < nFontNameLen; nC++)
|
||||
{
|
||||
int nCMapIndex = 0;
|
||||
int nGid = pFile->SetCMapForCharCode(sFontName.at(nC), &nCMapIndex);
|
||||
if (0 >= nGid)
|
||||
{
|
||||
bIsPresentAll = false;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
double offsetG = pFile->GetCharWidth(nGid);
|
||||
if (offsetG < 0.0001)
|
||||
{
|
||||
bIsPresentAll = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!bIsPresentAll)
|
||||
{
|
||||
NSFonts::CFontSelectFormat oSelectFormat;
|
||||
oSelectFormat.wsName = new std::wstring(L"Arial");
|
||||
NSFonts::CFontInfo* pInfoCur = pManager->GetFontInfoByParams(oSelectFormat);
|
||||
|
||||
if (NULL != pInfoCur)
|
||||
{
|
||||
pManager->LoadFontFromFile(pInfoCur->m_wsFontPath, 0, 14, dDpi, dDpi);
|
||||
}
|
||||
pRenderer->put_FontPath(pInfoCur->m_wsFontPath);
|
||||
pRenderer->put_FontFaceIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
pRenderer->PathCommandStart();
|
||||
pRenderer->BeginCommand(c_nClipType);
|
||||
@ -568,7 +608,7 @@ namespace NSCommon
|
||||
pRenderer->put_FontCharSpace(0);
|
||||
pRenderer->put_FontSize(14);
|
||||
|
||||
pRenderer->CommandDrawText(pPair->second.m_sName, 5, 25.4 * (index * lH1_px + lH1_px) / dDpi - 2, 0, 0);
|
||||
pRenderer->CommandDrawText(sFontName, 5, 25.4 * (index * lH1_px + lH1_px) / dDpi - 2, 0, 0);
|
||||
|
||||
pRenderer->BeginCommand(c_nResetClipType);
|
||||
pRenderer->EndCommand(c_nResetClipType);
|
||||
|
||||
@ -488,6 +488,7 @@ namespace NSFonts
|
||||
virtual void SetFontMatrix(const double& fA, const double& fB, const double& fC, const double fD, double fE, double fF) = 0;
|
||||
|
||||
virtual int SetCMapForCharCode(long lUnicode, int *pnCMapIndex) = 0;
|
||||
virtual double GetCharWidth(int gid) = 0;
|
||||
};
|
||||
|
||||
namespace NSFontFile
|
||||
|
||||
@ -172,15 +172,24 @@ namespace PdfReader
|
||||
|
||||
if (pEncryptDict->DictLookup("OE", &oOwnerEncryptionKey))
|
||||
{
|
||||
m_seOwnerEncryptionKey = oOwnerEncryptionKey.GetString()->Copy();
|
||||
if (oOwnerEncryptionKey.IsString())
|
||||
{
|
||||
m_seOwnerEncryptionKey = oOwnerEncryptionKey.GetString()->Copy();
|
||||
}
|
||||
}
|
||||
if (pEncryptDict->DictLookup("UE", &oUserEncryptionKey))
|
||||
{
|
||||
m_seUserEncryptionKey = oUserEncryptionKey.GetString()->Copy();
|
||||
if (oUserEncryptionKey.IsString())
|
||||
{
|
||||
m_seUserEncryptionKey = oUserEncryptionKey.GetString()->Copy();
|
||||
}
|
||||
}
|
||||
if (pEncryptDict->DictLookup("Perms", &oPermsValue))
|
||||
{
|
||||
m_sePermsValue = oPermsValue.GetString()->Copy();
|
||||
if (oPermsValue.IsString())
|
||||
{
|
||||
m_sePermsValue = oPermsValue.GetString()->Copy();
|
||||
}
|
||||
}
|
||||
|
||||
if (oFileID.IsArray())
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -40,6 +40,7 @@
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include "../../Common/DocxFormat/Source/Base/Types_32.h"
|
||||
|
||||
namespace NExtractTools
|
||||
{
|
||||
@ -48,160 +49,160 @@ class InputParamsMailMerge;
|
||||
}
|
||||
namespace NExtractTools
|
||||
{
|
||||
int docx2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docx_dir2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int docx2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doct_bin2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int doct_bin2docx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 docx2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docx_dir2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 docx2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doct_bin2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 doct_bin2docx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 doct2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int dotm2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int dotm2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int dotx2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int dotx2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int docm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int dotm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int dotm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 dotm2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 dotm2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 dotx2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 dotx2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 docm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 dotm2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 dotm2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
|
||||
int xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions, const std::wstring &sXlsxFile);
|
||||
int xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int xlst2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 xlsx2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xlsx_dir2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params, bool bXmlOptions, const std::wstring &sXlsxFile);
|
||||
_UINT32 xlsx2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xlst_bin2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 xlst_bin2xlsx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 xlst2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int xltx2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xltx2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int xltm2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xltm2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int xlsm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xlsm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int xltm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xltm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 xltx2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xltx2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 xltm2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xltm2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 xlsm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xlsm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 xltm2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xltm2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
|
||||
int pptx2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int pptx2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int pptt_bin2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int pptt_bin2pptx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int pptt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 pptx2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 pptx_dir2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 pptx2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 pptt_bin2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 pptt_bin2pptx_dir (const std::wstring &sFrom, const std::wstring &sToResult, const std::wstring &sTo, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 pptt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int csv2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int csv2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int csv2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int xlst2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xlsx2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xlst_bin2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 csv2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 csv2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 csv2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 xlst2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xlsx2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xlst_bin2csv (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int bin2pdf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 bin2pdf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int ppsx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppsx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int potx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int potx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int ppsm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppsm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int potm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int potm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int ppsm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppsm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int pptm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int pptm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
int potm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int potm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 ppsx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppsx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 potx2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 potx2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 ppsm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppsm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 potm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 potm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 ppsm2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppsm2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 pptm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 pptm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
_UINT32 potm2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 potm2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, InputParams& params);
|
||||
|
||||
int ppt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppt2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppt2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppt2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppt2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int ppt2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptt_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 ppt2pptm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int rtf2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int rtf2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int rtf2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int rtf2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docx2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docx_dir2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doct2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
int doct_bin2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 rtf2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 rtf2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 rtf2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 rtf2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docx2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docx_dir2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doct2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 doct_bin2rtf (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bFromChanges, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int doc2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doc2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doc2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docx_dir2doc (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doc2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int doc2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docx_dir2doc (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2docm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 doc2docm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xls2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int xls2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlsx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlsx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlst (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlst_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlsm (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 xls2xlsm_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int txt2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int txt2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
int docx_dir2txt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 txt2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 txt2docx_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 txt2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 txt2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 docx_dir2txt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int odf2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf2oox_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf2oox_dir (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
int odf_flat2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf_flat2oox_dir(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf_flat2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int odf_flat2oot_bin(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf_flat2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf_flat2oox_dir(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf_flat2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 odf_flat2oot_bin(const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
int docx2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int docx_dir2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int xlsx2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int xlsx_dir2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int pptx2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int pptx_dir2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 docx2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 docx_dir2odt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 xlsx2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 xlsx_dir2ods (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 pptx2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 pptx_dir2odp (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
int fromMscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int mscrypt2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int mscrypt2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int mscrypt2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 fromMscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 mscrypt2oox (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 mscrypt2oot (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 mscrypt2oot_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
int oox2mscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 oox2mscrypt (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
int html2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int html2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
int html2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 html2doct_bin (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 html2doct (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
_UINT32 html2docx (const std::wstring &sFrom, const std::wstring &sTo, const std::wstring & sTemp, InputParams& params);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
int dir2zip (const std::wstring &sFrom, const std::wstring &sTo);
|
||||
int zip2dir (const std::wstring &sFrom, const std::wstring &sTo);
|
||||
_UINT32 dir2zip (const std::wstring &sFrom, const std::wstring &sTo);
|
||||
_UINT32 zip2dir (const std::wstring &sFrom, const std::wstring &sTo);
|
||||
|
||||
int convertmailmerge (const InputParamsMailMerge& oMailMergeSend,const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
|
||||
_UINT32 convertmailmerge (const InputParamsMailMerge& oMailMergeSend,const std::wstring &sFrom, const std::wstring &sTo, const std::wstring &sTemp, bool bPaid, const std::wstring &sThemeDir, InputParams& params);
|
||||
|
||||
int fromDocxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromDoctBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromDocument (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 fromDocxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromDoctBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromDocument (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, const std::wstring &sXlsxFile);
|
||||
int fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 fromXlsxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params, const std::wstring &sXlsxFile);
|
||||
_UINT32 fromXlstBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromSpreadsheet (const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromPresentation(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
_UINT32 fromPptxDir (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromPpttBin (const std::wstring &sFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromPresentation(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTemp, InputParams& params);
|
||||
|
||||
int fromT(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromCrossPlatform(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
int fromCanvasPdf(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromT(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromCrossPlatform(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
_UINT32 fromCanvasPdf(const std::wstring &sFrom, int nFormatFrom, const std::wstring &sTo, int nFormatTo, const std::wstring &sTemp, const std::wstring &sThemeDir, bool bFromChanges, bool bPaid, InputParams& params);
|
||||
|
||||
int fromInputParams(InputParams& oInputParams);
|
||||
int detectMacroInFile(InputParams& oInputParams);
|
||||
_UINT32 fromInputParams(InputParams& oInputParams);
|
||||
_UINT32 detectMacroInFile(InputParams& oInputParams);
|
||||
|
||||
X2T_DECL_EXPORT int FromFile(const std::wstring& file);
|
||||
X2T_DECL_EXPORT int FromXml(const std::wstring& xml);
|
||||
X2T_DECL_EXPORT _UINT32 FromFile(const std::wstring& file);
|
||||
X2T_DECL_EXPORT _UINT32 FromXml(const std::wstring& xml);
|
||||
}
|
||||
#endif // ASCCONVERTERS_H
|
||||
|
||||
@ -403,7 +403,7 @@ namespace NExtractTools
|
||||
}
|
||||
std::sort (aChangesFiles.begin(), aChangesFiles.end(), compare_string_by_length);
|
||||
|
||||
for(int i = 0; i < aChangesFiles.size(); ++i)
|
||||
for(size_t i = 0; i < aChangesFiles.size(); ++i)
|
||||
{
|
||||
oBuilder.WriteString(_T("<Change>"));
|
||||
oBuilder.WriteEncodeXmlString(aChangesFiles[i]);
|
||||
@ -419,7 +419,7 @@ namespace NExtractTools
|
||||
oBuilder.WriteString(_T("</Settings>"));
|
||||
return oBuilder.GetData();
|
||||
}
|
||||
int apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params)
|
||||
_UINT32 apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params)
|
||||
{
|
||||
std::wstring sBinDir = NSDirectory::GetFolderPath(sBinFrom);
|
||||
std::wstring sChangesDir = sBinDir + FILE_SEPARATOR_STR + _T("changes");
|
||||
@ -464,7 +464,7 @@ namespace NExtractTools
|
||||
{
|
||||
std::vector<std::wstring> aImages = oDoctRenderer.GetImagesInChanges();
|
||||
//todo сделать interface у COfficeUtils, чтобы можно было делать архив из файлов в разных папках.
|
||||
for(int i = 0; i < aImages.size(); ++i)
|
||||
for(size_t i = 0; i < aImages.size(); ++i)
|
||||
{
|
||||
std::wstring sImageName = aImages[i];
|
||||
std::wstring sImage = sImagesDirectory + FILE_SEPARATOR_STR + sImageName;
|
||||
|
||||
@ -677,7 +677,7 @@ namespace NExtractTools
|
||||
oLimit.uncompressed = std::stoul(oZipNode.GetAttribute(L"uncompressed", L"0"));
|
||||
oLimit.pattern = oZipNode.GetAttribute(L"template", L"");
|
||||
}
|
||||
for (int j = 0; j < aTypes.size(); ++j)
|
||||
for (size_t j = 0; j < aTypes.size(); ++j)
|
||||
{
|
||||
m_mapInputLimits[COfficeFileFormatChecker::GetFormatByExtension(L"." + aTypes[j])] = oLimit;
|
||||
}
|
||||
@ -999,7 +999,7 @@ namespace NExtractTools
|
||||
}
|
||||
return str;
|
||||
}
|
||||
static int getReturnErrorCode(int nDefine)
|
||||
static int getReturnErrorCode(_UINT32 nDefine)
|
||||
{
|
||||
return 0 == nDefine ? 0 : nDefine - AVS_ERROR_FIRST - AVS_FILEUTILS_ERROR_FIRST;
|
||||
}
|
||||
@ -1170,7 +1170,7 @@ namespace NExtractTools
|
||||
std::wstring getDoctXml(NSDoctRenderer::DoctRendererFormat::FormatFile eFromType, NSDoctRenderer::DoctRendererFormat::FormatFile eToType,
|
||||
const std::wstring& sTFileDir, const std::wstring& sPdfBinFile, const std::wstring& sImagesDirectory,
|
||||
const std::wstring& sThemeDir, int nTopIndex, const std::wstring& sMailMerge, const InputParams& params);
|
||||
int apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params);
|
||||
_UINT32 apply_changes(const std::wstring &sBinFrom, const std::wstring &sToResult, NSDoctRenderer::DoctRendererFormat::FormatFile eType, const std::wstring &sThemeDir, std::wstring &sBinTo, const InputParams& params);
|
||||
#endif
|
||||
}
|
||||
#endif // CEXTRACTTOOLS_H
|
||||
|
||||
@ -116,7 +116,7 @@ static std::wstring utf8_to_unicode(const char *src)
|
||||
if (argc >= 3) sArg2 = std::wstring(argv [2]);
|
||||
#endif
|
||||
|
||||
int result = 0;
|
||||
_UINT32 result = 0;
|
||||
std::wstring sXmlExt = _T(".xml");
|
||||
if((sArg1.length() > 3) && (sXmlExt == sArg1.substr(sArg1.length() - sXmlExt.length(), sXmlExt.length())))
|
||||
{
|
||||
|
||||
@ -4764,10 +4764,10 @@ namespace BinXlsxRW
|
||||
{
|
||||
RELEASEOBJECT(m_oBcw);
|
||||
}
|
||||
int Open(const std::wstring& sInputDir, const std::wstring& sFileDst, NSFontCutter::CEmbeddedFontsManager* pEmbeddedFontsManager,
|
||||
_UINT32 Open(const std::wstring& sInputDir, const std::wstring& sFileDst, NSFontCutter::CEmbeddedFontsManager* pEmbeddedFontsManager,
|
||||
NSBinPptxRW::CDrawingConverter* pOfficeDrawingConverter, const std::wstring& sXMLOptions, bool bIsNoBase64)
|
||||
{
|
||||
int result = 0;
|
||||
_UINT32 result = 0;
|
||||
|
||||
OOX::CPath path(sFileDst);
|
||||
//создаем папку для media
|
||||
|
||||
@ -225,7 +225,7 @@ namespace CSVReader
|
||||
pCell->setRowCol(nRow, nCol);
|
||||
oRow.m_arrItems.push_back(pCell);
|
||||
}
|
||||
int ReadFromCsvToXlsx(const std::wstring &sFileName, OOX::Spreadsheet::CXlsx &oXlsx, UINT nCodePage, const std::wstring& sDelimiter)
|
||||
_UINT32 ReadFromCsvToXlsx(const std::wstring &sFileName, OOX::Spreadsheet::CXlsx &oXlsx, UINT nCodePage, const std::wstring& sDelimiter)
|
||||
{
|
||||
NSFile::CFileBinary oFile;
|
||||
if (false == oFile.OpenFile(sFileName)) return AVS_FILEUTILS_ERROR_CONVERT;
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
namespace CSVReader
|
||||
{
|
||||
void AddCell(std::wstring &sText, INT nStartCell, std::stack<INT> &oDeleteChars, OOX::Spreadsheet::CRow &oRow, INT nRow, INT nCol, bool bIsWrap);
|
||||
int ReadFromCsvToXlsx(const std::wstring &sFileName, OOX::Spreadsheet::CXlsx &oXlsx, UINT nCodePage, const std::wstring& wcDelimiter);
|
||||
_UINT32 ReadFromCsvToXlsx(const std::wstring &sFileName, OOX::Spreadsheet::CXlsx &oXlsx, UINT nCodePage, const std::wstring& wcDelimiter);
|
||||
}
|
||||
|
||||
#endif //CSV_READER
|
||||
|
||||
Reference in New Issue
Block a user