Compare commits

..

12 Commits

Author SHA1 Message Date
4a9abce180 Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  .
  x2t version up
2017-09-20 14:21:11 +03:00
a78711a19c fix build for ios11 2017-09-20 14:21:04 +03:00
04e4f1adae Merge remote-tracking branch 'origin/hotfix/v5.0.1' into develop 2017-09-20 10:03:11 +03:00
b69051a5b4 . 2017-09-20 10:04:34 +03:00
6e15370af2 x2t version up 2017-09-19 19:46:10 +03:00
57465b60bf Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop
* 'develop' of https://github.com/ONLYOFFICE/core:
  OdfFormatReader - support pilot(pivot) tables add flat open office formats ...
2017-09-19 19:33:48 +03:00
24d58fe189 fix for build 2017-09-19 19:33:41 +03:00
56bb39f716 Merge remote-tracking branch 'origin/hotfix/v5.0.1' into develop 2017-09-19 18:21:33 +03:00
60bcca0090 OdfFormatReader - support pilot(pivot) tables
add flat open office formats
...
2017-09-19 18:20:33 +03:00
92ce863bdf v5.0.0 2017-09-19 17:04:56 +03:00
48d4b72d4b Merge pull request #39 from ONLYOFFICE/release/v5.0.0
xhtml bug
2017-09-18 10:35:39 +03:00
85de7ec7a6 xhtml bug 2017-09-15 19:07:14 +03:00
110 changed files with 2870 additions and 831 deletions

View File

@ -902,7 +902,7 @@ namespace DocFileFormat
{
int shape_type = oPicture.shapeContainer->getShapeType();
if (shape_type != msosptPictureFrame) picture = false;
if (shape_type != msosptPictureFrame) picture = false;//шаблон 1.doc картинка в колонтитуле
}
if (picture)

View File

@ -149,7 +149,14 @@ namespace DocFileFormat
point.y = guides[index].param3;
}
}
if ((size_t)point.y > 0xffff)
{
point.y &= 0xffff;
}
if ((size_t)point.x > 0xffff)
{
point.x &= 0xffff;
}
m_arPoints.push_back(point);
}
}

View File

@ -63,8 +63,25 @@ namespace DocFileFormat
Shape* sh = dynamic_cast<Shape*>( *iter );
if (sh)
{
if (sh->shapeType) return sh->shapeType->GetTypeCode();
else return 0;
if (sh->shapeType)
{
return sh->shapeType->GetTypeCode();
}
else
{
for ( std::vector<Record*>::const_iterator iter1 = this->Children.begin(); iter1 != this->Children.end(); iter1++ )
{
ShapeOptions* sh_options = dynamic_cast<ShapeOptions*>( *iter1 );
if (sh_options)
{
if (sh_options->OptionsByID.end() != sh_options->OptionsByID.find(Pib))
{
return msosptPictureFrame;
}
}
}
return 0;
}
}
}
return 0;

View File

@ -314,7 +314,7 @@
17E17ED41AC453F800BEA2EA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17E17ED71AC453F800BEA2EA /* Build configuration list for PBXProject "ASCOfficeDocxFile2Lib" */;
@ -441,14 +441,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -470,7 +476,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -486,14 +492,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -509,7 +521,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -34,9 +34,11 @@
#include <stdio.h>
#include <tchar.h>
#include "../../Common/OfficeFileFormatChecker.h"
#include "../../OfficeUtils/src/OfficeUtils.h"
#include "../../DesktopEditor/common/Directory.h"
#include "../src/ConvertOO2OOX.h"
#include "../include/logging.h"
#if defined(_WIN64)
@ -45,30 +47,55 @@
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
int _tmain(int argc, _TCHAR* argv[])
HRESULT convert_single(std::wstring srcFileName)
{
if (argc < 2) return 1;
HRESULT hr = S_OK;
//////////////////////////////////////////////////////////////////////////
std::wstring srcFileName = argv[1];
std::wstring dstPath = argc > 2 ? argv[2] : srcFileName + L"-my.docx"; //xlsx pptx docx
COfficeFileFormatChecker fileChecker(srcFileName);
std::wstring dstPath = srcFileName;// + ; //xlsx pptx docx
switch(fileChecker.nFileType)
{
case AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT:
case AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT_FLAT: dstPath += L"-my.docx"; break;
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS:
case AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS_FLAT: dstPath += L"-my.xlsx"; break;
case AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP:
case AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP_FLAT: dstPath += L"-my.pptx"; break;
default:
return S_FALSE;
}
//---------------------------------------------------------------------------------------------------
COfficeUtils oCOfficeUtils(NULL);
std::wstring outputDir = NSDirectory::GetFolderPath(dstPath);
std::wstring srcTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
std::wstring dstTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
std::wstring srcTempPath;
// распаковываем исходник во временную директорию
COfficeUtils oCOfficeUtils(NULL);
if (S_OK != oCOfficeUtils.ExtractToDirectory(srcFileName.c_str(), srcTempPath.c_str(), NULL, 0))
return S_FALSE;
if (fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT ||
fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS ||
fileChecker.nFileType == AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP)
{
srcTempPath = NSDirectory::CreateDirectoryWithUniqueName(outputDir);
if (S_OK != oCOfficeUtils.ExtractToDirectory(srcFileName.c_str(), srcTempPath.c_str(), NULL, 0))
return S_FALSE;
}
else // flat
{
srcTempPath = srcFileName;
}
_CP_LOG << L"[info] " << srcFileName << std::endl;
hr = ConvertOO2OOX(srcTempPath, dstTempPath, L"C:\\Windows\\Fonts", false, NULL);
NSDirectory::DeleteDirectory(srcTempPath);
if (srcTempPath != srcFileName)
{
NSDirectory::DeleteDirectory(srcTempPath);
}
if (hr != S_OK) return hr;
@ -77,6 +104,35 @@ int _tmain(int argc, _TCHAR* argv[])
NSDirectory::DeleteDirectory(dstTempPath);
////////////////////////////////////////////////////////////////////////
return 0;
return hr;
}
HRESULT convert_directory(std::wstring pathName)
{
HRESULT hr = S_OK;
std::vector<std::wstring> arFiles = NSDirectory::GetFiles(pathName, false);
for (size_t i = 0; i < arFiles.size(); i++)
{
convert_single(arFiles[i]);
}
return S_OK;
}
int _tmain(int argc, _TCHAR* argv[])
{
if (argc < 2) return 1;
HRESULT hr = -1;
if (NSFile::CFileBinary::Exists(argv[1]))
{
hr = convert_single(argv[1]);
}
else if (NSDirectory::Exists(argv[1]))
{
hr = convert_directory(argv[1]);
}
return hr;
}

View File

@ -336,6 +336,14 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\Common\OfficeFileFormatChecker.h"
>
</File>
<File
RelativePath="..\..\Common\OfficeFileFormatChecker2.cpp"
>
</File>
<File
RelativePath="..\..\Common\3dParty\pole\pole.cpp"
>

View File

