mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
logic to cpp
This commit is contained in:
@ -51,6 +51,14 @@ namespace OOX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
// StylisticSets
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CStylisticSets::CStylisticSets(OOX::Document *pMain) : WritingElementWithChilds<ComplexTypes::Word::CStylisticSet>(pMain)
|
||||
{
|
||||
}
|
||||
CStylisticSets::~CStylisticSets() {}
|
||||
void CStylisticSets::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
if (oReader.IsEmptyNode())
|
||||
@ -67,6 +75,9 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
void CStylisticSets::fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
std::wstring CStylisticSets::toXML() const
|
||||
{
|
||||
std::wstring sResult = L"<w14:stylisticSets>";
|
||||
@ -82,6 +93,11 @@ namespace OOX
|
||||
sResult += L"</w14:stylisticSets>";
|
||||
return sResult;
|
||||
}
|
||||
EElementType CStylisticSets::getType() const
|
||||
{
|
||||
return et_w_stylisticSets;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// RPrChange
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -192,6 +208,41 @@ namespace OOX
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// RunProperty
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CRunProperty::CRunProperty()
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
}
|
||||
CRunProperty::~CRunProperty()
|
||||
{
|
||||
RELEASEOBJECT(m_pText);
|
||||
}
|
||||
CRunProperty::CRunProperty(const XmlUtils::CXmlNode &oNode)
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );
|
||||
}
|
||||
CRunProperty::CRunProperty(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
}
|
||||
const CRunProperty& CRunProperty::operator=(const XmlUtils::CXmlNode &oNode)
|
||||
{
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CRunProperty& CRunProperty::operator=(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
void CRunProperty::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
fromXML(oReader, NULL);
|
||||
@ -346,7 +397,6 @@ namespace OOX
|
||||
m_oRFonts->m_sAscii = *m_oFontName->m_sVal;
|
||||
}
|
||||
}
|
||||
|
||||
void CRunProperty::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
if ( L"w:rPr" != oNode.GetName() )
|
||||
@ -503,7 +553,6 @@ namespace OOX
|
||||
if (!pWriter) return;
|
||||
pWriter->WriteString(toXML());
|
||||
}
|
||||
|
||||
std::wstring CRunProperty::toXML() const
|
||||
{
|
||||
std::wstring sResult = L"<w:rPr>";
|
||||
@ -730,7 +779,10 @@ namespace OOX
|
||||
|
||||
return oProperties;
|
||||
}
|
||||
|
||||
EElementType CRunProperty::getType() const
|
||||
{
|
||||
return et_w_rPr;
|
||||
}
|
||||
|
||||
|
||||
} // Logic
|
||||
|
||||
@ -54,21 +54,14 @@ namespace OOX
|
||||
{
|
||||
public:
|
||||
WritingElement_AdditionConstructors(CStylisticSets)
|
||||
CStylisticSets(OOX::Document *pMain = NULL) : WritingElementWithChilds<ComplexTypes::Word::CStylisticSet>(pMain)
|
||||
{
|
||||
}
|
||||
virtual ~CStylisticSets() {}
|
||||
CStylisticSets(OOX::Document *pMain = NULL);
|
||||
virtual ~CStylisticSets();
|
||||
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node)
|
||||
{
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& node);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_stylisticSets;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -98,41 +91,17 @@ namespace OOX
|
||||
nullable<CRunProperty> m_pRunPr;
|
||||
};
|
||||
|
||||
|
||||
class CRunProperty : public WritingElement
|
||||
{
|
||||
public:
|
||||
CRunProperty()
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
}
|
||||
virtual ~CRunProperty()
|
||||
{
|
||||
RELEASEOBJECT(m_pText);
|
||||
}
|
||||
CRunProperty(const XmlUtils::CXmlNode &oNode)
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );
|
||||
}
|
||||
CRunProperty(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_pText = NULL;
|
||||
m_bRPRChange = false;
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
}
|
||||
const CRunProperty& operator=(const XmlUtils::CXmlNode &oNode)
|
||||
{
|
||||
fromXML( (XmlUtils::CXmlNode &)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CRunProperty& operator=(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
CRunProperty();
|
||||
virtual ~CRunProperty();
|
||||
CRunProperty(const XmlUtils::CXmlNode &oNode);
|
||||
CRunProperty(const XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
const CRunProperty& operator=(const XmlUtils::CXmlNode &oNode);
|
||||
const CRunProperty& operator=(const XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
bool IsNoEmpty();
|
||||
void Clear();
|
||||
|
||||
@ -141,10 +110,8 @@ namespace OOX
|
||||
void fromXML(XmlUtils::CXmlLiteReader& oReader, CRun* pRun);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual void toXmlWriter(NSBinPptxRW::CXmlWriter* pWriter) const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_rPr;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
template<typename Type>
|
||||
static nullable<Type> Merge(const nullable<Type> &oPrev, const nullable<Type> &oCurrent)
|
||||
{
|
||||
|
||||
@ -55,6 +55,12 @@ namespace ComplexTypes
|
||||
{
|
||||
namespace Word
|
||||
{
|
||||
CComb::CComb()
|
||||
{
|
||||
}
|
||||
CComb::~CComb()
|
||||
{
|
||||
}
|
||||
void CComb::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:width", m_oWidth );
|
||||
@ -100,6 +106,12 @@ namespace ComplexTypes
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CTextFormFormat::CTextFormFormat()
|
||||
{
|
||||
}
|
||||
CTextFormFormat::~CTextFormFormat()
|
||||
{
|
||||
}
|
||||
void CTextFormFormat::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase(oNode, L"w:type", m_oType);
|
||||
@ -138,6 +150,267 @@ namespace ComplexTypes
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, L"w:symbols", m_oSymbols)
|
||||
WritingElement_ReadAttributes_End(oReader)
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CSdtAppearance::CSdtAppearance()
|
||||
{
|
||||
}
|
||||
CSdtAppearance::~CSdtAppearance()
|
||||
{
|
||||
}
|
||||
void CSdtAppearance::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w15:val", m_oVal );
|
||||
}
|
||||
void CSdtAppearance::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CSdtAppearance::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
if(m_oVal.IsInit())
|
||||
{
|
||||
sResult = L"w15:val=\"" + m_oVal->ToString() + L"\"";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CSdtAppearance::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w15:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CSdtText::CSdtText()
|
||||
{
|
||||
}
|
||||
CSdtText::~CSdtText()
|
||||
{
|
||||
}
|
||||
void CSdtText::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:multiLine", m_oMultiLine );
|
||||
}
|
||||
void CSdtText::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CSdtText::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
if(m_oMultiLine.IsInit())
|
||||
{
|
||||
sResult = L"w:multiLine=\"" + m_oMultiLine->ToString() + L"\"";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CSdtText::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:multiLine", m_oMultiLine )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CLock::CLock()
|
||||
{
|
||||
}
|
||||
CLock::~CLock()
|
||||
{
|
||||
}
|
||||
void CLock::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
void CLock::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CLock::ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CLock::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CSdtDateMappingType::CSdtDateMappingType()
|
||||
{
|
||||
}
|
||||
CSdtDateMappingType::~CSdtDateMappingType()
|
||||
{
|
||||
}
|
||||
void CSdtDateMappingType::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
void CSdtDateMappingType::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CSdtDateMappingType::ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
return sResult;
|
||||
}
|
||||
void CSdtDateMappingType::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CCalendarType::CCalendarType()
|
||||
{
|
||||
}
|
||||
CCalendarType::~CCalendarType()
|
||||
{
|
||||
}
|
||||
void CCalendarType::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
void CCalendarType::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CCalendarType::ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
return sResult;
|
||||
}
|
||||
void CCalendarType::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_oVal.SetValue(SimpleTypes::calendartypeGregorian);
|
||||
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CDataBinding::CDataBinding()
|
||||
{
|
||||
}
|
||||
CDataBinding::~CDataBinding()
|
||||
{
|
||||
}
|
||||
void CDataBinding::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:prefixMappings", m_sPrefixMappings );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:storeItemID", m_sStoreItemID );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:xpath", m_sXPath );
|
||||
}
|
||||
void CDataBinding::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CDataBinding::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_sPrefixMappings.IsInit() )
|
||||
{
|
||||
sResult += L"w:prefixMappings=\"";
|
||||
sResult += m_sPrefixMappings.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sXPath.IsInit() )
|
||||
{
|
||||
sResult += L"w:xpath=\"";
|
||||
sResult += m_sXPath.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sStoreItemID.IsInit() )
|
||||
{
|
||||
sResult += L"w:storeItemID=\"";
|
||||
sResult += m_sStoreItemID.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
return sResult;
|
||||
}
|
||||
void CDataBinding::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"w:prefixMappings", m_sPrefixMappings )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:storeItemID", m_sStoreItemID )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:xpath", m_sXPath )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
CSdtListItem::CSdtListItem()
|
||||
{
|
||||
}
|
||||
CSdtListItem::~CSdtListItem()
|
||||
{
|
||||
}
|
||||
void CSdtListItem::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:displayText", m_sDisplayText );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:value", m_sValue );
|
||||
}
|
||||
void CSdtListItem::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CSdtListItem::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_sDisplayText.IsInit() )
|
||||
{
|
||||
sResult += L"w:displayText=\"";
|
||||
sResult += XmlUtils::EncodeXmlString(*m_sDisplayText);
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sValue.IsInit() )
|
||||
{
|
||||
sResult += L"w:value=\"";
|
||||
sResult += XmlUtils::EncodeXmlString(*m_sValue);
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CSdtListItem::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"w:displayText", m_sDisplayText )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:value", m_sValue )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -47,58 +47,17 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CSdtListItem)
|
||||
CSdtListItem()
|
||||
{
|
||||
}
|
||||
virtual ~CSdtListItem()
|
||||
{
|
||||
}
|
||||
CSdtListItem();
|
||||
virtual ~CSdtListItem();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:displayText", m_sDisplayText );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:value", m_sValue );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_sDisplayText.IsInit() )
|
||||
{
|
||||
sResult += L"w:displayText=\"";
|
||||
sResult += XmlUtils::EncodeXmlString(*m_sDisplayText);
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sValue.IsInit() )
|
||||
{
|
||||
sResult += L"w:value=\"";
|
||||
sResult += XmlUtils::EncodeXmlString(*m_sValue);
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"w:displayText", m_sDisplayText )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:value", m_sValue )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
nullable_string m_sDisplayText;
|
||||
nullable_string m_sValue;
|
||||
};
|
||||
@ -110,65 +69,17 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CDataBinding)
|
||||
CDataBinding()
|
||||
{
|
||||
}
|
||||
virtual ~CDataBinding()
|
||||
{
|
||||
}
|
||||
CDataBinding();
|
||||
virtual ~CDataBinding();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:prefixMappings", m_sPrefixMappings );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:storeItemID", m_sStoreItemID );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:xpath", m_sXPath );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_sPrefixMappings.IsInit() )
|
||||
{
|
||||
sResult += L"w:prefixMappings=\"";
|
||||
sResult += m_sPrefixMappings.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sXPath.IsInit() )
|
||||
{
|
||||
sResult += L"w:xpath=\"";
|
||||
sResult += m_sXPath.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
if ( m_sStoreItemID.IsInit() )
|
||||
{
|
||||
sResult += L"w:storeItemID=\"";
|
||||
sResult += m_sStoreItemID.get2();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, L"w:prefixMappings", m_sPrefixMappings )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:storeItemID", m_sStoreItemID )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, L"w:xpath", m_sXPath )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
nullable<std::wstring > m_sPrefixMappings;
|
||||
nullable<std::wstring > m_sStoreItemID;
|
||||
nullable<std::wstring > m_sXPath;
|
||||
@ -181,42 +92,17 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CCalendarType)
|
||||
CCalendarType()
|
||||
{
|
||||
}
|
||||
virtual ~CCalendarType()
|
||||
{
|
||||
}
|
||||
CCalendarType();
|
||||
virtual ~CCalendarType();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
m_oVal.SetValue(SimpleTypes::calendartypeGregorian);
|
||||
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
SimpleTypes::CCalendarType m_oVal;
|
||||
};
|
||||
|
||||
@ -227,40 +113,18 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CSdtDateMappingType)
|
||||
CSdtDateMappingType()
|
||||
{
|
||||
}
|
||||
virtual ~CSdtDateMappingType()
|
||||
{
|
||||
}
|
||||
CSdtDateMappingType();
|
||||
virtual ~CSdtDateMappingType();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
SimpleTypes::CSdtDateMappingType m_oVal;
|
||||
};
|
||||
|
||||
@ -271,41 +135,17 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CLock)
|
||||
CLock()
|
||||
{
|
||||
}
|
||||
virtual ~CLock()
|
||||
{
|
||||
}
|
||||
CLock();
|
||||
virtual ~CLock();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult = L"w:val=\"" + m_oVal.ToString() + L"\"";
|
||||
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
SimpleTypes::CLock m_oVal;
|
||||
};
|
||||
|
||||
@ -316,45 +156,18 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CSdtText)
|
||||
CSdtText()
|
||||
{
|
||||
}
|
||||
virtual ~CSdtText()
|
||||
{
|
||||
}
|
||||
CSdtText();
|
||||
virtual ~CSdtText();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:multiLine", m_oMultiLine );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
if(m_oMultiLine.IsInit())
|
||||
{
|
||||
sResult = L"w:multiLine=\"" + m_oMultiLine->ToString() + L"\"";
|
||||
}
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:multiLine", m_oMultiLine )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
nullable<SimpleTypes::COnOff> m_oMultiLine;
|
||||
};
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -364,42 +177,15 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CSdtAppearance)
|
||||
CSdtAppearance()
|
||||
{
|
||||
}
|
||||
virtual ~CSdtAppearance()
|
||||
{
|
||||
}
|
||||
CSdtAppearance();
|
||||
virtual ~CSdtAppearance();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w15:val", m_oVal );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
if(m_oVal.IsInit())
|
||||
{
|
||||
sResult = L"w15:val=\"" + m_oVal->ToString() + L"\"";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w15:val", m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
@ -411,13 +197,8 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CComb)
|
||||
CComb()
|
||||
{
|
||||
}
|
||||
virtual ~CComb()
|
||||
{
|
||||
}
|
||||
|
||||
CComb();
|
||||
virtual ~CComb();
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
@ -437,13 +218,8 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CTextFormFormat)
|
||||
CTextFormFormat()
|
||||
{
|
||||
}
|
||||
virtual ~CTextFormFormat()
|
||||
{
|
||||
}
|
||||
|
||||
CTextFormFormat();
|
||||
virtual ~CTextFormFormat();
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring ToString() const;
|
||||
@ -456,6 +232,7 @@ namespace ComplexTypes
|
||||
nullable_string m_oVal;
|
||||
nullable_string m_oSymbols;
|
||||
};
|
||||
|
||||
} // Word
|
||||
} // ComplexTypes
|
||||
|
||||
|
||||
@ -34,6 +34,945 @@
|
||||
|
||||
#include "SectionProperty.h"
|
||||
|
||||
namespace ComplexTypes
|
||||
{
|
||||
namespace Word
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
// Column 17.6.3 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CColumn::CColumn()
|
||||
{
|
||||
}
|
||||
CColumn::~CColumn()
|
||||
{
|
||||
}
|
||||
void CColumn::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:space", m_oSpace );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:w", m_oW );
|
||||
}
|
||||
void CColumn::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CColumn::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oW.IsInit() )
|
||||
{
|
||||
sResult += L"w:w=\"" + std::to_wstring(m_oW->ToTwips()) + L"\" ";
|
||||
}
|
||||
|
||||
if ( m_oSpace.IsInit() )
|
||||
{
|
||||
sResult += L"w:space=\"" + std::to_wstring(m_oSpace->ToTwips()) + L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CColumn::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:space"), m_oSpace )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:w"), m_oW )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// DocGrid 17.6.5 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CDocGrid::CDocGrid()
|
||||
{
|
||||
}
|
||||
CDocGrid::~CDocGrid()
|
||||
{
|
||||
}
|
||||
void CDocGrid::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:charSpace"), m_oCharSpace );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:linePitch"), m_oLinePitch );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:type"), m_oType );
|
||||
}
|
||||
void CDocGrid::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CDocGrid::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if (m_oType.IsInit())
|
||||
{
|
||||
sResult += L" w:type=\"" + m_oType->ToString() + L"\"";
|
||||
}
|
||||
if ( m_oLinePitch.IsInit() )
|
||||
{
|
||||
sResult += L" w:linePitch=\"" + m_oLinePitch->ToString() + L"\"";
|
||||
}
|
||||
if (m_oCharSpace.IsInit())
|
||||
{
|
||||
sResult += L" w:charSpace=\"" + m_oCharSpace->ToString() + L"\"";
|
||||
}
|
||||
return sResult;
|
||||
}
|
||||
void CDocGrid::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:charSpace"), m_oCharSpace )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:linePitch"), m_oLinePitch )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:type"), m_oType )
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, (L"w:line-pitch"), m_oLinePitch) //2003 xml
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// HdrFtrRef 17.10.5 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CHdrFtrRef::CHdrFtrRef()
|
||||
{
|
||||
}
|
||||
CHdrFtrRef::~CHdrFtrRef()
|
||||
{
|
||||
}
|
||||
void CHdrFtrRef::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{//todooo переделать на перебор всех и без неймспейсов
|
||||
XmlMacroReadAttributeBase( oNode, L"r:id", m_oId );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:type", m_oType );
|
||||
|
||||
if (false == m_oId.IsInit())
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"relationships:id", m_oId );
|
||||
}
|
||||
}
|
||||
void CHdrFtrRef::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CHdrFtrRef::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oType.IsInit() )
|
||||
{
|
||||
sResult += L" w:type=\"" + m_oType->ToString() + L"\"";
|
||||
}
|
||||
if ( m_oId.IsInit() )
|
||||
{
|
||||
sResult += L" r:id=\"" + m_oId->ToString() + L"\"";
|
||||
}
|
||||
return sResult;
|
||||
}
|
||||
void CHdrFtrRef::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start_No_NS( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"type"), m_oType )
|
||||
WritingElement_ReadAttributes_End_No_NS( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// LineNumber 17.6.8 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CLineNumber::CLineNumber()
|
||||
{
|
||||
}
|
||||
CLineNumber::~CLineNumber()
|
||||
{
|
||||
}
|
||||
void CLineNumber::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:countBy"), m_oCountBy );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:distance"), m_oDistance );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:restart"), m_oRestart );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:start"), m_oStart );
|
||||
}
|
||||
void CLineNumber::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CLineNumber::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oCountBy.IsInit() )
|
||||
{
|
||||
sResult += (L"w:countBy=\"");
|
||||
sResult += m_oCountBy->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oDistance.IsInit() )
|
||||
{
|
||||
sResult += (L"w:distance=\"");
|
||||
sResult += std::to_wstring(m_oDistance->ToTwips());
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oRestart.IsInit() )
|
||||
{
|
||||
sResult += (L"w:restart=\"");
|
||||
sResult += m_oRestart->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oStart.IsInit() )
|
||||
{
|
||||
sResult += (L"w:start=\"");
|
||||
sResult += m_oStart->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CLineNumber::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:countBy"), m_oCountBy )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:distance"), m_oDistance )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:restart"), m_oRestart )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:start"), m_oStart )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// PaperSource 17.6.9 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CPaperSource::CPaperSource()
|
||||
{
|
||||
}
|
||||
CPaperSource::~CPaperSource()
|
||||
{
|
||||
}
|
||||
void CPaperSource::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:first"), m_oFirst );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:other"), m_oOther );
|
||||
}
|
||||
void CPaperSource::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CPaperSource::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oFirst.IsInit() )
|
||||
{
|
||||
sResult += (L"w:first=\"");
|
||||
sResult += m_oFirst->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oOther.IsInit() )
|
||||
{
|
||||
sResult += (L"w:other=\"");
|
||||
sResult += m_oOther->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CPaperSource::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:first"), m_oFirst )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:other"), m_oOther )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// PageBorder 17.6.7 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CPageBorder::CPageBorder()
|
||||
{
|
||||
}
|
||||
CPageBorder::~CPageBorder()
|
||||
{
|
||||
}
|
||||
void CPageBorder::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:color"), m_oColor );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:frame"), m_oFrame );
|
||||
XmlMacroReadAttributeBase( oNode, (L"r:id"), m_oId );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:shadow"), m_oShadow );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:space"), m_oSpace );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:sz"), m_oSz );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeColor"), m_oThemeColor );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeShade"), m_oThemeShade );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeTint"), m_oThemeTint );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:val"), m_oVal );
|
||||
|
||||
if (false == m_oId.IsInit())
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"relationships:id", m_oId );
|
||||
}
|
||||
}
|
||||
void CPageBorder::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CPageBorder::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:color=\"");
|
||||
sResult += m_oColor->ToStringNoAlpha();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oFrame.IsInit() )
|
||||
{
|
||||
sResult += (L"w:frame=\"");
|
||||
sResult += m_oFrame->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oId.IsInit() )
|
||||
{
|
||||
sResult += (L"r:id=\"");
|
||||
sResult += m_oId->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oShadow.IsInit() )
|
||||
{
|
||||
sResult += (L"w:shadow=\"");
|
||||
sResult += m_oShadow->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSpace.IsInit() )
|
||||
{
|
||||
sResult += (L"w:space=\"");
|
||||
sResult += m_oSpace->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSz.IsInit() )
|
||||
{
|
||||
sResult += (L"w:sz=\"");
|
||||
sResult += m_oSz->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oThemeColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeColor=\"");
|
||||
sResult += m_oThemeColor->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeShade.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeShade=\"");
|
||||
sResult += m_oThemeShade->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeTint.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeTint=\"");
|
||||
sResult += m_oThemeTint->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oVal.IsInit() )
|
||||
{
|
||||
sResult += (L"w:val=\"");
|
||||
sResult += m_oVal->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CPageBorder::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:color"), m_oColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:frame"), m_oFrame )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"relationships:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:shadow"), m_oShadow )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:space"), m_oSpace )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:sz"), m_oSz )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeColor"), m_oThemeColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeShade"), m_oThemeShade )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeTint"), m_oThemeTint )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:val"), m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// BottomPageBorder 17.6.2 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CBottomPageBorder::CBottomPageBorder()
|
||||
{
|
||||
}
|
||||
CBottomPageBorder::~CBottomPageBorder()
|
||||
{
|
||||
}
|
||||
void CBottomPageBorder::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"r:bottomLeft", m_oBottomLeft );
|
||||
XmlMacroReadAttributeBase( oNode, L"r:bottomRight", m_oBottomRight );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:color", m_oColor );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:frame", m_oFrame );
|
||||
XmlMacroReadAttributeBase( oNode, L"r:id", m_oId );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:shadow", m_oShadow );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:space", m_oSpace );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:sz", m_oSz );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:themeColor", m_oThemeColor );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:themeShade", m_oThemeShade );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:themeTint", m_oThemeTint );
|
||||
XmlMacroReadAttributeBase( oNode, L"w:val", m_oVal );
|
||||
|
||||
if (false == m_oId.IsInit())
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"relationships:id", m_oId );
|
||||
}
|
||||
}
|
||||
void CBottomPageBorder::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CBottomPageBorder::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oBottomLeft.IsInit() )
|
||||
{
|
||||
sResult += (L"r:bottomLeft=\"");
|
||||
sResult += m_oBottomLeft->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oBottomRight.IsInit() )
|
||||
{
|
||||
sResult += (L"r:bottomRight=\"");
|
||||
sResult += m_oBottomRight->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:color=\"");
|
||||
sResult += m_oColor->ToStringNoAlpha();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oFrame.IsInit() )
|
||||
{
|
||||
sResult += (L"w:frame=\"");
|
||||
sResult += m_oFrame->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oId.IsInit() )
|
||||
{
|
||||
sResult += (L"r:id=\"");
|
||||
sResult += m_oId->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oShadow.IsInit() )
|
||||
{
|
||||
sResult += (L"w:shadow=\"");
|
||||
sResult += m_oShadow->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSpace.IsInit() )
|
||||
{
|
||||
sResult += (L"w:space=\"");
|
||||
sResult += m_oSpace->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSz.IsInit() )
|
||||
{
|
||||
sResult += (L"w:sz=\"");
|
||||
sResult += m_oSz->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oThemeColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeColor=\"");
|
||||
sResult += m_oThemeColor->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeShade.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeShade=\"");
|
||||
sResult += m_oThemeShade->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeTint.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeTint=\"");
|
||||
sResult += m_oThemeTint->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oVal.IsInit() )
|
||||
{
|
||||
sResult += (L"w:val=\"");
|
||||
sResult += m_oVal->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CBottomPageBorder::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"r:bottomLeft"), m_oBottomLeft )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:bottomRight"), m_oBottomRight )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:color"), m_oColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:frame"), m_oFrame )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"relationships:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:shadow"), m_oShadow )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:space"), m_oSpace )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:sz"), m_oSz )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeColor"), m_oThemeColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeShade"), m_oThemeShade )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeTint"), m_oThemeTint )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:val"), m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// TopPageBorder 17.6.7 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CTopPageBorder::CTopPageBorder()
|
||||
{
|
||||
}
|
||||
CTopPageBorder::~CTopPageBorder()
|
||||
{
|
||||
}
|
||||
void CTopPageBorder::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:color"), m_oColor );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:frame"), m_oFrame );
|
||||
XmlMacroReadAttributeBase( oNode, (L"r:id"), m_oId );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:shadow"), m_oShadow );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:space"), m_oSpace );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:sz"), m_oSz );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeColor"), m_oThemeColor );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeShade"), m_oThemeShade );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:themeTint"), m_oThemeTint );
|
||||
XmlMacroReadAttributeBase( oNode, (L"r:topLeft"), m_oTopLeft );
|
||||
XmlMacroReadAttributeBase( oNode, (L"r:topRight"), m_oTopRight );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:val"), m_oVal );
|
||||
|
||||
if (false == m_oId.IsInit())
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"relationships:id", m_oId );
|
||||
}
|
||||
}
|
||||
void CTopPageBorder::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CTopPageBorder::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:color=\"");
|
||||
sResult += m_oColor->ToStringNoAlpha();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oFrame.IsInit() )
|
||||
{
|
||||
sResult += (L"w:frame=\"");
|
||||
sResult += m_oFrame->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oId.IsInit() )
|
||||
{
|
||||
sResult += (L"r:id=\"");
|
||||
sResult += m_oId->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oShadow.IsInit() )
|
||||
{
|
||||
sResult += (L"w:shadow=\"");
|
||||
sResult += m_oShadow->ToString2(SimpleTypes::onofftostring1);
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSpace.IsInit() )
|
||||
{
|
||||
sResult += (L"w:space=\"");
|
||||
sResult += m_oSpace->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oSz.IsInit() )
|
||||
{
|
||||
sResult += (L"w:sz=\"");
|
||||
sResult += m_oSz->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oThemeColor.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeColor=\"");
|
||||
sResult += m_oThemeColor->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeShade.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeShade=\"");
|
||||
sResult += m_oThemeShade->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oThemeTint.IsInit() )
|
||||
{
|
||||
sResult += (L"w:themeTint=\"");
|
||||
sResult += m_oThemeTint->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oTopLeft.IsInit() )
|
||||
{
|
||||
sResult += (L"r:topLeft=\"");
|
||||
sResult += m_oTopLeft->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oTopRight.IsInit() )
|
||||
{
|
||||
sResult += (L"r:topRight=\"");
|
||||
sResult += m_oTopRight->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oVal.IsInit() )
|
||||
{
|
||||
sResult += (L"w:val=\"");
|
||||
sResult += m_oVal->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CTopPageBorder::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:color"), m_oColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:frame"), m_oFrame )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"relationships:id"), m_oId )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:shadow"), m_oShadow )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:space"), m_oSpace )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:sz"), m_oSz )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeColor"), m_oThemeColor )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeShade"), m_oThemeShade )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:themeTint"), m_oThemeTint )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:topLeft"), m_oTopLeft )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"r:topRight"), m_oTopRight )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:val"), m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// PageMar 17.6.11 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CPageMar::CPageMar()
|
||||
{
|
||||
}
|
||||
CPageMar::~CPageMar()
|
||||
{
|
||||
}
|
||||
void CPageMar::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:bottom"), m_oBottom );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:footer"), m_oFooter );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:gutter"), m_oGutter );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:header"), m_oHeader );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:left"), m_oLeft );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:right"), m_oRight );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:top"), m_oTop );
|
||||
}
|
||||
void CPageMar::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CPageMar::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if (m_oTop.IsInit())
|
||||
{
|
||||
sResult += L" w:top=\"" + m_oTop->ToString() + L"\"";
|
||||
}
|
||||
if (m_oRight.IsInit())
|
||||
{
|
||||
sResult += L" w:right=\"" + m_oRight->ToString() + L"\"";
|
||||
}
|
||||
if ( m_oBottom.IsInit() )
|
||||
{
|
||||
sResult += L" w:bottom=\"" + m_oBottom->ToString() + L"\"";
|
||||
}
|
||||
if (m_oLeft.IsInit())
|
||||
{
|
||||
sResult += L" w:left=\"" + m_oLeft->ToString() + L"\"";
|
||||
}
|
||||
if (m_oHeader.IsInit())
|
||||
{
|
||||
sResult += L" w:header=\"" + m_oHeader->ToString() + L"\"";
|
||||
}
|
||||
if ( m_oFooter.IsInit() )
|
||||
{
|
||||
sResult += L" w:footer=\"" + m_oFooter->ToString() + L"\"";
|
||||
}
|
||||
if ( m_oGutter.IsInit() )
|
||||
{
|
||||
sResult += L" w:gutter=\"" + m_oGutter->ToString() + L"\"";
|
||||
}
|
||||
return sResult;
|
||||
}
|
||||
void CPageMar::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:bottom"), m_oBottom )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:footer"), m_oFooter )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:gutter"), m_oGutter )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:header"), m_oHeader )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:left"), m_oLeft )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:right"), m_oRight )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:top"), m_oTop )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// PageNumber 17.6.12 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CPageNumber::CPageNumber()
|
||||
{
|
||||
}
|
||||
CPageNumber::~CPageNumber()
|
||||
{
|
||||
}
|
||||
void CPageNumber::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:chapSep"), m_oChapSep );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:chapStyle"), m_oChapStyle );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:fmt"), m_oFmt );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:start"), m_oStart );
|
||||
}
|
||||
void CPageNumber::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CPageNumber::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oChapSep.IsInit() )
|
||||
{
|
||||
sResult += (L"w:chapSep=\"");
|
||||
sResult += m_oChapSep->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oChapStyle.IsInit() )
|
||||
{
|
||||
sResult += (L"w:chapStyle=\"");
|
||||
sResult += m_oChapStyle->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oFmt.IsInit() )
|
||||
{
|
||||
sResult += (L"w:fmt=\"");
|
||||
sResult += m_oFmt->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oStart.IsInit() )
|
||||
{
|
||||
sResult += (L"w:start=\"");
|
||||
sResult += m_oStart->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CPageNumber::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:chapSep"), m_oChapSep )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:chapStyle"), m_oChapStyle )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:fmt"), m_oFmt )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:start"), m_oStart )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// PageSz 17.6.13 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CPageSz::CPageSz()
|
||||
{
|
||||
}
|
||||
CPageSz::~CPageSz()
|
||||
{
|
||||
}
|
||||
void CPageSz::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:code"), m_oCode );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:h"), m_oH );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:orient"), m_oOrient );
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:w"), m_oW );
|
||||
}
|
||||
void CPageSz::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CPageSz::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oCode.IsInit() )
|
||||
{
|
||||
sResult += (L"w:code=\"");
|
||||
sResult += m_oCode->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
if ( m_oH.IsInit() )
|
||||
{
|
||||
sResult += (L"w:h=\"");
|
||||
sResult += m_oH->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oOrient.IsInit() )
|
||||
{
|
||||
sResult += (L"w:orient=\"");
|
||||
sResult += m_oOrient->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
if ( m_oW.IsInit() )
|
||||
{
|
||||
sResult += (L"w:w=\"");
|
||||
sResult += m_oW->ToString();
|
||||
sResult += (L"\" ");
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CPageSz::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_Read_if ( oReader, (L"w:code"), m_oCode )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:h"), m_oH )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:orient"), m_oOrient )
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, (L"w:w"), m_oW )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// SectType 17.6.22 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CSectType::CSectType()
|
||||
{
|
||||
}
|
||||
CSectType::~CSectType()
|
||||
{
|
||||
}
|
||||
void CSectType::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, (L"w:val"), m_oVal );
|
||||
}
|
||||
void CSectType::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CSectType::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oVal.IsInit() )
|
||||
{
|
||||
sResult += L"w:val=\"";
|
||||
sResult += m_oVal->ToString();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CSectType::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, (L"w:val"), m_oVal )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
} // Word
|
||||
} // ComplexTypes
|
||||
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Logic
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -36,6 +36,55 @@
|
||||
#include "../Math/oMathPara.h"
|
||||
#include "../Math/OMath.h"
|
||||
|
||||
namespace ComplexTypes
|
||||
{
|
||||
namespace Word
|
||||
{
|
||||
//--------------------------------------------------------------------------------
|
||||
// TblGridCol 17.4.16 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
CTblGridCol::CTblGridCol()
|
||||
{
|
||||
}
|
||||
CTblGridCol::~CTblGridCol()
|
||||
{
|
||||
}
|
||||
void CTblGridCol::FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:w", m_oW );
|
||||
}
|
||||
void CTblGridCol::FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
std::wstring CTblGridCol::ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
|
||||
if ( m_oW.IsInit() )
|
||||
{
|
||||
sResult += L"w:w=\"";
|
||||
sResult += m_oW->ToString();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
void CTblGridCol::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:w", m_oW )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
} // Word
|
||||
} // ComplexTypes
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Logic
|
||||
@ -129,13 +178,17 @@ namespace OOX
|
||||
|
||||
return sResult;
|
||||
}
|
||||
|
||||
EElementType CTblGridChange::getType() const
|
||||
{
|
||||
return et_w_tblGridChange;
|
||||
}
|
||||
void CTblGridChange::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, _T("w:id"), m_oId )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTblPrExChange
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -240,7 +293,10 @@ namespace OOX
|
||||
|
||||
return sResult;
|
||||
}
|
||||
|
||||
EElementType CTblPrExChange::getType() const
|
||||
{
|
||||
return et_w_tblPrExChange;
|
||||
}
|
||||
void CTblPrExChange::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
@ -250,6 +306,7 @@ namespace OOX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("oouserid"), m_sUserId )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTbl 17.4.38 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -259,6 +316,46 @@ namespace OOX
|
||||
// <w:moveFrom>
|
||||
// <w:moveTo>
|
||||
|
||||
CTbl::CTbl(OOX::Document *pMain) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
}
|
||||
CTbl::CTbl(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTbl::CTbl(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
fromXML( oReader );
|
||||
}
|
||||
CTbl::~CTbl()
|
||||
{
|
||||
}
|
||||
const CTbl& CTbl::operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CTbl& CTbl::operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
void CTbl::ClearItems()
|
||||
{
|
||||
m_oTblGrid.reset();
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
}
|
||||
void CTbl::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlUtils::CXmlNodes oChilds;
|
||||
@ -343,8 +440,6 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CTbl::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
if ( oReader.IsEmptyNode() )
|
||||
@ -474,6 +569,10 @@ namespace OOX
|
||||
|
||||
return sResult;
|
||||
}
|
||||
EElementType CTbl::getType() const
|
||||
{
|
||||
return et_w_tbl;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTr 17.4.79 (Part 1)
|
||||
@ -484,6 +583,49 @@ namespace OOX
|
||||
// <w:moveFrom>
|
||||
// <w:moveTo>
|
||||
|
||||
CTr::CTr(OOX::Document *pMain) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
}
|
||||
CTr::CTr(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTr::CTr(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
fromXML( oReader );
|
||||
}
|
||||
CTr::~CTr()
|
||||
{
|
||||
}
|
||||
const CTr& CTr::operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CTr& CTr::operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
void CTr::ClearItems()
|
||||
{
|
||||
m_pTableRowProperties = NULL;
|
||||
m_oRsidDel.reset();
|
||||
m_oRsidR.reset();
|
||||
m_oRsidRPr.reset();
|
||||
m_oRsidTr.reset();
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
|
||||
}
|
||||
void CTr::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, _T("w:rsidDel"), m_oRsidDel );
|
||||
@ -591,8 +733,6 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CTr::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
@ -721,8 +861,6 @@ namespace OOX
|
||||
}
|
||||
m_nCountCell = nNumCol;
|
||||
}
|
||||
|
||||
|
||||
std::wstring CTr::toXML() const
|
||||
{
|
||||
std::wstring sResult = _T("<w:tr ");
|
||||
@ -746,6 +884,10 @@ namespace OOX
|
||||
|
||||
return sResult;
|
||||
}
|
||||
EElementType CTr::getType() const
|
||||
{
|
||||
return et_w_tr;
|
||||
}
|
||||
void CTr::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
@ -755,6 +897,7 @@ namespace OOX
|
||||
WritingElement_ReadAttributes_Read_else_if( oReader, _T("w:rsidTr"), m_oRsidTr )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTc 17.4.66 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -764,6 +907,48 @@ namespace OOX
|
||||
// <w:moveFrom>
|
||||
// <w:moveTo>
|
||||
|
||||
CTc::CTc(OOX::Document *pMain) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
}
|
||||
CTc::CTc(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTc::CTc(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
fromXML( oReader );
|
||||
}
|
||||
CTc::~CTc()
|
||||
{
|
||||
}
|
||||
const CTc& CTc::operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CTc& CTc::operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
void CTc::ClearItems()
|
||||
{
|
||||
m_pTableCellProperties = NULL;
|
||||
m_nNumCol = 0;
|
||||
m_sId.reset();
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
}
|
||||
void CTc::fromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, _T("w:id"), m_sId );
|
||||
@ -850,8 +1035,6 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CTc::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
@ -958,7 +1141,6 @@ namespace OOX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::wstring CTc::toXML() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
@ -984,11 +1166,16 @@ namespace OOX
|
||||
|
||||
return sResult;
|
||||
}
|
||||
EElementType CTc::getType() const
|
||||
{
|
||||
return et_w_tc;
|
||||
}
|
||||
void CTc::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, _T("w:id"), m_sId )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
|
||||
} // namespace Logic
|
||||
} // namespace OOX
|
||||
|
||||
@ -48,49 +48,18 @@ namespace ComplexTypes
|
||||
{
|
||||
public:
|
||||
ComplexTypes_AdditionConstructors(CTblGridCol)
|
||||
CTblGridCol()
|
||||
{
|
||||
}
|
||||
virtual ~CTblGridCol()
|
||||
{
|
||||
}
|
||||
CTblGridCol();
|
||||
virtual ~CTblGridCol();
|
||||
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
XmlMacroReadAttributeBase( oNode, L"w:w", m_oW );
|
||||
}
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes(oReader);
|
||||
virtual void FromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void FromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
if ( !oReader.IsEmptyNode() )
|
||||
oReader.ReadTillEnd();
|
||||
}
|
||||
virtual std::wstring ToString() const
|
||||
{
|
||||
std::wstring sResult;
|
||||
virtual std::wstring ToString() const;
|
||||
|
||||
if ( m_oW.IsInit() )
|
||||
{
|
||||
sResult += L"w:w=\"";
|
||||
sResult += m_oW->ToString();
|
||||
sResult += L"\" ";
|
||||
}
|
||||
|
||||
return sResult;
|
||||
}
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
// Читаем атрибуты
|
||||
WritingElement_ReadAttributes_Start( oReader )
|
||||
WritingElement_ReadAttributes_ReadSingle( oReader, L"w:w", m_oW )
|
||||
WritingElement_ReadAttributes_End( oReader )
|
||||
}
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
nullable<SimpleTypes::CTwipsMeasure > m_oW;
|
||||
};
|
||||
|
||||
@ -119,21 +88,17 @@ namespace OOX
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_tblGridChange;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
nullable<SimpleTypes::CDecimalNumber> m_oId;
|
||||
|
||||
CTblGrid *m_pTblGrid;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTblGrid 17.4.49 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -248,6 +213,7 @@ namespace OOX
|
||||
// CTblPrExChange 17.13.5.35 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
class CTblPrEx;
|
||||
|
||||
class CTblPrExChange : public WritingElement
|
||||
{
|
||||
public:
|
||||
@ -261,17 +227,12 @@ namespace OOX
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_tblPrExChange;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
private:
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
public:
|
||||
|
||||
// Attributes
|
||||
nullable<std::wstring > m_sAuthor;
|
||||
nullable<SimpleTypes::CDateTime > m_oDate;
|
||||
@ -281,6 +242,7 @@ namespace OOX
|
||||
// Childs
|
||||
nullable<CTblPrEx > m_pTblPrEx;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTblPrEx 17.4.61 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
@ -398,63 +360,28 @@ namespace OOX
|
||||
nullable<OOX::Logic::CTblPrExChange > m_oTblPrExChange;
|
||||
nullable<ComplexTypes::Word::CTblWidth > m_oTblW;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
// CTbl 17.4.38 (Part 1)
|
||||
//--------------------------------------------------------------------------------
|
||||
class CTbl : public WritingElementWithChilds<>
|
||||
{
|
||||
public:
|
||||
CTbl(OOX::Document *pMain = NULL) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
}
|
||||
CTbl(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTbl(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
fromXML( oReader );
|
||||
}
|
||||
virtual ~CTbl()
|
||||
{
|
||||
}
|
||||
CTbl(OOX::Document *pMain = NULL);
|
||||
CTbl(XmlUtils::CXmlNode &oNode);
|
||||
CTbl(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual ~CTbl();
|
||||
|
||||
const CTbl &operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
|
||||
const CTbl &operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
|
||||
virtual void ClearItems()
|
||||
{
|
||||
m_oTblGrid.reset();
|
||||
m_oTableProperties = NULL;
|
||||
m_nCountRow = 0;
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
}
|
||||
const CTbl &operator =(const XmlUtils::CXmlNode& oNode);
|
||||
const CTbl &operator =(const XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual void ClearItems();
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_tbl;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
void CreateElements(XmlUtils::CXmlLiteReader &oReader, int Depth);
|
||||
|
||||
int m_nCountRow;
|
||||
@ -469,56 +396,20 @@ namespace OOX
|
||||
class CTr : public WritingElementWithChilds<>
|
||||
{
|
||||
public:
|
||||
CTr(OOX::Document *pMain = NULL) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
}
|
||||
CTr(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTr(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nCountCell = 0;
|
||||
m_pTableRowProperties = NULL;
|
||||
fromXML( oReader );
|
||||
}
|
||||
virtual ~CTr()
|
||||
{
|
||||
}
|
||||
const CTr &operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CTr &operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
virtual void ClearItems()
|
||||
{
|
||||
m_pTableRowProperties = NULL;
|
||||
m_oRsidDel.reset();
|
||||
m_oRsidR.reset();
|
||||
m_oRsidRPr.reset();
|
||||
m_oRsidTr.reset();
|
||||
CTr(OOX::Document *pMain = NULL);
|
||||
CTr(XmlUtils::CXmlNode &oNode);
|
||||
CTr(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual ~CTr();
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
const CTr &operator =(const XmlUtils::CXmlNode& oNode);
|
||||
const CTr &operator =(const XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual void ClearItems();
|
||||
|
||||
}
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_tr;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
private:
|
||||
void CreateElements(XmlUtils::CXmlLiteReader &oReader, int Depth);
|
||||
@ -542,56 +433,20 @@ namespace OOX
|
||||
class CTc : public WritingElementWithChilds<>
|
||||
{
|
||||
public:
|
||||
CTc(OOX::Document *pMain = NULL) : WritingElementWithChilds<>(pMain)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
}
|
||||
CTc(XmlUtils::CXmlNode &oNode) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
fromXML( oNode );
|
||||
}
|
||||
CTc(XmlUtils::CXmlLiteReader& oReader) : WritingElementWithChilds<>(NULL)
|
||||
{
|
||||
m_nNumCol = 0;
|
||||
m_pTableCellProperties = NULL;
|
||||
fromXML( oReader );
|
||||
}
|
||||
virtual ~CTc()
|
||||
{
|
||||
}
|
||||
const CTc &operator =(const XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
ClearItems();
|
||||
|
||||
fromXML( (XmlUtils::CXmlNode&)oNode );
|
||||
return *this;
|
||||
}
|
||||
const CTc &operator =(const XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ClearItems();
|
||||
|
||||
fromXML( (XmlUtils::CXmlLiteReader&)oReader );
|
||||
return *this;
|
||||
}
|
||||
virtual void ClearItems()
|
||||
{
|
||||
m_pTableCellProperties = NULL;
|
||||
m_nNumCol = 0;
|
||||
m_sId.reset();
|
||||
CTc(OOX::Document *pMain = NULL);
|
||||
CTc(XmlUtils::CXmlNode &oNode);
|
||||
CTc(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual ~CTc();
|
||||
|
||||
WritingElementWithChilds::ClearItems();
|
||||
}
|
||||
const CTc &operator =(const XmlUtils::CXmlNode& oNode);
|
||||
const CTc &operator =(const XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
virtual void ClearItems();
|
||||
|
||||
virtual void fromXML(XmlUtils::CXmlNode& oNode);
|
||||
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader);
|
||||
virtual std::wstring toXML() const;
|
||||
virtual EElementType getType() const
|
||||
{
|
||||
return et_w_tc;
|
||||
}
|
||||
virtual EElementType getType() const;
|
||||
|
||||
private:
|
||||
void CreateElements(XmlUtils::CXmlLiteReader &oReader, int Depth);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user