Compare commits

..

10 Commits

Author SHA1 Message Date
709ee1942d fix bug #36568 2017-12-19 16:31:54 +03:00
e59eff3a16 fix user file 2017-12-18 18:57:05 +03:00
2206b3b366 Remove unused code 2017-12-18 16:43:12 +03:00
a2d37e8a22 OdfFormaReader - fix 3d charts with 2 axis 2017-12-16 16:24:51 +03:00
b13eba5f01 x2t optimization rels 2017-12-15 17:05:47 +03:00
a48058c7d5 merge from 5.0.7 2017-12-15 14:52:11 +03:00
ab76aff379 . 2017-12-15 14:49:54 +03:00
b8b8a14268 fix bug 36524 (fix MathType equation) 2017-12-15 14:47:57 +03:00
e5ef749718 . 2017-12-15 12:24:35 +03:00
5d524369b8 . 2017-12-14 19:31:33 +03:00
55 changed files with 305 additions and 250 deletions

View File

@ -47,7 +47,7 @@
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -48,7 +48,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@ -392,6 +392,14 @@
<File
RelativePath="..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
</File>
</Filter>
<File

View File

@ -61,6 +61,13 @@ enum ETblStyleOverrideType
tblstyleoverridetypeSwCell = 11,
tblstyleoverridetypeWholeTable = 12
};
struct RowHeight
{
unsigned char HRule = 0;
long nHeight = 0;
};
class SdtWraper
{
public:
@ -2111,7 +2118,17 @@ public:
}
else if( c_oSerProp_rowPrType::Height == type )
{
res = Read2(length, &Binary_tblPrReader::ReadHeight, this, poResult);
RowHeight val;
res = Read2(length, &Binary_tblPrReader::ReadHeight, this, &val);
pCStringWriter->WriteString(L"<w:trHeight w:val=\"" + std::to_wstring(val.nHeight) + L"\"");
switch (val.HRule)
{
case 1: pCStringWriter->WriteString(L" w:hRule=\"auto\""); break;
case 2: pCStringWriter->WriteString(L" w:hRule=\"exact\""); break;
}
pCStringWriter->WriteString(L"/>");
}
else if( c_oSerProp_rowPrType::TableHeader == type )
{
@ -2180,17 +2197,17 @@ public:
int ReadHeight(BYTE type, long length, void* poResult)
{
int res = c_oSerConstants::ReadOk;
XmlUtils::CStringWriter* pCStringWriter = static_cast<XmlUtils::CStringWriter*>(poResult);
/*if( c_oSerProp_rowPrType::Height_Rule == type )
RowHeight* pHeight = static_cast<RowHeight*>(poResult);
if( c_oSerProp_rowPrType::Height_Rule == type )
{
Height.HRule = this.stream.GetUChar();
pHeight->HRule = m_oBufferedStream.GetUChar();
}
else */if( c_oSerProp_rowPrType::Height_Value == type )
else if( c_oSerProp_rowPrType::Height_Value == type )
{
double dHeight = m_oBufferedStream.GetDouble();
long nHeight = SerializeCommon::Round( g_dKoef_mm_to_twips * dHeight);
pCStringWriter->WriteString(L"<w:trHeight w:val=\"" + std::to_wstring(nHeight) + L"\"/>");
pHeight->nHeight = SerializeCommon::Round( g_dKoef_mm_to_twips * dHeight);
}
else
res = c_oSerConstants::ReadUnknown;

View File

@ -618,7 +618,7 @@ namespace MathEquation
nRows = m_aRowsCounter.top();
m_aRowsCounter.pop();
}
int nPos = 0;
int nPos = m_oStream.GetPosition();
if (!m_aRowsPosCounter.empty())
{
nPos = m_aRowsPosCounter.top();

View File

@ -2104,14 +2104,11 @@ namespace BinDocxRW
SimpleTypes::EHeightRule eHRule = SimpleTypes::heightruleAtLeast;
if(rowHeight.m_oHRule.IsInit())
eHRule = rowHeight.m_oHRule->GetValue();
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_Rule);
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Byte);
switch(eHRule)
{
case SimpleTypes::heightruleAtLeast :
case SimpleTypes::heightruleExact :m_oBcw.m_oStream.WriteBYTE(heightrule_AtLeast);break;
default :m_oBcw.m_oStream.WriteBYTE(heightrule_Auto);break;
}
m_oBcw.m_oStream.WriteBYTE(eHRule);
//Value
m_oBcw.m_oStream.WriteBYTE(c_oSerProp_rowPrType::Height_Value);

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_UNICODE;UNICODE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"

View File

