summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfreferenceproperties.cxx
blob: 7d10af862259428dc3001c65a9f58b9450fae77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <rtfreferenceproperties.hxx>
#include <rtfsprm.hxx>

namespace writerfilter {
namespace rtftok {

RTFReferenceProperties::RTFReferenceProperties(std::vector<std::pair<Id, RTFValue::Pointer_t>> rAttributes,
        std::vector<std::pair<Id, RTFValue::Pointer_t>> rSprms)
    : m_rAttributes(rAttributes),
    m_rSprms(rSprms)
{
}

RTFReferenceProperties::~RTFReferenceProperties()
{
}

void RTFReferenceProperties::resolve(Properties& rHandler)
{
    for (std::vector<std::pair<Id, RTFValue::Pointer_t>>::iterator i = m_rAttributes.begin(); i != m_rAttributes.end(); ++i)
        rHandler.attribute(i->first, *i->second.get());
    for (std::vector<std::pair<Id, RTFValue::Pointer_t>>::iterator i = m_rSprms.begin(); i != m_rSprms.end(); ++i)
    {
        RTFSprm aSprm(i->first, i->second);
        rHandler.sprm(aSprm);
    }
}

std::string RTFReferenceProperties::getType() const
{
    return "RTFReferenceProperties";
}

} // namespace rtftok
} // namespace writerfilter

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */