Compare commits

..

6 Commits

Author SHA1 Message Date
7c83535528 Merge branch hotfix/v7.0.1 into master 2022-02-22 08:13:32 +00:00
35a86586ab Merge pull request #849 from ONLYOFFICE/fix/bug-55460
Fix bug #55460
2022-02-15 11:51:25 +03:00
00fa7e7afe Fix bug #55460 2022-02-15 11:38:54 +03:00
dc574f6606 [x2t] For bug 55284 2022-02-06 13:02:42 +03:00
c886341ac1 Fix bug 53831 2022-02-04 15:03:06 +03:00
4a93c91011 Fix bug 47558 2022-01-28 11:39:25 +03:00
3074 changed files with 439822 additions and 288268 deletions

12
.gitignore vendored
View File

@ -26,15 +26,3 @@ Thumbs.db
*.dat
*.txt
*.log
*.ipch
*.ipch
*.ipch
*.db-wal
*.db-shm
*.db
*.opendb

View File

@ -1,31 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31624.102
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocFormatLib", "DocFormatLib.vcxproj", "{C5371405-338F-4B70-83BD-2A5CDF64F383}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x64.ActiveCfg = Debug|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x64.Build.0 = Debug|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x86.ActiveCfg = Debug|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Debug|x86.Build.0 = Debug|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.ActiveCfg = Release|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x64.Build.0 = Release|x64
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x86.ActiveCfg = Release|Win32
{C5371405-338F-4B70-83BD-2A5CDF64F383}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3EDBED06-16E0-41A4-B58C-20C41B41BE20}
EndGlobalSection
EndGlobal

View File

@ -68,8 +68,8 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<IncludePath>..\..\..\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>..\..\..\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
@ -88,7 +88,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\DesktopEditor\freetype-2.5.2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

View File

@ -3535,6 +3535,10 @@ int Binary_CustomsTableReader::ReadCustomContent(BYTE type, long length, void* p
{
pCustomXMLProps->m_oCustomXmlContent = m_oBufferedStream.GetString3(length);
}
else if (c_oSerCustoms::ContentA == type)
{
pCustomXMLProps->m_oCustomXmlContentA = m_oBufferedStream.GetString2A();
}
else
res = c_oSerConstants::ReadUnknown;
return res;

View File

@ -1158,7 +1158,8 @@ extern int g_nCurFormatVersion;
Custom = 0,
ItemId = 1,
Uri = 2,
Content = 3
Content = 3,
ContentA = 4
};}
namespace c_oSerApp{enum c_oSerApp
{

View File

@ -9058,11 +9058,8 @@ void BinaryCustomsTableWriter::Write(OOX::CDocument* pDocument)
}
}
int nCurPos2 = m_oBcw.WriteItemStart(c_oSerCustoms::Content);
std::wstring sXml = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)pCustomXml->m_sXmlA.c_str(), pCustomXml->m_sXmlA.length());
m_oBcw.m_oStream.WriteStringW3(sXml);
int nCurPos2 = m_oBcw.WriteItemStart(c_oSerCustoms::ContentA);
m_oBcw.m_oStream.WriteStringA(pCustomXml->m_sXmlA);
m_oBcw.WriteItemEnd(nCurPos2);
m_oBcw.WriteItemEnd(nCurPos);

View File

@ -578,51 +578,40 @@ namespace BinXlsxRW{
//SharedStrings
if(pCell->m_oValue.IsInit())
{
if (pCell->m_oType.IsInit())
pCell->m_oType.Init();
const std::wstring& val = pCell->m_oValue->m_sText;
if(L"TRUE" == val || L"FALSE" == val)
{
if (pCell->m_oType->GetValue() == SimpleTypes::Spreadsheet::celltypeSharedString)
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
if(L"TRUE" == val)
{
aSharedStrings.push_back(pCell->m_oValue->m_sText);
pCell->m_oValue->m_sText = std::to_wstring(aSharedStrings.size() - 1);
}
}
else
{
pCell->m_oType.Init();
const std::wstring& val = pCell->m_oValue->m_sText;
if(L"TRUE" == val || L"FALSE" == val)
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeBool);
if(L"TRUE" == val)
{
pCell->m_oValue->m_sText = L"1";
}
else
{
pCell->m_oValue->m_sText = L"0";
}
}
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
pCell->m_oValue->m_sText = val;
pCell->m_oValue->m_sText = L"1";
}
else
{
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (0 != *pEndPtr)
{
// Не число
aSharedStrings.push_back(val);
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
}
else
{
pCell->m_oValue->m_sText = val;
}
pCell->m_oValue->m_sText = L"0";
}
}
else if(L"#NULL!" == val || L"#DIV/0!" == val || L"#VALUE!" == val || L"#REF!" == val || L"#NAME?" == val || L"#NUM!" == val || L"#N/A" == val)
{
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeError);
pCell->m_oValue->m_sText = val;
}
else
{
//как в CsvReader - подозрительный код
WCHAR *pEndPtr;
wcstod(val.c_str(), &pEndPtr);
if (0 != *pEndPtr)
{
// Не число
aSharedStrings.push_back(val);
pCell->m_oType->SetValue(SimpleTypes::Spreadsheet::celltypeSharedString);
pCell->m_oValue->m_sText = std::to_wstring((int)aSharedStrings.size() - 1);
}
else
{
pCell->m_oValue->m_sText = val;
}
}
}
@ -631,7 +620,7 @@ namespace BinXlsxRW{
pWorksheet->m_oSheetData->m_arrItems.push_back(pRow);
}
}
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL, bool bAlwaysSharedString)
void ChartWriter::parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format = NULL)
{
std::map<std::wstring, std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>*>::const_iterator itSheets = m_mapSheets.find(sheet);
std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>* rows = NULL;
@ -660,12 +649,6 @@ namespace BinXlsxRW{
if(cells->find(nCol) == cells->end())
{
OOX::Spreadsheet::CCell* pNewCell = parseCreateCell(nRow, nCol, val, format);
if (bAlwaysSharedString)
{
pNewCell->m_oType.Init();
pNewCell->m_oType->SetValue(SimpleTypes::Spreadsheet::ECellTypeType::celltypeSharedString);
}
cells->insert(std::make_pair(nCol, pNewCell));
}
}
@ -724,14 +707,14 @@ namespace BinXlsxRW{
{
if(nCol1 > 1)
{
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL, true);
parseCell(sheetFrom, nRow1, nCol1 - 1, std::wstring(cRangeName), NULL);
}
}
else
{
if(nRow1 > 1)
{
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL, true);
parseCell(sheetFrom, nRow1 - 1, nCol1, std::wstring(cRangeName), NULL);
}
}
}
@ -768,7 +751,7 @@ namespace BinXlsxRW{
nRow = nRow1 + *val->m_idx;
nCol = nCol1;
}
parseCell(sheetFrom, nRow, nCol, *val->m_v, NULL, true);
parseCell(sheetFrom, nRow, nCol, *val->m_v);
}
}
}

View File

