summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-07-13 18:27:55 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2011-07-29 17:32:39 +0200
commit1383d8b9ded45c43aa66a60a4b08d0d31570203d (patch)
tree5ea2ff7fe2cd3281331c7cc4ed4dc884462f97d6 /writerfilter/source
parente14a04bdb4502ea85b76f13e2b6413bd0a46cd46 (diff)
teach RTFValue to deal with io::XInputStream
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx24
-rw-r--r--writerfilter/source/rtftok/rtfvalue.hxx6
2 files changed, 27 insertions, 3 deletions
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 54fbd6cbe..530512561 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -37,12 +37,14 @@ using rtl::OString;
using rtl::OUString;
RTFValue::RTFValue(int nValue, rtl::OUString sValue, RTFSprms_t rAttributes,
- RTFSprms_t rSprms, uno::Reference<drawing::XShape> rShape)
+ RTFSprms_t rSprms, uno::Reference<drawing::XShape> rShape,
+ uno::Reference<io::XInputStream> rStream)
: m_nValue(nValue),
m_sValue(sValue),
m_rAttributes(rAttributes),
m_rSprms(rSprms),
m_rShape(rShape),
+ m_rStream(rStream),
m_bForceString(false)
{
}
@@ -53,6 +55,7 @@ RTFValue::RTFValue(int nValue)
m_rAttributes(),
m_rSprms(),
m_rShape(),
+ m_rStream(),
m_bForceString(false)
{
}
@@ -63,6 +66,7 @@ RTFValue::RTFValue(OUString sValue, bool bForce)
m_rAttributes(),
m_rSprms(),
m_rShape(),
+ m_rStream(),
m_bForceString(bForce)
{
}
@@ -73,6 +77,7 @@ RTFValue::RTFValue(RTFSprms_t rAttributes)
m_rAttributes(rAttributes),
m_rSprms(),
m_rShape(),
+ m_rStream(),
m_bForceString(false)
{
}
@@ -83,6 +88,7 @@ RTFValue::RTFValue(RTFSprms_t rAttributes, RTFSprms_t rSprms)
m_rAttributes(rAttributes),
m_rSprms(rSprms),
m_rShape(),
+ m_rStream(),
m_bForceString(false)
{
}
@@ -93,6 +99,18 @@ RTFValue::RTFValue(uno::Reference<drawing::XShape> rShape)
m_rAttributes(),
m_rSprms(),
m_rShape(rShape),
+ m_rStream(),
+ m_bForceString(false)
+{
+}
+
+RTFValue::RTFValue(uno::Reference<io::XInputStream> rStream)
+ : m_nValue(),
+ m_sValue(),
+ m_rAttributes(),
+ m_rSprms(),
+ m_rShape(),
+ m_rStream(rStream),
m_bForceString(false)
{
}
@@ -122,6 +140,8 @@ uno::Any RTFValue::getAny() const
ret <<= m_sValue;
else if (m_rShape.is())
ret <<= m_rShape;
+ else if (m_rStream.is())
+ ret <<= m_rStream;
else
ret <<= static_cast<sal_Int32>(m_nValue);
return ret;
@@ -155,7 +175,7 @@ std::string RTFValue::toString() const
RTFValue* RTFValue::Clone()
{
- return new RTFValue(m_nValue, m_sValue, m_rAttributes, m_rSprms, m_rShape);
+ return new RTFValue(m_nValue, m_sValue, m_rAttributes, m_rSprms, m_rShape, m_rStream);
}
RTFSprms_t& RTFValue::getAttributes()
diff --git a/writerfilter/source/rtftok/rtfvalue.hxx b/writerfilter/source/rtftok/rtfvalue.hxx
index e03971936..21947e040 100644
--- a/writerfilter/source/rtftok/rtfvalue.hxx
+++ b/writerfilter/source/rtftok/rtfvalue.hxx
@@ -32,6 +32,7 @@
#include <map>
#include <rtl/ustrbuf.hxx>
#include <resourcemodel/WW8ResourceModel.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
namespace writerfilter {
namespace rtftok {
@@ -42,13 +43,15 @@ namespace writerfilter {
public:
typedef ::boost::shared_ptr<RTFValue> Pointer_t;
RTFValue(int nValue, rtl::OUString sValue, std::vector< std::pair<Id, RTFValue::Pointer_t> > rAttributes,
- std::vector< std::pair<Id, RTFValue::Pointer_t> > rSprms, uno::Reference<drawing::XShape> rShape);
+ std::vector< std::pair<Id, RTFValue::Pointer_t> > rSprms, uno::Reference<drawing::XShape> rShape,
+ uno::Reference<io::XInputStream> rStream);
RTFValue(int nValue);
RTFValue(rtl::OUString sValue, bool bForce = false);
RTFValue(std::vector< std::pair<Id, RTFValue::Pointer_t> > rAttributes);
RTFValue(std::vector< std::pair<Id, RTFValue::Pointer_t> > rAttributes,
std::vector< std::pair<Id, RTFValue::Pointer_t> > rSprms);
RTFValue(uno::Reference<drawing::XShape> rShape);
+ RTFValue(uno::Reference<io::XInputStream> rStream);
void setString(rtl::OUString sValue);
virtual int getInt() const;
virtual rtl::OUString getString() const;
@@ -66,6 +69,7 @@ namespace writerfilter {
std::vector< std::pair<Id, RTFValue::Pointer_t> > m_rAttributes;
std::vector< std::pair<Id, RTFValue::Pointer_t> > m_rSprms;
uno::Reference<drawing::XShape> m_rShape;
+ uno::Reference<io::XInputStream> m_rStream;
bool m_bForceString;
};
} // namespace rtftok