@ -48,13 +48,19 @@ _CP_PTR(oox_axis_content) oox_axis_content::create(int type)
oox_axis_content::oox_axis_content(int type/*,std::wstring name*/)
{
//id_ = abs((int)*((_UINT32*)this));
id_ = abs((long)this);
type_=type; //dimension
if (type == 0)
{
id_ = 0;
}
else
{
id_ = abs((long)this);
}
type_ = type;
}
void oox_axis_content::oox_serialize(std::wostream & _Wostream)
{
if (id_ <0 )return;//not activate
if (id_ < 1 )return; //not activate, blank axis
CP_XML_WRITER(_Wostream)
{

View File

@ -153,7 +153,7 @@ void oox_chart_context::serialize(std::wostream & strm)
}
CP_XML_NODE(L"c:dispBlanksAs")
{
CP_XML_ATTR(L"val", L"zero");
CP_XML_ATTR(L"val", plot_area_.current_chart_->dispBlanksAs_);
}
CP_XML_NODE(L"c:showDLblsOverMax")
{

View File

@ -250,7 +250,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
CP_XML_CONTENT(values_[i].numRef_.formula);
}
if (values_[i].numRef_.num_cache_count>0)
if (values_[i].numRef_.num_cache_count > 0)
{
CP_XML_NODE(L"c:numCache")
{

View File

@ -31,10 +31,10 @@
*/
#include "oox_plot_area.h"
#include <boost/foreach.hpp>
#include <boost/functional.hpp>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include "../odf/style_text_properties.h"
#include "oox_chart_shape.h"
@ -90,7 +90,7 @@ void oox_plot_area::add_chart(int type)
void oox_plot_area::add_axis(int type, odf_reader::chart::axis & content)
{
oox_axis_content_ptr ax=oox_axis_content::create(type);
oox_axis_content_ptr ax = oox_axis_content::create(type);
ax->content_ = content;
axis_.push_back(ax);
@ -98,21 +98,25 @@ void oox_plot_area::add_axis(int type, odf_reader::chart::axis & content)
void oox_plot_area::reset_cross_axis()//обязательно после всех добавлений
{
BOOST_FOREACH(oox_axis_content_ptr const & ax, axis_)
for (size_t i = 0; i < axis_.size(); i++)
{
BOOST_FOREACH(oox_chart_ptr const & ch, charts_)
for (size_t j = 0; j < charts_.size(); j++)
{
ch->add_axis(ax->get_Id());
charts_[j]->add_axis(axis_[i]->get_Id());
}
}
BOOST_FOREACH(oox_axis_content_ptr const & a, axis_)
{
int curr_id = a->get_Id();
BOOST_FOREACH(oox_axis_content_ptr const & b, axis_)
{
if (b->get_Id()==curr_id)continue;
b->add_CrossedId(curr_id);
for (size_t i = 0; i < axis_.size(); i++)
{
int curr_id = axis_[i]->get_Id();
if (curr_id < 1) continue;
for (size_t j = 0; j < axis_.size(); j++)
{
if (axis_[j]->get_Id() == curr_id)continue;
axis_[j]->add_CrossedId(curr_id);
}
}
}
@ -130,18 +134,18 @@ void oox_plot_area::oox_serialize(std::wostream & _Wostream)
//CP_XML_NODE(L"c:layout"){}
bool axisPresent = true;
BOOST_FOREACH(oox_chart_ptr const & ch, charts_)
{
ch->oox_serialize(CP_XML_STREAM());
for (size_t i = 0; i < charts_.size(); i++)
{
charts_[i]->oox_serialize(CP_XML_STREAM());
if (ch->type_ == CHART_TYPE_PIE ||
ch->type_ == CHART_TYPE_DOUGHNUT) axisPresent = false;
if (charts_[i]->type_ == CHART_TYPE_PIE ||
charts_[i]->type_ == CHART_TYPE_DOUGHNUT) axisPresent = false;
}
if (axisPresent)
{
BOOST_FOREACH(oox_axis_content_ptr const & a, axis_)
{
a->oox_serialize(CP_XML_STREAM());
for (size_t i = 0; i < axis_.size(); i++)
{
axis_[i]->oox_serialize(CP_XML_STREAM());
}
}
shape.oox_serialize(CP_XML_STREAM());

View File

@ -63,7 +63,7 @@ void oox_chart::set_content_series(odf_reader::chart::series & content)
}
void oox_chart::set_values_series(int ind, std::vector<std::wstring> & val)
{
if (val.size()<1)return;
if (val.empty())return;
oox_series_ptr & current_ptr = series_.back();
current_ptr->setValues (ind, val);
@ -74,9 +74,11 @@ void oox_chart::set_properties(std::vector<odf_reader::_property> g)
_CP_OPT(bool) bStacked;
_CP_OPT(bool) bPercent;
_CP_OPT(int) iGapWidth;
odf_reader::GetProperty(g, L"stacked",bStacked);
odf_reader::GetProperty(g, L"percentage",bPercent);
odf_reader::GetProperty(g, L"stacked", bStacked);
odf_reader::GetProperty(g, L"percentage", bPercent);
odf_reader::GetProperty(g, L"gap-width", iGapWidth);
if ( (bStacked) && (bStacked.get()))
{
@ -87,6 +89,10 @@ void oox_chart::set_properties(std::vector<odf_reader::_property> g)
{
grouping_ = L"percentStacked";
}
if (iGapWidth)
{
dispBlanksAs_ = L"gap";
}
//solid-type - трехмерные
}
void oox_chart::oox_serialize_common(std::wostream & _Wostream)
@ -128,17 +134,15 @@ void oox_bar_chart::set_properties(std::vector<odf_reader::_property> g)
{
oox_chart::set_properties(g);
odf_reader::GetProperty(g, L"vertical",bVertical);
odf_reader::GetProperty(g, L"connect-bars",bConnectBars);
odf_reader::GetProperty(g, L"vertical", bVertical);
odf_reader::GetProperty(g, L"connect-bars", bConnectBars);
odf_reader::GetProperty(g, L"gap-width",iGapWidth);
odf_reader::GetProperty(g, L"overlap",iOverlap);
odf_reader::GetProperty(g, L"gap-width", iGapWidth);
odf_reader::GetProperty(g, L"overlap", iOverlap);
}
void oox_bar_chart::set_additional_properties(std::vector<odf_reader::_property> g)
{
odf_reader::GetProperty(g, L"gap-width",iGapWidth);
odf_reader::GetProperty(g, L"overlap",iOverlap);
}
void oox_bar_chart::oox_serialize(std::wostream & _Wostream)
@ -169,13 +173,13 @@ void oox_bar_chart::oox_serialize(std::wostream & _Wostream)
}
CP_XML_NODE(L"c:overlap")//-100 to 100
{
CP_XML_ATTR(L"val",Overlap);
CP_XML_ATTR(L"val", Overlap);
}
if (iGapWidth)
{
CP_XML_NODE(L"c:gapWidth")
{
CP_XML_ATTR(L"val",iGapWidth.get());
CP_XML_ATTR(L"val", iGapWidth.get());
}
}
CP_XML_NODE(L"c:varyColors")

View File

@ -63,9 +63,10 @@ public:
oox_chart()
{
grouping_ = L"standard";
is3D_ = false;
type_ = 0;
grouping_ = L"standard";
is3D_ = false;
type_ = 0;
dispBlanksAs_ = L"zero";
}
~oox_chart(){}
@ -98,9 +99,10 @@ public:
int type_;
bool is3D_;
std::vector<int> axisId_; //axId (Axis ID) §21.2.2.9
std::wstring dispBlanksAs_;
std::vector<int> axisId_; // axId (Axis ID) §21.2.2.9
std::wstring grouping_; // clustered | percentStacked | stacked | standard
std::vector<oox_series_ptr> series_; //ser (Bar Chart Series) §21.2.2.170
std::vector<oox_series_ptr> series_; // ser (Bar Chart Series) §21.2.2.170
virtual void set_properties(std::vector<odf_reader::_property> g);
virtual void set_additional_properties(std::vector<odf_reader::_property> g){}

View File

@ -401,7 +401,7 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
std::vector<std::wstring> cell_cash;
std::vector<std::wstring> cat_cash;
calc_cache_series (domain_cell_range_adress_, domain_cash);
calc_cache_series (domain_cell_range_adress_, domain_cash);
calc_cache_series (series_[i].cell_range_address_, cell_cash);
if (categories_.size() >0)
@ -462,10 +462,19 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
std::sort(axises_.begin(), axises_.end(), axises_sort());//file_1_ (1).odp
bool x_enabled = false;
bool y_enabled = false;
bool z_enabled = false;
bool x_enabled = false;
bool y_enabled = false;
bool z_enabled = false;
bool is3D = false;
_CP_OPT(bool) boolVal;
odf_reader::GetProperty(plot_area_.properties_, L"three-dimensional", boolVal);
if ((boolVal) && (*boolVal))
{
is3D = true;
}
for (int i = 0; i < axises_.size(); i++)
{
axis & a = axises_[i];
@ -481,6 +490,8 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
if (class_ == chart_stock && a.type_ == 3 )
a.type_ = 4; //шкала дат.
if (is3D) a.type_ = 1; // шкала категорий
x_enabled = true;
}
@ -499,7 +510,7 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
}
else if (a.dimension_ == L"z")
{
chart_context.set_3D_chart (true);
is3D = true;
continue;
a.type_ = 2;
z_enabled = true;
@ -507,6 +518,18 @@ void object_odf_context::oox_convert(oox::oox_chart_context & chart_context)
chart_context.add_axis(a.type_, a);
}
if (is3D)
{
if (!z_enabled)
{
chart::axis a;
a.type_ = 0; // blank
chart_context.add_axis(a.type_, a);
}
chart_context.set_3D_chart (true);
}
}
//----------------------------------------------------------------------------------------

View File

@ -88,8 +88,8 @@ void style_chart_properties::add_attributes( const xml::attributes_wc_ptr & Attr
_CP_OPT(int) iVal;
//CP_APPLY_ATTR(L"chart:symbol-type", iVal); if (iVal)content_.push_back(_property(L"symbol-type", iVal.get()));
CP_APPLY_ATTR(L"chart:gap-width", iVal); if (iVal)content_.push_back(_property(L"gap-width", iVal.get()));
//CP_APPLY_ATTR(L"chart:symbol-type", iVal); if (iVal)content_.push_back(_property(L"symbol-type", iVal.get()));
CP_APPLY_ATTR(L"chart:gap-width", iVal); if (iVal)content_.push_back(_property(L"gap-width", iVal.get()));
CP_APPLY_ATTR(L"chart:overlap", iVal); if (iVal)content_.push_back(_property(L"overlap", iVal.get()));
CP_APPLY_ATTR(L"chart:spline-order", iVal); if (iVal)content_.push_back(_property(L"spline-order", iVal.get()));
CP_APPLY_ATTR(L"chart:spline-resolution",iVal); if (iVal)content_.push_back(_property(L"spline-resolution", iVal.get()));
@ -100,8 +100,8 @@ void style_chart_properties::add_attributes( const xml::attributes_wc_ptr & Attr
CP_APPLY_ATTR(L"chart:maximum", dVal); if (dVal)content_.push_back(_property(L"maximum", dVal.get()));
CP_APPLY_ATTR(L"chart:minimum", dVal); if (dVal)content_.push_back(_property(L"minimum", dVal.get()));
CP_APPLY_ATTR(L"chart:origin", dVal); if (dVal)content_.push_back(_property(L"origin", dVal.get()));
CP_APPLY_ATTR(L"chart:interval-major", dVal); if (dVal)content_.push_back(_property(L"interval-major", dVal.get()));
CP_APPLY_ATTR(L"chart:origin", dVal); if (dVal)content_.push_back(_property(L"origin", dVal.get()));
CP_APPLY_ATTR(L"chart:interval-major", dVal); if (dVal)content_.push_back(_property(L"interval-major", dVal.get()));
CP_APPLY_ATTR(L"chart:error-percentage",dVal); if (dVal)content_.push_back(_property(L"error-percentage", dVal.get()));
CP_APPLY_ATTR(L"chart:error-margin", dVal); if (dVal)content_.push_back(_property(L"error-margin", dVal.get()));
CP_APPLY_ATTR(L"chart:error-lower-limit",dVal); if (dVal)content_.push_back(_property(L"error-lower-limit", dVal.get()));

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -45,7 +45,7 @@
AdditionalIncludeDirectories=""
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="_DEBUG;_LIB;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough=""
WarningLevel="3"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="Oox2OdfConverter"
ProjectGUID="{BEE01B53-244A-44E6-8947-ED9342D9247E}"
RootNamespace="Oox2OdfConverter"
@ -47,7 +47,7 @@
PreprocessorDefinitions="NDEBUG;_LIB;_USE_XMLLITE_READER_;USE_LITE_READER;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -59,7 +59,7 @@
PreprocessorDefinitions="_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
@ -429,6 +429,14 @@
<File
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>

View File

@ -153,7 +153,7 @@ namespace NS_DWC_Common
s.erase(nLen - 1);
int nVal = XmlUtils::GetInteger(s);
double dKoef = 100000.0 / 65536;
nVal = (int)(dKoef * nVal);
nVal = (int)(dKoef * nVal + 0.5);
s = std::to_wstring(nVal);
}
}
@ -1499,60 +1499,34 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
if (bIsFound)
break;
}
if(NULL != pElem)
if(pElem && NULL != pOle && pOle->m_sProgId.IsInit() && (pOle->m_oId.IsInit() || pOle->m_OleObjectFile.IsInit()))
{
if(NULL != pOle && pOle->m_sProgId.IsInit() && (pOle->m_oId.IsInit() || pOle->m_OleObjectFile.IsInit()))
PPTX::Logic::Pic* pPicture = dynamic_cast<PPTX::Logic::Pic*>(pElem->GetElem().operator ->());
if ((NULL != pPicture) && (pPicture->blipFill.blip.IsInit()))
{
PPTX::Logic::Shape* pShape = dynamic_cast<PPTX::Logic::Shape*>(pElem->GetElem().operator ->());
if(NULL != pShape && pShape->spPr.Fill.Fill.IsInit())
if (pOle->m_OleObjectFile.IsInit())
{
bool bImageOle = false;
if (pShape->spPr.Fill.m_type == PPTX::Logic::UniFill::blipFill) bImageOle = true;
PPTX::Logic::BlipFill oBlipFillNew;
if (!bImageOle)
oBlipFillNew.blip = new PPTX::Logic::Blip();
const PPTX::Logic::BlipFill& oBlipFill = bImageOle ? pShape->spPr.Fill.Fill.as<PPTX::Logic::BlipFill>() :
oBlipFillNew;
if(oBlipFill.blip.IsInit())
pPicture->blipFill.blip->oleFilepathBin = pOle->m_OleObjectFile->filename().GetPath();
}
else if (pOle->m_oId.IsInit())
{
pPicture->blipFill.blip->oleRid = pOle->m_oId.get().ToString();
}
if(strName == L"object")
{
int nDxaOrig = oParseNode.ReadAttributeInt(L"w:dxaOrig");
int nDyaOrig = oParseNode.ReadAttributeInt(L"w:dyaOrig");
if (nDxaOrig > 0 && nDyaOrig > 0)
{
if (pOle->m_OleObjectFile.IsInit())
{
oBlipFill.blip->oleFilepathBin = pOle->m_OleObjectFile->filename().GetPath();
}
else if (pOle->m_oId.IsInit())
{
oBlipFill.blip->oleRid = pOle->m_oId.get().ToString();
}
if(strName == L"object")
{
int nDxaOrig = oParseNode.ReadAttributeInt(L"w:dxaOrig");
int nDyaOrig = oParseNode.ReadAttributeInt(L"w:dyaOrig");
if (nDxaOrig > 0 && nDyaOrig > 0)
{
pOle->m_oDxaOrig = nDxaOrig;
pOle->m_oDyaOrig = nDyaOrig;
}
}
PPTX::Logic::Pic *newElem = new PPTX::Logic::Pic();
newElem->blipFill = oBlipFill;
newElem->spPr = pShape->spPr;
newElem->style = pShape->style;
newElem->oleObject.reset(pOle);
newElem->spPr.Fill.Fill.reset();
pOle = NULL;
pElem->InitElem(newElem);
pOle->m_oDxaOrig = nDxaOrig;
pOle->m_oDyaOrig = nDyaOrig;
}
}
pPicture->oleObject.reset(pOle);
pOle = NULL;
}
m_pBinaryWriter->WriteRecord1(1, *pElem);
if (pElem)
m_pBinaryWriter->WriteRecord1(1, *pElem);
}
RELEASEOBJECT(pElem)
RELEASEOBJECT(pOle)
@ -2555,9 +2529,9 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
ConvertTextVML(oNodeTextBox, pShape);
}
std::wstring sTextInset = oNodeTextBox.GetAttribute(L"inset");
std::wstring sTextInsetMode = oNodeTextBox.GetAttribute(L"o:insetmode");
sTextboxStyle = oNodeTextBox.GetAttribute(L"style");
std::wstring sTextInset = oNodeTextBox.GetAttribute(L"inset");
std::wstring sTextInsetMode = oNodeTextBox.GetAttribute(L"o:insetmode");
sTextboxStyle = oNodeTextBox.GetAttribute(L"style");
if (L"" != sTextInset && ((L"" == sTextInsetMode) || (L"custom" == sTextInsetMode)))
{
@ -2565,15 +2539,15 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
oTrimmer.m_Separator = (wchar_t)',';
oTrimmer.LoadFromString(sTextInset);
double dTextMarginLeft = oTrimmer.GetParameter(0, 0.1);
double dTextMarginTop = oTrimmer.GetParameter(1, 0.05);
double dTextMarginRight = oTrimmer.GetParameter(2, 0.1);
double dTextMarginBottom = oTrimmer.GetParameter(3, 0.05);
double dTextMarginLeft = oTrimmer.GetParameter(0, 0.1);
double dTextMarginTop = oTrimmer.GetParameter(1, 0.05);
double dTextMarginRight = oTrimmer.GetParameter(2, 0.1);
double dTextMarginBottom = oTrimmer.GetParameter(3, 0.05);
pShape->oTextBoxBodyPr->lIns = (int)(12700 * dTextMarginLeft);
pShape->oTextBoxBodyPr->tIns = (int)(12700 * dTextMarginTop);
pShape->oTextBoxBodyPr->rIns = (int)(12700 * dTextMarginRight);
pShape->oTextBoxBodyPr->bIns = (int)(12700 * dTextMarginBottom);
pShape->oTextBoxBodyPr->lIns = (int)(12700 * dTextMarginLeft + 0.5);
pShape->oTextBoxBodyPr->tIns = (int)(12700 * dTextMarginTop + 0.5);
pShape->oTextBoxBodyPr->rIns = (int)(12700 * dTextMarginRight + 0.5);
pShape->oTextBoxBodyPr->bIns = (int)(12700 * dTextMarginBottom + 0.5);
}
if (!sTextboxStyle.empty())
@ -3164,7 +3138,7 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
if (oCssStyles.m_mapSettings.end() != pPair)
{
left = (LONG)(dKoefSize * parserPoint.FromString(pPair->second));
left = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5);
}
pPair = oCssStyles.m_mapSettings.find(L"margin-top");
@ -3174,54 +3148,54 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
if (oCssStyles.m_mapSettings.end() != pPair)
{
top = (LONG)(dKoefSize * parserPoint.FromString(pPair->second));
top = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5);
}
}
pPair = oCssStyles.m_mapSettings.find(L"width");
if (oCssStyles.m_mapSettings.end() != pPair)
{
width = (LONG)(dKoefSize * parserPoint.FromString(pPair->second));
width = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5);
}
else
{
pPair = oCssStyles.m_mapSettings.find(L"margin-right");
if (oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.end())
width = (LONG)(dKoefSize * parserPoint.FromString(pPair->second)) - left;
width = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5) - left;
}
pPair = oCssStyles.m_mapSettings.find(L"height");
if (oCssStyles.m_mapSettings.end() != pPair)
{
height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second));
height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5);
}
else
{
pPair = oCssStyles.m_mapSettings.find(L"margin-bottom");
if (oCssStyles.m_mapSettings.end() != oCssStyles.m_mapSettings.end())
height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second)) - top;
height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second) + 0.5) - top;
}
unsigned long margL = (unsigned long)(9 * dKoef);
unsigned long margL = (unsigned long)(9 * dKoef + 0.5);
unsigned long margT = 0;
unsigned long margR = (unsigned long)(9 * dKoef);
unsigned long margR = (unsigned long)(9 * dKoef + 0.5);
unsigned long margB = 0;
pPair = oCssStyles.m_mapSettings.find(L"mso-wrap-distance-left");
if (oCssStyles.m_mapSettings.end() != pPair)
margL = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
margL = (unsigned long)(dKoef * parserPoint.FromString(pPair->second) + 0.5);
pPair = oCssStyles.m_mapSettings.find(L"mso-wrap-distance-top");
if (oCssStyles.m_mapSettings.end() != pPair)
margT = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
margT = (unsigned long)(dKoef * parserPoint.FromString(pPair->second) + 0.5);
pPair = oCssStyles.m_mapSettings.find(L"mso-wrap-distance-right");
if (oCssStyles.m_mapSettings.end() != pPair)
margR = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
margR = (unsigned long)(dKoef * parserPoint.FromString(pPair->second) + 0.5);
pPair = oCssStyles.m_mapSettings.find(L"mso-wrap-distance-bottom");
if (oCssStyles.m_mapSettings.end() != pPair)
margB = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
margB = (unsigned long)(dKoef * parserPoint.FromString(pPair->second) + 0.5);
oProps.X = left;
oProps.Y = top;
@ -3247,14 +3221,23 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
oWriter.WriteAttribute(L"distR", margR);
oWriter.EndAttributes();
oWriter.StartNode(L"wp:extent");
oWriter.StartNode(L"wp:extent");
oWriter.StartAttributes();
oWriter.WriteAttribute(L"cx", width);
oWriter.WriteAttribute(L"cy", height);
oWriter.EndAttributes();
oWriter.EndNode(L"wp:extent");
std::wstring strId = L"<wp:docPr id=\"" + std::to_wstring(m_lNextId) + L"\" name=\"\"/>";
oWriter.StartNode(L"wp:effectExtent");
oWriter.StartAttributes();
oWriter.WriteAttribute(L"l", 0);
oWriter.WriteAttribute(L"t", 0);
oWriter.WriteAttribute(L"r", 0);
oWriter.WriteAttribute(L"b", 0);
oWriter.EndAttributes();
oWriter.EndNode(L"wp:effectExtent");
std::wstring strId = L"<wp:docPr id=\"" + std::to_wstring(m_lNextId) + L"\" name=\"\"/>";
m_lNextId++;
oWriter.WriteString(strId);
@ -3530,7 +3513,6 @@ std::wstring CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, P
bHidden = true;
}
std::wstring strId = L"<wp:docPr id=\"" + std::to_wstring(m_lNextId) + L"\" name=\"\"" + (bHidden ? L" hidden=\"true\"" : L"") + L"/>";
m_lNextId++;
@ -5019,8 +5001,8 @@ void CDrawingConverter::ConvertMainPropsToVML(const std::wstring& bsMainProps, N
int nX = oNodeT.ReadAttributeInt(L"x");
int nY = oNodeT.ReadAttributeInt(L"y");
nX = (int)(dKoefX * nX);
nY = (int)(dKoefY * nY);
nX = (int)(dKoefX * nX + 0.5);
nY = (int)(dKoefY * nY + 0.5);
std::wstring strFP = std::to_wstring(nX) + L" " + std::to_wstring(nY);
strAttr += strFP;

View File

@ -103,11 +103,9 @@ namespace PPTX
pSrcFile->type() == OOX::Presentation::FileTypes::NotesSlide) ? true : false;
}
size_t nCount = rels.m_arrRelations.size();
for (size_t i = 0; i < nCount; ++i)
{
OOX::Rels::CRelationShip* pRelation = rels.m_arrRelations[i];
for (std::map<std::wstring, OOX::Rels::CRelationShip*>::const_iterator it = rels.m_mapRelations.begin(); it != rels.m_mapRelations.end(); it++)
{
OOX::Rels::CRelationShip* pRelation = it->second;
OOX::CPath normPath = CorrectPathRels(path, pRelation);

View File

@ -123,18 +123,18 @@ namespace PPTX
oWriter.StartNode(_T("w:ind"));
oWriter.StartAttributes();
if (oPar.pPr->marL.is_init())
oWriter.WriteAttribute(_T("w:left"), (int)((double)(*pPr->marL) / 635));
oWriter.WriteAttribute(_T("w:left"), (int)((double)(*pPr->marL) / 635.) + 0.5);
if (oPar.pPr->marR.is_init())
oWriter.WriteAttribute(_T("w:right"), (int)((double)(*pPr->marR) / 635));
oWriter.WriteAttribute(_T("w:right"), (int)((double)(*pPr->marR) / 635.) + 0.5);
if (oPar.pPr->indent.is_init())
oWriter.WriteAttribute(_T("w:firstLine"), (int)((double)(*pPr->indent) / 635));
oWriter.WriteAttribute(_T("w:firstLine"), (int)((double)(*pPr->indent) / 635.) + 0.5);
oWriter.EndAttributes();
oWriter.EndNode(_T("w:ind"));
}
if (true)
{
oWriter.WriteString(_T("<w:spacing w:before=\"0\" w:after=\"0\" />"));
oWriter.WriteString(_T("<w:spacing w:before=\"0\" w:after=\"0\"/>"));
}
if (pPr->algn.is_init())

View File

@ -48,7 +48,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_MATH_DEFINES;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -46,7 +46,7 @@
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"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -46,7 +46,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\XlsFileTestD.pdb"
WarningLevel="3"

View File

@ -516,7 +516,7 @@ const std::wstring tab2sheet_name(const short tabid, std::vector<std::wstring>&
const std::wstring name2sheet_name(std::wstring name, const std::wstring prefix)
{
static boost::wregex correct_sheet_name(L"^\\'.+?\\'$");
static boost::wregex test_sheet_name(L"[\\s)(\\'&:-]+"); //.??? 6442946.xls
static boost::wregex test_sheet_name(L"[\\s)(\\!\\'&:-]+"); //.??? 6442946.xls
std::wstring sheet_first = prefix + name;
@ -537,7 +537,7 @@ const std::wstring xti_indexes2sheet_name(const short tabFirst, const short tabL
return L"#REF";
}
static boost::wregex correct_sheet_name(L"^\\'.+?\\'$");
static boost::wregex test_sheet_name(L"[\\s)(\\'&:-]+"); //.??? 6442946.xls
static boost::wregex test_sheet_name(L"[\\s)(\\!\\'&:-]+"); //.??? 6442946.xls
std::wstring sheet_first = prefix + tab2sheet_name(tabFirst, names);

View File

@ -60,7 +60,9 @@ void String::readFields(CFRecord& record)
string = s;
}
else
{
record >> string;
}
}
} // namespace XLS

View File

@ -32,13 +32,11 @@
#pragma once
#include "BiffRecordContinued.h"
#include <Logic/Biff_structures/BiffString.h>
#include "../Biff_structures/BiffString.h"
namespace XLS
{
// Logical representation of String record in BIFF8
class String: public BiffRecordContinued
{
BIFF_RECORD_DEFINE_TYPE_INFO(String)

View File

@ -31,16 +31,17 @@
*/
#include "FORMULA.h"
#include <Logic/Biff_records/Uncalced.h>
#include <Logic/Biff_records/Formula.h>
#include <Logic/Biff_records/Array.h>
#include <Logic/Biff_records/Table.h>
#include <Logic/Biff_records/ShrFmla.h>
#include <Logic/Biff_unions/SUB.h>
#include <Logic/Biff_records/String.h>
#include <Logic/Biff_records/Continue.h>
#include "../Biff_records/Uncalced.h"
#include "../Biff_records/Formula.h"
#include "../Biff_records/Array.h"
#include "../Biff_records/Table.h"
#include "../Biff_records/ShrFmla.h"
#include "../Biff_unions/SUB.h"
#include "../Biff_records/String.h"
#include "../Biff_records/Continue.h"
#include <utils.h>
#include "../../../../source/Common/utils.h"
#include "../../../../../Common/DocxFormat/Source/XML/Utils.h"
namespace XLS
{
@ -105,14 +106,18 @@ const bool FORMULA::loadContent(BinProcessor& proc)
m_sharedIndex = shared_formulas_locations_ref_.size();
shared_formulas_locations_ref_.push_back(shr_formula.ref_);
}
//proc.optional<SUB>();
else
{
//proc.optional<SUB>();
}
}
if ((formula) && (formula->fShrFmla))
{
for (size_t i = 0; i < shared_formulas_locations_ref_.size(); i++)
{
if (shared_formulas_locations_ref_[i].inRange(location)) m_sharedIndex = i;
if (shared_formulas_locations_ref_[i].inRange(location))
m_sharedIndex = i;
}
}
@ -208,21 +213,20 @@ int FORMULA::serialize(std::wostream & stream)
}
}
//if (formula_cash.empty())
//{ todooo неверно читается - general_formulas.xls
// if (m_Cash)
//
// String * str = dynamic_cast<String*>(m_Cash.get());
// if (str)
// formula_cash =str->string.value();
// }
//}
if (formula_cash.empty() && m_Cash)
{
String * str = dynamic_cast<String*>(m_Cash.get());
if (str)
{
formula_cash =str->string.value();
}
}
if (!formula_cash.empty())
{
CP_XML_NODE(L"v")
{
CP_XML_STREAM() << xml::utils::replace_text_to_xml(formula_cash);
CP_XML_STREAM() << XmlUtils::EncodeXmlString(formula_cash, true);
}
}
}

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"

