summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx20
-rw-r--r--writerfilter/source/rtftok/rtfvalue.hxx3
2 files changed, 20 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 0716458804d7..4ac4ace9caf0 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -1,4 +1,5 @@
#include <rtfvalue.hxx>
+#include <rtfreferenceproperties.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -10,13 +11,22 @@ using rtl::OUString;
RTFValue::RTFValue(int nValue)
: m_nValue(nValue),
- m_sValue()
+ m_sValue(),
+ m_rAttributes()
{
}
RTFValue::RTFValue(OUString sValue)
: m_nValue(),
- m_sValue(sValue)
+ m_sValue(sValue),
+ m_rAttributes()
+{
+}
+
+RTFValue::RTFValue(std::map<Id, RTFValue::Pointer_t> rAttributes)
+ : m_nValue(),
+ m_sValue(),
+ m_rAttributes(rAttributes)
{
}
@@ -42,7 +52,11 @@ uno::Any RTFValue::getAny() const
writerfilter::Reference<Properties>::Pointer_t RTFValue::getProperties()
{
- return writerfilter::Reference<Properties>::Pointer_t();
+ std::map<Id, RTFValue::Pointer_t> aSprms;
+ writerfilter::Reference<Properties>::Pointer_t const pProperties(
+ new RTFReferenceProperties(m_rAttributes, aSprms)
+ );
+ return pProperties;
}
writerfilter::Reference<Stream>::Pointer_t RTFValue::getStream()
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index cae47b237864..9016e0014ae9 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -2,6 +2,7 @@
#define _RTFVALUE_HXX_
#include <string>
+#include <map>
#include <rtl/ustrbuf.hxx>
#include <resourcemodel/WW8ResourceModel.hxx>
@@ -15,6 +16,7 @@ namespace writerfilter {
typedef ::boost::shared_ptr<RTFValue> Pointer_t;
RTFValue(int nValue);
RTFValue(rtl::OUString sValue);
+ RTFValue(std::map<Id, RTFValue::Pointer_t> rAttributes);
virtual int getInt() const;
virtual rtl::OUString getString() const;
virtual uno::Any getAny() const;
@@ -26,6 +28,7 @@ namespace writerfilter {
private:
int m_nValue;
rtl::OUString m_sValue;
+ std::map<Id, RTFValue::Pointer_t> m_rAttributes;
};
} // namespace rtftok
} // namespace writerfilter