Add conditional formattings14 conversion

This commit is contained in:
Viktor Andreev
2024-09-09 18:46:47 +06:00
parent 00ccd7f7a0
commit bb7b63c86e
11 changed files with 782 additions and 185 deletions

View File

@ -55,10 +55,10 @@ namespace XLSB
void load(XLS::CFRecord& record) override;
void save(XLS::CFRecord& record) override;
bool fRef;
bool fSqref;
bool fFormula;
bool fRelID;
bool fRef = false;
bool fSqref = false;
bool fFormula = false;
bool fRelID = false;
FRTRefs rgRefs;
FRTSqrefs rgSqrefs;

View File

@ -53,10 +53,10 @@ namespace XLSB
void load(XLS::CFRecord& record) override;
void save(XLS::CFRecord& record) override;
bool fAdjDelete;
bool fDoAdjust;
bool fAdjChange;
bool fEdit;
bool fAdjDelete = false;
bool fDoAdjust = false;
bool fAdjChange = false;
bool fEdit = false;
UncheckedSqRfX sqrfx;

View File

@ -884,12 +884,12 @@ namespace OOX
{
if(i->m_sUri == L"{78C0D931-6437-407d-A8EE-F0AAD7539E65}")
{
/*auto formatPtr(new XLSB::CONDITIONALFORMATTINGS);
auto formatPtr(new XLSB::CONDITIONALFORMATTINGS);
ptr->m_CONDITIONALFORMATTINGS = XLS::BaseObjectPtr{formatPtr};
for(auto j:i->m_arrConditionalFormatting)
{
formatPtr->m_arCONDITIONALFORMATTING14.push_back(j->toBin());
}*/
formatPtr->m_arCONDITIONALFORMATTING14.push_back(j->toBin14());
}
}
else if(i->m_sUri == L"{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}")
{

View File

@ -109,7 +109,8 @@ namespace XLSB
record.reserveNunBytes(4);
_GUID_ guid_;
STR::bstr2guid(guid, guid_);
if(fGuid)
STR::bstr2guid(guid, guid_);
record << guid_ << fGuid << strParam;
}

View File

@ -62,19 +62,19 @@ namespace XLSB
FRTHeader FRTheader;
CFType iType;
CFTemp iTemplate;
_UINT32 dxfId;
_INT32 iPri;
_UINT32 iParam;
_UINT32 dxfId = 0xFFFFFFFF;
_INT32 iPri = 1;
_UINT32 iParam = 0;
std::string sTypeiParam;
bool fStopTrue;
bool fAbove;
bool fBottom;
bool fPercent;
_UINT32 cbFmla1;
_UINT32 cbFmla2;
_UINT32 cbFmla3;
bool fStopTrue = false;
bool fAbove = false;
bool fBottom = false;
bool fPercent = false;
_UINT32 cbFmla1 = 0;
_UINT32 cbFmla2 = 0;
_UINT32 cbFmla3 = 0;
std::wstring guid;
XLS::Boolean<unsigned int> fGuid;
XLS::Boolean<unsigned int> fGuid = false;
XLNullableWideString strParam;
};

View File

@ -55,9 +55,9 @@ namespace XLSB
FRTBlank FRTheader;
XLS::KPISets14 iSet;
bool fCustom;
bool fIcon;
bool fReverse;
bool fCustom = false;
bool fIcon = false;
bool fReverse = false;
};
} // namespace XLSB

View File

@ -57,7 +57,12 @@ namespace XLSB
void CFVO14::writeFields(XLS::CFRecord& record)
{
record << FRTheader << iType << numParam << fSaveGTE << fGTE << cbFmla;
record << FRTheader << iType << numParam << fSaveGTE << fGTE;
if(FRTheader.fFormula && !FRTheader.rgFormulas.array.empty())
{
cbFmla = FRTheader.rgFormulas.array.at(0).formula.cce;
}
record << cbFmla;
}
} // namespace XLSB

View File