View File

@ -335,7 +335,7 @@
Optimization="0"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="_DEBUG;_WINDOWS;USE_PRECOMPILED_HEADERS;WIN32"
RuntimeLibrary="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="pch.h"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
ProgramDataBaseFileName="$(IntDir)\DocxFormat.pdb"
WarningLevel="3"
DebugInformationFormat="4"

View File

@ -74,19 +74,19 @@ namespace OOX
void IFileContainer::Read (const OOX::CRels& oRels, const OOX::CPath& oRootPath, const OOX::CPath& oPath)
{
unsigned int nCount = oRels.m_arrRelations.size();
for ( unsigned int nIndex = 0; nIndex < nCount; ++nIndex )
for (std::map<std::wstring, Rels::CRelationShip*>::const_iterator it = oRels.m_mapRelations.begin(); it != oRels.m_mapRelations.end(); it++)
{
if (!it->second) continue;
smart_ptr<OOX::File> pFile;
if (m_bSpreadsheets)
pFile = OOX::Spreadsheet::CreateFile( oRootPath, oPath, oRels.m_arrRelations[nIndex] );
pFile = OOX::Spreadsheet::CreateFile( oRootPath, oPath, it->second );
if (pFile.IsInit() == false || pFile->type() == FileTypes::Unknow)
pFile = OOX::CreateFile( oRootPath, oPath, oRels.m_arrRelations[nIndex] );
pFile = OOX::CreateFile( oRootPath, oPath, it->second );
Add( oRels.m_arrRelations[nIndex]->rId(), pFile );
Add( it->second->rId(), pFile );
}
}