@ -389,29 +389,37 @@ namespace formulasconvert {
}
std::wstring forbidden_formulas[] =
{
L"NULLFORMULA"
//L"BETADIST",
//L"CEILING",
//L"FLOOR",
//L"RANK",
//L"ROUND",
//L"ROUNDDOWN",
//L"ROUNDUP",
//L"SUBTOTAL",
//L"FORMULA",
//L"ISREF"
};
//std::wstring forbidden_formulas[] =
//{
// L"NULLFORMULA"
// //L"BETADIST",
// //L"CEILING",
// //L"FLOOR",
// //L"RANK",
// //L"ROUND",
// //L"ROUNDDOWN",
// //L"ROUNDUP",
// //L"SUBTOTAL",
// //L"FORMULA",
// //L"ISREF"
//};
bool is_forbidden(const std::wstring & formula)
std::wstring is_forbidden(const std::wstring & formula)
{
for (size_t i = 0; i < 1/*forbidden_formulas.size()*/; i++)
std::wstring result = formula;
std::map<std::wstring, std::wstring> forbidden_formulas;
forbidden_formulas.insert(std::make_pair(L"FORMULA", L"_xlfn.FORMULATEXT"));
for (std::map<std::wstring, std::wstring>::iterator it = forbidden_formulas.begin(); it != forbidden_formulas.end(); it++)
{
if (boost::algorithm::contains(formula, forbidden_formulas[i]))
return true;
if (boost::algorithm::contains(formula, it->first))
{
XmlUtils::replace_all(result, it->first, it->second);
}
}
return false;
return result;
}
// заменить вертикальную черту во всех вхождениях в фигурных скобках, но не внутри строк
@ -437,10 +445,7 @@ namespace formulasconvert {
std::wstring odf2oox_converter::Impl::convert(const std::wstring& expr)
{
if (is_forbidden(expr))
return L"NULLFORMULA()";
std::wstring workstr = expr;
std::wstring workstr = is_forbidden(expr);
//boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// Better_Donut.ods- cell(c27)
//std::wstring workstr = boost::regex_replace(
// expr,
@ -517,10 +522,8 @@ namespace formulasconvert {
std::wstring odf2oox_converter::Impl::convert_chart_distance(const std::wstring& expr)
{
if (is_forbidden(expr))
return L"NULLFORMULA()";
std::wstring workstr = is_forbidden(expr);
std::wstring workstr = expr;
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там
workstr = boost::regex_replace(

View File

@ -35,11 +35,15 @@
#include "../CPSharedPtr.h"
#include "../CPScopedPtr.h"
struct ProgressCallback;
namespace cpdoccore {
namespace xml
{
class sax;
}
namespace oox {
class docx_conversion_context;
class xlsx_conversion_context;
@ -54,9 +58,10 @@ class odf_document
{
public:
odf_document(const std::wstring & Folder, const ProgressCallback* CallBack);
~odf_document();
odf_document(xml::sax * Reader);
~odf_document();
public:
odf_read_context & odf_context();
bool docx_convert(oox::docx_conversion_context & Context);
@ -77,6 +82,7 @@ private:
_CP_SCOPED_PTR(Impl) impl_;
};
typedef shared_ptr<odf_document>::Type odf_document_ptr;
}
}

View File

@ -217,6 +217,7 @@ SOURCES += \
../src/odf/datatypes/tableorientation.cpp \
../src/odf/datatypes/tablefunction.cpp \
../src/odf/datatypes/tableorder.cpp \
../src/odf/datatypes/dategroup.cpp \
../src/docx/xlsx_conditionalFormatting.cpp \
../src/docx/xlsx_dxfs.cpp \
../src/docx/docx_content_type.cpp \

View File

@ -126,3 +126,4 @@
#include "../src/odf/datatypes/tableorientation.cpp"
#include "../src/odf/datatypes/tablefunction.cpp"
#include "../src/odf/datatypes/tableorder.cpp"
#include "../src/odf/datatypes/dategroup.cpp"

View File

@ -97,14 +97,6 @@ HRESULT ConvertOO2OOX(const std::wstring & srcPath, const std::wstring & dstPath
if (encrypted) return AVS_ERROR_DRM;
//if (type<1)
//{
// if (ext == L".odt")type = 1;
// if (ext == L".ods")type = 2;
// if (ext == L".odp")type = 3;
//}
if (bOnlyPresentation && type != 3)return AVS_ERROR_UNEXPECTED;
switch (type)

View File

@ -127,6 +127,7 @@ public:
if (sExt == L"m4v") return typeVideo;
if (sExt == L"mp4") return typeVideo;
if (sExt == L"mov") return typeVideo;
if (sExt == L"mkv") return typeVideo;
return typeMedia;
}

View File

@ -118,6 +118,23 @@ void oox_chart_context::serialize(std::wostream & strm)
{
CP_XML_ATTR(L"val",L"en-US");
}
if (pivot_source_.empty() == false)
{
set_cache_only(true);
CP_XML_NODE(L"c:pivotSource")
{
CP_XML_NODE(L"c:name")
{
CP_XML_STREAM() << pivot_source_;
}
CP_XML_NODE(L"c:fmtId")
{
CP_XML_ATTR(L"val", 0);
}
}
}
CP_XML_NODE(L"c:chart")
{
if (plot_area_.current_chart_->is3D_)
@ -148,10 +165,42 @@ void oox_chart_context::serialize(std::wostream & strm)
shape.set(graphic_properties_, fill_);
shape.oox_serialize(CP_XML_STREAM());
if (pivot_source_.empty() == false)
{
CP_XML_NODE(L"c:extLst")
{
CP_XML_NODE(L"c:ext")
{
CP_XML_ATTR(L"uri", L"{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}");
CP_XML_ATTR(L"xmlns:c14", L"http://schemas.microsoft.com/office/drawing/2007/8/2/chart");
CP_XML_NODE(L"c14:pivotOptions")
{
CP_XML_NODE(L"c14:dropZoneFilter")
{
CP_XML_ATTR(L"val", 1);
}
CP_XML_NODE(L"c14:dropZoneCategories")
{
CP_XML_ATTR(L"val", 1);
}
CP_XML_NODE(L"c14:dropZoneData")
{
CP_XML_ATTR(L"val", 1);
}
CP_XML_NODE(L"c14:dropZoneSeries")
{
CP_XML_ATTR(L"val", 1);
}
CP_XML_NODE(L"c14:dropZonesVisible")
{
CP_XML_ATTR(L"val", 1);
}
}
}
}
}
}
}
}
oox_chart_context::~oox_chart_context()
@ -160,7 +209,7 @@ oox_chart_context::~oox_chart_context()
void oox_chart_context::set_cache_only (bool val)
{
for (int i = 0 ; i < plot_area_.charts_.size(); i++)
for (size_t i = 0 ; i < plot_area_.charts_.size(); i++)
{
plot_area_.charts_[i]->set_cache_only(val);
}

View File

@ -63,6 +63,10 @@ public:
void serialize(std::wostream & strm);
void dump_rels(rels & Rels);
void set_pivot_chart(const std::wstring &source)
{
pivot_source_ = source;
}
void set_title(odf_reader::chart::title & t)
{
title_.set_content(t);
@ -130,6 +134,8 @@ private:
cpdoccore::oox::oox_plot_area plot_area_;
cpdoccore::oox::oox_chart_legend legend_;
std::wstring pivot_source_;
std::vector<odf_reader::_property> graphic_properties_;
_oox_fill fill_;
};

View File

@ -37,6 +37,8 @@
#include <cpdoccore/xml/simple_xml_writer.h>
#include "../odf/style_text_properties.h"
#include "xlsx_utils.h"
#include "oox_chart_series.h"
#include "../formulasconvert/formulasconvert.h"
@ -258,8 +260,11 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
CP_XML_ATTR(L"idx", j);
double val = 0;
try { val = boost::lexical_cast<double>(v);}
catch(...){}
if (oox::IsNumber(v))
{
try { val = boost::lexical_cast<double>(v);}
catch(...){}
}
CP_XML_NODE(L"c:v")
{
CP_XML_CONTENT(val);
@ -293,8 +298,11 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
CP_XML_ATTR(L"idx", j);
double val = 0;
try { val = boost::lexical_cast<double>(v);}
catch(...){}
if (oox::IsNumber(v))
{
try { val = boost::lexical_cast<double>(v);}
catch(...){}
}
CP_XML_NODE(L"c:v")
{
CP_XML_CONTENT(val);

View File

@ -171,7 +171,7 @@ void oox_serialize_ln(std::wostream & strm, const std::vector<odf_reader::_prope
if ( color.empty() )
{
if (always_draw) color = L"000000";
else color = L"ffffff";
else color = L"FFFFFFFF";
}
CP_XML_NODE(L"a:srgbClr")
@ -232,11 +232,11 @@ void oox_serialize_aLst(std::wostream & strm, const std::vector<odf_reader::_pro
if (values[i].empty()) continue;
CP_XML_NODE(L"a:gd")
{
if (values.size() > 1 || bModifiers)
//if (values.size() > 1 || bModifiers)
//весьма странное .. для некоторых модификаторов (напр math...) нужно указывать множественность их
CP_XML_ATTR(L"name", L"adj" + std::to_wstring(i+1));
else
CP_XML_ATTR(L"name", L"adj");
//else
// CP_XML_ATTR(L"name", L"adj");
CP_XML_ATTR(L"fmla", L"val " + values[i]);
}
@ -263,8 +263,8 @@ void _oox_drawing::serialize_bodyPr(std::wostream & strm, const std::wstring & n
odf_reader::GetProperty(prop,L"text-padding-bottom" , dPaddingBottom);
if (dPaddingLeft) CP_XML_ATTR(L"lIns", (int)(*dPaddingLeft));
if (dPaddingRight) CP_XML_ATTR(L"rIns", (int)(*dPaddingRight));
if (dPaddingTop) CP_XML_ATTR(L"tIns", (int)(*dPaddingTop));
if (dPaddingRight) CP_XML_ATTR(L"rIns", (int)(*dPaddingRight));
if (dPaddingBottom) CP_XML_ATTR(L"bIns", (int)(*dPaddingBottom));
if (inGroup == false)

View File

@ -168,7 +168,7 @@ void oox_serialize_bitmap_fill(std::wostream & strm, const _oox_fill & val)
{
if (val.bitmap->isInternal)
{
CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
//CP_XML_ATTR(L"xmlns:r", L"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
CP_XML_ATTR(L"r:embed", val.bitmap->rId );
}
else

View File

@ -81,6 +81,7 @@ static std::wstring get_mime_type(const std::wstring & extension)
else if (L"mov" == extension) return L"video/unknown";
else if (L"mp4" == extension) return L"video/unknown";
else if (L"m4v" == extension) return L"video/unknown";
else if (L"mkv" == extension) return L"video/unknown";
else if (L"bin" == extension) return L"application/vnd.openxmlformats-officedocument.oleObject";
else if (L"xlsx" == extension) return L"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";

File diff suppressed because it is too large Load Diff

View File

@ -49,21 +49,36 @@ public:
void start_table();
int end_table();
void start_field();
void set_field_name(std::wstring name);
void set_field_type(int type);
void set_field_function(int type);
void set_field_user_function(std::wstring f);
void add_field_subtotal(int function_type);
void add_field_cache(int index, std::wstring value);
void start_field ();
void set_field_name (std::wstring name);
void set_field_type (int type, int hierarchy);
void set_field_function (int type);
void set_field_user_function (std::wstring f);
void add_field_subtotal (int function_type);
void add_field_cache (int index, std::wstring value);
void set_field_show_empty (bool val);
void set_field_data_layout (bool val);
void set_field_sort (int type);
void set_field_groups (int type);
void set_repeat_item_labels(bool val);
void end_field();
int get_count();
void set_view_name(std::wstring name);
void set_view_target_range(std::wstring ref);
void set_view_target_table_name(std::wstring name);
void add_button_header(std::wstring ref);
void set_identify_categories(bool val);
void set_drill(bool val);
void set_source_range(std::wstring table_name, std::wstring ref);
void set_source_database(std::wstring database, std::wstring table_name);
void set_source_database_query(std::wstring database, std::wstring query);
void set_source_database_sql(std::wstring database, std::wstring sql);
void write_cache_definitions_to (int index, std::wostream & strm);
void write_cache_records_to (int index, std::wostream & strm);
@ -74,6 +89,8 @@ public:
void dump_rels_cache(int index, rels & Rels);
void dump_rels_view (int index, rels & Rels);
std::wstring get_chart_source(std::wstring name);
void add_connections(std::wstring connections);
bool is_connections();

View File

@ -394,6 +394,7 @@ void xlsx_table_state::serialize_table_format (std::wostream & strm)
{
CP_XML_NODE(L"dimension")
{
if (current_table_column_ < 0) current_table_column_ = columns_count_;
std::wstring ref2 = getCellAddress( current_table_column_, current_table_row_);
CP_XML_ATTR(L"ref", L"A1:" + ref2);
}
@ -433,10 +434,10 @@ void xlsx_table_state::serialize_table_format (std::wostream & strm)
{
CP_XML_NODE(L"selection")
{
CP_XML_ATTR(L"sqref", getCellAddress(col, row));
CP_XML_ATTR(L"activeCellId", 0);
CP_XML_ATTR(L"activeCell", getCellAddress(col, row));
CP_XML_ATTR(L"activeCellId", 0);
CP_XML_ATTR(L"pane", L"topLeft");
CP_XML_ATTR(L"sqref", getCellAddress(col, row));
}
}

View File

@ -30,7 +30,6 @@
*
*/
#include "xlsx_utils.h"
#include <boost/lexical_cast.hpp>
@ -46,6 +45,14 @@ namespace cpdoccore {
namespace oox {
bool IsNumber(const std::wstring &value)
{
boost::wregex rule(L"\\-?^[0-9]*[.,]?[0-9]*$");
boost::match_results<std::wstring::const_iterator> results;
return boost::regex_search(value/*.begin(), value.end(), results*/, rule);
}
std::wstring getColAddress(size_t col)
{
static const size_t r = (L'Z' - L'A' + 1);
@ -62,8 +69,6 @@ std::wstring getColAddress(size_t col)
return std::wstring(1, (wchar_t)(L'A' + col));
}
std::wstring getRowAddress(size_t row)
{
return std::to_wstring(row + 1);

View File

@ -40,6 +40,8 @@ namespace cpdoccore {
namespace oox {
bool IsNumber(const std::wstring &value);
std::wstring getColAddress(size_t col);
std::wstring getRowAddress(size_t row);

View File

@ -447,6 +447,18 @@ void xlsx_conversion_context::end_table()
get_table_context().dump_rels_hyperlinks (current_sheet().sheet_rels());
get_table_context().dump_rels_ole_objects (current_sheet().sheet_rels());
typedef std::multimap<std::wstring, int> _mapPivotsTableView;
std::pair<_mapPivotsTableView::iterator, _mapPivotsTableView::iterator> range;
range = mapPivotsTableView_.equal_range(current_sheet().name());
for (_mapPivotsTableView::iterator it = range.first; it != range.second; ++it)
{
current_sheet().sheet_rels().add(oox::relationship(L"pvId" + std::to_wstring(it->second),
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable",
L"../pivotTables/pivotTable" + std::to_wstring(it->second) + L".xml"));
}
if (!get_drawing_context().empty())
{
std::wstringstream strm;
@ -702,6 +714,10 @@ void xlsx_conversion_context::end_hyperlink(std::wstring const & href)
xlsx_text_context_.end_span2();
}
}
void xlsx_conversion_context::add_pivot_sheet_source (const std::wstring & sheet_name, int index_table_view)
{//ващето в либре жесткая привязка что на одном листе тока одна сводная может быть ..
mapPivotsTableView_.insert(std::make_pair(sheet_name, index_table_view));
}
void xlsx_conversion_context::start_conditional_format(std::wstring ref)
{

View File

@ -137,6 +137,8 @@ public:
void end_hyperlink (std::wstring const & href);
//------------------------------------------------------------------------------------
void add_pivot_sheet_source (const std::wstring & sheet_name, int index_table_view);
void start_conditional_format (std::wstring ref);
void end_conditional_format (){}
@ -200,6 +202,7 @@ private:
num_format_context num_format_context_;
size_t default_style_;
mediaitems mediaitems_;
std::multimap<std::wstring, int> mapPivotsTableView_;
xlsx_style_manager xlsx_style_;
xlsx_defined_names xlsx_defined_names_;

View File

@ -77,6 +77,15 @@ typedef shared_ptr<const office_element>::Type office_element_ptr_const;
// Класс для конструирования чартов
using namespace chart;
void object_odf_context::set_pivot_source(std::wstring const & val)
{
pivot_source_ = val;
if (pivot_source_.empty() == false)
{
bPivotChart_ = true;
}
}
void object_odf_context::set_width(double valPt)
{
@ -167,6 +176,11 @@ void object_odf_context::xlsx_convert(oox::xlsx_conversion_context & Context)
{
if (object_type_ == 1)
{
if (pivot_source_.empty() == false)
{
pivot_source_ = Context.get_pivots_context().get_chart_source(pivot_source_);
}
Context.start_chart(L"");
oox::oox_chart_context & chart = Context.current_chart();
@ -266,23 +280,60 @@ void object_odf_context::calc_cache_series(std::wstring adress, std::vector<std:
{
if (adress.empty()) return;
formulasconvert::odf2oox_converter converter;
std::wstring ref_1, ref_2, table;
size_t col_1=0, row_1=0, col_2=0, row_2=0;
if (!converter.find_first_last_ref(adress, table, ref_1, ref_2))return;
//if ((res = table.find(L"local-table"))<0)return;
oox::getCellAddressInv(ref_1, col_1,row_1);
oox::getCellAddressInv(ref_2, col_2,row_2);
for (size_t i = 0; i < cash_values.size(); i++)
if (bPivotChart_)
{
if (cash_values[i].col >= col_1 && cash_values[i].col <= col_2 &&
cash_values[i].row >= row_1 && cash_values[i].row <= row_2)
std::map<std::wstring, _cell>::iterator pFind = cash_pivot.find(adress);
if (pFind != cash_pivot.end())
{
cash.push_back(cash_values[i].val);
int col = pFind->second.col;
int row = pFind->second.row;
if (col == 0 || row == 0)
{
for (size_t i = 0; i < cash_values.size(); i++)
{
if (col == 0)
{
if (cash_values[i].col == col)
{
cash.push_back(cash_values[i].val);
}
}
if (row == 0)
{
if (cash_values[i].row == row)
{
cash.push_back(cash_values[i].val);
}
}
}
}
else
{
cash.push_back(pFind->second.val);
}
}
}
else
{
formulasconvert::odf2oox_converter converter;
std::wstring ref_1, ref_2, table;
size_t col_1 = 0, row_1 = 0, col_2 = 0, row_2 = 0;
if (!converter.find_first_last_ref(adress, table, ref_1, ref_2))return;
//if ((res = table.find(L"local-table"))<0)return;
oox::getCellAddressInv(ref_1, col_1, row_1);
oox::getCellAddressInv(ref_2, col_2, row_2);
for (size_t i = 0; i < cash_values.size(); i++)
{
if (cash_values[i].col >= col_1 && cash_values[i].col <= col_2 &&
cash_values[i].row >= row_1 && cash_values[i].row <= row_2)
{
cash.push_back(cash_values[i].val);
}
}
}
}
@ -297,6 +348,8 @@ struct axises_sort
void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
{
chart_context.set_pivot_chart (pivot_source_);
chart_context.set_title (title_);
chart_context.set_wall (wall_);
chart_context.set_floor (floor_);
@ -370,30 +423,36 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
{
if (last_set_type == chart_bubble)
{ //bubble(x)
current->set_formula_series(4, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
if (!bPivotChart_)
current->set_formula_series(4, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
current->set_values_series (4, domain_cash);
//y
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
if (!bPivotChart_)
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
current->set_values_series (3, cell_cash);
}
else
{ //x
current->set_formula_series(2, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
if (!bPivotChart_)
current->set_formula_series(2, domain_cell_range_adress_, formatCode, boolVal.get_value_or(true));
current->set_values_series (2, domain_cash);
//y
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
if (!bPivotChart_)
current->set_formula_series(3, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
current->set_values_series (3, cell_cash);
}
}
else
{ //common
current->set_formula_series(1, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
if (!bPivotChart_)
current->set_formula_series(1, series_[i].cell_range_address_, formatCode, boolVal.get_value_or(true));
current->set_values_series(1, cell_cash);
}
if (categories_.empty() == false)//названия
{
current->set_formula_series(0, categories_[0], L"General", true);
if (!bPivotChart_)
current->set_formula_series(0, categories_[0], L"General", true);
current->set_values_series(0, cat_cash);
}
current->set_name(series_[i].name_);
@ -560,7 +619,13 @@ void process_build_object::on_not_impl(std::string const & message)
_CP_LOG << L"[process_object visitor] : not impliment for \"" << utf8_to_utf16(message) << L"\"" << std::endl;
}
//////////////////////////////////////////////////
//-----------------------------------------------------------------------------------
void process_build_object::visit(office_document & val)
{
if (val.office_body_)
val.office_body_->accept(*this);
}
void process_build_object::visit(const office_document_content& val)
{
if (val.office_body_)
@ -599,18 +664,21 @@ void process_build_object::visit(const chart_chart& val)
{
object_odf_context_.object_type_ = 1;
if (val.chart_chart_attlist_.common_draw_size_attlist_.svg_width_)
if (val.attlist_.common_draw_size_attlist_.svg_width_)
{
object_odf_context_.set_width(val.chart_chart_attlist_.common_draw_size_attlist_.svg_width_->get_value_unit(length::pt));
object_odf_context_.set_width(val.attlist_.common_draw_size_attlist_.svg_width_->get_value_unit(length::pt));
}
if (val.chart_chart_attlist_.common_draw_size_attlist_.svg_height_)
if (val.attlist_.common_draw_size_attlist_.svg_height_)
{
object_odf_context_.set_height(val.chart_chart_attlist_.common_draw_size_attlist_.svg_height_->get_value_unit(length::pt));
object_odf_context_.set_height(val.attlist_.common_draw_size_attlist_.svg_height_->get_value_unit(length::pt));
}
ApplyGraphicProperties (val.chart_chart_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.chart_graphic_properties_, object_odf_context_.chart_fill_);
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.chart_graphic_properties_, object_odf_context_.chart_fill_);
object_odf_context_.set_class(val.chart_chart_attlist_.chart_class_);
object_odf_context_.set_class(val.attlist_.chart_class_);
if (val.attlist_.loext_data_pilot_source_)
object_odf_context_.set_pivot_source(*val.attlist_.loext_data_pilot_source_);
ACCEPT_ALL_CONTENT_CONST(val.content_);
@ -626,13 +694,13 @@ void process_build_object::visit(const chart_title& val)
val.text_p_->text_to_stream(v);
t.content_ = v.str();
}
ApplyTextProperties(val.chart_title_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), t.text_properties_);
ApplyTextProperties(val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), t.text_properties_);
///////////////////////////////////////////////////////////////////////////////////////
if (val.chart_title_attlist_.common_draw_position_attlist_.svg_x_)
if (val.attlist_.common_draw_position_attlist_.svg_x_)
{
t.pos_x = val.chart_title_attlist_.common_draw_position_attlist_.svg_x_->get_value_unit(length::pt);
t.pos_y = val.chart_title_attlist_.common_draw_position_attlist_.svg_y_->get_value_unit(length::pt);
t.pos_x = val.attlist_.common_draw_position_attlist_.svg_x_->get_value_unit(length::pt);
t.pos_y = val.attlist_.common_draw_position_attlist_.svg_y_->get_value_unit(length::pt);
}
t.bEnabled = true;
@ -650,10 +718,10 @@ void process_build_object::visit(const chart_subtitle & val)
val.text_p_->text_to_stream(v);
t.content_ = v.str();
if (val.chart_title_attlist_.common_draw_position_attlist_.svg_x_)
if (val.attlist_.common_draw_position_attlist_.svg_x_)
{
t.pos_x = val.chart_title_attlist_.common_draw_position_attlist_.svg_x_->get_value_unit(length::pt);
t.pos_y = val.chart_title_attlist_.common_draw_position_attlist_.svg_y_->get_value_unit(length::pt);
t.pos_x = val.attlist_.common_draw_position_attlist_.svg_x_->get_value_unit(length::pt);
t.pos_y = val.attlist_.common_draw_position_attlist_.svg_y_->get_value_unit(length::pt);
}
t.bEnabled = true;
object_odf_context_.sub_title_ = t;
@ -672,32 +740,32 @@ void process_build_object::visit(const chart_legend& val)
{
object_odf_context_.legend_.bEnabled = true;
ApplyChartProperties (val.chart_legend_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.properties_);
ApplyGraphicProperties (val.chart_legend_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.graphic_properties_,object_odf_context_.legend_.fill_);
ApplyTextProperties (val.chart_legend_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.text_properties_);
ApplyChartProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.properties_);
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.graphic_properties_,object_odf_context_.legend_.fill_);
ApplyTextProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.legend_.text_properties_);
}
void process_build_object::visit(const chart_plot_area& val)
{
ACCEPT_ALL_CONTENT_CONST(val.content_);
object_odf_context_.plot_area_.cell_range_address_ = val.chart_plot_area_attlist_.table_cell_range_address_.get_value_or(L"");
object_odf_context_.plot_area_.cell_range_address_ = val.attlist_.table_cell_range_address_.get_value_or(L"");
ApplyChartProperties (val.chart_plot_area_attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.properties_);
ApplyGraphicProperties (val.chart_plot_area_attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.graphic_properties_, object_odf_context_.plot_area_.fill_);
ApplyTextProperties (val.chart_plot_area_attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.text_properties_);
ApplyChartProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.properties_);
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.graphic_properties_, object_odf_context_.plot_area_.fill_);
ApplyTextProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""),object_odf_context_.plot_area_.text_properties_);
}
void process_build_object::visit(const chart_axis& val)
{
object_odf_context_.start_axis(val.chart_axis_attlist_.chart_dimension_.get_value_or(L""),
val.chart_axis_attlist_.chart_name_.get_value_or(L""),
val.chart_axis_attlist_.common_attlist_.chart_style_name_.get_value_or(L""));
object_odf_context_.start_axis(val.attlist_.chart_dimension_.get_value_or(L""),
val.attlist_.chart_name_.get_value_or(L""),
val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""));
ACCEPT_ALL_CONTENT_CONST(val.content_);
std::wstring style_name = val.chart_axis_attlist_.common_attlist_.chart_style_name_.get_value_or(L"");
std::wstring style_name = val.attlist_.common_attlist_.chart_style_name_.get_value_or(L"");
ApplyChartProperties (style_name, object_odf_context_.axises_.back().properties_);
ApplyGraphicProperties (style_name, object_odf_context_.axises_.back().graphic_properties_, object_odf_context_.axises_.back().fill_);
@ -708,7 +776,7 @@ void process_build_object::visit(const chart_axis& val)
void process_build_object::visit(const chart_series& val)
{
const chart_series_attlist & att = val.chart_series_attlist_;
const chart_series_attlist & att = val.attlist_;
chart::class_type chartClass = get_series_class_type(att.chart_class_.get_value_or(object_odf_context_.str_class_));
@ -737,21 +805,21 @@ void process_build_object::visit(const chart_domain& val)
}
void process_build_object::visit(const chart_grid& val)
{
object_odf_context_.add_grid(val.chart_grid_attlist_.chart_class_.get_value_or(L""),
val.chart_grid_attlist_.common_attlist_.chart_style_name_.get_value_or(L"") );
object_odf_context_.add_grid(val.attlist_.chart_class_.get_value_or(L""),
val.attlist_.common_attlist_.chart_style_name_.get_value_or(L"") );
oox::_oox_fill fill;
ApplyGraphicProperties (val.chart_grid_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), (object_odf_context_.axises_.back()).grids_.back().graphic_properties_, fill);
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), (object_odf_context_.axises_.back()).grids_.back().graphic_properties_, fill);
}
void process_build_object::visit(const chart_wall& val)
{
object_odf_context_.wall_.bEnabled = true;
ApplyChartProperties (val.chart_wall_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.properties_);
ApplyGraphicProperties (val.chart_wall_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.graphic_properties_,object_odf_context_.wall_.fill_);
ApplyTextProperties (val.chart_wall_attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.text_properties_);
ApplyChartProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.properties_);
ApplyGraphicProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.graphic_properties_,object_odf_context_.wall_.fill_);
ApplyTextProperties (val.attlist_.common_attlist_.chart_style_name_.get_value_or(L""), object_odf_context_.wall_.text_properties_);
}
void process_build_object::visit(const chart_floor& val)
@ -765,12 +833,12 @@ void process_build_object::visit(const chart_floor& val)
void process_build_object::visit(const chart_data_point & val)
{
object_odf_context_.add_point( val.chart_data_point_attlist_.chart_repeated_.get_value_or(1));
object_odf_context_.add_point( val.attlist_.chart_repeated_.get_value_or(1));
if (val.chart_data_point_attlist_.common_attlist_.chart_style_name_)
if (val.attlist_.common_attlist_.chart_style_name_)
{
object_odf_context_.series_.back().points_.back().bEnabled = true;
std::wstring style_name = val.chart_data_point_attlist_.common_attlist_.chart_style_name_.get_value_or(L"");
std::wstring style_name = val.attlist_.common_attlist_.chart_style_name_.get_value_or(L"");
ApplyGraphicProperties (style_name, object_odf_context_.series_.back().points_.back().graphic_properties_,
object_odf_context_.series_.back().points_.back().fill_);
@ -895,12 +963,21 @@ void process_build_object::visit(const table_table_cell& val)
unsigned int repeated = val.attlist_.table_number_columns_repeated_;
std::wstringstream wstream_temp;
val.content_.text_to_stream(wstream_temp);
std::wstring cell_cash = wstream_temp.str();
std::wstring cell_val;
std::wstring cell_val, cell_cash, cell_desc;
for (size_t i = 0 ; i < val.content_.elements_.size(); i++)
{
std::wstringstream wstream_temp;
val.content_.elements_[i]->text_to_stream(wstream_temp);
if (val.content_.elements_[i]->get_type() == typeTextP)
{
cell_cash += wstream_temp.str();
}
else if (val.content_.elements_[i]->get_type() == typeDrawG)
{
cell_desc += wstream_temp.str();
}
}
if (attlist.common_value_and_type_attlist_.office_value_) cell_val = *attlist.common_value_and_type_attlist_.office_value_;
else if (attlist.common_value_and_type_attlist_.office_currency_) cell_val = *attlist.common_value_and_type_attlist_.office_currency_;
@ -912,11 +989,16 @@ void process_build_object::visit(const table_table_cell& val)
if (cell_cash.empty())
cell_cash = cell_val;
object_odf_context::_cell cell_={object_odf_context_.current_table_column_, object_odf_context_.current_table_row_, cell_cash};
object_odf_context::_cell cell_= {object_odf_context_.current_table_column_, object_odf_context_.current_table_row_, cell_cash};
object_odf_context_.cash_values.push_back(cell_);
object_odf_context_.current_table_column_+=repeated;
if (object_odf_context_.bPivotChart_)
{
object_odf_context_.cash_pivot.insert(std::make_pair(cell_desc, cell_));
}
}
void process_build_object::visit(const table_covered_table_cell& val)
{

View File

@ -111,6 +111,7 @@ public:
width_pt_ (0),
height_pt_ (0),
in_axis_ (false),
bPivotChart_ (false),
current_table_column_ (0),
current_table_row_ (0),
columns_spanned_num_ (0),
@ -124,6 +125,8 @@ public:
{
}
void set_pivot_source(std::wstring const & val);
void set_width(double valPt);
void set_height(double valPt);
@ -170,6 +173,9 @@ public:
std::wstring style_name_;
std::wstring name_;
std::wstring pivot_source_;
bool bPivotChart_;
bool in_axis_;
std::vector<chart::axis> axises_;
std::vector<chart::series> series_;
@ -195,6 +201,7 @@ public:
oox::_oox_fill chart_fill_;
std::vector<_cell> cash_values;
std::map<std::wstring, _cell>cash_pivot;
//---------------------------------------
std::wstring target_table_;
@ -216,6 +223,8 @@ public:
class process_build_object
: public base_visitor,
public visitor<office_document>,
public const_visitor<office_document_content>,
public visitor<office_document_content>,
@ -283,7 +292,8 @@ private:
virtual void on_not_impl(std::string const & message);
public:
virtual void visit(office_document & val);
virtual void visit(const office_document_content& val);
virtual void visit(office_document_content & val);

View File

@ -86,7 +86,8 @@ const std::wstring color::get_hex_value() const
{
boost::algorithm::trim(tmp);
boost::algorithm::trim_left_if(tmp, boost::algorithm::is_any_of("#"));
return tmp;
return XmlUtils::GetUpper(tmp);
}
else if (tmp.size() == 6)
{
@ -96,7 +97,7 @@ const std::wstring color::get_hex_value() const
unsigned int t = 0;
if ((s << tmp) && (s >> std::hex >> t) && (s >> std::ws).eof())
{
return tmp;
return XmlUtils::GetUpper(tmp);
}
}
catch(...)

View File

@ -0,0 +1,94 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "dategroup.h"
#include <boost/algorithm/string.hpp>
#include <ostream>
namespace cpdoccore { namespace odf_types {
std::wostream & operator << (std::wostream & _Wostream, const date_group & _Val)
{
switch(_Val.get_type())
{
case date_group::seconds:
_Wostream << L"seconds";
break;
case date_group::minutes:
_Wostream << L"minutes";
break;
case date_group::hours:
_Wostream << L"hours";
break;
case date_group::days:
_Wostream << L"days";
break;
case date_group::months:
_Wostream << L"months";
break;
case date_group::quarters:
_Wostream << L"quarters";
break;
case date_group::years:
_Wostream << L"years";
break;
default:
break;
}
return _Wostream;
}
date_group date_group::parse(const std::wstring & Str)
{
std::wstring tmp = Str;
boost::algorithm::to_lower(tmp);
if (tmp == L"seconds")
return date_group( seconds );
else if (tmp == L"minutes")
return date_group( minutes );
else if (tmp == L"hours")
return date_group( hours );
else if (tmp == L"days")
return date_group( days );
else if (tmp == L"months")
return date_group( months );
else if (tmp == L"quarters")
return date_group( quarters );
else if (tmp == L"years")
return date_group( years );
else
{
return date_group( months );
}
}
} }

View File

@ -0,0 +1,78 @@
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <iosfwd>
#include <string>
#include "odfattributes.h"
namespace cpdoccore { namespace odf_types {
class date_group
{
public:
enum type
{
seconds,
minutes,
hours,
days,
months,
quarters,
years
};
date_group() {}
date_group(type _Type) : type_(_Type)
{}
type get_type() const
{
return type_;
};
static date_group parse(const std::wstring & Str);
private:
type type_;
};
std::wostream & operator << (std::wostream & _Wostream, const date_group & _Val);
}
APPLY_PARSE_XML_ATTRIBUTES(odf_types::date_group);
}

View File

@ -105,7 +105,10 @@ void draw_image::add_child_element( xml::sax * Reader, const std::wstring & Ns,
//CP_NOT_APPLICABLE_ELM();
}
}
std::wostream & draw_image::text_to_stream(std::wostream & _Wostream) const
{
return _Wostream;
}
// draw:chart
////////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * draw_chart::ns = L"draw";
@ -151,6 +154,13 @@ void draw_g::add_child_element( xml::sax * Reader, const std::wstring & Ns, cons
{
CP_CREATE_ELEMENT(content_);
}
std::wostream & draw_g::text_to_stream(std::wostream & _Wostream) const
{
CP_SERIALIZE_TEXT(content_);
return _Wostream;
}
// draw:frame
//////////////////////////////////////////////////////////////////////////////////////////////////
const wchar_t * draw_frame::ns = L"draw";
@ -261,7 +271,11 @@ void draw_object::add_attributes( const xml::attributes_wc_ptr & Attributes )
void draw_object::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
CP_NOT_APPLICABLE_ELM(); // TODO
if CP_CHECK_NAME(L"office", L"document")
{
//embedded
odf_document_ = odf_document_ptr( new odf_document(Reader));
}
}
// draw:object
@ -328,8 +342,10 @@ std::wstring draw_object_ole::detectObject(const std::wstring &fileName)
}
std::wstring draw_object::office_convert(odf_document * odfDocument, int type)
std::wstring draw_object::office_convert(odf_document_ptr odfDocument, int type)
{
if (!odfDocument) return L"";
std::wstring href_result;
std::wstring folderPath = odfDocument->get_folder();
std::wstring objectOutPath = NSDirectory::CreateDirectoryWithUniqueName(folderPath);
@ -337,7 +353,7 @@ std::wstring draw_object::office_convert(odf_document * odfDocument, int type)
if (type == 1)
{
oox::package::docx_document outputDocx;
oox::docx_conversion_context conversionDocxContext ( odfDocument);
oox::docx_conversion_context conversionDocxContext ( odfDocument.get());
conversionDocxContext.set_output_document (&outputDocx);
//conversionContext.set_font_directory (fontsPath);
@ -356,7 +372,7 @@ std::wstring draw_object::office_convert(odf_document * odfDocument, int type)
if (type == 2)
{
oox::package::xlsx_document outputXlsx;
oox::xlsx_conversion_context conversionXlsxContext ( odfDocument);
oox::xlsx_conversion_context conversionXlsxContext ( odfDocument.get());
conversionXlsxContext.set_output_document (&outputXlsx);
//conversionContext.set_font_directory (fontsPath);

View File

@ -49,13 +49,14 @@ namespace cpdoccore {
namespace odf_reader {
/// draw-image-attlist
class odf_document;
typedef shared_ptr<odf_document>::Type odf_document_ptr;
class draw_image_attlist
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(std::wstring) draw_filter_name_;
};
@ -69,7 +70,9 @@ public:
static const ElementType type = typeDrawImage;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void pptx_convert(oox::pptx_conversion_context & Context);
@ -79,14 +82,15 @@ private:
draw_image_attlist draw_image_attlist_;
odf_types::common_xlink_attlist common_xlink_attlist_;
office_element_ptr office_binary_data_;
office_element_ptr office_binary_data_;
office_element_ptr_array content_;
};
CP_REGISTER_OFFICE_ELEMENT2(draw_image);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//draw-chart-attlist
//------------------------------------------------------------------------------------------------------
class draw_chart_attlist
{
public:
@ -134,7 +138,6 @@ class draw_frame_attlist
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(std::wstring) draw_copy_of_;
_CP_OPT(odf_types::length_or_percent) fo_min_width_;
_CP_OPT(odf_types::length_or_percent) fo_min_height_;
@ -191,15 +194,12 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(draw_frame);
//-------------------------------------------------------------------------------------------------------------
//draw-frame-attlist
class draw_g_attlist
{
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
};
class draw_g : public office_element_impl<draw_g>
{
public:
@ -209,7 +209,9 @@ public:
static const ElementType type = typeDrawG;
CPDOCCORE_DEFINE_VISITABLE();
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
virtual void docx_convert(oox::docx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void pptx_convert(oox::pptx_conversion_context & Context);
@ -226,7 +228,6 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(draw_g);
//-------------------------------------------------------------------------------------------------------------
// draw-text-box-attlist
class draw_text_box_attlist
{
public:
@ -268,7 +269,6 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(draw_text_box);
//-------------------------------------------------------------------------------------------------------------
/// draw-object-attlist
class draw_object_attlist
{
public:
@ -280,7 +280,6 @@ public:
};
// draw:object
class draw_object : public office_element_impl<draw_object>
{
public:
@ -297,16 +296,17 @@ public:
draw_object_attlist draw_object_attlist_;
odf_types::common_xlink_attlist common_xlink_attlist_;
odf_document_ptr odf_document_;
private:
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
std::wstring office_convert(odf_document * odfDocument, int type);
std::wstring office_convert(odf_document_ptr odfDocument, int type);
};
CP_REGISTER_OFFICE_ELEMENT2(draw_object);
// draw:object-ole
class draw_object_ole : public office_element_impl<draw_object>
{
public:
@ -332,7 +332,6 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(draw_object_ole);
// draw:param
class draw_param : public office_element_impl<draw_param>
{
public:
@ -356,7 +355,6 @@ private:
CP_REGISTER_OFFICE_ELEMENT2(draw_param);
// draw:plugin
class draw_plugin : public office_element_impl<draw_plugin>
{
public:

View File

@ -1408,22 +1408,25 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
{
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
if (!odf_document_)
{
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
//normalize path ??? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
cpdoccore::odf_reader::odf_document objectSubDoc(objectPath ,NULL);
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
}
//---------------------------------------------------------------------------------------------------------------------
draw_frame* frame = NULL;
oox::_docx_drawing * drawing = NULL;
office_element* contentSubDoc = objectSubDoc.get_impl()->get_content();
office_element* contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
object_odf_context objectBuild (href);
if (contentSubDoc)
{
process_build_object process_build_object_(objectBuild, objectSubDoc.odf_context());
process_build_object process_build_object_(objectBuild, odf_document_->odf_context());
contentSubDoc->accept(process_build_object_);
objectBuild.docx_convert(Context);
@ -1493,7 +1496,7 @@ void draw_object::docx_convert(oox::docx_conversion_context & Context)
bool & use_image_replace = Context.get_drawing_context().get_use_image_replace();
use_image_replace = true;
std::wstring href_new = office_convert(&objectSubDoc, 2);
std::wstring href_new = office_convert(odf_document_, 2);
if (!href_new.empty())
{

View File

@ -255,18 +255,22 @@ void draw_text_box::pptx_convert(oox::pptx_conversion_context & Context)
}
void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
{
try {
try
{
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
if (!odf_document_)
{
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
//normalize path ??? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
cpdoccore::odf_reader::odf_document objectSubDoc(objectPath, NULL);
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
}
//---------------------------------------------------------------------------------------------------------------------
office_element *contentSubDoc = objectSubDoc.get_impl()->get_content();
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
if (!contentSubDoc)
{
//здесь другой формат xml (не Open Office)
@ -275,13 +279,13 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
}
object_odf_context objectBuild(href);
process_build_object process_build_object_(objectBuild, objectSubDoc.odf_context());
contentSubDoc->accept(process_build_object_);
process_build_object process_build_object_(objectBuild, odf_document_->odf_context() );
contentSubDoc->accept(process_build_object_);
//---------------------------------------------------------------------------------------------------------------------
if (objectBuild.object_type_ == 1)//диаграмма
{
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"");
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"Chart");
objectBuild.pptx_convert(Context);
Context.get_slide_context().set_chart(href_draw); // в рисовательной части только место объекта, рамочки ... и релсы
@ -290,7 +294,7 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
{
Context.get_slide_context().set_use_image_replacement();
std::wstring href_new = office_convert( &objectSubDoc, 1);
std::wstring href_new = office_convert( odf_document_, 1);
if (!href_new.empty())
{
@ -324,7 +328,7 @@ void draw_object::pptx_convert(oox::pptx_conversion_context & Context)
{
Context.get_slide_context().set_use_image_replacement();
std::wstring href_new = office_convert( &objectSubDoc, 2);
std::wstring href_new = office_convert( odf_document_, 2);
if (!href_new.empty())
{

View File

@ -203,8 +203,19 @@ void draw_frame::xlsx_convert(oox::xlsx_conversion_context & Context)
void draw_image::xlsx_convert(oox::xlsx_conversion_context & Context)
{
const std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
Context.get_drawing_context().set_image(href);
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
if (href.empty() && office_binary_data_)
{
office_binary_data* binary_data = dynamic_cast<office_binary_data*>(office_binary_data_.get());
if (binary_data)
{
href = binary_data->write_to(Context.root()->get_folder());
}
}
Context.get_drawing_context().set_image(href);
////////////////////////////////////в принципе достаточно общая часть ...
Context.get_text_context().start_drawing_content();//... если в объекте есть текст он привяжется к объекту - иначе к ячейке
@ -246,34 +257,39 @@ void draw_text_box::xlsx_convert(oox::xlsx_conversion_context & Context)
if (text_content_.length()>0)
{
Context.get_drawing_context().set_property(_property(L"text-content",text_content_));
Context.get_drawing_context().set_property(_property(L"text-content", text_content_));
}
}
void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
{
try {
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
try
{
std::wstring href = common_xlink_attlist_.href_.get_value_or(L"");
if (!odf_document_)
{
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
std::wstring folderPath = Context.root()->get_folder();
std::wstring objectPath = folderPath + FILE_SEPARATOR_STR + href;
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
// normalize path ???? todooo
XmlUtils::replace_all( objectPath, FILE_SEPARATOR_STR + std::wstring(L"./"), FILE_SEPARATOR_STR);
cpdoccore::odf_reader::odf_document objectSubDoc(objectPath,NULL);
//---------------------------------------------------------------------------------------------------------------------
office_element *contentSubDoc = objectSubDoc.get_impl()->get_content();
odf_document_ = odf_document_ptr(new odf_document(objectPath, NULL));
}
office_element *contentSubDoc = odf_document_ ? odf_document_->get_impl()->get_content() : NULL;
if (!contentSubDoc)
{
//здесь другой формат xml (не Open Office)
//временно - замещающая картинка(если она конечно присутствует)
return;
}
object_odf_context objectBuild(href);
if (contentSubDoc)
{
process_build_object process_build_object_(objectBuild, objectSubDoc.odf_context());
contentSubDoc->accept(process_build_object_);
}
process_build_object process_build_object_(objectBuild, odf_document_->odf_context() );
contentSubDoc->accept(process_build_object_);
//---------------------------------------------------------------------------------------------------------------------
if (objectBuild.object_type_ == 1) //диаграмма
{
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"");
const std::wstring href_draw = common_xlink_attlist_.href_.get_value_or(L"chart");
objectBuild.xlsx_convert(Context);
Context.get_drawing_context().set_chart(href_draw); // в рисовательной части только место объекта, рамочки ... и релсы
@ -282,7 +298,7 @@ void draw_object::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.get_drawing_context().set_use_image_replacement();
std::wstring href_new = office_convert( &objectSubDoc, 1);
std::wstring href_new = office_convert( odf_document_, 1);
if (!href_new.empty())
{

View File

@ -41,9 +41,22 @@
namespace cpdoccore {
namespace odf_reader {
const wchar_t * svg_desc::ns = L"svg";
const wchar_t * svg_desc::name = L"desc";
std::wostream & svg_desc::text_to_stream(std::wostream & _Wostream) const
{
_Wostream << text_ ;
return _Wostream;
}
void svg_desc::add_text(const std::wstring & Text)
{
text_ = Text;
}
// svg:font-face-uri
//////////////////////////////////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------------------------------
const wchar_t * svg_font_face_uri::ns = L"svg";
const wchar_t * svg_font_face_uri::name = L"font-face-uri";

View File

@ -58,7 +58,6 @@ public:
odf_types::common_xlink_attlist common_xlink_attlist_;
};
// svg:font-face-uri
class svg_font_face_uri : public office_element_impl<svg_font_face_uri>
{
@ -80,7 +79,31 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
};
CP_REGISTER_OFFICE_ELEMENT2(svg_font_face_uri);
// svg:desc
class svg_desc : public office_element_impl<svg_desc>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeSvgDesc;
CPDOCCORE_DEFINE_VISITABLE();
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
std::wstring text_;
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ){}
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
virtual void add_text(const std::wstring & Text);
};
CP_REGISTER_OFFICE_ELEMENT2(svg_desc);
// svg:font-face-format
class svg_font_face_format : public office_element_impl<svg_font_face_format>
{
public:
@ -100,7 +123,6 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
};
CP_REGISTER_OFFICE_ELEMENT2(svg_font_face_format);
// svg:font-face-name

View File

@ -64,7 +64,11 @@ void content_xml_t::add_attributes( const xml::attributes_wc_ptr & Attributes )
void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
if CP_CHECK_NAME(L"office", L"document-content")
if CP_CHECK_NAME(L"office", L"document")
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
else if CP_CHECK_NAME(L"office", L"document-content")
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
@ -84,6 +88,10 @@ void content_xml_t::add_child_element( xml::sax * Reader, const std::wstring & N
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
else if CP_CHECK_NAME(L"manifest", L"manifest")
{
create_element_and_read(Reader, Ns, Name, xml_content_, getContext(), true);
}
}
void content_xml_t::add_text(const std::wstring & Text)

View File

@ -38,7 +38,9 @@
namespace cpdoccore {
namespace odf_reader {
odf_document::odf_document(const std::wstring & Folder, const ProgressCallback* CallBack) : impl_(new Impl(Folder,CallBack))
odf_document::odf_document(const std::wstring & Folder, const ProgressCallback* CallBack) : impl_(new Impl(Folder, CallBack))
{}
odf_document::odf_document( xml::sax * Reader) : impl_(new Impl(Reader))
{}
odf_document::~odf_document()

View File

@ -106,47 +106,122 @@ content_xml_t_ptr read_file_content(const std::wstring & Path)
return result;
}
}
content_xml_t_ptr read_file_content(xml::sax * reader_owner)
{
if (!reader_owner) return content_xml_t_ptr();
odf_document::Impl::Impl(const std::wstring & folderPath, const ProgressCallback* CallBack) :
context_(new odf_read_context()), base_folder_(folderPath), pCallBack(CallBack), bUserStopConvert (0)
content_xml_t_ptr result( new content_xml_t() );
const std::wstring namespacePrefix = reader_owner->namespacePrefix();
const std::wstring localName = reader_owner->nodeLocalName();
result->add_child_element(reader_owner, namespacePrefix, localName);
return result;
}
}
odf_document::Impl::Impl(xml::sax * Reader):
context_(new odf_read_context()), base_folder_(L""), pCallBack(NULL), bUserStopConvert (0)
{
office_mime_type_ = 0;
encrypted = false;
std::wstring content_xml = folderPath + FILE_SEPARATOR_STR + L"content.xml";
std::wstring styles_xml = folderPath + FILE_SEPARATOR_STR + L"styles.xml";
std::wstring meta_xml = folderPath + FILE_SEPARATOR_STR + L"meta.xml";
std::wstring settings_xml = folderPath + FILE_SEPARATOR_STR + L"settings.xml";
std::wstring manifest_xml = folderPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
content_xml_ = read_file_content(Reader);
if (content_xml_)
{
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts(content_xml_->get_content());
_CP_LOG << L"[info] parse styles" << std::endl;
parse_styles(content_xml_->get_content());
_CP_LOG << L"[info] read manifest.xml" << std::endl;
manifest_xml_ = read_file_content(manifest_xml);
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(content_xml_->get_content());
_CP_LOG << L"[info] read settings.xml" << std::endl;
settings_xml_ = read_file_content(settings_xml);
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(content_xml_->get_content());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
}
}
_CP_LOG << L"[info] read content.xml" << std::endl;
content_xml_ = read_file_content(content_xml);
odf_document::Impl::Impl(const std::wstring & srcPath, const ProgressCallback* CallBack) :
context_(new odf_read_context()), pCallBack(CallBack), bUserStopConvert (0)
{
office_mime_type_ = 0;
encrypted = false;
_CP_LOG << L"[info] read styles.xml" << std::endl;
styles_xml_ = read_file_content(styles_xml);
if (NSDirectory::Exists(srcPath))
{
base_folder_ = srcPath;
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts();
std::wstring content_xml = srcPath + FILE_SEPARATOR_STR + L"content.xml";
std::wstring styles_xml = srcPath + FILE_SEPARATOR_STR + L"styles.xml";
std::wstring meta_xml = srcPath + FILE_SEPARATOR_STR + L"meta.xml";
std::wstring settings_xml = srcPath + FILE_SEPARATOR_STR + L"settings.xml";
std::wstring manifest_xml = srcPath + FILE_SEPARATOR_STR + L"META-INF" + FILE_SEPARATOR_STR + L"manifest.xml";
_CP_LOG << L"[info] parse styles" << std::endl;
parse_styles();
_CP_LOG << L"[info] read manifest.xml" << std::endl;
manifest_xml_ = read_file_content(manifest_xml);
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests();
_CP_LOG << L"[info] read settings.xml" << std::endl;
settings_xml_ = read_file_content(settings_xml);
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings();
_CP_LOG << L"[info] read content.xml" << std::endl;
content_xml_ = read_file_content(content_xml);
_CP_LOG << L"[info] read styles.xml" << std::endl;
styles_xml_ = read_file_content(styles_xml);
//----------------------------------------------------------------------------------------
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts(content_xml_ ? content_xml_->get_content() : NULL);
_CP_LOG << L"[info] parse styles" << std::endl;
parse_styles(styles_xml_ ? styles_xml_->get_content() : NULL);
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(manifest_xml_ ? manifest_xml_->get_content() : NULL);
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(settings_xml_ ? settings_xml_->get_content() : NULL);
}
else
{
_CP_LOG << L"[info] read flat document" << std::endl;
content_xml_ = read_file_content(srcPath);
if (content_xml_)
{
_CP_LOG << L"[info] parse fonts" << std::endl;
parse_fonts(content_xml_->get_content());
_CP_LOG << L"[info] parse styles" << std::endl;
parse_styles(content_xml_->get_content());
_CP_LOG << L"[info] parse manifest" << std::endl;
parse_manifests(content_xml_->get_content());
_CP_LOG << L"[info] parse settings" << std::endl;
parse_settings(content_xml_->get_content());
tmp_folder_ = NSDirectory::CreateDirectoryWithUniqueName(NSDirectory::GetTempPath());
}
}
UpdateProgress(400000);
}
odf_document::Impl::~Impl()
{
if (!tmp_folder_.empty())
NSDirectory::DeleteDirectory(tmp_folder_);
}
const std::wstring & odf_document::Impl::get_folder() const
{
if (!base_folder_.empty()) return base_folder_;
else return tmp_folder_;
}
bool odf_document::Impl::UpdateProgress(long nComplete)
{
if (pCallBack)
@ -162,17 +237,11 @@ bool odf_document::Impl::UpdateProgress(long nComplete)
return false;
}
void odf_document::Impl::parse_fonts()
void odf_document::Impl::parse_fonts(office_element *element)
{
do
{
if (!content_xml_)
{
_CP_LOG << L"[warning] empty content xml\n";
break;
}
office_document_base * document = dynamic_cast<office_document_base *>( content_xml_->get_content() );
office_document_base * document = dynamic_cast<office_document_base *>( element );
if (!document)
{
_CP_LOG << L"[warning] empty document\n";
@ -236,15 +305,12 @@ void odf_document::Impl::parse_fonts()
}
while (0);
}
void odf_document::Impl::parse_manifests()
void odf_document::Impl::parse_manifests(office_element *element)
{
if (!manifest_xml_)return;
office_document_base * document = dynamic_cast<office_document_base *>( manifest_xml_->get_content() );
office_document_base * document = dynamic_cast<office_document_base *>( element );
if (!document)return;
int res =-1;
for (size_t i = 0; i < document->manifests_.size(); i++)
{
office_element_ptr & elm = document->manifests_[i];
@ -252,34 +318,44 @@ void odf_document::Impl::parse_manifests()
manifest_entry * entry = dynamic_cast<manifest_entry *>(elm.get());
if (!entry)continue;
if (entry->full_path_==L"content.xml" && entry->encryption_) encrypted = true;
if (entry->full_path_ == L"content.xml" && entry->encryption_) encrypted = true;
if (entry->full_path_==L"/")
if (entry->full_path_ == L"/")
{
res = entry->media_type_.find(L"application/vnd.oasis.opendocument.text");
if (res>=0)
if (std::wstring::npos != entry->media_type_.find(L"application/vnd.oasis.opendocument.text"))
{
office_mime_type_ = 1;
}
res = entry->media_type_.find(L"application/vnd.oasis.opendocument.spreadsheet");
if (res>=0)
else if (std::wstring::npos != entry->media_type_.find(L"application/vnd.oasis.opendocument.spreadsheet"))
{
office_mime_type_ = 2;
}
res = entry->media_type_.find(L"application/vnd.oasis.opendocument.presentation");
if (res>=0)
else if (std::wstring::npos != entry->media_type_.find(L"application/vnd.oasis.opendocument.presentation"))
{
office_mime_type_ = 3;
}
}
}
if (!office_mime_type_ && !document->office_mimetype_.empty())
{
if (std::wstring::npos != document->office_mimetype_.find(L"application/vnd.oasis.opendocument.text"))
{
office_mime_type_ = 1;
}
else if (std::wstring::npos != document->office_mimetype_.find(L"application/vnd.oasis.opendocument.spreadsheet"))
{
office_mime_type_ = 2;
}
else if (std::wstring::npos != document->office_mimetype_.find(L"application/vnd.oasis.opendocument.presentation"))
{
office_mime_type_ = 3;
}
}
}
void odf_document::Impl::parse_settings()
void odf_document::Impl::parse_settings(office_element *element)
{
if (!settings_xml_)return;
office_document_base * document = dynamic_cast<office_document_base *>( settings_xml_->get_content() );
office_document_base * document = dynamic_cast<office_document_base *>( element );
if (!document) return;
office_settings * settings = dynamic_cast<office_settings*>(document->office_settings_.get());
@ -358,20 +434,14 @@ void odf_document::Impl::parse_settings()
}
}
void odf_document::Impl::parse_styles()
void odf_document::Impl::parse_styles(office_element *element)
{
do
{
if (!styles_xml_)
{
_CP_LOG << L"[warning] empty styles xml\n";
break;
}
office_document_base * document = dynamic_cast<office_document_base *>( styles_xml_->get_content() );
office_document_base * document = dynamic_cast<office_document_base *>( element );
if (!document)
{
_CP_LOG << L"[warning] empty document\n";
_CP_LOG << L"[warning] empty styles\n";
break;
}

View File

@ -54,16 +54,19 @@ class odf_document::Impl
{
public:
Impl(const std::wstring & Folder, const ProgressCallback* CallBack);
Impl(xml::sax * Reader);
virtual ~Impl();
odf_read_context & odf_context();
bool docx_convert(oox::docx_conversion_context & Context);
bool xlsx_convert(oox::xlsx_conversion_context & Context);
bool pptx_convert(oox::pptx_conversion_context & Context);
const std::wstring & get_folder() const { return base_folder_; }
const std::wstring & get_folder() const;
const office_element * get_content() const;
office_element * get_content();
const office_element * get_content() const;
office_element * get_content();
long get_office_mime_type() {return office_mime_type_;}
@ -77,20 +80,20 @@ private:
odf_read_context_ptr context_;
void parse_styles();
void parse_fonts();
void parse_manifests();
void parse_settings();
void parse_styles (office_element *element);
void parse_fonts (office_element *elemen);
void parse_manifests(office_element *element);
void parse_settings (office_element *element);
private:
content_xml_t_ptr content_xml_;
content_xml_t_ptr styles_xml_;
content_xml_t_ptr meta_xml_;
content_xml_t_ptr settings_xml_;
content_xml_t_ptr manifest_xml_;
private:
std::wstring base_folder_;
std::wstring tmp_folder_;
long office_mime_type_;
bool encrypted;

View File

@ -61,7 +61,34 @@ void office_binary_data::add_child_element( xml::sax * Reader, const std::wstrin
void office_binary_data::add_text(const std::wstring & Text)
{
base64Binary_ = Text;
base64Binary_ = std::string(Text.begin(), Text.end());
}
std::wstring office_binary_data::write_to(const std::wstring & path)
{
std::wstring result;
NSFile::CBase64Converter base64;
int nLength = 0;
unsigned char *pData = NULL;
NSFile::CBase64Converter::Decode(base64Binary_.c_str(), base64Binary_.length(), pData, nLength);
if (pData)
{
NSFile::CFileBinary file;
std::wstring bin_file = file.CreateTempFileWithUniqueName(path + FILE_SEPARATOR_STR, L"bin");
if (file.CreateFileW(bin_file))
{
file.WriteFile(pData, nLength);
file.CloseFile();
int pos = bin_file.rfind(FILE_SEPARATOR_STR);
result = bin_file.substr(pos + 1);
}
delete []pData; pData = NULL;
}
return result;
}
}

View File

@ -53,17 +53,15 @@ public:
CPDOCCORE_DEFINE_VISITABLE();
public:
virtual std::wostream & text_to_stream(std::wostream & _Wostream) const;
std::wstring write_to(const std::wstring & path);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
virtual void add_text(const std::wstring & Text);
private:
std::wstring base64Binary_;
virtual void add_text(const std::wstring & Text);
std::string base64Binary_;
};
CP_REGISTER_OFFICE_ELEMENT2(office_binary_data);

View File

@ -63,9 +63,10 @@ void chart_chart_attlist::add_attributes( const xml::attributes_wc_ptr & Attribu
common_draw_size_attlist_.add_attributes(Attributes);
common_attlist_.add_attributes(Attributes);
CP_APPLY_ATTR(L"chart:class", chart_class_, std::wstring(L""));
CP_APPLY_ATTR(L"chart:column-mapping", chart_column_mapping_);
CP_APPLY_ATTR(L"chart:row-mapping", chart_row_mapping_);
CP_APPLY_ATTR(L"chart:class", chart_class_, std::wstring(L""));
CP_APPLY_ATTR(L"chart:column-mapping", chart_column_mapping_);
CP_APPLY_ATTR(L"chart:row-mapping", chart_row_mapping_);
CP_APPLY_ATTR(L"loext:data-pilot-source", loext_data_pilot_source_);
}
// chart:chart
@ -75,7 +76,7 @@ const wchar_t * chart_chart::name = L"chart";
void chart_chart::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_chart_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_chart::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -97,7 +98,7 @@ const wchar_t * chart_title::name = L"title";
void chart_title::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_title_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_title::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -117,7 +118,7 @@ const wchar_t * chart_subtitle::name = L"subtitle";
void chart_subtitle::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_title_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_subtitle::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -157,7 +158,7 @@ const wchar_t * chart_legend::name = L"legend";
void chart_legend::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_legend_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_legend::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -194,7 +195,7 @@ const wchar_t * chart_plot_area::name = L"plot-area";
void chart_plot_area::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_plot_area_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_plot_area::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -217,7 +218,7 @@ const wchar_t * chart_wall::name = L"wall";
void chart_wall::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_wall_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_wall::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -256,7 +257,7 @@ const wchar_t * chart_axis::name = L"axis";
void chart_axis::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_axis_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_axis::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -279,7 +280,7 @@ const wchar_t * chart_grid::name = L"grid";
void chart_grid::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_grid_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_grid::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -306,11 +307,12 @@ void chart_categories::add_child_element( xml::sax * Reader, const std::wstring
void chart_series_attlist::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"chart:values-cell-range-address", chart_values_cell_range_address_);
CP_APPLY_ATTR(L"chart:label-cell-", chart_label_cell_address_);
CP_APPLY_ATTR(L"chart:class", chart_class_);
CP_APPLY_ATTR(L"chart:attached-axis", chart_attached_axis_);
common_attlist_.add_attributes(Attributes);
CP_APPLY_ATTR(L"chart:values-cell-range-address", chart_values_cell_range_address_);
CP_APPLY_ATTR(L"chart:label-cell-address", chart_label_cell_address_);
CP_APPLY_ATTR(L"chart:class", chart_class_);
CP_APPLY_ATTR(L"chart:attached-axis", chart_attached_axis_);
common_attlist_.add_attributes(Attributes);
}
// chart:categories
@ -320,7 +322,7 @@ const wchar_t * chart_series::name = L"series";
void chart_series::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_series_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_series::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
@ -358,7 +360,7 @@ const wchar_t * chart_data_point::name = L"data-point";
void chart_data_point::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
chart_data_point_attlist_.add_attributes(Attributes);
attlist_.add_attributes(Attributes);
}
void chart_data_point::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)

View File

@ -82,12 +82,12 @@ class chart_chart_attlist
public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
odf_types::common_draw_size_attlist common_draw_size_attlist_;
common_chart_attlist common_attlist_;
std::wstring chart_class_;
_CP_OPT(std::wstring) chart_column_mapping_;
_CP_OPT(std::wstring) chart_row_mapping_;
_CP_OPT(std::wstring) loext_data_pilot_source_;
};
// chart:chart
@ -105,8 +105,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_chart_attlist chart_chart_attlist_;
office_element_ptr_array content_;
chart_chart_attlist attlist_;
office_element_ptr_array content_;
};
CP_REGISTER_OFFICE_ELEMENT2(chart_chart);
@ -139,7 +139,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_title_attlist chart_title_attlist_;
chart_title_attlist attlist_;
office_element_ptr text_p_;
};
@ -160,8 +160,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_title_attlist chart_title_attlist_;
office_element_ptr text_p_;
chart_title_attlist attlist_;
office_element_ptr text_p_;
};
@ -183,7 +183,7 @@ private:
public:
common_chart_attlist common_attlist_;
office_element_ptr text_p_;
office_element_ptr text_p_;
};
@ -195,11 +195,11 @@ public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(std::wstring) chart_legend_position_;
_CP_OPT(std::wstring) chart_legend_align_;
_CP_OPT(std::wstring) chart_legend_position_;
_CP_OPT(std::wstring) chart_legend_align_;
odf_types::common_draw_position_attlist common_draw_position_attlist_;
_CP_OPT(std::wstring) style_legend_expansion_;
_CP_OPT(double) style_legend_expansion_aspect_ratio_;
_CP_OPT(std::wstring) style_legend_expansion_;
_CP_OPT(double) style_legend_expansion_aspect_ratio_;
common_chart_attlist common_attlist_;
};
@ -219,7 +219,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_legend_attlist chart_legend_attlist_;
chart_legend_attlist attlist_;
};
@ -234,7 +234,7 @@ public:
public:
odf_types::common_draw_position_attlist common_draw_position_attlist_;
odf_types::common_draw_size_attlist common_draw_size_attlist_;
common_chart_attlist common_attlist_;
common_chart_attlist common_attlist_;
_CP_OPT(std::wstring) table_cell_range_address_;
_CP_OPT(std::wstring) chart_data_source_has_labels_;
@ -257,9 +257,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_plot_area_attlist chart_plot_area_attlist_;
office_element_ptr_array content_;
chart_plot_area_attlist attlist_;
office_element_ptr_array content_;
};
CP_REGISTER_OFFICE_ELEMENT2(chart_plot_area);
@ -270,7 +269,7 @@ public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(odf_types::length) svg_width_;
_CP_OPT(odf_types::length) svg_width_;
common_chart_attlist common_attlist_;
};
@ -289,7 +288,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_wall_attlist chart_wall_attlist_;
chart_wall_attlist attlist_;
};
CP_REGISTER_OFFICE_ELEMENT2(chart_wall);
@ -310,7 +309,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
common_chart_attlist common_attlist_;
};
@ -322,8 +321,8 @@ public:
void add_attributes( const xml::attributes_wc_ptr & Attributes );
public:
_CP_OPT(std::wstring) chart_dimension_;
_CP_OPT(std::wstring) chart_name_;
_CP_OPT(std::wstring) chart_dimension_;
_CP_OPT(std::wstring) chart_name_;
common_chart_attlist common_attlist_;
};
@ -342,9 +341,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_axis_attlist chart_axis_attlist_;
office_element_ptr_array content_;
chart_axis_attlist attlist_;
office_element_ptr_array content_;
};
@ -376,7 +374,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_grid_attlist chart_grid_attlist_;
chart_grid_attlist attlist_;
};
@ -432,9 +430,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_series_attlist chart_series_attlist_;
office_element_ptr_array content_;
chart_series_attlist attlist_;
office_element_ptr_array content_;
};
@ -486,7 +483,7 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
chart_data_point_attlist chart_data_point_attlist_;
chart_data_point_attlist attlist_;
};
@ -550,8 +547,8 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
common_chart_attlist common_attlist_;
_CP_OPT(bool) display_r_square_;
common_chart_attlist common_attlist_;
_CP_OPT(bool) display_r_square_;
};

View File

@ -41,7 +41,6 @@
namespace cpdoccore {
namespace odf_reader {
// office_document_base
class office_document_base : public office_element
{
public:
@ -67,6 +66,8 @@ public:
// office-document-attrs
// office-document-common-attrs
office_element_ptr office_body_; // office-body
office_element_ptr office_meta_; // office-meta
office_element_ptr office_settings_; // office-settings
office_element_ptr office_scripts_;
@ -75,14 +76,9 @@ public:
office_element_ptr office_styles_; // office-styles
office_element_ptr office_automatic_styles_; // office-automatic-styles
office_element_ptr office_master_styles_; // office-master-styles
office_element_ptr_array manifests_; // manifests
public:
office_element_ptr office_body_; // office-body
office_element_ptr_array manifests_; // manifests
friend class odf_document;
};

View File

@ -190,6 +190,7 @@ enum ElementType
typeStyleFontFace,
typeSvgDesc,
typeSvgFontFaceUri,
typeSvgFontFaceFormat,
typeSvgFontFaceName,
@ -234,7 +235,9 @@ enum ElementType
typeTableDatabaseSourceQuery,
typeTableDatabaseSourceSql,
typeTableSourceCellRange,
typeTableSourceCellRanges,
typeTableSourceService,
typeTableDataPilotGrandTotal,
typeTableDataPilotSubtotals,
typeTableDataPilotSubtotal,
typeTableDataPilotGroupMember,

View File

@ -88,13 +88,13 @@ void office_spreadsheet::xlsx_convert(oox::xlsx_conversion_context & Context)
if (database_ranges_)
database_ranges_->xlsx_convert(Context);
if (data_pilot_tables_)
data_pilot_tables_->xlsx_convert(Context);
for (size_t i = 0; i < content_.size(); i++)
{
content_[i]->xlsx_convert(Context);
}
if (data_pilot_tables_)
data_pilot_tables_->xlsx_convert(Context);
}
Context.end_office_spreadsheet();
}

View File

@ -318,8 +318,30 @@ void text_format_properties_content::drawing_serialize(std::wostream & strm, std
CP_XML_NODE(node)//a:rPr & a:defRPr
{
//attr
const int W = process_font_weight(fo_font_weight_);
if (W > 0) CP_XML_ATTR(L"b", true);
if (fo_language_ || style_language_asian_ || style_language_complex_)
{
std::wstring w_val;
if (fo_language_)
{
w_val = *fo_language_;
if (fo_country_) w_val += L"-" + *fo_country_;
}
else if (style_language_asian_)
{
w_val = *style_language_asian_;
if (style_country_asian_) w_val += L"-" + *style_country_asian_;
}
else if (style_language_complex_)
{
w_val = *style_language_complex_;
if (style_country_complex_)w_val += L"-" + *style_country_complex_;
}
if (w_val.empty() == false)
{
CP_XML_ATTR(L"lang", w_val);
}
}
const int fontStyle = process_font_style(fo_font_style_);
if (fontStyle > 0) CP_XML_ATTR(L"i", true);
@ -354,6 +376,9 @@ void text_format_properties_content::drawing_serialize(std::wostream & strm, std
CP_XML_ATTR(L"cap", "small");
}
}
const int W = process_font_weight(fo_font_weight_);
if (W > 0) CP_XML_ATTR(L"b", true);
// underline
line_width under = style_text_underline_width_.get_value_or(line_width::Auto);
bool underlineBold = under.get_type() == line_width::Bold ||
@ -433,18 +458,6 @@ void text_format_properties_content::drawing_serialize(std::wostream & strm, std
CP_XML_ATTR(L"spc",(int)(20.0 * fo_letter_spacing_->get_length().get_value_unit(length::pt)));
}
if (fo_language_ || style_language_asian_ || style_language_complex_)
{
std::wstring w_val;
if (fo_language_) w_val = *fo_language_;
else if (fo_country_) w_val = *fo_country_;
else if (style_country_asian_) w_val = *style_country_asian_;
else if (style_language_asian_) w_val = *style_language_asian_;
else if (style_language_complex_) w_val = *style_language_complex_;
else if (style_country_complex_) w_val = *style_country_complex_;
CP_XML_ATTR(L"lang", w_val);
}
if (style_text_position_)
{
if (style_text_position_->get_type() == text_position::Percent)

View File

@ -54,7 +54,6 @@ void table_data_pilot_tables::add_child_element( xml::sax * Reader, const std::w
}
void table_data_pilot_tables::xlsx_convert(oox::xlsx_conversion_context & Context)
{
return;
for (size_t i = 0; i < content_.size(); i++)
{
content_[i]->xlsx_convert(Context);
@ -69,11 +68,11 @@ void table_data_pilot_table::add_attributes( const xml::attributes_wc_ptr & Attr
CP_APPLY_ATTR(L"table:name" , table_name_);
CP_APPLY_ATTR(L"table:application-data" , table_application_data_);
CP_APPLY_ATTR(L"table:buttons" , table_buttons_);
CP_APPLY_ATTR(L"table:drill-down-ondouble-click", table_drill_down_ondouble_click_);
CP_APPLY_ATTR(L"table:drill-down-on-double-click", table_drill_down_ondouble_click_);
CP_APPLY_ATTR(L"table:grand-total" , table_grand_total_);
CP_APPLY_ATTR(L"table:identify-categories" , table_identify_categories_);
CP_APPLY_ATTR(L"table:ignore-empty-rows" , table_ignore_empty_rows_);
CP_APPLY_ATTR(L"table:show-filter-button" , table_show_filter_button_);
CP_APPLY_ATTR(L"table:show-filter-button" , table_show_filter_button_, true);
CP_APPLY_ATTR(L"table:target-range-address" , table_target_range_address_);
}
@ -82,6 +81,8 @@ void table_data_pilot_table::add_child_element( xml::sax * Reader, const std::ws
{
if (L"table" == Ns && L"data-pilot-field" == Name)
CP_CREATE_ELEMENT (fields_);
else if (L"tableooo" == Ns && L"data-pilot-grand-total" == Name)
CP_CREATE_ELEMENT (grand_total_);
else
CP_CREATE_ELEMENT (source_);
@ -90,39 +91,56 @@ void table_data_pilot_table::xlsx_convert(oox::xlsx_conversion_context & Context
{
if (!source_) return;
int table_index = -1;
formulasconvert::odf2oox_converter formulas_converter;
Context.get_pivots_context().start_table();
source_->xlsx_convert(Context);
if (table_name_) Context.get_pivots_context().set_view_name(*table_name_);
std::wstring sheet_name;
if (table_name_) Context.get_pivots_context().set_view_name(*table_name_);
if (table_target_range_address_)
{
formulasconvert::odf2oox_converter formulas_converter;
std::wstring ref = formulas_converter.convert_named_ref(*table_target_range_address_, false);
std::wstring table_name = formulas_converter.get_table_name();
table_index = Context.find_sheet_by_name(table_name);
sheet_name = formulas_converter.get_table_name();
Context.get_pivots_context().set_view_target_range(ref);
//Context.get_pivots_context().set_view_target_table(table_index);
Context.get_pivots_context().set_view_target_table_name(sheet_name);
}
if (table_buttons_)
{
std::vector<std::wstring> headers;
formulas_converter.split_distance_by(*table_buttons_, L" ", headers);
for (size_t i = table_show_filter_button_ ? 1 : 0; i < headers.size(); i++)
{
std::wstring ref = formulas_converter.convert_named_ref(headers[i], false);
Context.get_pivots_context().add_button_header(ref);
}
}
if (table_identify_categories_)
Context.get_pivots_context().set_identify_categories(table_identify_categories_->get());
if (table_drill_down_ondouble_click_)
Context.get_pivots_context().set_drill(table_drill_down_ondouble_click_->get());
for (size_t i = 0; i < fields_.size(); i++)
{
fields_[i]->xlsx_convert(Context);
}
int index_view = Context.get_pivots_context().end_table();
int index_table_view = Context.get_pivots_context().end_table();
if (index_view > 0)
if (index_table_view < 0)
return;
if (0 == sheet_name.find(L"'"))
{
Context.current_sheet(table_index).sheet_rels().add(oox::relationship(L"pvId" + std::to_wstring(index_view),
L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable",
L"../pivotTables/pivotTable" + std::to_wstring(index_view) + L".xml"));
}
sheet_name = sheet_name.substr(1, sheet_name.length() - 2);
}
Context.add_pivot_sheet_source(sheet_name, index_table_view);
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_field::ns = L"table";
@ -150,18 +168,26 @@ void table_data_pilot_field::add_child_element( xml::sax * Reader, const std::ws
}
void table_data_pilot_field::xlsx_convert(oox::xlsx_conversion_context & Context)
{
int field_type = table_orientation_.get_value_or(table_orientation::data).get_type(); //?? default type ????
int field_hierarchy = table_used_hierarchy_.get_value_or(-1);
Context.get_pivots_context().start_field();
Context.get_pivots_context().set_field_name(table_source_field_name_.get_value_or(L""));
Context.get_pivots_context().set_field_type(table_orientation_.get_value_or(table_orientation::hidden).get_type());
if (table_is_data_layout_field_)
Context.get_pivots_context().set_field_data_layout(table_is_data_layout_field_->get());
if (table_function_)
{
table_function::type type = table_function_->get_type();
if (type == table_function::String)
{
Context.get_pivots_context().set_field_user_function(table_function_->get_string());
formulasconvert::odf2oox_converter formulas_converter;
std::wstring user_funtion = formulas_converter.convert(table_function_->get_string());
Context.get_pivots_context().set_field_user_function(user_funtion);
}
else
{
@ -173,6 +199,8 @@ void table_data_pilot_field::xlsx_convert(oox::xlsx_conversion_context & Context
if (groups_) groups_->xlsx_convert(Context);
if (level_) level_->xlsx_convert(Context);
Context.get_pivots_context().set_field_type(field_type, field_hierarchy);
Context.get_pivots_context().end_field();
}
//-------------------------------------------------------------------------------------------------
@ -197,13 +225,16 @@ const wchar_t * table_database_source_table::name = L"database-source-table";
void table_database_source_table::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:database-name" , table_database_name_);
CP_APPLY_ATTR(L"table:database-table-name" , table_database_table_name_);
CP_APPLY_ATTR(L"table:database-name", table_database_name_);
CP_APPLY_ATTR(L"table:table-name" , table_table_name_);
}
void table_database_source_table::xlsx_convert(oox::xlsx_conversion_context & Context)
{
if (table_database_name_)
{
Context.get_pivots_context().set_source_database(*table_database_name_, table_table_name_.get_value_or(L""));
}
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_database_source_query::ns = L"table";
@ -218,7 +249,10 @@ void table_database_source_query::add_attributes( const xml::attributes_wc_ptr &
void table_database_source_query::xlsx_convert(oox::xlsx_conversion_context & Context)
{
if (table_database_name_)
{
Context.get_pivots_context().set_source_database_query(*table_database_name_, table_query_name_.get_value_or(L""));
}
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_database_source_sql::ns = L"table";
@ -233,7 +267,12 @@ void table_database_source_sql::add_attributes( const xml::attributes_wc_ptr & A
void table_database_source_sql::xlsx_convert(oox::xlsx_conversion_context & Context)
{
//todoooo split data-base-ranges & pivots
if (table_database_name_)
{//table_parse_sql_statement_??
Context.get_pivots_context().set_source_database_sql(*table_database_name_, table_sql_statement_.get_value_or(L""));
}
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_source_cell_range::ns = L"table";
@ -261,6 +300,26 @@ void table_source_cell_range::xlsx_convert(oox::xlsx_conversion_context & Contex
}
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_source_cell_ranges::ns = L"table";
const wchar_t * table_source_cell_ranges::name = L"source-cell-ranges";
void table_source_cell_ranges::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:cell-ranges-address", table_cell_ranges_address_);
}
void table_source_cell_ranges::xlsx_convert(oox::xlsx_conversion_context & Context)
{
if (table_cell_ranges_address_)//??? split by ref
{
//formulasconvert::odf2oox_converter formulas_converter;
//
//std::wstring ref = formulas_converter.convert_named_ref(*table_cell_range_address_, false);
//std::wstring table_name = formulas_converter.get_table_name();
//Context.get_pivots_context().set_source_range(table_name, ref);
}
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_source_service::ns = L"table";
const wchar_t * table_source_service::name = L"source-service";
@ -282,7 +341,8 @@ const wchar_t * table_data_pilot_level::name = L"data-pilot-level";
void table_data_pilot_level::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:show-empty-address", table_show_empty_);
CP_APPLY_ATTR(L"table:show-empty", table_show_empty_);
CP_APPLY_ATTR(L"calcext:repeat-item-labels", calcext_repeat_item_labels_);
}
void table_data_pilot_level::add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name)
{
@ -299,22 +359,28 @@ void table_data_pilot_level::add_child_element( xml::sax * Reader, const std::ws
}
void table_data_pilot_level::xlsx_convert(oox::xlsx_conversion_context & Context)
{
table_data_pilot_members* members = dynamic_cast<table_data_pilot_members*>(members_.get());
table_data_pilot_subtotals* subtotals = dynamic_cast<table_data_pilot_subtotals*>(subtotals_.get());
if (table_show_empty_)
Context.get_pivots_context().set_field_show_empty(table_show_empty_->get());
for (size_t i = 0; members && i < members->content_.size(); i++)
if (calcext_repeat_item_labels_)
Context.get_pivots_context().set_repeat_item_labels(calcext_repeat_item_labels_->get());
if (members_)
members_->xlsx_convert(Context);
if (subtotals_)
subtotals_->xlsx_convert(Context);
table_data_pilot_sort_info *sort = dynamic_cast<table_data_pilot_sort_info*>(sort_info_.get());
if (sort)
{
table_data_pilot_member* member = dynamic_cast<table_data_pilot_member*>(members->content_[i].get());
if (member)
Context.get_pivots_context().add_field_cache(i, member->table_name_.get_value_or(L""));
Context.get_pivots_context().set_field_sort(sort->table_order_.get_value_or(table_order::ascending).get_type());
}
for (size_t i = 0; subtotals && i < subtotals->content_.size(); i++)
table_data_pilot_layout_info *layout = dynamic_cast<table_data_pilot_layout_info*>(layout_info_.get());
if (layout)
{
table_data_pilot_subtotal* subtotal = dynamic_cast<table_data_pilot_subtotal*>(subtotals->content_[i].get());
if (subtotal)
{
Context.get_pivots_context().add_field_subtotal(subtotal->table_function_.get_value_or(table_function::Auto).get_type());
}
}
}
//-------------------------------------------------------------------------------------------------
@ -337,7 +403,10 @@ void table_data_pilot_groups::add_child_element( xml::sax * Reader, const std::w
}
void table_data_pilot_groups::xlsx_convert(oox::xlsx_conversion_context & Context)
{
for (size_t i = 0; i < content_.size(); i++)
if (table_grouped_by_)
Context.get_pivots_context().set_field_groups(table_grouped_by_->get_type());
for (size_t i = 0; i < content_.size(); i++)
{
content_[i]->xlsx_convert(Context);
}
@ -389,7 +458,7 @@ void table_data_pilot_member::add_attributes( const xml::attributes_wc_ptr & Att
void table_data_pilot_member::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.get_pivots_context().add_field_cache(-1, table_name_.get_value_or(L""));
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_group_member::ns = L"table";
@ -430,7 +499,21 @@ void table_data_pilot_subtotal::add_attributes( const xml::attributes_wc_ptr & A
void table_data_pilot_subtotal::xlsx_convert(oox::xlsx_conversion_context & Context)
{
Context.get_pivots_context().add_field_subtotal(table_function_.get_value_or(table_function::Auto).get_type());
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_grand_total::ns = L"tableooo";
const wchar_t * table_data_pilot_grand_total::name = L"data-pilot-grand-total";
void table_data_pilot_grand_total::add_attributes( const xml::attributes_wc_ptr & Attributes )
{
CP_APPLY_ATTR(L"table:display" , table_display_);
CP_APPLY_ATTR(L"table:orientation" , table_orientation_);
//CP_APPLY_ATTR(L"table:display-name" , table_display_name_);
CP_APPLY_ATTR(L"tableooo:display-name" , table_display_name_);
}
void table_data_pilot_grand_total::xlsx_convert(oox::xlsx_conversion_context & Context)
{
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_layout_info::ns = L"table";
@ -440,10 +523,6 @@ void table_data_pilot_layout_info::add_attributes( const xml::attributes_wc_ptr
{
CP_APPLY_ATTR(L"table:add-empty-lines" , table_add_empty_lines_);
CP_APPLY_ATTR(L"table:layout-mode" , table_layout_mode_);
}
void table_data_pilot_layout_info::xlsx_convert(oox::xlsx_conversion_context & Context)
{
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_sort_info::ns = L"table";
@ -454,10 +533,6 @@ void table_data_pilot_sort_info::add_attributes( const xml::attributes_wc_ptr &
CP_APPLY_ATTR(L"table:data-field" , table_data_field_);
CP_APPLY_ATTR(L"table:order" , table_order_);
CP_APPLY_ATTR(L"table:sort-mode" , table_sort_mode_);
}
void table_data_pilot_sort_info::xlsx_convert(oox::xlsx_conversion_context & Context)
{
}
//-------------------------------------------------------------------------------------------------
const wchar_t * table_data_pilot_display_info::ns = L"table";
@ -469,10 +544,6 @@ void table_data_pilot_display_info::add_attributes( const xml::attributes_wc_ptr
CP_APPLY_ATTR(L"table:display-member-mode" , table_display_member_mode_);
CP_APPLY_ATTR(L"table:enabled" , table_enabled_);
CP_APPLY_ATTR(L"table:member-count" , table_member_count_);
}
void table_data_pilot_display_info::xlsx_convert(oox::xlsx_conversion_context & Context)
{
}
}
}

View File

@ -46,6 +46,7 @@
#include "datatypes/tabletype.h"
#include "datatypes/tablefunction.h"
#include "datatypes/tableorder.h"
#include "datatypes/dategroup.h"
namespace cpdoccore {
namespace odf_reader {
@ -96,10 +97,11 @@ public:
_CP_OPT(odf_types::grand_total)table_grand_total_;
_CP_OPT(odf_types::Bool) table_identify_categories_;
_CP_OPT(odf_types::Bool) table_ignore_empty_rows_;
_CP_OPT(odf_types::Bool) table_show_filter_button_;
bool table_show_filter_button_;
office_element_ptr source_;
office_element_ptr_array fields_;
office_element_ptr grand_total_;
};
CP_REGISTER_OFFICE_ELEMENT2(table_data_pilot_table);
@ -136,6 +138,30 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(table_data_pilot_field);
//-------------------------------------------------------------------------------------
class table_data_pilot_grand_total : public office_element_impl<table_data_pilot_grand_total>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTableDataPilotGrandTotal;
CPDOCCORE_DEFINE_VISITABLE();
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
public:
_CP_OPT(std::wstring) table_display_name_;
_CP_OPT(odf_types::Bool) table_display_;
_CP_OPT(odf_types::table_orientation) table_orientation_;
};
CP_REGISTER_OFFICE_ELEMENT2(table_data_pilot_grand_total );
//-------------------------------------------------------------------------------------
class table_data_pilot_field_reference : public office_element_impl<table_data_pilot_field_reference>
{
public:
@ -178,7 +204,7 @@ private:
public:
_CP_OPT(std::wstring) table_database_name_;
_CP_OPT(std::wstring) table_database_table_name_;
_CP_OPT(std::wstring) table_table_name_;
};
CP_REGISTER_OFFICE_ELEMENT2(table_database_source_table);
@ -253,6 +279,27 @@ public:
CP_REGISTER_OFFICE_ELEMENT2(table_source_cell_range);
//-------------------------------------------------------------------------------------
class table_source_cell_ranges : public office_element_impl<table_source_cell_ranges>
{
public:
static const wchar_t * ns;
static const wchar_t * name;
static const xml::NodeType xml_type = xml::typeElement;
static const ElementType type = typeTableSourceCellRanges;
CPDOCCORE_DEFINE_VISITABLE();
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
public:
_CP_OPT(std::wstring) table_cell_ranges_address_;
};
CP_REGISTER_OFFICE_ELEMENT2(table_source_cell_ranges);
//-------------------------------------------------------------------------------------
class table_source_service : public office_element_impl<table_source_service>
{
@ -297,6 +344,7 @@ private:
public:
_CP_OPT(odf_types::Bool) table_show_empty_;
_CP_OPT(odf_types::Bool) calcext_repeat_item_labels_;
office_element_ptr members_;
office_element_ptr subtotals_;
@ -323,13 +371,13 @@ private:
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name);
public:
_CP_OPT(std::wstring) table_date_end_;
_CP_OPT(std::wstring) table_date_start_;
_CP_OPT(std::wstring) table_start; //double 18.2 or auto.
_CP_OPT(std::wstring) table_end_; //double 18.2 or auto.
_CP_OPT(std::wstring) table_grouped_by_; //seconds, minutes, hours, days, months, quarters or years.
_CP_OPT(std::wstring) table_source_field_name_;
_CP_OPT(double) table_step;
_CP_OPT(std::wstring) table_date_end_;
_CP_OPT(std::wstring) table_date_start_;
_CP_OPT(std::wstring) table_start; //double 18.2 or auto.
_CP_OPT(std::wstring) table_end_; //double 18.2 or auto.
_CP_OPT(odf_types::date_group) table_grouped_by_;
_CP_OPT(std::wstring) table_source_field_name_;
_CP_OPT(double) table_step;
office_element_ptr_array content_;
};
@ -478,7 +526,7 @@ public:
static const ElementType type = typeTableDataLayoutInfo;
CPDOCCORE_DEFINE_VISITABLE();
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
@ -500,7 +548,7 @@ public:
static const ElementType type = typeTableDataSortInfo;
CPDOCCORE_DEFINE_VISITABLE();
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );
@ -523,7 +571,7 @@ public:
static const ElementType type = typeTableDataDisplayInfo;
CPDOCCORE_DEFINE_VISITABLE();
virtual void xlsx_convert(oox::xlsx_conversion_context & Context);
virtual void xlsx_convert(oox::xlsx_conversion_context & Context){}
private:
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes );

View File

@ -449,6 +449,14 @@
RelativePath="..\src\odf\datatypes\common_attlists.h"
>
</File>
<File
RelativePath="..\src\odf\datatypes\dategroup.cpp"
>
</File>
<File
RelativePath="..\src\odf\datatypes\dategroup.h"
>
</File>
<File
RelativePath="..\src\odf\datatypes\direction.cpp"
>

View File

@ -60,7 +60,7 @@ int _tmain(int argc, _TCHAR* argv[])
pptFile.put_TempDirectory(tempPath);
HRESULT hRes = pptFile.LoadFromFile(sSrcPpt, dstTempPath, L"");
HRESULT hRes = pptFile.LoadFromFile(sSrcPpt, dstTempPath, L"password");
if (hRes == S_OK)
{

View File

@ -1922,7 +1922,7 @@
17063B5B1AC5708E0056A3F1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17063B5E1AC5708E0056A3F1 /* Build configuration list for PBXProject "PPTXFormatLib" */;
@ -2004,14 +2004,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -2033,7 +2039,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -2049,14 +2055,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -2072,7 +2084,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -394,7 +394,7 @@
6967B1211E27B44D00A129E2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
6967B1281E27B44D00A129E2 = {
@ -468,7 +468,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -476,7 +478,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -499,7 +505,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -515,7 +521,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -523,7 +531,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -540,7 +552,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@ -148,7 +148,7 @@
6967AFB71E2798B900A129E2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
6967AFBE1E2798B900A129E2 = {
@ -202,7 +202,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -210,7 +212,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -233,7 +239,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -249,7 +255,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -257,7 +265,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -274,7 +286,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@ -73,6 +73,8 @@ int AxcExt::serialize(std::wostream & _stream)
CP_XML_WRITER(_stream)
{
CP_XML_NODE(L"c:auto") { CP_XML_ATTR(L"val", !fAutoCross); }
if (fAutoMax == false)
{
CP_XML_NODE(L"c:max")

View File

@ -36,8 +36,6 @@
namespace XLS
{
// Logical representation of Scatter record in BIFF8
class Scatter: public BiffRecord
{
BIFF_RECORD_DEFINE_TYPE_INFO(Scatter)
@ -48,7 +46,6 @@ public:
BaseObjectPtr clone();
void readFields(CFRecord& record);
static const ElementType type = typeScatter;

View File

@ -539,7 +539,7 @@ class cropFromLeft : public FixedPoint
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(cropFromLeft)
};
class cropFromRight : public OfficeArtFOPTE
class cropFromRight : public FixedPoint
{
BASE_STRUCTURE_DEFINE_CLASS_NAME(cropFromRight)
};

View File

@ -75,6 +75,24 @@ const bool AI::loadContent(BinProcessor& proc)
return true;
}
bool AI::empty()
{
if (!m_SeriesText && !m_BRAI) return true;
BRAI* brai = dynamic_cast<BRAI*>(m_BRAI.get());
if (brai)
{
std::wstring forumla = brai->formula.getAssembledFormula();
return forumla.empty();
}
SeriesText * text = dynamic_cast<SeriesText *>(m_SeriesText.get());
if (text)
{
return text->stText.value().empty();
}
return false;
}
int AI::serialize(std::wostream & _stream)
{

View File

@ -35,9 +35,6 @@
namespace XLS
{
// Logical representation of AI union of records
class AI: public CompositeObject
{
BASE_OBJECT_DEFINE_CLASS_NAME(AI)
@ -51,6 +48,8 @@ public:
int serialize(std::wostream & _stream);
bool empty();
BaseObjectPtr m_SeriesText ;
BaseObjectPtr m_BRAI;

View File

@ -216,15 +216,29 @@ int ATTACHEDLABEL::serialize(std::wostream & _stream, bool isPosition)
int count_runs = allRuns ? allRuns->rgRuns.size() : 0;
Text * textProps = dynamic_cast<Text*> (m_TextProperties.get());
bool rtl = false;
if((textProps) && (textProps->iReadingOrder == (unsigned char)2)) rtl = true;
FRAME *FRAME_ = dynamic_cast<FRAME*> (m_FRAME.get());
Pos *Pos_ = dynamic_cast<Pos*> (m_Pos.get());
if (FRAME_ && Pos_)
if (Pos_)
{
Pos_->m_Frame = FRAME_->m_Frame;
Pos_->m_Frame = FRAME_ ? FRAME_->m_Frame : NULL;
}
else if (isPosition && textProps)
{
m_Pos = BaseObjectPtr(new Pos());
Pos_ = dynamic_cast<Pos*>(m_Pos.get());
Pos_->mdTopLt = 2;
Pos_->mdBotRt = 2;
Pos_->x1 = textProps->x;
Pos_->y1 = textProps->y;
Pos_->x2 = textProps->dx;
Pos_->y2 = textProps->dx;
}
CP_XML_WRITER(_stream)

View File

@ -48,6 +48,7 @@ namespace XLS
AXES::AXES()
{
bAxisCategories = false;
}
@ -152,6 +153,8 @@ const bool AXES::loadContent(BinProcessor& proc)
if (iv)
{
bAxisCategories = true;
id = iv->id;
type = 1;
@ -234,7 +237,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
break;
}
}
}
CP_XML_WRITER(_stream)
{
for (size_t i = 0 ; i < m_arAxes.size(); i++)
@ -246,8 +249,8 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
std::wstring node_ax_type = L"c:valAx";
if (iv)
{
if (iv->bDataAxis) node_ax_type = L"c:dateAx";
else node_ax_type = L"c:catAx";
if (iv->bDataAxis) node_ax_type = L"c:dateAx";
else node_ax_type = L"c:catAx";
iv->m_bSecondary = secondary;
}
@ -273,7 +276,7 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
l_->m_bUsed = true;
break;
}
if (l_->m_iLinkObject == 3 && l_->m_bUsed == false && iv)
if (l_->m_iLinkObject == 3 && l_->m_bUsed == false && ((bAxisCategories && iv) || (!bAxisCategories && (dv || ser))))
{
label = l_;
l_->m_bUsed = true;
@ -315,18 +318,21 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
{
if (m_arAxesId[i].second == 3 && m_arAxesId[j].second == 1)continue;
CP_XML_NODE(L"c:crossAx"){CP_XML_ATTR(L"val", m_arAxesId[j].first);}
CP_XML_NODE(L"c:crossAx") {CP_XML_ATTR(L"val", m_arAxesId[j].first);}
}
}
CP_XML_NODE(L"c:crossBetween")
if (dv)
{
if ((iv == NULL && iv_CatSerRange) && (iv_CatSerRange->fBetween == false))
CP_XML_NODE(L"c:crossBetween")
{
CP_XML_ATTR(L"val", L"midCat");
}
else
{
CP_XML_ATTR(L"val", L"between");
if ((iv_CatSerRange) && (iv_CatSerRange->fBetween == false))
{
CP_XML_ATTR(L"val", L"midCat");
}
else
{
CP_XML_ATTR(L"val", L"between");
}
}
}
}

View File

@ -59,6 +59,8 @@ public:
BaseObjectPtr m_PlotArea_FRAME;
BaseObjectPtr m_Wall_FRAME;
BaseObjectPtr m_Floor_FRAME;
bool bAxisCategories;
};
} // namespace XLS

View File

@ -136,31 +136,33 @@ int DVAXIS::serialize(std::wostream & _stream)
}
CP_XML_NODE(L"c:scaling")
{
if ((value_range) && (value_range->fLog == true))
{
CP_XML_NODE(L"c:logBase") { CP_XML_ATTR(L"val", 10); }
bLogarithScale = true;
}
CP_XML_NODE(L"c:orientation")
{
if ((value_range) && (value_range->fReversed)) CP_XML_ATTR(L"val", L"maxMin");
else CP_XML_ATTR(L"val", L"minMax");
}
if ((value_range) && (value_range->fAutoMax == false))
if (value_range)
{
CP_XML_NODE(L"c:max")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMax));
else CP_XML_ATTR(L"val", value_range->numMax);
}
}
if ((value_range) && (value_range->fAutoMin == false))
{
CP_XML_NODE(L"c:min")
if (value_range->fLog == true)
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMin));
else CP_XML_ATTR(L"val", value_range->numMin);
CP_XML_NODE(L"c:logBase") { CP_XML_ATTR(L"val", 10); }
bLogarithScale = true;
}
if (value_range->fAutoMax == false)
{
CP_XML_NODE(L"c:max")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMax));
else CP_XML_ATTR(L"val", value_range->numMax);
}
}
if (value_range->fAutoMin == false)
{
CP_XML_NODE(L"c:min")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMin));
else CP_XML_ATTR(L"val", value_range->numMin);
}
}
}
}
@ -187,26 +189,30 @@ int DVAXIS::serialize(std::wostream & _stream)
//----------------------------------------------------------------------------------------------
m_AXS->serialize(_stream);
CP_XML_NODE(L"c:crosses")
if (value_range)
{
if ((value_range) && (value_range->fMaxCross == true)) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
if ((value_range) && (value_range->fAutoMajor == false))
{
CP_XML_NODE(L"c:majorUnit")
CP_XML_NODE(L"c:crosses")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMajor));
else CP_XML_ATTR(L"val", value_range->numMajor);
if (value_range->fMaxCross == true) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
}
if ((value_range) && (value_range->fAutoMinor == false))
{
CP_XML_NODE(L"c:minorUnit")
CP_XML_NODE(L"c:auto") { CP_XML_ATTR(L"val", !value_range->fAutoCross); }
if (value_range->fAutoMajor == false)
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMinor));
else CP_XML_ATTR(L"val", value_range->numMinor);
CP_XML_NODE(L"c:majorUnit")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMajor));
else CP_XML_ATTR(L"val", value_range->numMajor);
}
}
if (value_range->fAutoMinor == false)
{
CP_XML_NODE(L"c:minorUnit")
{
if (bLogarithScale) CP_XML_ATTR(L"val", pow(10, value_range->numMinor));
else CP_XML_ATTR(L"val", value_range->numMinor);
}
}
}
}

View File

@ -153,7 +153,6 @@ int IVAXIS::serialize(std::wostream & _stream)
CP_XML_NODE(L"c:orientation"){ CP_XML_ATTR(L"val", L"minMax"); }
}
}
CP_XML_NODE(L"c:auto") { CP_XML_ATTR(L"val", 0); }
CP_XML_NODE(L"c:delete"){ CP_XML_ATTR(L"val", 0); }
//-------------------------------------------------------------------------------
@ -181,11 +180,33 @@ int IVAXIS::serialize(std::wostream & _stream)
if (m_AxcExt)
m_AxcExt->serialize(_stream);
CP_XML_NODE(L"c:crosses")
if (cat_ser_range)
{
if ((cat_ser_range) && (cat_ser_range->fMaxCross == true)) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
CP_XML_NODE(L"c:crosses")
{
if (cat_ser_range->fMaxCross == true) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
}
if (m_CatLab)
{
CatLab *label = dynamic_cast<CatLab*>(m_CatLab.get());
CP_XML_NODE(L"c:lblAlgn")
{
switch(label->at)
{
case 0x0001: CP_XML_ATTR(L"val", L"l"); break;
case 0x0003: CP_XML_ATTR(L"val", L"r"); break;
case 0x0002:
default: CP_XML_ATTR(L"val", L"ctr"); break;
}
}
CP_XML_NODE(L"c:lblOffset")
{
CP_XML_ATTR(L"val", label->wOffset);
}
}
}
return axes_type;

View File

@ -153,7 +153,6 @@ int SERIESAXIS::serialize(std::wostream & _stream)
CP_XML_NODE(L"c:orientation"){ CP_XML_ATTR(L"val", L"minMax"); }
}
}
CP_XML_NODE(L"c:auto") { CP_XML_ATTR(L"val", 0); }
CP_XML_NODE(L"c:delete"){ CP_XML_ATTR(L"val", 0); }
//-------------------------------------------------------------------------------
@ -178,11 +177,14 @@ int SERIESAXIS::serialize(std::wostream & _stream)
//-----------------------------------------------------------------------------------
m_AXS->serialize(_stream);
CP_XML_NODE(L"c:crosses")
if (cat_ser_range)
{
if ((cat_ser_range) && (cat_ser_range->fMaxCross == true)) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
CP_XML_NODE(L"c:crosses")
{
if (cat_ser_range->fMaxCross == true) CP_XML_ATTR(L"val", L"max");
else CP_XML_ATTR(L"val", L"autoZero");
}
}
}
return axes_type;

View File

@ -385,7 +385,8 @@ int SS::serialize(std::wostream & _stream, int series_type, int indPt)
if (series_type == CHART_TYPE_Scatter || series_type == CHART_TYPE_Stock)
//points only - todooo сделать дефолтовые точки ala 95 стиль & stork
{
CP_XML_NODE(L"a:noFill");
m_isAutoLine = false;
//CP_XML_NODE(L"a:noFill");
}
else
{
@ -445,20 +446,20 @@ int SS::serialize2(std::wostream & _stream, int series_type)
}
}
if (m_isAutoLine == false && ( series_type == CHART_TYPE_Line ||
series_type == CHART_TYPE_Radar ||
series_type == CHART_TYPE_Scatter))
{
if (series_format)
{
CP_XML_NODE(L"c:smooth")
{
CP_XML_ATTR(L"val", series_format->fSmoothedLine);
}
}
else
CP_XML_NODE(L"c:smooth") { CP_XML_ATTR(L"val", 0); }
}
//if (m_isAutoLine == false && ( series_type == CHART_TYPE_Line ||
// series_type == CHART_TYPE_Radar/* ||
// series_type == CHART_TYPE_Scatter*/))
//{
// if (series_format)
// {
// CP_XML_NODE(L"c:smooth")
// {
// CP_XML_ATTR(L"val", series_format->fSmoothedLine);
// }
// }
// else
// CP_XML_NODE(L"c:smooth") { CP_XML_ATTR(L"val", 0); }
//}
}
return 0;
}

View File

@ -629,10 +629,10 @@ int ChartSheetSubstream::serialize_title (std::wostream & _stream)
if (title_label == NULL) return 0;
AI* title_text = dynamic_cast<AI *>(title_label->m_AI.get());
if (title_text == NULL) return 0;
if (!title_text->m_SeriesText && !title_text->m_BRAI) return 0; // если не выкидывать будет рисоваться placeholder
if (title_text == NULL) return 0;
if (title_text->empty()) return 0;
CP_XML_WRITER(_stream)
{
CP_XML_NODE(L"c:title")
@ -753,6 +753,8 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
PlotAreaPos->serialize(CP_XML_STREAM());
}
int series_order = 0;
for (std::unordered_map<int, std::vector<int>>::iterator it = m_mapTypeChart.begin(); it != m_mapTypeChart.end(); it++)
{
CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[it->first].get());
@ -799,7 +801,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
CP_XML_NODE(L"c:ser")
{
CP_XML_NODE(L"c:idx") { CP_XML_ATTR (L"val" , series_id); }
CP_XML_NODE(L"c:order") { CP_XML_ATTR (L"val" , series_id); }
CP_XML_NODE(L"c:order") { CP_XML_ATTR (L"val" , series_order++); }
series->m_arAI[0]->serialize(CP_XML_STREAM());

View File

@ -1475,22 +1475,22 @@ void XlsConverter::convert_blip(std::vector<ODRAW::OfficeArtFOPTEPtr> & props)
case 0x100:
{
if (fixed_point)
xlsx_context->get_drawing_context().set_crop_top(fixed_point->dVal);
xlsx_context->get_drawing_context().set_crop_top(fixed_point->dVal * 10);
}break;
case 0x101:
{
if (fixed_point)
xlsx_context->get_drawing_context().set_crop_bottom(fixed_point->dVal);
xlsx_context->get_drawing_context().set_crop_bottom(fixed_point->dVal * 10);
}break;
case 0x102:
{
if (fixed_point)
xlsx_context->get_drawing_context().set_crop_left(fixed_point->dVal);
xlsx_context->get_drawing_context().set_crop_left(fixed_point->dVal * 10);
}break;
case 0x103:
{
if (fixed_point)
xlsx_context->get_drawing_context().set_crop_right(fixed_point->dVal);
xlsx_context->get_drawing_context().set_crop_right(fixed_point->dVal * 10);
}break;
case 0x104:
{

View File

@ -514,8 +514,8 @@ void xlsx_drawing_context::end_drawing(_drawing_state_ptr & drawing_state)
if (drawing_state->id < 0)
drawing_state->id = count_object + 0x20000;
if ( drawing_state->type == external_items::typeImage ||
drawing_state->shape_id == msosptPictureFrame )
if ( drawing_state->type == external_items::typeImage ||
( drawing_state->type == external_items::typeShape && drawing_state->shape_id == msosptPictureFrame ))
{
drawing_state->type = external_items::typeImage;
@ -1687,10 +1687,10 @@ void xlsx_drawing_context::serialize_bitmap_fill(std::wostream & stream, _drawin
{
if (fill.texture_crop_enabled)
{
CP_XML_ATTR(L"l", static_cast<size_t>(fill.texture_crop[0]));
CP_XML_ATTR(L"t", static_cast<size_t>(fill.texture_crop[1]));
CP_XML_ATTR(L"r", static_cast<size_t>(fill.texture_crop[2]));
CP_XML_ATTR(L"b", static_cast<size_t>(fill.texture_crop[3]));
CP_XML_ATTR(L"l", static_cast<long>(fill.texture_crop[0] * 10000));
CP_XML_ATTR(L"t", static_cast<long>(fill.texture_crop[1] * 10000));
CP_XML_ATTR(L"r", static_cast<long>(fill.texture_crop[2] * 10000));
CP_XML_ATTR(L"b", static_cast<long>(fill.texture_crop[3] * 10000));
}
}
if (fill.texture_mode == textureStretch)

View File

@ -239,7 +239,7 @@ public:
{
color.SetRGB(0xff, 0xff, 0xff);
angle = opacity = opacity2 = focus = 0; type = fillSolid;
memset(texture_crop, 0, 4 * sizeof(int));
memset(texture_crop, 0, 4 * sizeof(double));
texture_crop_enabled = false;
}
_color color;
@ -252,7 +252,7 @@ public:
double angle;
std::wstring texture_target;
int texture_crop[4];
double texture_crop[4];
bool texture_crop_enabled;
_texture_mode texture_mode;

View File

@ -1114,7 +1114,7 @@
17E69FD41AC4259800F28F8B /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17E69FD71AC4259800F28F8B /* Build configuration list for PBXProject "DocxFormatLib" */;
@ -1277,14 +1277,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -1306,7 +1312,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -1322,14 +1328,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -1345,7 +1357,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -73,6 +73,7 @@ public:
bool isRtfFormatFile (unsigned char* pBuffer,int dwBytes);
bool isHtmlFormatFile (unsigned char* pBuffer,int dwBytes, bool testCloseTag);
bool isPdfFormatFile (unsigned char* pBuffer,int dwBytes);
bool isOpenOfficeFlatFormatFile(unsigned char* pBuffer,int dwBytes);
bool isBinaryDoctFormatFile (unsigned char* pBuffer,int dwBytes);
bool isBinaryXlstFormatFile (unsigned char* pBuffer,int dwBytes);

View File

@ -233,8 +233,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
else if ( isOnlyOfficeFormatFile(fileName) ) return true;
else if ( isXpsFile(fileName) ) return true;
}
//-----------------------------------------------------------------------------------------------
// others
{
NSFile::CFileBinary file;
@ -272,7 +271,7 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
{
nFileType = AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_DJVU;
}
else if (isHtmlFormatFile(buffer,sizeRead, false))
else if (isHtmlFormatFile(buffer,sizeRead, false))
{
long fileSize = file.GetFileSize();
if (fileSize > MIN_SIZE_BUFFER)
@ -290,14 +289,18 @@ bool COfficeFileFormatChecker::isOfficeFile(const std::wstring & fileName)
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_FB2;
}
/////////////////////////////////////////////////////////////////////////
else if (isOpenOfficeFlatFormatFile(buffer,sizeRead) )
{
//nFileType
}
//------------------------------------------------------------------------------------------------
file.CloseFile();
if (buffer)delete []buffer;
buffer = NULL;
}
if (nFileType != AVS_OFFICESTUDIO_FILE_UNKNOWN)return true;
//------------------------------------------------------------------------------------------------
//// by Extension
std::wstring::size_type nExtPos = fileName.rfind(L'.');
@ -546,6 +549,39 @@ bool COfficeFileFormatChecker::isOpenOfficeFormatFile(const std::wstring & fileN
return false;
}
bool COfficeFileFormatChecker::isOpenOfficeFlatFormatFile(unsigned char* pBuffer,int dwBytes)
{
const char *odfFormatLine = "office:document xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\"";
std::string xml_string((char*)pBuffer, dwBytes);
if (std::string::npos == xml_string.find(odfFormatLine))
{
return false;
}
const char *odtFormatLine = "application/vnd.oasis.opendocument.text";
const char *odsFormatLine = "application/vnd.oasis.opendocument.spreadsheet";
const char *odpFormatLine = "application/vnd.oasis.opendocument.presentation";
if (std::string::npos != xml_string.find(odtFormatLine))
{
nFileType = AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT_FLAT;
}
else if (std::string::npos != xml_string.find(odsFormatLine))
{
nFileType = AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS_FLAT;
}
else if (std::string::npos != xml_string.find(odpFormatLine))
{
nFileType = AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP_FLAT;
}
if (nFileType != AVS_OFFICESTUDIO_FILE_UNKNOWN) return true;
return false;
}
std::wstring COfficeFileFormatChecker::GetExtensionByType(int type)
{
switch (type)

View File

@ -47,6 +47,7 @@
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_DOCM AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x000b
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTX AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x000c
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_DOTM AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x000d
#define AVS_OFFICESTUDIO_FILE_DOCUMENT_ODT_FLAT AVS_OFFICESTUDIO_FILE_DOCUMENT + 0x000e
#define AVS_OFFICESTUDIO_FILE_PRESENTATION 0x0080
#define AVS_OFFICESTUDIO_FILE_PRESENTATION_PPTX AVS_OFFICESTUDIO_FILE_PRESENTATION + 0x0001
@ -57,6 +58,7 @@
#define AVS_OFFICESTUDIO_FILE_PRESENTATION_PPSM AVS_OFFICESTUDIO_FILE_PRESENTATION + 0x0006
#define AVS_OFFICESTUDIO_FILE_PRESENTATION_POTX AVS_OFFICESTUDIO_FILE_PRESENTATION + 0x0007
#define AVS_OFFICESTUDIO_FILE_PRESENTATION_POTM AVS_OFFICESTUDIO_FILE_PRESENTATION + 0x0008
#define AVS_OFFICESTUDIO_FILE_PRESENTATION_ODP_FLAT AVS_OFFICESTUDIO_FILE_PRESENTATION + 0x0009
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET 0x0100
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSX AVS_OFFICESTUDIO_FILE_SPREADSHEET + 0x0001
@ -66,6 +68,7 @@
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLSM AVS_OFFICESTUDIO_FILE_SPREADSHEET + 0x0005
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTX AVS_OFFICESTUDIO_FILE_SPREADSHEET + 0x0006
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET_XLTM AVS_OFFICESTUDIO_FILE_SPREADSHEET + 0x0007
#define AVS_OFFICESTUDIO_FILE_SPREADSHEET_ODS_FLAT AVS_OFFICESTUDIO_FILE_SPREADSHEET + 0x0008
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM 0x0200
#define AVS_OFFICESTUDIO_FILE_CROSSPLATFORM_PDF AVS_OFFICESTUDIO_FILE_CROSSPLATFORM + 0x0001

View File

@ -251,7 +251,7 @@
7C560F671AA71A91000E5860 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System";
TargetAttributes = {
7C560F6E1AA71A91000E5860 = {
@ -341,14 +341,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -370,7 +376,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -386,14 +392,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -408,7 +420,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;

View File

@ -727,7 +727,7 @@
17D918631AC5A19D0096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D918661AC5A19D0096D788 /* Build configuration list for PBXProject "agg" */;
@ -852,14 +852,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -897,14 +903,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -278,7 +278,7 @@
17D91A341AC5A7C20096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D91A371AC5A7C20096D788 /* Build configuration list for PBXProject "cximage" */;
@ -402,14 +402,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -447,14 +453,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -457,7 +457,7 @@
175CBDA41AC93C09007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CBDA71AC93C09007D7DEC /* Build configuration list for PBXProject "jasper" */;
@ -547,14 +547,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -592,14 +598,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -93,7 +93,7 @@
175CBE931AC9458E007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CBE961AC9458E007D7DEC /* Build configuration list for PBXProject "jbig" */;
@ -134,14 +134,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -179,14 +185,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -335,7 +335,7 @@
175CBEBF1AC94658007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CBEC21AC94658007D7DEC /* Build configuration list for PBXProject "jpeg" */;
@ -442,14 +442,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -487,14 +493,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -281,7 +281,7 @@
175CBF9A1AC948D9007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CBF9D1AC948D9007D7DEC /* Build configuration list for PBXProject "libpsd" */;
@ -370,14 +370,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -415,14 +421,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -228,7 +228,7 @@
175CC0451AC949B4007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CC0481AC949B4007D7DEC /* Build configuration list for PBXProject "mng" */;
@ -286,14 +286,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -315,7 +321,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -331,14 +337,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -354,7 +366,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -159,7 +159,7 @@
175CC1791AC9569C007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CC17C1AC9569C007D7DEC /* Build configuration list for PBXProject "png" */;
@ -214,14 +214,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -259,14 +265,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -90,7 +90,7 @@
175CC14D1AC9560E007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CC1501AC9560E007D7DEC /* Build configuration list for PBXProject "raw" */;
@ -130,14 +130,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -175,14 +181,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -249,7 +249,7 @@
175CC0AE1AC94D62007D7DEC /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 175CC0B11AC94D62007D7DEC /* Build configuration list for PBXProject "tiff" */;
@ -326,14 +326,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -371,14 +377,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -199,7 +199,7 @@
17D9182D1AC5A0870096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D918301AC5A0870096D788 /* Build configuration list for PBXProject "fontengine" */;
@ -301,14 +301,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -330,7 +336,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -346,14 +352,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -369,7 +381,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -495,7 +495,7 @@
17D913FD1AC59C860096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D914001AC59C860096D788 /* Build configuration list for PBXProject "freetype" */;
@ -638,14 +638,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -683,14 +689,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -236,7 +236,7 @@
17D9130D1AC58E750096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D913101AC58E750096D788 /* Build configuration list for PBXProject "graphics" */;
@ -349,14 +349,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -378,7 +384,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
@ -394,14 +400,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -417,7 +429,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;

View File

@ -1042,10 +1042,7 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = _IOS;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
@ -1085,6 +1082,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = _IOS;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -97,7 +97,7 @@
17D913D51AC59B6E0096D788 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
};
buildConfigurationList = 17D913D81AC59B6E0096D788 /* Build configuration list for PBXProject "raster" */;
@ -178,14 +178,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -223,14 +229,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

View File

@ -1,4 +1,4 @@
/*====================================================================*
/*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
- This software is distributed in the hope that it will be
- useful, but with NO WARRANTY OF ANY KIND.
@ -371,7 +371,10 @@ l_int32 ignore;
snprintf(buf, L_BUF_SIZE,
"wgnuplot -persist %s", gplot->cmdname);
#endif /* _WIN32 */
#if !defined(_IOS)
ignore = system(buf);
#endif
return 0;
}

View File

@ -1,4 +1,4 @@
/*====================================================================*
/*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
- This software is distributed in the hope that it will be
- useful, but with NO WARRANTY OF ANY KIND.
@ -103,8 +103,10 @@ SARRAY *safiles, *sathumbs, *saviews, *sahtml, *salink;
/* Make the output directory if it doesn't already exist */
sprintf(charbuf, "mkdir -p %s", dirout);
#if !defined(_IOS)
ignore = system(charbuf);
#endif
/* Capture the filenames in the input directory */
if ((safiles = getFilenamesInDirectory(dirin)) == NULL)
return ERROR_INT("safiles not made", procName, 1);

View File

@ -1,4 +1,4 @@
/*====================================================================*
/*====================================================================*
- Copyright (C) 2001 Leptonica. All rights reserved.
- This software is distributed in the hope that it will be
- useful, but with NO WARRANTY OF ANY KIND.
@ -734,7 +734,9 @@ char pathname[_MAX_PATH];
if (index == 0) {
snprintf(buffer, L_BUF_SIZE, "rm -f /tmp/junk_display.*");
#if !defined(_IOS)
ignore = system(buffer);
#endif
}
index++;
@ -778,7 +780,10 @@ char pathname[_MAX_PATH];
"xzgv --geometry %dx%d+%d+%d %s &", wt + 10, ht + 10,
x, y, tempname);
}
#if !defined(_IOS)
ignore = system(buffer);
#endif
#else /* _WIN32 */
@ -791,7 +796,9 @@ char pathname[_MAX_PATH];
else
snprintf(buffer, L_BUF_SIZE, "i_view32.exe \"%s\" /pos=(%d,%d)",
pathname, x, y);
#if !defined(_IOS)
ignore = system(buffer);
#endif
#endif /* _WIN32 */
@ -841,7 +848,9 @@ char *dir, *tail;
FREE(tail);
#endif /* _WIN32 */
#if !defined(_IOS)
ignore = system(buffer);
#endif
return 0;
}
@ -927,7 +936,11 @@ static l_int32 index = 0; /* caution: not .so or thread safe */
if (index == 0) {
snprintf(buffer, L_BUF_SIZE,
"rm -f /tmp/junk_write_display.*.png /tmp/junk_write_display.*.jpg");
#if !defined(_IOS)
ignore = system(buffer);
#endif
}
index++;

View File

@ -360,7 +360,7 @@
69967F501E2F84F100B620CD /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
69967F571E2F84F100B620CD = {
@ -449,7 +449,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -457,7 +459,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -494,7 +500,7 @@
"$(PROJECT_DIR)/../libxml2/include",
"$(PROJECT_DIR)/../libxml2/include/libxml",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -511,7 +517,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -519,7 +527,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -554,7 +566,7 @@
"$(PROJECT_DIR)/../../libxml2/include",
"$(PROJECT_DIR)/../../libxml2/include/libxml",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@ -252,7 +252,7 @@ int CHtmlFile::Convert(const std::vector<std::wstring>& arFiles, const std::wstr
std::wstring sExt = NSCommon::GetFileExtention(sFilePath);
NSCommon::makeUpperW(sExt);
if (sExt == L"HTML" || sExt == L"HTM")
if (sExt == L"HTML" || sExt == L"HTM" || sExt == L"XHTML")
oBuilder.WriteEncodeXmlString(CorrectHtmlPath(sFilePath));
else
{

View File

@ -98,7 +98,7 @@
6967B0B51E27A22E00A129E2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0820;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
6967B0BC1E27A22E00A129E2 = {
@ -146,7 +146,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -154,7 +156,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -177,7 +183,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -193,7 +199,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -201,7 +209,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -218,7 +230,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
696DD6401F5974DC0021D0F3 /* bfinit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD5AA1F5974DB0021D0F3 /* bfinit.cpp */; };
696DD64B1F5974DC0021D0F3 /* crc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD5B51F5974DB0021D0F3 /* crc.cpp */; };
696DD66C1F5974DC0021D0F3 /* hmac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD5E21F5974DB0021D0F3 /* hmac.cpp */; };
696DD6771F5974DC0021D0F3 /* md5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD5EE1F5974DB0021D0F3 /* md5.cpp */; };
696DD7041F599E0A0021D0F3 /* cryptlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7031F599E0A0021D0F3 /* cryptlib.cpp */; };
@ -28,7 +27,6 @@
696DD7A31F59B4200021D0F3 /* misc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7A21F59B4200021D0F3 /* misc.cpp */; };
696DD7A61F59B5520021D0F3 /* modes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7A41F59B5520021D0F3 /* modes.cpp */; };
696DD7A91F59B5F50021D0F3 /* integer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7A71F59B5F50021D0F3 /* integer.cpp */; };
696DD7AC1F59B8270021D0F3 /* asn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7AA1F59B8270021D0F3 /* asn.cpp */; };
696DD7AF1F59B8630021D0F3 /* mqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7AD1F59B8630021D0F3 /* mqueue.cpp */; };
696DD7B21F59B88E0021D0F3 /* des.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7B01F59B88E0021D0F3 /* des.cpp */; };
696DD7B41F59B9030021D0F3 /* dessp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 696DD7B31F59B9030021D0F3 /* dessp.cpp */; };
@ -384,7 +382,7 @@
69880ED81F4D79BB00E4C541 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = OnlyOffce;
TargetAttributes = {
69880EDF1F4D79BC00E4C541 = {
@ -438,7 +436,6 @@
696DD7891F59A9520021D0F3 /* filters.cpp in Sources */,
696DD7A61F59B5520021D0F3 /* modes.cpp in Sources */,
696DD7A31F59B4200021D0F3 /* misc.cpp in Sources */,
696DD64B1F5974DC0021D0F3 /* crc.cpp in Sources */,
696DD7951F59AF8E0021D0F3 /* arc4.cpp in Sources */,
696DD7801F59A7C20021D0F3 /* rng.cpp in Sources */,
699A97841F5EA21600605160 /* xtr.cpp in Sources */,
@ -452,7 +449,6 @@
699A97851F5EA21600605160 /* xtrcrypt.cpp in Sources */,
69880EF71F4D79D900E4C541 /* ECMACryptFile.cpp in Sources */,
699A97D61F5EA9FE00605160 /* cbcmac.cpp in Sources */,
696DD7AC1F59B8270021D0F3 /* asn.cpp in Sources */,
696DD79E1F59B2110021D0F3 /* algparam.cpp in Sources */,
699A97D31F5EA9ED00605160 /* casts.cpp in Sources */,
699A977D1F5EA10000605160 /* eccrypto.cpp in Sources */,
@ -481,7 +477,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -489,7 +487,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -512,7 +514,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -529,7 +531,9 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
@ -537,7 +541,11 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -554,7 +562,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;

View File

@ -153,7 +153,7 @@
69676CA11CA58B7400D7A1D1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Ascensio System SIA";
TargetAttributes = {
69676CA81CA58B7400D7A1D1 = {
@ -206,14 +206,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -252,14 +258,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;

Some files were not shown because too many files have changed in this diff Show More