@ -80,7 +80,7 @@ namespace BinXlsxRW {
OOX::Spreadsheet::CWorksheet* toXlsxGetSheet(std::vector<OOX::Spreadsheet::CWorksheet*>& arWorksheets, std::map<std::wstring, OOX::Spreadsheet::CWorksheet*>& mapWorksheets, const std::wstring& sName);
void toXlsxSheetdata(OOX::Spreadsheet::CWorksheet* pWorksheet, const std::map<int, std::map<int, OOX::Spreadsheet::CCell*>*>& rows, std::vector<std::wstring>& aSharedStrings);
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format, bool bAlwaysSharedString = false);
void parseCell(const std::wstring& sheet, const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
OOX::Spreadsheet::CCell* parseCreateCell(const int& nRow, const int& nCol, const std::wstring& val, std::wstring* format);
void parseStrRef(const OOX::Spreadsheet::CT_StrRef* pStrRef, bool bUpdateRange, const wchar_t* cRangeName);
void parseNumRef(const OOX::Spreadsheet::CT_NumRef* pNumRef, bool bUpdateRange, const wchar_t* cRangeName);

View File

@ -14,10 +14,6 @@ include(../../Common/base.pri)
#BOOST
include($$PWD/../../Common/3dParty/boost/boost.pri)
INCLUDEPATH += ../../ASCOfficeXlsFile2/source/XlsFormat
INCLUDEPATH += ../../ASCOfficeXlsFile2/source/Common
INCLUDEPATH += ../../Common/DocxFormat/Source/XlsbFormat
DEFINES += UNICODE \
_UNICODE \
SOLUTION_ASCOFFICEDOCXFILE2 \

View File

@ -70,8 +70,8 @@
<OutDir>$(Configuration)\</OutDir>
<IntDir>$(Configuration)\</IntDir>
<LinkIncremental>true</LinkIncremental>
<IncludePath>../../Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>../../Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
<IncludePath>D:\_Work\core\Common\3dParty\boost\build\win_32\include;$(IncludePath)</IncludePath>
<LibraryPath>D:\_Work\core\Common\3dParty\boost\build\win_32\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(Platform)\$(Configuration)\</OutDir>

View File

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Common\OfficeFileFormatChecker.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Common\OfficeFileFormatChecker2.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\3dParty\pole\pole.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="OdfFileTest.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Common\OfficeFileFormatChecker.h">
<Filter>Common</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\Common\OfficeFileFormatChecker2.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\3dParty\pole\pole.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="OdfFileTest.cpp">
<Filter>Common</Filter>
</ClCompile>
<ClCompile Include="..\..\Common\DocxFormat\Source\Base\unicode_util.cpp">
<Filter>Common</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -52,11 +52,11 @@ public:
std::wstring convert(std::wstring const & expr);
// $Лист1.$A$1 -> Лист1!$A$1
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ", bool bAbsoluteAlways = false);
std::wstring convert_named_ref(std::wstring const & expr, bool withTableName = true, std::wstring separator = L" ");
std::wstring get_table_name();
//a-la convert without check formula
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true, bool bAbsoluteAlways = false);
std::wstring convert_named_expr(std::wstring const & expr, bool withTableName = true);
//Sheet2.C3:Sheet2.C19 -> Sheet2!C3:C19
std::wstring convert_chart_distance(std::wstring const & expr);

View File