View File

@ -172,12 +172,12 @@ namespace OOX
}
~CRels()
{
for ( unsigned int nIndex = 0; nIndex < m_arrRelations.size(); nIndex++ )
for (std::map<std::wstring, Rels::CRelationShip*>::iterator it = m_mapRelations.begin(); it != m_mapRelations.end(); it++)
{
if ( m_arrRelations[nIndex] ) delete m_arrRelations[nIndex];
m_arrRelations[nIndex] = NULL;
if ( it->second ) delete it->second;
it->second = NULL;
}
m_arrRelations.clear();
m_mapRelations.clear();
}
@ -206,8 +206,12 @@ namespace OOX
sName = oReader.GetName();
if ( _T("Relationship") == sName )
{
OOX::Rels::CRelationShip *oRel = new OOX::Rels::CRelationShip(oReader);
if (oRel) m_arrRelations.push_back( oRel );
OOX::Rels::CRelationShip *pRel = new OOX::Rels::CRelationShip(oReader);
if (pRel)
{
std::wstring rid = pRel->rId().get();
m_mapRelations.insert(std::make_pair( rid, pRel) );
}
}
}
}
@ -226,9 +230,12 @@ namespace OOX
{
if ( oNodes.GetAt( nIndex, oRelNode ) )
{
//Rels::CRelationShip oRel = oRelNode;
Rels::CRelationShip *oRel = new Rels::CRelationShip (oRelNode);
m_arrRelations.push_back( oRel );
Rels::CRelationShip *pRel = new Rels::CRelationShip (oRelNode);
if (pRel)
{
std::wstring rid = pRel->rId().get();
m_mapRelations.insert(std::make_pair( rid, pRel) );
}
}
}
}
@ -237,7 +244,7 @@ namespace OOX
}
void Write(const CPath& oFilePath) const
{
if ( 0 < m_arrRelations.size() )
if ( !m_mapRelations.empty() )
{
CPath oFile = CreateFileName( oFilePath );
CSystemUtility::CreateDirectories( oFile.GetDirectory() );
@ -250,10 +257,10 @@ namespace OOX
oWriter.WriteAttribute( _T("xmlns"), _T("http://schemas.openxmlformats.org/package/2006/relationships") );
oWriter.WriteNodeEnd( _T("Relationships"), true, false );
for ( unsigned int nIndex = 0; nIndex < m_arrRelations.size(); nIndex++ )
for (std::map<std::wstring, Rels::CRelationShip*>::const_iterator it = m_mapRelations.begin(); it != m_mapRelations.end(); it++)
{
if ( m_arrRelations[nIndex])
oWriter.WriteString( m_arrRelations[nIndex]->toXML() );
if ( it->second )
oWriter.WriteString( it->second->toXML() );
}
oWriter.WriteNodeEnd(_T("Relationships") );
@ -270,39 +277,37 @@ namespace OOX
std::wstring strFileName = oPath.m_strFilename;
std::wstring strDir = oPath.GetDirectory() + _T("");
if ( _T("") == oPath.GetExtention() )
if ( L"" == oPath.GetExtention() )
{
if ( oType.RelationType() == _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject") )
if ( oType.RelationType() == L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject" )
{
strFileName += L".bin";
m_arrRelations.push_back(new Rels::CRelationShip( rId, oType.RelationType(), strDir + strFileName ) );
m_mapRelations.insert( std::make_pair( rId.get(), new Rels::CRelationShip( rId, oType.RelationType(), strDir + strFileName )) );
}
else if ( oType.RelationType() == _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") )
else if ( oType.RelationType() == L"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" )
{
strFileName += L".wmf" ;
m_arrRelations.push_back(new Rels::CRelationShip( rId, oType.RelationType(), strDir + strFileName ) );
m_mapRelations.insert( std::make_pair( rId.get(), new Rels::CRelationShip( rId, oType.RelationType(), strDir + strFileName )) );
}
}
else
{
m_arrRelations.push_back(new Rels::CRelationShip( rId, oType.RelationType(), oPath.GetPath()) );
//m_arrRelations.push_back( Rels::CRelationShip( rId, oType.RelationType(), replace_extension( oPath, L"svm", L"png") );
m_mapRelations.insert( std::make_pair( rId.get(), new Rels::CRelationShip( rId, oType.RelationType(), oPath.GetPath())));
}
}
}
void Registration(const RId& rId, const smart_ptr<External> pExternal)
{
m_arrRelations.push_back( new Rels::CRelationShip( rId, pExternal ) );
m_mapRelations.insert( std::make_pair( rId.get(), new Rels::CRelationShip( rId, pExternal )) );
}
void GetRel(const RId& rId, Rels::CRelationShip** ppRelationShip)
{
(*ppRelationShip) = NULL;
for( size_t i = 0, length = m_arrRelations.size(); i < length; ++i)
std::map<std::wstring, Rels::CRelationShip*>::iterator pFind = m_mapRelations.find(rId.get());
if (pFind != m_mapRelations.end())
{
if ((m_arrRelations[i]) && (m_arrRelations[i]->rId() == rId))
{
(*ppRelationShip) = new Rels::CRelationShip(*m_arrRelations[i]);
}
(*ppRelationShip) = pFind->second;
}
}
@ -319,11 +324,9 @@ namespace OOX
return pathTemp.GetPath();
}
public:
std::vector<Rels::CRelationShip*> m_arrRelations;
std::map<std::wstring, Rels::CRelationShip*> m_mapRelations;
};
} // namespace OOX

