don't overload operator-> and just forward specific methods
Change-Id: I22f5f4a17f2eef0d04756ff4c8e614da073248ca
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -48,9 +48,9 @@ RTFReferenceProperties::~RTFReferenceProperties()
|
|||||||
|
|
||||||
void RTFReferenceProperties::resolve(Properties& rHandler)
|
void RTFReferenceProperties::resolve(Properties& rHandler)
|
||||||
{
|
{
|
||||||
for (RTFSprms::Iterator_t i = m_aAttributes->begin(); i != m_aAttributes->end(); ++i)
|
for (RTFSprms::Iterator_t i = m_aAttributes.begin(); i != m_aAttributes.end(); ++i)
|
||||||
rHandler.attribute(i->first, *i->second.get());
|
rHandler.attribute(i->first, *i->second.get());
|
||||||
for (RTFSprms::Iterator_t i = m_aSprms->begin(); i != m_aSprms->end(); ++i)
|
for (RTFSprms::Iterator_t i = m_aSprms.begin(); i != m_aSprms.end(); ++i)
|
||||||
{
|
{
|
||||||
RTFSprm aSprm(i->first, i->second);
|
RTFSprm aSprm(i->first, i->second);
|
||||||
rHandler.sprm(aSprm);
|
rHandler.sprm(aSprm);
|
||||||
|
@@ -107,12 +107,12 @@ void RTFSdrImport::resolve(RTFShape& rShape)
|
|||||||
else if ( i->first == "wzName" )
|
else if ( i->first == "wzName" )
|
||||||
{
|
{
|
||||||
RTFValue::Pointer_t pValue(new RTFValue(i->second));
|
RTFValue::Pointer_t pValue(new RTFValue(i->second));
|
||||||
m_rImport.getState().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_name, pValue));
|
m_rImport.getState().aCharacterAttributes.push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_name, pValue));
|
||||||
}
|
}
|
||||||
else if ( i->first == "wzDescription" )
|
else if ( i->first == "wzDescription" )
|
||||||
{
|
{
|
||||||
RTFValue::Pointer_t pValue(new RTFValue(i->second));
|
RTFValue::Pointer_t pValue(new RTFValue(i->second));
|
||||||
m_rImport.getState().aCharacterAttributes->push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_descr, pValue));
|
m_rImport.getState().aCharacterAttributes.push_back(make_pair(NS_ooxml::LN_CT_NonVisualDrawingProps_descr, pValue));
|
||||||
}
|
}
|
||||||
else if ( i->first == "pib" )
|
else if ( i->first == "pib" )
|
||||||
{
|
{
|
||||||
|
@@ -134,11 +134,6 @@ RTFSprms& RTFSprms::operator=(const RTFSprms& rOther)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector< std::pair<Id, RTFValue::Pointer_t> >* RTFSprms::operator->()
|
|
||||||
{
|
|
||||||
return &m_aSprms;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RTFSprms::swap(RTFSprms& rOther)
|
void RTFSprms::swap(RTFSprms& rOther)
|
||||||
{
|
{
|
||||||
m_aSprms.swap(rOther.m_aSprms);
|
m_aSprms.swap(rOther.m_aSprms);
|
||||||
|
@@ -38,14 +38,21 @@ namespace writerfilter {
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ::boost::shared_ptr<RTFSprms> Pointer_t;
|
typedef ::boost::shared_ptr<RTFSprms> Pointer_t;
|
||||||
typedef std::vector< std::pair<Id, RTFValue::Pointer_t> >::iterator Iterator_t;
|
typedef std::pair<Id, RTFValue::Pointer_t> id_val;
|
||||||
|
typedef std::vector< id_val >::iterator Iterator_t;
|
||||||
RTFSprms();
|
RTFSprms();
|
||||||
RTFSprms(const RTFSprms& rSprms);
|
RTFSprms(const RTFSprms& rSprms);
|
||||||
RTFSprms& operator=(const RTFSprms& rOther);
|
RTFSprms& operator=(const RTFSprms& rOther);
|
||||||
std::vector< std::pair<Id, RTFValue::Pointer_t> >* operator->();
|
|
||||||
RTFValue::Pointer_t find(Id nKeyword);
|
RTFValue::Pointer_t find(Id nKeyword);
|
||||||
bool erase(Id nKeyword);
|
bool erase(Id nKeyword);
|
||||||
void swap(RTFSprms& rOther);
|
void swap(RTFSprms& rOther);
|
||||||
|
size_t size() const { return m_aSprms.size(); }
|
||||||
|
bool empty() const { return m_aSprms.empty(); }
|
||||||
|
id_val& back() { return m_aSprms.back(); }
|
||||||
|
Iterator_t begin() { return m_aSprms.begin(); }
|
||||||
|
Iterator_t end() { return m_aSprms.end(); }
|
||||||
|
void push_back(id_val aVal) { m_aSprms.push_back(aVal); }
|
||||||
|
void clear() { return m_aSprms.clear(); }
|
||||||
private:
|
private:
|
||||||
std::vector< std::pair<Id, RTFValue::Pointer_t> > m_aSprms;
|
std::vector< std::pair<Id, RTFValue::Pointer_t> > m_aSprms;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user