@ -36,7 +36,6 @@
#include"../../Common/DocxFormat/Source/XML/Utils.h"
#include "../src/docx/xlsxconversioncontext.h"
#include "../src/docx/xlsx_utils.h"
namespace cpdoccore {
namespace formulasconvert {
@ -53,43 +52,30 @@ namespace formulasconvert {
void split_distance_by(const std::wstring& expr, const std::wstring& by, std::vector<std::wstring>& out);
void replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways = false);
void replace_cells_range(std::wstring& expr, bool withTableName);
bool check_formula(std::wstring& expr);
void replace_semicolons(std::wstring& expr);
void replace_tilda(std::wstring& expr);
void replace_vertical(std::wstring& expr);
void replace_space(std::wstring& expr);
void replace_apersand(std::wstring& expr);
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways);
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways);
std::wstring convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator);
std::wstring convert_named_expr(const std::wstring& expr, bool withTableName);
static std::wstring replace_named_ref_formater(boost::wsmatch const & what);
static std::wstring replace_named_ref_formater1(boost::wsmatch const & what);
//static std::wstring replace_cell_range_formater(boost::wsmatch const & what);
void replace_named_formula(std::wstring & expr, bool w = true);
void replace_named_ref(std::wstring & expr, bool withTable = true, bool bAbsoluteAlways = false);
void replace_named_ref(std::wstring & expr, bool w = true);
bool find_first_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref);
bool find_first_last_ref(std::wstring const & expr, std::wstring & table, std::wstring & ref_first,std::wstring & ref_last);
static bool convert_with_absolute;
static bool convert_with_TableName;
static std::wstring table_name_;
static bool convert_with_TableName;
static std::wstring table_name_;
//-------------------------------------------------------------------------------------------------------------
static std::wstring replace_apersand_formater(boost::wsmatch const & what)
{
if (what[1].matched)
return L"&amp;";
else if (what[2].matched)
return what[2].str();
else if (what[3].matched)
return what[3].str();
else
return L"";
}
static std::wstring replace_semicolons_formater(boost::wsmatch const & what)
{
if (what[1].matched)
@ -142,7 +128,6 @@ namespace formulasconvert {
XmlUtils::replace_all( expr, L"PROBEL", L" ");
//XmlUtils::replace_all( expr, L"APOSTROF", L"'");
//XmlUtils::replace_all( expr, L"KAVYCHKA", L"\"");
XmlUtils::replace_all(expr, L"APERSAND", L"&");
}
static void replace_tmp(std::wstring &expr)
{
@ -187,10 +172,6 @@ namespace formulasconvert {
{
result += L"PROBEL";
}break;
case '&':
{
result += L"APERSAND";
}break;
default:
{
result += expr[pos];
@ -261,7 +242,6 @@ namespace formulasconvert {
};
bool odf2oox_converter::Impl::convert_with_TableName = true;
std::wstring odf2oox_converter::Impl::table_name_ = L"";
bool odf2oox_converter::Impl::convert_with_absolute = false;
std::unordered_map<std::wstring, int> &odf2oox_converter::Impl::mapExternalLink_ = oox::xlsx_conversion_context::mapExternalLink_;
@ -367,6 +347,7 @@ namespace formulasconvert {
std::wstring ref2 = sz == 7 ? what[6].str() : what[5].str();
XmlUtils::replace_all( sheet1, L"$", L"");
//XmlUtils::replace_all( sheet2, L"$", L"");
std::wstring result;
@ -400,20 +381,6 @@ namespace formulasconvert {
}
table_name_ = sheet1;
if (convert_with_absolute)
{
size_t col = 0, row = 0;
oox::getCellAddressInv(ref1, col, row);
ref1 = oox::getCellAddress(col, row, true);
if (false == ref2.empty())
{
oox::getCellAddressInv(ref2, col, row);
ref2 = oox::getCellAddress(col, row, true);
}
}
if (convert_with_TableName)
{
@ -446,14 +413,13 @@ namespace formulasconvert {
// [Sheet2.A1:B5] -> Sheet2!A1:B5
// [Sheet2.A1] -> Sheet2!A1
// [$'Sheet2 A'.$B2] -> 'Sheet2 A'!$B2
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
void odf2oox_converter::Impl::replace_cells_range(std::wstring& expr, bool withTableName)
{
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
convert_with_TableName = withTableName;
convert_with_absolute = bAbsoluteAlways;
//boost::wregex complexRef(L"\\[(?:\'([^\']*)\'#){0,1}\\[{0,1}(?:\\$){0,1}([^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::(\\${0,1}[^\\.]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
boost::wregex complexRef(L"(?:(?:(?:(?:\\[\'([^\']*)\'#)|(?:\'([^\']*)\'#\\[)))|(?:\\[))\
@ -466,14 +432,13 @@ namespace formulasconvert {
&replace_named_ref_formater,
boost::match_default | boost::format_all);
}
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName, bool bAbsoluteAlways)
void odf2oox_converter::Impl::replace_named_ref(std::wstring & expr, bool withTableName)
{
XmlUtils::replace_all( expr, L"#REF !", L"#REF!");
XmlUtils::replace_all( expr, L"#REF!#REF!", L"#REF!");
XmlUtils::replace_all( expr, L"$#REF!$#REF!", L"#REF!");
convert_with_TableName = withTableName;
convert_with_absolute = bAbsoluteAlways;
//boost::wregex complexRef(L"\\${0,1}([^\\.]+?){0,1}\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)(?::\\.(\\${0,1}[a-zA-Z]+\\${0,1}\\d+)){0,1}");
boost::wregex complexRef(L"\\[{0,1}(?:\'([^\']*)\'#){0,1}\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)(?::\\${0,1}([^\\.\\s]+?){0,1}\\.(\\${0,1}[\\w^0-9]*\\${0,1}\\d*)){0,1}\\]{0,1}");
@ -530,17 +495,6 @@ namespace formulasconvert {
expr = res;
}
void odf2oox_converter::Impl::replace_apersand(std::wstring& expr)
{
const std::wstring res = boost::regex_replace(
expr,
//boost::wregex(L"(;)|(?:\".*?\")|(?:'.*?')"),
boost::wregex(L"(&)|(\".*?\")|('.*?')"),
&replace_apersand_formater,
boost::match_default | boost::format_all);
expr = res;
}
// заменить вертикальную черту во всех вхождениях в фигурных скобках, но не внутри строк
void odf2oox_converter::Impl::replace_vertical(std::wstring& expr)
{
@ -577,8 +531,7 @@ namespace formulasconvert {
replace_semicolons (workstr);
replace_tilda (workstr);
replace_vertical (workstr);
replace_apersand (workstr);
if (isFormula)
{
XmlUtils::replace_all( workstr, L"FDIST(", L"_xlfn.F.DIST(");
@ -681,7 +634,7 @@ namespace formulasconvert {
return result.substr(0, result.size() - 1);// минус последняя лишняя запятая
}
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
std::wstring odf2oox_converter::Impl::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
{
boost::wregex complexRef(L"('(?!\\s\\'){0,1}.*?')");// поиск того что в апострофах и замена там
@ -692,7 +645,7 @@ namespace formulasconvert {
boost::wregex(L"('.*?')|(\".*?\")"),
&convert_scobci, boost::match_default | boost::format_all);
replace_named_ref(workstr, withTableName, bAbsoluteAlways);
replace_named_ref(workstr, withTableName);
if (separator != L" ")
{
@ -707,7 +660,7 @@ namespace formulasconvert {
}
return workstr;
}
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
std::wstring odf2oox_converter::Impl::convert_named_expr(const std::wstring& expr, bool withTableName)
{
std::wstring workstr = expr;
@ -726,7 +679,7 @@ namespace formulasconvert {
&convert_scobci, boost::match_default | boost::format_all);
replace_cells_range(workstr, withTableName, bAbsoluteAlways);
replace_cells_range(workstr, withTableName);
replace_semicolons(workstr);
replace_vertical(workstr);
@ -773,13 +726,13 @@ namespace formulasconvert {
{
return impl_->split_distance_by(expr, by, out);
}
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator, bool bAbsoluteAlways)
std::wstring odf2oox_converter::convert_named_ref(const std::wstring& expr, bool withTableName, std::wstring separator)
{
return impl_->convert_named_ref(expr, withTableName, separator, bAbsoluteAlways);
return impl_->convert_named_ref(expr, withTableName, separator);
}
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName, bool bAbsoluteAlways)
std::wstring odf2oox_converter::convert_named_expr(const std::wstring& expr, bool withTableName)
{
return impl_->convert_named_expr(expr, withTableName, bAbsoluteAlways);
return impl_->convert_named_expr(expr, withTableName);
}
std::wstring odf2oox_converter::convert_ref(std::wstring const & expr)

View File

@ -34,7 +34,6 @@
#include <string>
#include "../CPSharedPtr.h"
#include "../xml/nodetype.h"
namespace cpdoccore {

View File

@ -32,7 +32,7 @@
#pragma once
#include "../CPOptional.h"
#include "../logging.h"
#include "logging.h"
namespace cpdoccore {
namespace common {

View File

@ -1,330 +1,327 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 <string>
#include <iostream>
#include <sstream>
#include <stack>
#include <cassert>
namespace cpdoccore
{
namespace xml
{
namespace writer
{
template <class T> struct chars { };
template <>
struct chars<char>
{
static const char eq = '=';
static const char quote = '\"';
static const char space = ' ';
static const char left_brocket = '<';
static const char right_brocket = '>';
static const char slash = '/';
static const char colon = ':';
static const char amp = '&';
static const char apos = '\'';
static const char * cdata_open() { return "<![CDATA["; }
static const char * cdata_close() { return "]]>"; }
static const char * amp_str(){ return "&amp;"; }
static const char * left_brocket_str() { return "&lt;"; }
static const char * right_brocket_str() { return "&gt;"; }
static const char * apos_str() { return "&apos;"; }
static const char * quote_str() { return "&quot;"; }
};
template <>
struct chars<wchar_t>
{
static const wchar_t eq = L'=';
static const wchar_t quote = L'\"';
static const wchar_t space = L' ';
static const wchar_t left_brocket = L'<';
static const wchar_t right_brocket = L'>';
static const wchar_t slash = L'/';
static const wchar_t colon = L':';
static const wchar_t amp = L'&';
static const wchar_t apos = L'\'';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t * cdata_close() { return L"]]>"; }
static const wchar_t * amp_str(){ return L"&"/* L"&amp;"*/; }
static const wchar_t * left_brocket_str() { return L"&lt;"; }
static const wchar_t * right_brocket_str() { return L"&gt;"; }
static const wchar_t * apos_str() { return L"&apos;"; }
static const wchar_t * quote_str() { return L"&quot;"; }
};
template <class V>
class element;
//
// xml::writer class
//
template <class T>
class writer
{
public:
// writer must be bound to an ostream
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
~writer(void) { assert(elements_.empty()); }
private:
size_t level_;
std::basic_ostream<T>& os_; // output stream
bool need_header_; // have we written an XML header yet?
std::stack<element<T>*> elements_; // stack of open element tags
// write XML header, if necessary
writer& header()
{
if (need_header_)
{
// TODO
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
need_header_ = false;
}
return *this;
}
// write a single character to the output stream
writer& putc(T c)
{
os_.put(c);
return *this;
}
// write a string to the output stream
writer& puts(const T* str) {
os_ << str;
return *this;
}
template <class V>
friend class element;
};
//
// xml::element class
//
template <class T>
class element
{
public:
// create a new element tag, bound to an xml::writer
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
{
wr_.level_++;
check_parent();
wr_.header().putc('<').puts(name_.c_str());
tagopen_ = true;
wr_.elements_.push(this);
}
// close the current element tag
~element()
{
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
{
wr_.elements_.pop();
if (tagopen_)
wr_.putc(chars<T>::slash)
.putc(chars<T>::right_brocket);
else
wr_.putc(chars<T>::left_brocket)
.putc(chars<T>::slash)
.puts(name_.c_str())
.putc(chars<T>::right_brocket);
}
wr_.level_--;
}
// write an attribute for the current element
element& attr(const T* name, const T* value)
{
assert(name != 0);
assert(value != 0);
assert(tagopen_);
wr_.putc(chars<T>::space)
.puts(name)
.putc(chars<T>::eq)
.putc(chars<T>::quote);
qputs(value);
wr_.putc(chars<T>::quote);
return *this;
}
// attr() overload for std::string type
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
{
return attr(name, value.c_str());
}
// attr() function template for all streamable types
template <class V>
element& attr(const T* name, V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
attr(name, ss.str());
return *this;
}
// write text content for the current element
element& contents(const T* str)
{
assert(str != 0);
check_parent();
qputs(str);
return *this;
}
// contents() overload for std::string type
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return contents(str.c_str());
}
// contents() function template for all streamable types
template <class V>
element& contents(V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
contents(ss.str());
return *this;
}
std::basic_ostream<T>& stream()
{
check_parent();
return wr_.os_;
}
// write CDATA section
element& cdata(const T * str)
{
assert(str != 0);
check_parent();
wr_.puts(chars<T>::cdata_open());
wr_.puts(str);
wr_.puts(chars<T>::cdata_close());
return *this;
}
// cdata() overload for std::string type
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return cdata(str.c_str());
}
private:
writer<T>& wr_; // bound XML writer
//const T* name_; // name of current element
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
bool tagopen_; // is the element tag for this element still open?
// write a string quoting characters which have meaning in xml
element& qputs(const T* str)
{
for (; *str; ++str)
{
switch (*str)
{
case chars<T>::amp:
wr_.puts(chars<T>::amp_str()); break;
case chars<T>::left_brocket:
wr_.puts(chars<T>::left_brocket_str()); break;
case chars<T>::right_brocket:
wr_.puts(chars<T>::right_brocket_str()); break;
case chars<T>::apos:
wr_.puts(chars<T>::apos_str()); break;
case chars<T>::quote:
wr_.puts(chars<T>::quote_str()); break;
default:
wr_.putc(*str); break;
}
}
return *this;
}
// check to see if we have a parent tag which needs to be closed
void check_parent()
{
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
{
wr_.putc(chars<T>::right_brocket);
wr_.elements_.top()->tagopen_ = false;
}
}
};
}
}
typedef xml::writer::writer<wchar_t> xml_writer;
typedef xml::writer::element<wchar_t> xml_element;
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
#define CP_XML_STREAM() _xml_node_.stream()
#define CP_GET_XML_NODE() _xml_node_
#define CP_ATTR_NODE xml_element & _xml_node_
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
#define CP_XML_ATTR_OPT_ENCODE_STRING(NAME, STR) if (STR)CP_XML_ATTR(NAME, XmlUtils::EncodeXmlString(XmlUtils::EncodeXmlString(*STR)))
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
#define CP_XML_NODE_SIMPLE_NONS() CP_XML_NODE(std::wstring(name))
}
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 <string>
#include <iostream>
#include <sstream>
#include <stack>
#include <cassert>
namespace cpdoccore
{
namespace xml
{
namespace writer
{
template <class T> struct chars { };
template <>
struct chars<char>
{
static const char eq = '=';
static const char quote = '\"';
static const char space = ' ';
static const char left_brocket = '<';
static const char right_brocket = '>';
static const char slash = '/';
static const char colon = ':';
static const char amp = '&';
static const char apos = '\'';
static const char * cdata_open() { return "<![CDATA["; }
static const char * cdata_close() { return "]]>"; }
static const char * amp_str(){ return "&amp;"; }
static const char * left_brocket_str() { return "&lt;"; }
static const char * right_brocket_str() { return "&gt;"; }
static const char * apos_str() { return "&apos;"; }
static const char * quote_str() { return "&quot;"; }
};
template <>
struct chars<wchar_t>
{
static const wchar_t eq = L'=';
static const wchar_t quote = L'\"';
static const wchar_t space = L' ';
static const wchar_t left_brocket = L'<';
static const wchar_t right_brocket = L'>';
static const wchar_t slash = L'/';
static const wchar_t colon = L':';
static const wchar_t amp = L'&';
static const wchar_t apos = L'\'';
static const wchar_t * cdata_open() { return L"<![CDATA["; }
static const wchar_t * cdata_close() { return L"]]>"; }
static const wchar_t * amp_str(){ return L"&amp;"; }
static const wchar_t * left_brocket_str() { return L"&lt;"; }
static const wchar_t * right_brocket_str() { return L"&gt;"; }
static const wchar_t * apos_str() { return L"&apos;"; }
static const wchar_t * quote_str() { return L"&quot;"; }
};
template <class V>
class element;
//
// xml::writer class
//
template <class T>
class writer
{
public:
// writer must be bound to an ostream
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
~writer(void) { assert(elements_.empty()); }
private:
size_t level_;
std::basic_ostream<T>& os_; // output stream
bool need_header_; // have we written an XML header yet?
std::stack<element<T>*> elements_; // stack of open element tags
// write XML header, if necessary
writer& header()
{
if (need_header_)
{
// TODO
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
need_header_ = false;
}
return *this;
}
// write a single character to the output stream
writer& putc(T c)
{
os_.put(c);
return *this;
}
// write a string to the output stream
writer& puts(const T* str) {
os_ << str;
return *this;
}
template <class V>
friend class element;
};
//
// xml::element class
//
template <class T>
class element
{
public:
// create a new element tag, bound to an xml::writer
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
{
wr_.level_++;
check_parent();
wr_.header().putc('<').puts(name_.c_str());
tagopen_ = true;
wr_.elements_.push(this);
}
// close the current element tag
~element()
{
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
{
wr_.elements_.pop();
if (tagopen_)
wr_.putc(chars<T>::slash)
.putc(chars<T>::right_brocket);
else
wr_.putc(chars<T>::left_brocket)
.putc(chars<T>::slash)
.puts(name_.c_str())
.putc(chars<T>::right_brocket);
}
wr_.level_--;
}
// write an attribute for the current element
element& attr(const T* name, const T* value)
{
assert(name != 0);
assert(value != 0);
assert(tagopen_);
wr_.putc(chars<T>::space)
.puts(name)
.putc(chars<T>::eq)
.putc(chars<T>::quote);
qputs(value);
wr_.putc(chars<T>::quote);
return *this;
}
// attr() overload for std::string type
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
{
return attr(name, value.c_str());
}
// attr() function template for all streamable types
template <class V>
element& attr(const T* name, V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
attr(name, ss.str());
return *this;
}
// write text content for the current element
element& contents(const T* str)
{
assert(str != 0);
check_parent();
qputs(str);
return *this;
}
// contents() overload for std::string type
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return contents(str.c_str());
}
// contents() function template for all streamable types
template <class V>
element& contents(V value)
{
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
ss << value;
contents(ss.str());
return *this;
}
std::basic_ostream<T>& stream()
{
check_parent();
return wr_.os_;
}
// write CDATA section
element& cdata(const T * str)
{
assert(str != 0);
check_parent();
wr_.puts(chars<T>::cdata_open());
wr_.puts(str);
wr_.puts(chars<T>::cdata_close());
return *this;
}
// cdata() overload for std::string type
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
{
return cdata(str.c_str());
}
private:
writer<T>& wr_; // bound XML writer
//const T* name_; // name of current element
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
bool tagopen_; // is the element tag for this element still open?
// write a string quoting characters which have meaning in xml
element& qputs(const T* str)
{
for (; *str; ++str)
{
switch (*str)
{
case chars<T>::amp:
wr_.puts(chars<T>::amp_str()); break;
case chars<T>::left_brocket:
wr_.puts(chars<T>::left_brocket_str()); break;
case chars<T>::right_brocket:
wr_.puts(chars<T>::right_brocket_str()); break;
case chars<T>::apos:
wr_.puts(chars<T>::apos_str()); break;
case chars<T>::quote:
wr_.puts(chars<T>::quote_str()); break;
default:
wr_.putc(*str); break;
}
}
return *this;
}
// check to see if we have a parent tag which needs to be closed
void check_parent()
{
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
{
wr_.putc(chars<T>::right_brocket);
wr_.elements_.top()->tagopen_ = false;
}
}
};
}
}
typedef xml::writer::writer<wchar_t> xml_writer;
typedef xml::writer::element<wchar_t> xml_element;
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
#define CP_XML_ATTR2(NAME, VAL) _xml_node_.attr((std::wstring(NAME).c_str()),(VAL))
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
#define CP_XML_STREAM() _xml_node_.stream()
#define CP_GET_XML_NODE() _xml_node_
#define CP_ATTR_NODE xml_element & _xml_node_
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
}

View File

@ -33,7 +33,7 @@
#include <iostream>
#include "conversionelement.h"
#include "../include/logging.h"
#include "logging.h"
namespace cpdoccore {
namespace oox {

View File

@ -30,7 +30,9 @@
*
*/
#include "../../include/xml/simple_xml_writer.h"
#include <xml/attributes.h>
#include <xml/simple_xml_writer.h>
#include "docx_content_type.h"
#include "namespaces.h"

View File

@ -33,9 +33,7 @@
#include <string>
#include <iosfwd>
#include <vector>
#include "../../include/xml/xmlelement.h"
#include <xml/xmlelement.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,9 +32,9 @@
#include <iostream>
#include "../../include/xml/utils.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/utils.h>
#include <odf/odf_document.h>
#include <xml/simple_xml_writer.h>
#include "docx_conversion_context.h"
@ -49,7 +49,7 @@
#include "docx_package.h"
#include "xlsx_package.h"
#include "oox_rels.h"
#include "../../include/logging.h"
#include "logging.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"

View File

@ -31,7 +31,7 @@
*/
#include "docx_drawing.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../odf/datatypes/custom_shape_types_convert.h"
namespace cpdoccore {

View File

@ -33,6 +33,9 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "oox_drawing.h"
#include "mediaitems.h"

View File

@ -34,6 +34,8 @@
#include <string>
#include <vector>
#include <CPSharedPtr.h>
#include "oox_rels.h"
#include "docx_content_type.h"
#include "oox_package.h"

View File

@ -29,12 +29,11 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include <iostream>
#include "docx_conversion_context.h"
#include "../../include/logging.h"
#include "../../include/odf/odf_document.h"
#include "logging.h"
#include <iostream>
#include <odf/odf_document.h>
#include "../odf/odfcontext.h"
namespace cpdoccore {

View File

@ -46,12 +46,7 @@ struct _rect
double x;
double y;
};
enum _anchor_rel
{
anchor_none = 0,
anchor_start = 1,
anchor_end = 2
};
struct drawing_object_description
{
bool bNotes_;
@ -63,7 +58,6 @@ struct drawing_object_description
_CP_OPT(_rect) svg_rect_;
_anchor_rel anchor_rel_;
std::wstring anchor_;
double anchor_x_;
double anchor_y_;

View File

@ -32,7 +32,7 @@
#include "hyperlinks.h"
#include "../../include/xml/utils.h"
#include <xml/utils.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#include "measuredigits.h"
#include <boost/lexical_cast.hpp>
#include <logging.h>
#include "../../include/logging.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {

View File

@ -34,14 +34,14 @@
#include <boost/regex.hpp>
#include "../../include/xml/utils.h"
#include <xml/utils.h>
#include "../../../Common/DocxFormat/Source/Base/Base.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../Common/DocxFormat/Source/Base/Base.h"
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
#include "../../../DesktopEditor/common/Directory.h"
#include "../../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../DesktopEditor/common/Directory.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
namespace cpdoccore {
namespace oox {

View File

@ -30,9 +30,10 @@
*
*/
#include "../../include/xml/simple_xml_writer.h"
#include "oox_chart_axis.h"
#include <xml/simple_xml_writer.h>
#include "oox_title.h"
#include "oox_chart_shape.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include "../../include/CPSharedPtr.h"
#include <CPOptional.h>
#include <CPSharedPtr.h>
#include "oox_chart_shape.h"

View File

@ -32,7 +32,7 @@
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "oox_rels.h"
#include "oox_chart_context.h"

View File

@ -32,10 +32,10 @@
#pragma once
#include "oox_package.h"
#include "../../include/CPNoncopyable.h"
#include <CPNoncopyable.h>
#include "../../include/CPScopedPtr.h"
#include "../../include/CPSharedPtr.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include "oox_title.h"
#include "oox_plot_area.h"
@ -75,12 +75,9 @@ public:
}
void set_3D_chart(bool val)
{
for (size_t i = 0 ; i < plot_area_.charts_.size(); ++i)
for (size_t i = 0 ; i < plot_area_.charts_.size(); i++)
{
plot_area_.charts_[i]->is3D_ = val;
for (size_t j = 0; j < plot_area_.charts_[i]->series_.size(); ++j)
plot_area_.charts_[i]->series_[j]->is3D_ = val;
}
}
void set_externalData(const std::wstring & href);

View File

@ -32,9 +32,11 @@
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "oox_chart_legend.h"
#include "oox_chart_shape.h"
namespace cpdoccore {

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "oox_layout.h"

View File

@ -34,13 +34,13 @@
#include <boost/algorithm/string.hpp>
#include <boost/ref.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../odf/style_text_properties.h"
#include "xlsx_utils.h"
#include "oox_chart_series.h"
#include "../../formulasconvert/formulasconvert.h"
#include "../formulasconvert/formulasconvert.h"
#include "oox_chart_shape.h"
@ -58,7 +58,6 @@ oox_chart_series::oox_chart_series()
iSymbolMarkerType_ = 0;
bCacheOnly_ = false;
labelPosEnabled_ = true;
is3D_ = false;
}
void oox_chart_series::setName(const std::wstring &value)
{
@ -572,30 +571,10 @@ void oox_bar_series::oox_serialize(std::wostream & _Wostream)
CP_XML_NODE(L"c:ser")
{
oox_serialize_common(CP_XML_STREAM());
if (is3D_)
{
CP_XML_NODE(L"c:shape")
{
switch (iSolidType.get_value_or(0))
{
case 1: CP_XML_ATTR(L"val", L"cylinder"); break;
case 2: CP_XML_ATTR(L"val", L"cone"); break;
case 3: CP_XML_ATTR(L"val", L"pyramid"); break;
case 0:
default: CP_XML_ATTR(L"val", L"box"); break;
}
}
}
}
}
}
void oox_bar_series::set_properties(std::vector<odf_reader::_property> g)
{
oox_chart_series::set_properties(g);
odf_reader::GetProperty(g, L"solid-type", iSolidType);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
_CP_PTR(oox_chart_series) oox_line_series::create()

View File

@ -32,7 +32,7 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include "../odf/chart_objects.h"
#include "oox_chart_values.h"
@ -55,8 +55,6 @@ public:
virtual void oox_serialize(std::wostream & _Wostream) = 0;
bool is3D_;
bool labelPosEnabled_;
_oox_chart_values values_[5]; //cat, common, x, y, bubble,
@ -80,8 +78,6 @@ public:
odf_reader::chart::series content_;
virtual void set_properties(std::vector<odf_reader::_property> g) {}
//extLst (Chart Extensibility) §21.2.2.64
//idx (Index) §21.2.2.84
//order (Order) §21.2.2.128
@ -99,11 +95,7 @@ public:
static oox_series_ptr create();
virtual void set_properties(std::vector<odf_reader::_property> g);
virtual void oox_serialize(std::wostream & _Wostream);
_CP_OPT(int) iSolidType;
};
//cat (Category Axis Data) §21.2.2.24
//errBars (Error Bars) §21.2.2.55

View File

@ -30,7 +30,8 @@
*
*/
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "oox_chart_shape.h"
#include "oox_drawing.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "../odf/chart_objects.h"
#include "oox_drawing_fills.h"

View File

@ -32,7 +32,7 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include <CPOptional.h>
namespace cpdoccore {

View File

@ -33,9 +33,9 @@
#include "oox_conversion_context.h"
#include <iostream>
#include "../../include/xml/utils.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/utils.h>
#include <odf/odf_document.h>
#include <xml/simple_xml_writer.h>
#include "../odf/odfcontext.h"
#include "../odf/style_text_properties.h"
@ -44,7 +44,7 @@
namespace cpdoccore {
namespace oox
{
void forms_context::start_element (_form_type type)
void forms_context::start_element (int type)
{
current_state_.clear();

View File

@ -60,32 +60,15 @@ namespace odf_reader
typedef boost::shared_ptr<office_element> office_element_ptr;
};
namespace oox
{
enum _form_type
{
formNone = 0,
formButton = 1,
formLabel = 2,
formCheckbox = 3,
formCombobox = 4,
formListbox = 5,
formDateTime = 6,
formSpin = 7,
formScroll = 8,
formFrame = 9,
formImage = 10,
formText = 11
};
namespace oox {
class forms_context
{
public:
struct _state
{
std::wstring id;
std::wstring name;
_form_type type;
int type = 0; //enum?
std::wstring label;
std::wstring uuid;
std::wstring value;
@ -95,7 +78,7 @@ public:
void clear()
{
type = formNone;
type = 0;
id.clear();
name.clear();
label.clear();
@ -107,7 +90,7 @@ public:
};
forms_context(){}
void start_element (_form_type type);
void start_element (int type);
void set_id (const std::wstring& id);
void set_name (const std::wstring& name);
void set_label (const std::wstring& label);

View File

@ -29,7 +29,10 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "oox_data_labels.h"
#include "oox_chart_shape.h"

View File

@ -36,9 +36,9 @@
#include <vector>
#include <boost/noncopyable.hpp>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include "../../include/xml/attributes.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include <xml/attributes.h>
namespace cpdoccore {

View File

@ -33,7 +33,8 @@
#include <boost/algorithm/string.hpp>
#include "oox_drawing.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../odf/datatypes/custom_shape_types_convert.h"
using namespace cpdoccore;

View File

@ -33,6 +33,9 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "mediaitems.h"
#include "oox_drawing_fills.h"

View File

@ -32,7 +32,7 @@
#include "oox_drawing_fills.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,9 +32,12 @@
#pragma once
#include <string>
#include <CPOptional.h>
#include <CPSharedPtr.h>
#include "../odf/datatypes/lengthorpercent.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#include "oox_layout.h"
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../odf/style_text_properties.h"
namespace cpdoccore {

View File

@ -32,6 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "../odf/chart_objects.h"

View File

@ -34,14 +34,14 @@
#include <boost/ref.hpp>
#include "../../include/utf8cpp/utf8.h"
#include <utf8cpp/utf8.h>
#include "mediaitems.h"
#include "../../../DesktopEditor/common/File.h"
#include "../../../DesktopEditor/common/SystemUtils.h"
#include "../../../DesktopEditor/graphics/pro/Image.h"
#include "../../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../../Common/DocxFormat/Source/Base/Base.h"
#include "../../DesktopEditor/common/File.h"
#include "../../DesktopEditor/common/SystemUtils.h"
#include "../../DesktopEditor/graphics/pro/Image.h"
#include "../../DesktopEditor/raster/ImageFileFormatChecker.h"
#include "../../Common/DocxFormat/Source/Base/Base.h"
namespace cpdoccore {
namespace oox {

View File

@ -29,13 +29,12 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef _CPDOCCORE_OOX_PACKAGE_H_75f74d15
#define _CPDOCCORE_OOX_PACKAGE_H_75f74d15
#include <vector>
#include "../../include/CPSharedPtr.h"
#include "../../include/CPNoncopyable.h"
#include "../../include/CPOptional.h"
#include <CPSharedPtr.h>
#include <CPNoncopyable.h>
#include "docx_content_type.h"
#include "oox_rels.h"
@ -270,3 +269,4 @@ private:
} // namespace oox
} // namespace cpdoccore
#endif

View File

@ -33,15 +33,14 @@
#include "oox_plot_area.h"
#include <random>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include <boost/algorithm/string.hpp>
#include "../odf/style_text_properties.h"
#include "oox_chart_shape.h"
#include "../odf/datatypes/chartclass.h"
#include "../../ASCOfficeOdfFile/src/odf/datatypes/chartclass.h"
namespace cpdoccore {
namespace oox {

View File

@ -32,6 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "oox_types_chart.h"
#include "oox_chart_axis.h"

View File

@ -31,10 +31,9 @@
*/
#include "oox_rels.h"
#include <xml/attributes.h>
#include "namespaces.h"
#include "../../include/xml/attributes.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {
namespace oox {

View File

@ -34,8 +34,8 @@
#include <string>
#include <vector>
#include <iosfwd>
#include "../../include/xml/xmlelement.h"
#include "../../include/CPSharedPtr.h"
#include <xml/xmlelement.h>
#include <CPSharedPtr.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#include "oox_title.h"
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../odf/odfcontext.h"
#include "../odf/style_text_properties.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include "oox_layout.h"

View File

@ -30,7 +30,7 @@
*
*/
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "oox_types_chart.h"
namespace cpdoccore {
@ -59,7 +59,6 @@ void oox_chart::set_name(const std::wstring& val)
void oox_chart::set_content_series(odf_reader::chart::series & content)
{
series_.back()->content_= content;
series_.back()->set_properties(content.properties_);
}
void oox_chart::set_values_series(int ind, std::vector<std::wstring> & val)
@ -147,7 +146,6 @@ void oox_bar_chart::set_properties(std::vector<odf_reader::_property> g)
odf_reader::GetProperty(g, L"gap-width", iGapWidth);
odf_reader::GetProperty(g, L"overlap", iOverlap);
odf_reader::GetProperty(g, L"solid-type", iSolidType);
}
void oox_bar_chart::set_additional_properties(std::vector<odf_reader::_property> g)
@ -201,14 +199,7 @@ void oox_bar_chart::oox_serialize(std::wostream & _Wostream)
{
CP_XML_NODE(L"c:shape")
{
switch (iSolidType.get_value_or(0))
{
case 1: CP_XML_ATTR(L"val", L"cylinder"); break;
case 2: CP_XML_ATTR(L"val", L"cone"); break;
case 3: CP_XML_ATTR(L"val", L"pyramid"); break;
case 0:
default: CP_XML_ATTR(L"val", L"box"); break;
}
CP_XML_ATTR(L"val", L"box");
}
}
}

View File

@ -140,7 +140,7 @@ class oox_bar_chart: public oox_chart
_CP_OPT(bool) bConnectBars;
_CP_OPT(int) iGapWidth;
_CP_OPT(int) iOverlap;
_CP_OPT(int) iSolidType;
//gapWidth (Gap Width) §21.2.2.75
//overlap (Overlap) §21.2.2.131

View File

@ -31,7 +31,7 @@
*/
#pragma once
#include "../../include/CPSharedPtr.h"
#include <CPSharedPtr.h>
#include <string>
namespace cpdoccore {

View File

@ -32,7 +32,7 @@
#include "pptx_comments.h"
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "oox_rels.h"
namespace cpdoccore {

View File

@ -32,9 +32,9 @@
#pragma once
#include <iosfwd>
#include "../../include/CPScopedPtr.h"
#include "../../include/CPSharedPtr.h"
#include "../../include/xml/attributes.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include <xml/attributes.h>
#include "mediaitems.h"
namespace cpdoccore {

View File

@ -34,6 +34,8 @@
#include <string>
#include <boost/noncopyable.hpp>
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include "pptx_comments.h"

View File

@ -34,8 +34,8 @@
#include "pptx_package.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/simple_xml_writer.h"
#include <odf/odf_document.h>
#include <xml/simple_xml_writer.h>
#include <iostream>

View File

@ -31,7 +31,7 @@
*/
#pragma once
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {

View File

@ -31,8 +31,7 @@
*/
#include "pptx_drawing.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../odf/datatypes/custom_shape_types_convert.h"
namespace cpdoccore {

View File

@ -33,6 +33,9 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "oox_drawing.h"
#include "mediaitems.h"

View File

@ -31,7 +31,7 @@
*/
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "oox_rels.h"

View File

@ -32,9 +32,9 @@
#pragma once
#include <iosfwd>
#include "../../include/CPScopedPtr.h"
#include "../../include/CPSharedPtr.h"
#include "../../include/xml/attributes.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include <xml/attributes.h>
#include "mediaitems.h"
namespace cpdoccore {

View File

@ -32,7 +32,7 @@
#include <boost/make_shared.hpp>
#include <boost/lexical_cast.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "pptx_output_xml.h"

View File

@ -32,9 +32,9 @@
#pragma once
#include <iosfwd>
#include "../../include/CPSharedPtr.h"
#include "../../include/CPScopedPtr.h"
#include "../../include/CPNoncopyable.h"
#include <CPSharedPtr.h>
#include <CPScopedPtr.h>
#include <CPNoncopyable.h>
#include "oox_rels.h"

View File

@ -34,7 +34,7 @@
#include "pptx_package.h"
#include "pptx_output_xml.h"
#include "../../include/utf8cpp/utf8.h"
#include <utf8cpp/utf8.h>
namespace cpdoccore {
namespace oox {

View File

@ -31,9 +31,8 @@
*/
#pragma once
#include "../../include/CPNoncopyable.h"
#include "oox_package.h"
#include <CPNoncopyable.h>
#include "pptx_comments.h"
namespace NSFonts

View File

@ -31,10 +31,9 @@
*/
#include <iostream>
#include "../../include/xml/simple_xml_writer.h"
#include "../../include/xml/utils.h"
#include "../../include/odf/odf_document.h"
#include <xml/simple_xml_writer.h>
#include <xml/utils.h>
#include <odf/odf_document.h>
#include "pptx_drawing.h"
#include "pptx_drawings.h"

View File

@ -32,15 +32,15 @@
#include <iostream>
#include "../../include/xml/simple_xml_writer.h"
#include "../../include/odf/odf_document.h"
#include <xml/simple_xml_writer.h>
#include <odf/odf_document.h>
#include "../odf/odfcontext.h"
#include "../odf/draw_common.h"
#include "../odf/calcs_styles.h"
#include "../odf/datatypes/borderstyle.h"
#include "../../include/logging.h"
#include "logging.h"
#include "pptx_conversion_context.h"

View File

@ -37,9 +37,9 @@
#include <iostream>
#include <list>
#include "../../include/xml/simple_xml_writer.h"
#include "../../include/odf/odf_document.h"
#include "../../include/xml/utils.h"
#include <xml/simple_xml_writer.h>
#include <odf/odf_document.h>
#include <xml/utils.h>
#include "../odf/odfcontext.h"
#include "../odf/calcs_styles.h"

View File

@ -33,7 +33,10 @@
#include <string>
#include <boost/noncopyable.hpp>
#include "../../include/CPScopedPtr.h"
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "oox_conversion_context.h"
#include "../odf/datatypes/stylefamily.h"

View File

@ -40,7 +40,7 @@
#include <ostream>
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <string>
#include "../../include/CPOptional.h"
namespace cpdoccore {

View File

@ -32,7 +32,8 @@
#include "xlsx_border.h"
#include <boost/functional.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <CPOptional.h>
#include <xml/simple_xml_writer.h>
#include "../odf/style_text_properties.h"
namespace cpdoccore {

View File

@ -32,6 +32,7 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <string>
#include <vector>

View File

@ -34,7 +34,7 @@
#include <boost/functional.hpp>
#include <boost/unordered_set.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "xlsx_border.h"
#include "../odf/datatypes/length.h"

View File

@ -32,8 +32,8 @@
#pragma once
#include <iosfwd>
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
namespace cpdoccore {
namespace odf_reader {

View File

@ -32,7 +32,7 @@
#include "xlsx_cell_style.h"
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {
namespace oox {

View File

@ -29,13 +29,14 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef _CPDOCCORE_XLSX_CELL_STYLE_H_
#define _CPDOCCORE_XLSX_CELL_STYLE_H_
#include <iosfwd>
#include <string>
#include "../../include/CPSharedPtr.h"
#include "../../include/CPOptional.h"
#include <CPSharedPtr.h>
#include <CPOptional.h>
namespace cpdoccore {
namespace oox {
@ -53,3 +54,4 @@ namespace oox {
}
}
#endif

View File

@ -31,7 +31,7 @@
*/
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "xlsx_cell_styles.h"
#include "xlsx_cell_style.h"

View File

@ -31,7 +31,7 @@
*/
#pragma once
#include "../../include/CPScopedPtr.h"
#include <CPScopedPtr.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,11 +32,10 @@
#pragma once
#include <iosfwd>
#include <CPOptional.h>
#include <string>
#include <vector>
#include "../../include/CPOptional.h"
namespace cpdoccore {
namespace oox {

View File

@ -34,7 +34,7 @@
#include "oox_rels.h"
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
namespace cpdoccore {
namespace oox {

View File

@ -32,8 +32,9 @@
#pragma once
#include <iosfwd>
#include "../../include/CPScopedPtr.h"
#include "../../include/xml/attributes.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include <xml/attributes.h>
#include "mediaitems.h"
namespace cpdoccore {

View File

@ -33,7 +33,8 @@
#include <string>
#include <boost/noncopyable.hpp>
#include "../../include/CPScopedPtr.h"
#include <CPScopedPtr.h>
#include <CPSharedPtr.h>
#include "xlsx_comments.h"

View File

@ -29,10 +29,11 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef CPDOCCORE_COMPLEX_NUMBER_FORMAT
#define CPDOCCORE_COMPLEX_NUMBER_FORMAT
#include <string>
#include "../../include/CPScopedPtr.h"
#include <CPScopedPtr.h>
namespace cpdoccore {
namespace oox {
@ -56,4 +57,6 @@ private:
};
}
}
}
#endif

View File

@ -35,10 +35,10 @@
#include <vector>
#include <boost/lexical_cast.hpp>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
#include "../../formulasconvert/formulasconvert.h"
#include "../formulasconvert/formulasconvert.h"
namespace cpdoccore {
namespace oox {

View File

@ -31,8 +31,8 @@
*/
#pragma once
#include "../../include/CPOptional.h"
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include <string>
namespace cpdoccore {

View File

@ -36,13 +36,12 @@
#include <vector>
#include <map>
#include "../../include/xml/simple_xml_writer.h"
#include "../../include/CPSharedPtr.h"
#include <xml/simple_xml_writer.h>
#include <CPSharedPtr.h>
#include <boost/regex.hpp>
#include <boost/algorithm/string/regex.hpp>
#include "../../formulasconvert/formulasconvert.h"
#include "../formulasconvert/formulasconvert.h"
#include "../../../Common/DocxFormat/Source/XML/Utils.h"
namespace cpdoccore {

View File

@ -31,7 +31,8 @@
*/
#pragma once
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
#include <string>
namespace cpdoccore {

View File

@ -33,9 +33,9 @@
#include "xlsx_defined_names.h"
#include <vector>
#include "../../include/xml/simple_xml_writer.h"
#include <xml/simple_xml_writer.h>
#include "../../formulasconvert/formulasconvert.h"
#include "../formulasconvert/formulasconvert.h"
namespace cpdoccore {
namespace oox {

View File

@ -29,12 +29,13 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#ifndef _CPDOCCORE_XLSX_DEFINED_NAMES_H_
#define _CPDOCCORE_XLSX_DEFINED_NAMES_H_
#include <iosfwd>
#include <string>
#include "../../include/CPScopedPtr.h"
#include <CPOptional.h>
#include <CPScopedPtr.h>
namespace cpdoccore {
namespace oox {
@ -58,3 +59,6 @@ namespace oox {
}
}
#endif

View File

@ -31,8 +31,8 @@
*/
#include "xlsx_drawing.h"
#include "../../include/xml/simple_xml_writer.h"
#include "../../include/xml/utils.h"
#include <xml/simple_xml_writer.h>
#include <xml/utils.h>
#include "../odf/datatypes/custom_shape_types_convert.h"
#include "../../formulasconvert/formulasconvert.h"
@ -538,7 +538,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
case OBJ_SpinControl: CP_XML_ATTR(L"ObjectType", L"Spin"); break;
case OBJ_Scrollbar: CP_XML_ATTR(L"ObjectType", L"Scroll"); break;
case OBJ_List: CP_XML_ATTR(L"ObjectType", L"List"); break;
case OBJ_DropdownList: CP_XML_ATTR(L"ObjectType", L"Drop"); break;
case OBJ_DropdownList: CP_XML_ATTR(L"ObjectType", L"List"); break;
case OBJ_Note: CP_XML_ATTR(L"ObjectType", L"Note"); break;
}
@ -576,7 +576,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
if (sVal)
{
formulasconvert::odf2oox_converter converter;
std::wstring fmla = converter.convert_named_ref(*sVal, true, L" ", true);
std::wstring fmla = converter.convert_named_ref(*sVal);
CP_XML_NODE(L"x:FmlaLink")
{
CP_XML_STREAM() << fmla;
@ -586,7 +586,7 @@ void _xlsx_drawing::serialize_vml(std::wostream & strm)
if (sVal)
{
formulasconvert::odf2oox_converter converter;
std::wstring fmla = converter.convert_named_ref(*sVal, true, L" ", true);
std::wstring fmla = converter.convert_named_ref(*sVal);
CP_XML_NODE(L"x:FmlaRange")
{
CP_XML_STREAM() << fmla;

View File

@ -33,6 +33,9 @@
#include <iosfwd>
#include <iostream>
#include <CPScopedPtr.h>
#include <CPOptional.h>
#include <xml/attributes.h>
#include "oox_drawing.h"
#include "xlsx_table_position.h"

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