View File

@ -501,7 +501,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;JAS_WIN_MSVC_BUILD;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -49,7 +49,7 @@
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;JAS_WIN_MSVC_BUILD;_CRT_SECURE_NO_DEPRECATE;EXCLUDE_JPG_SUPPORT"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -338,7 +338,7 @@
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -344,7 +344,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -49,7 +49,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MNG_SUPPORT_DISPLAY;MNG_SUPPORT_READ;MNG_SUPPORT_WRITE;MNG_ACCESS_CHUNKS;MNG_STORE_CHUNKS;_CRT_SECURE_NO_DEPRECATE;MNG_ERROR_TELLTALE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"

View File

@ -49,7 +49,7 @@
AdditionalIncludeDirectories="..\zlib"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -195,7 +195,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -50,7 +50,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -198,7 +198,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -500,7 +500,7 @@
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE;FT2_BUILD_LIBRARY"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
DisableLanguageExtensions="true"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)/"

View File

@ -214,7 +214,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;$(NOINHERIT)"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
StructMemberAlignment="0"
DisableLanguageExtensions="false"
PrecompiledHeaderFile=""

View File

@ -46,7 +46,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
ObjectFile="$(IntDir)\"
ProgramDataBaseFileName="$(IntDir)\vc80.pdb"

View File

@ -495,7 +495,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE;$(NOINHERIT)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=""
AssemblerListingLocation="$(ConfigurationName)\"
ObjectFile="$(IntDir)\"

View File

@ -254,8 +254,6 @@ ARTIFACTS += Common/3dParty/*/$(TARGET)/build/*
ifeq ($(OS),Windows_NT)
ARTIFACTS += Common/3dParty/v8/$(TARGET)/*/*.dll
else
ARTIFACTS += Common/3dParty/v8/$(TARGET)/*.S
endif
#Template for next statment:

View File

@ -46,7 +46,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"

View File

@ -47,7 +47,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;FILE_FORMAT_CHECKER_WITH_MACRO;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;AVS_USE_CONVERT_PPTX_TOCUSTOM_VML;DONT_WRITE_EMBEDDED_FONTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@ -336,6 +336,7 @@
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
UsePrecompiledHeader="0"
/>
</FileConfiguration>