@ -37,6 +37,7 @@
#include "../../../MsBinaryFile/XlsFile/Format/Logic/Biff_structures/BIFF12/Color.h"
#include "../../XlsbFormat/Biff12_records/IndexedColor.h"
#include "../../XlsbFormat/Biff12_records/MRUColor.h"
#include "../../XlsbFormat/Biff12_records/Color14.h"
#include "../ComplexTypes_Spreadsheet.h"
@ -563,6 +564,52 @@ namespace OOX
ptr->nTintAndShade = 0;
return objectPtr;
}
XLS::BaseObjectPtr CColor::toBin14()
{
auto ptr(new XLSB::Color14);
XLS::BaseObjectPtr objectPtr(ptr);
ptr->color.bAlpha = 0;
ptr->color.bRed = 0;
ptr->color.bGreen = 0;
ptr->color.bBlue = 0;
ptr->color.index = 0;
ptr->color.fValidRGB = false;
if(m_oAuto.IsInit())
{
if(m_oAuto->GetValue())
ptr->color.xColorType = 0;
}
else if(m_oIndexed.IsInit())
{
ptr->color.index = m_oIndexed->GetValue();
ptr->color.xColorType = 1;
}
else if(m_oThemeColor.IsInit())
{
ptr->color.index = m_oThemeColor->GetValue();
ptr->color.xColorType = 3;
}
else
{
ptr->color.bAlpha = m_oRgb->Get_A();
ptr->color.bBlue = m_oRgb->Get_B();
ptr->color.bGreen = m_oRgb->Get_G();
ptr->color.bRed = m_oRgb->Get_R();
ptr->color.xColorType = 2;
ptr->color.fValidRGB = true;
}
if ( m_oTint.IsInit())
{
ptr->color.nTintAndShade = m_oTint->GetValue() * 32767.0;
}
else
ptr->color.nTintAndShade = 0;
return objectPtr;
}
EElementType CColor::getType () const
{
return et_x_Color;

View File

@ -148,6 +148,7 @@ namespace OOX
void fromBin(XLS::BaseObjectPtr& obj);
void fromBin(XLS::BaseObject* obj);
XLS::BaseObjectPtr toBin();
XLS::BaseObjectPtr toBin14();
XLSB::Color toColor();
XLSB::Color GetDefaultColor();

View File

@ -287,6 +287,69 @@ XLS::BaseObjectPtr CConditionalFormatValueObject::toBin(bool isIcon)
return objectPtr;
}
XLS::BaseObjectPtr CConditionalFormatValueObject::toBin14(bool isIcon)
{
auto ptr(new XLSB::uCFVO14);
XLS::BaseObjectPtr objectPtr(ptr);
auto ptr1(new XLSB::CFVO14);
ptr->m_BrtCFVO14 = XLS::BaseObjectPtr{ptr1};
ptr1->fSaveGTE = isIcon;
if(m_oGte.IsInit())
ptr1->fGTE = m_oGte->GetValue();
else
ptr1->fGTE = true;
if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Number)
ptr1->iType = XLSB::CFVOtype::CFVONUM;
else if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Minimum)
ptr1->iType = XLSB::CFVOtype::CFVOMIN;
else if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Maximum)
ptr1->iType = XLSB::CFVOtype::CFVOMAX;
else if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Percent)
ptr1->iType = XLSB::CFVOtype::CFVOPERCENT;
else if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Percentile)
ptr1->iType = XLSB::CFVOtype::CFVOPERCENTILE;
else if (m_oType == SimpleTypes::Spreadsheet::ECfvoType::Formula)
ptr1->iType = XLSB::CFVOtype::CFVOFMLA;
else
ptr1->iType = XLSB::CFVOtype::CFVONUM;
if(ptr1->iType.get_type() == XLSB::CFVOtype::CFVOMIN)
ptr1->numParam.data.value = 0;
else if(ptr1->iType.get_type() == XLSB::CFVOtype::CFVOMAX)
ptr1->numParam.data.value = 0;
if(static_cast<_UINT32>(ptr1->iType) == XLSB::CFVOtype::CFVOFMLA && m_oVal.IsInit())
{
XLSB::FRTFormula tempFmla;
tempFmla.formula = m_oVal.get();
ptr1->FRTheader.rgFormulas.array.push_back(tempFmla);
ptr1->FRTheader.fFormula = true;
ptr1->cbFmla = 1;
}
else if (static_cast<_UINT32>(ptr1->iType) == XLSB::CFVOtype::CFVOFMLA && !m_oFormula->m_sText.empty())
{
XLSB::FRTFormula tempFmla;
tempFmla.formula = m_oFormula->m_sText;
ptr1->FRTheader.rgFormulas.array.push_back(tempFmla);
ptr1->FRTheader.fFormula = true;
ptr1->cbFmla = 1;
}
else
{
ptr1->cbFmla = 0;
}
if(ptr1->cbFmla == 0 && !m_oFormula->m_sText.empty())
{
try
{
ptr1->numParam.data.value = std::stod(m_oFormula->m_sText);
}
catch(std::exception)
{}
}
return objectPtr;
}
void CConditionalFormatValueObject::fromBin(XLS::BaseObjectPtr& obj)
{
ReadAttributes(obj);
@ -676,6 +739,16 @@ XLS::BaseObjectPtr CColorScale::toBin()
ptr->m_arBrtColor.push_back(i->toBin());
return objectPtr;
}
XLS::BaseObjectPtr CColorScale::toBin14()
{
auto ptr(new XLSB::COLORSCALE14);
XLS::BaseObjectPtr objectPtr(ptr);
for(auto i:m_arrValues)
ptr->m_arCFVO14.push_back(i->toBin14());
for(auto i:m_arrColors)
ptr->m_arBrtColor14.push_back(i->toBin14());
return objectPtr;
}
EElementType CColorScale::getType () const
{
return et_x_ColorScale;
@ -925,6 +998,43 @@ XLS::BaseObjectPtr CDataBar::toBin()
return objectPtr;
}
XLS::BaseObjectPtr CDataBar::toBin14()
{
auto ptr(new XLSB::DATABAR14);
XLS::BaseObjectPtr objectPtr(ptr);
auto ptr1(new XLSB::BeginDatabar14);
ptr->m_BrtBeginDatabar14 = XLS::BaseObjectPtr{ptr1};
if(m_oMaxLength.IsInit())
ptr1->bLenMax = m_oMaxLength->GetValue();
else
ptr1->bLenMax = 100;
if(m_oMinLength.IsInit())
ptr1->bLenMin = m_oMinLength->GetValue();
else
ptr1->bLenMin = 0;
if(m_oShowValue.IsInit())
ptr1->fShowValue = m_oShowValue->GetValue();
else
ptr1->fShowValue = false;
for(auto i:m_arrValues)
ptr->m_arCFVO14.push_back(i->toBin14());
if(m_oColor.IsInit())
ptr->m_arBrtColor14.push_back(m_oColor->toBin14());
if(m_oAxisColor.IsInit())
ptr->m_arBrtColor14.push_back(m_oAxisColor->toBin14());
if(m_oBorderColor.IsInit())
ptr->m_arBrtColor14.push_back(m_oBorderColor->toBin14());
if(m_oNegativeFillColor.IsInit())
ptr->m_arBrtColor14.push_back(m_oNegativeFillColor->toBin14());
if(m_oNegativeBorderColor.IsInit())
ptr->m_arBrtColor14.push_back(m_oNegativeBorderColor->toBin14());
return objectPtr;
}
void CDataBar::ReadAttributes(XLS::BaseObjectPtr& obj)
{
if(obj->get_type() == XLS::typeBeginDatabar)
@ -1298,6 +1408,170 @@ XLS::BaseObjectPtr CIconSet::toBin()
ptr->m_arCFVO.push_back(i->toBin(true));
return objectPtr;
}
XLS::BaseObjectPtr CIconSet::toBin14()
{
auto ptr(new XLSB::ICONSET14);
XLS::BaseObjectPtr objectPtr(ptr);
auto beginPtr(new XLSB::BeginIconSet14);
ptr->m_BrtBeginIconSet14 = XLS::BaseObjectPtr{beginPtr};
if(m_oShowValue.IsInit())
beginPtr->fIcon = !m_oShowValue->GetValue();
if(m_oReverse.IsInit())
beginPtr->fReverse = m_oReverse->GetValue();
if(m_oIconSet.IsInit())
{
switch (m_oIconSet->GetValue())
{
case SimpleTypes::Spreadsheet::EIconSetType::NoIcons:
{
beginPtr->iSet.set = KPISets14::KPINIL_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows3:
{
beginPtr->iSet.set = KPISets14::KPI3ARROWS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows3Gray:
{
beginPtr->iSet.set = KPISets14::KPI3ARROWSGRAY_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Flags3:
{
beginPtr->iSet.set = KPISets14::KPI3FLAGS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Traffic3Lights1:
{
beginPtr->iSet.set = KPISets14::KPI3TRAFFICLIGHTS1_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Traffic3Lights2:
{
beginPtr->iSet.set = KPISets14::KPI3TRAFFICLIGHTS2_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Signs3:
{
beginPtr->iSet.set = KPISets14::KPI3SIGNS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Symbols3:
{
beginPtr->iSet.set = KPISets14::KPI3SYMBOLS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Symbols3_2:
{
beginPtr->iSet.set = KPISets14::KPI3SYMBOLS2_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows4:
{
beginPtr->iSet.set = KPISets14::KPI4ARROWS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows4Gray:
{
beginPtr->iSet.set = KPISets14::KPI4ARROWSGRAY_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::RedToBlack4:
{
beginPtr->iSet.set = KPISets14::KPI4REDTOBLACK_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Rating4:
{
beginPtr->iSet.set = KPISets14::KPI4RATING_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Traffic4Lights:
{
beginPtr->iSet.set = KPISets14::KPI4TRAFFICLIGHTS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows5:
{
beginPtr->iSet.set = KPISets14::KPI5ARROWS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Arrows5Gray:
{
beginPtr->iSet.set = KPISets14::KPI5ARROWSGRAY_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Rating5:
{
beginPtr->iSet.set = KPISets14::KPI5RATING_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Quarters5:
{
beginPtr->iSet.set = KPISets14::KPI5QUARTERS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Stars3:
{
beginPtr->iSet.set = KPISets14::KPI3STARS_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Triangles3:
{
beginPtr->iSet.set = KPISets14::KPI3TRIANGLES_14;
break;
}
case SimpleTypes::Spreadsheet::EIconSetType::Boxes5:
{
beginPtr->iSet.set = KPISets14::KPI5BOXES_14;
break;
}
default:
{
beginPtr->iSet.set = KPISets14::KPINIL_14;
break;
}
}
}
else
{
switch(m_arrValues.size())
{
case 0:
{
beginPtr->iSet.set = KPISets14::KPINIL_14;
break;
}
case 3:
{
beginPtr->iSet.set = KPISets14::KPI3TRAFFICLIGHTS1_14;
break;
}
case 4:
{
beginPtr->iSet.set = KPISets14::KPI4TRAFFICLIGHTS_14;
break;
}
case 5:
{
beginPtr->iSet.set = KPISets14::KPI5QUARTERS_14;
break;
}
default:
{
beginPtr->iSet.set = KPISets14::KPINIL_14;
break;
}
}
}
for(auto i:m_arrValues)
ptr->m_arCFVO14.push_back(i->toBin14(true));
return objectPtr;
}
void CIconSet::ReadAttributes(XLS::BaseObjectPtr& obj)
{
if(obj->get_type() == XLS::typeBeginIconSet)
@ -1900,171 +2174,400 @@ XLS::BaseObjectPtr CConditionalFormattingRule::WriteAttributes(const XLS::CellR
ptr->cbFmla3 = 0;
}
ptr->iType = XLSB::CFType::CF_TYPE_EXPRIS;
ptr->iParam =0;
ptr->iType = XLSB::CFType::CF_TYPE_EXPRIS;
ptr->iParam =0;
if (m_oType == SimpleTypes::Spreadsheet::ECfType::cellIs)
{
if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_between)
ptr->iParam = XLSB::CFOper::CF_OPER_BN;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notBetween)
ptr->iParam = XLSB::CFOper::CF_OPER_NB;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_equal)
ptr->iParam = XLSB::CFOper::CF_OPER_EQ;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_NE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThan)
ptr->iParam = XLSB::CFOper::CF_OPER_GT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThan)
ptr->iParam = XLSB::CFOper::CF_OPER_LT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_GE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_LE;
ptr->iType = XLSB::CFType::CF_TYPE_CELLIS;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_EXPR;
}
if (m_oType == SimpleTypes::Spreadsheet::ECfType::cellIs)
{
if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_between)
ptr->iParam = XLSB::CFOper::CF_OPER_BN;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notBetween)
ptr->iParam = XLSB::CFOper::CF_OPER_NB;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_equal)
ptr->iParam = XLSB::CFOper::CF_OPER_EQ;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_NE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThan)
ptr->iParam = XLSB::CFOper::CF_OPER_GT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThan)
ptr->iParam = XLSB::CFOper::CF_OPER_LT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_GE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_LE;
ptr->iType = XLSB::CFType::CF_TYPE_CELLIS;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_EXPR;
}
if (m_oType == SimpleTypes::Spreadsheet::ECfType::expression)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FMLA;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::uniqueValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_UNIQUEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_CONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_NOTCONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::beginsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_BEGINSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::endsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_ENDSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSERRORS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOERRORS;
}
if (m_oType == SimpleTypes::Spreadsheet::ECfType::expression)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FMLA;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::uniqueValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_UNIQUEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_CONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_NOTCONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::beginsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_BEGINSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::endsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_ENDSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSERRORS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOERRORS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::timePeriod)
{
if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::today)
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::timePeriod)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTODAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TODAY;
if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::today)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTODAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TODAY;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::tomorrow)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTOMORROW;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TOMORROW;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::yesterday)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODYESTERDAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_YESTERDAY;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::last7Days)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLAST7DAYS;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LAST7DAYS;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISMONTH;
}
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::tomorrow)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTOMORROW;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TOMORROW;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::yesterday)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODYESTERDAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_YESTERDAY;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::last7Days)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLAST7DAYS;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LAST7DAYS;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISMONTH;
}
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::aboveAverage)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_ABOVEAVERAGE;
if(m_oStdDev.IsInit())
ptr->iParam = m_oStdDev->GetValue();
else
ptr->iParam = 0;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::duplicateValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DUPLICATEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::colorScale)
{
ptr->iType = XLSB::CFType::CF_TYPE_GRADIENT;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_GRADIENT;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::dataBar)
{
ptr->iType = XLSB::CFType::CF_TYPE_DATABAR;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DATABAR;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::iconSet)
{
ptr->iType = XLSB::CFType::CF_TYPE_MULTISTATE;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_MULTISTATE;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::top10)
{
ptr->iType = XLSB::CFType::CF_TYPE_FILTER;
if(m_oRank.IsInit())
ptr->iParam = m_oRank->GetValue();
else
ptr->iParam = 1;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FILTER;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::aboveAverage)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_ABOVEAVERAGE;
if(m_oStdDev.IsInit())
ptr->iParam = m_oStdDev->GetValue();
else
ptr->iParam = 0;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::duplicateValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DUPLICATEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::colorScale)
{
ptr->iType = XLSB::CFType::CF_TYPE_GRADIENT;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_GRADIENT;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::dataBar)
{
ptr->iType = XLSB::CFType::CF_TYPE_DATABAR;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DATABAR;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::iconSet)
{
ptr->iType = XLSB::CFType::CF_TYPE_MULTISTATE;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_MULTISTATE;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::top10)
{
ptr->iType = XLSB::CFType::CF_TYPE_FILTER;
if(m_oRank.IsInit())
ptr->iParam = m_oRank->GetValue();
else
ptr->iParam = 1;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FILTER;
}
return objectPtr;
}
XLS::BaseObjectPtr CConditionalFormattingRule::toBin14(const XLS::CellRef &cellRef)
{
auto ptr(new XLSB::CFRULE14());
XLS::BaseObjectPtr objPtr(ptr);
ptr->m_BrtBeginCFRule14 = WriteAttributes14(cellRef);
if(m_oColorScale.IsInit())
{
ptr->m_source = m_oColorScale->toBin14();
}
else if(m_oDataBar.IsInit())
{
ptr->m_source = m_oDataBar->toBin14();
}
else if(m_oIconSet.IsInit())
{
ptr->m_source = m_oIconSet->toBin14();
}
return objPtr;
}
XLS::BaseObjectPtr CConditionalFormattingRule::WriteAttributes14(const XLS::CellRef &cellRef)
{
auto ptr(new XLSB::BeginCFRule14);
XLS::BaseObjectPtr objPtr(ptr);
if(m_oDxfId.IsInit())
{
ptr->dxfId = m_oDxfId->GetValue();
}
if(m_oPriority.IsInit())
ptr->iPri = m_oPriority->GetValue();
if(m_oStopIfTrue.IsInit())
ptr->fStopTrue = m_oStopIfTrue->GetValue();
if(m_oAboveAverage.IsInit())
ptr->fAbove = m_oAboveAverage->GetValue();
if(m_oBottom.IsInit())
ptr->fBottom = m_oBottom->GetValue();
if(m_oPercent.IsInit())
ptr->fPercent = m_oPercent->GetValue();
if(m_oId.IsInit())
{
ptr->fGuid = true;
ptr->guid = m_oId.get();
}
if(m_oText.IsInit())
ptr->strParam = m_oText.get();
else
ptr->strParam.setSize(0xFFFFFFFF);
if(!m_arrFormula.empty())
{
for(auto i:m_arrFormula)
{
if(i.IsInit())
{
XLSB::FRTFormula tempFmla;
tempFmla.formula.set_base_ref(cellRef);
tempFmla.formula = i->m_sText;
ptr->FRTheader.rgFormulas.array.push_back(tempFmla);
}
}
if(!ptr->FRTheader.rgFormulas.array.empty())
ptr->FRTheader.fFormula = true;
}
ptr->iType = XLSB::CFType::CF_TYPE_EXPRIS;
ptr->iParam =0;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_EXPR;
if(!m_oType.IsInit())
return objPtr;
if (m_oType == SimpleTypes::Spreadsheet::ECfType::cellIs)
{
if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_between)
ptr->iParam = XLSB::CFOper::CF_OPER_BN;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notBetween)
ptr->iParam = XLSB::CFOper::CF_OPER_NB;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_equal)
ptr->iParam = XLSB::CFOper::CF_OPER_EQ;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_notEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_NE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThan)
ptr->iParam = XLSB::CFOper::CF_OPER_GT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThan)
ptr->iParam = XLSB::CFOper::CF_OPER_LT;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_greaterThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_GE;
else if (m_oOperator == SimpleTypes::Spreadsheet::ECfOperator::Operator_lessThanOrEqual)
ptr->iParam = XLSB::CFOper::CF_OPER_LE;
ptr->iType = XLSB::CFType::CF_TYPE_CELLIS;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_EXPR;
}
if (m_oType == SimpleTypes::Spreadsheet::ECfType::expression)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FMLA;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::uniqueValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_UNIQUEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_CONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsText)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_NOTCONTAINS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::beginsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_BEGINSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::endsWith)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSTEXT;
ptr->iParam = XLSB::CFTextOper::CF_TEXTOPER_ENDSWITH;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsBlanks)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOBLANKS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::containsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSERRORS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::notContainsErrors)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_CONTAINSNOERRORS;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::timePeriod)
{
if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::today)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTODAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TODAY;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::tomorrow)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTOMORROW;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_TOMORROW;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::yesterday)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODYESTERDAY;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_YESTERDAY;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::last7Days)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLAST7DAYS;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LAST7DAYS;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTMONTH;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::nextWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODNEXTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_NEXTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::lastWeek)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODLASTWEEK;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_LASTWEEK;
}
else if (m_oTimePeriod == SimpleTypes::Spreadsheet::ETimePeriod::thisMonth)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_TIMEPERIODTHISMONTH;
ptr->iParam = XLSB::CFDateOper::CF_TIMEPERIOD_THISMONTH;
}
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::aboveAverage)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_ABOVEAVERAGE;
if(m_oStdDev.IsInit())
ptr->iParam = m_oStdDev->GetValue();
else
ptr->iParam = 0;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::duplicateValues)
{
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DUPLICATEVALUES;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::colorScale)
{
ptr->iType = XLSB::CFType::CF_TYPE_GRADIENT;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_GRADIENT;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::dataBar)
{
ptr->iType = XLSB::CFType::CF_TYPE_DATABAR;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_DATABAR;
ptr->dxfId = 0xFFFFFFFF;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::iconSet)
{
ptr->iType = XLSB::CFType::CF_TYPE_MULTISTATE;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_MULTISTATE;
}
else if (m_oType == SimpleTypes::Spreadsheet::ECfType::top10)
{
ptr->iType = XLSB::CFType::CF_TYPE_FILTER;
if(m_oRank.IsInit())
ptr->iParam = m_oRank->GetValue();
else
ptr->iParam = 1;
ptr->iTemplate = XLSB::CFTemp::CF_TEMPLATE_FILTER;
}
return objPtr;
}
template<typename Type>
nullable<Type> CConditionalFormattingRule::Merge(const nullable<Type> &oPrev, const nullable<Type> &oCurrent)
{
@ -2766,6 +3269,39 @@ XLS::BaseObjectPtr CConditionalFormatting::toBin()
}
return objectPtr;
}
XLS::BaseObjectPtr CConditionalFormatting::toBin14()
{
auto ptr(new XLSB::CONDITIONALFORMATTING14);
auto ptr1(new XLSB::BeginConditionalFormatting14);
ptr->m_BrtBeginConditionalFormatting14 = XLS::BaseObjectPtr{ptr1};
XLS::BaseObjectPtr objectPtr = XLS::BaseObjectPtr{ptr};
ptr1->FRTheader.fFormula = false;
ptr1->FRTheader.fRelID = false;
ptr1->FRTheader.fRef = false;
ptr1->FRTheader.fSqref = true;
XLS::CellRef formatingfirstCell;
if(m_oSqRef.IsInit())
{
XLSB::FRTSqref sqref;
sqref.sqrfx.strValue = m_oSqRef.get();
ptr1->FRTheader.rgSqrefs.array.push_back(sqref);
formatingfirstCell = sqref.sqrfx.getLocationFirstCell();
}
ptr1->ccf = m_arrItems.size();
if(m_oPivot.IsInit())
ptr1->fPivot = m_oPivot->GetValue();
else
ptr1->fPivot = false;
for(auto i: m_arrItems)
{
ptr->m_arCFRULE14.push_back(i->toBin14(formatingfirstCell));
}
return objectPtr;
}
bool CConditionalFormatting::IsUsage()
{
for ( size_t i = 0; i < m_arrItems.size(); ++i)

View File

@ -108,6 +108,7 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin(const bool isIcon = false);
XLS::BaseObjectPtr toBin14(const bool isIcon = false);
virtual EElementType getType () const;
bool isExtended ();
@ -169,6 +170,7 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin();
XLS::BaseObjectPtr toBin14();
virtual EElementType getType () const;
@ -203,6 +205,7 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin();
XLS::BaseObjectPtr toBin14();
virtual EElementType getType () const;
@ -256,6 +259,7 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin();
XLS::BaseObjectPtr toBin14();
virtual EElementType getType () const;
@ -301,6 +305,7 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin(const XLS::CellRef &cellRef);
XLS::BaseObjectPtr toBin14(const XLS::CellRef &cellRef);
virtual EElementType getType () const;
bool isValid () const;
@ -313,7 +318,7 @@ namespace OOX
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
void ReadAttributes(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr WriteAttributes(const XLS::CellRef &cellRef);
XLS::BaseObjectPtr WriteAttributes14(const XLS::CellRef &cellRef);
public:
nullable<CDxf> m_oDxf;
@ -362,6 +367,8 @@ namespace OOX
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
void fromBin(XLS::BaseObjectPtr& obj);
XLS::BaseObjectPtr toBin();
XLS::BaseObjectPtr toBin14();
virtual EElementType getType () const;
bool IsUsage();