summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfvalue.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/rtftok/rtfvalue.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfvalue.cxx52
1 files changed, 39 insertions, 13 deletions
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 9a2f79d4e2be..330640fc31ba 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -24,7 +24,8 @@ RTFValue::RTFValue(int nValue, OUString sValue,
uno::Reference<io::XInputStream> xStream,
uno::Reference<embed::XEmbeddedObject> xObject,
bool bForceString,
- const RTFShape& aShape)
+ const RTFShape& aShape,
+ const RTFPicture& rPicture)
: m_nValue(nValue),
m_sValue(std::move(sValue)),
m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
@@ -33,7 +34,8 @@ RTFValue::RTFValue(int nValue, OUString sValue,
m_xStream(std::move(xStream)),
m_xObject(std::move(xObject)),
m_bForceString(bForceString),
- m_pShape(std::make_shared<RTFShape>(aShape))
+ m_pShape(std::make_shared<RTFShape>(aShape)),
+ m_pPicture(std::make_shared<RTFPicture>(rPicture))
{
}
@@ -42,7 +44,8 @@ RTFValue::RTFValue()
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -50,7 +53,8 @@ RTFValue::RTFValue(int nValue)
: m_nValue(nValue),
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
- m_bForceString(false)
+ m_bForceString(false),
+ m_pPicture(std::make_shared<RTFPicture>())
{
m_pShape.reset(new RTFShape());
}
@@ -61,7 +65,8 @@ RTFValue::RTFValue(OUString sValue, bool bForce)
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
m_bForceString(bForce),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -70,7 +75,8 @@ RTFValue::RTFValue(RTFSprms rAttributes)
m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
m_pSprms(std::make_shared<RTFSprms>()),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -79,7 +85,8 @@ RTFValue::RTFValue(RTFSprms rAttributes, RTFSprms rSprms)
m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
m_pSprms(std::make_shared<RTFSprms>(rSprms)),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -89,7 +96,8 @@ RTFValue::RTFValue(uno::Reference<drawing::XShape> xShape)
m_pSprms(std::make_shared<RTFSprms>()),
m_xShape(std::move(xShape)),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -99,7 +107,8 @@ RTFValue::RTFValue(uno::Reference<io::XInputStream> xStream)
m_pSprms(std::make_shared<RTFSprms>()),
m_xStream(std::move(xStream)),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -109,7 +118,8 @@ RTFValue::RTFValue(uno::Reference<embed::XEmbeddedObject> xObject)
m_pSprms(std::make_shared<RTFSprms>()),
m_xObject(std::move(xObject)),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>())
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>())
{
}
@@ -118,7 +128,18 @@ RTFValue::RTFValue(const RTFShape& aShape)
m_pAttributes(std::make_shared<RTFSprms>()),
m_pSprms(std::make_shared<RTFSprms>()),
m_bForceString(false),
- m_pShape(std::make_shared<RTFShape>(aShape))
+ m_pShape(std::make_shared<RTFShape>(aShape)),
+ m_pPicture(std::make_shared<RTFPicture>())
+{
+}
+
+RTFValue::RTFValue(const RTFPicture& rPicture)
+ : m_nValue(),
+ m_pAttributes(std::make_shared<RTFSprms>()),
+ m_pSprms(std::make_shared<RTFSprms>()),
+ m_bForceString(false),
+ m_pShape(std::make_shared<RTFShape>()),
+ m_pPicture(std::make_shared<RTFPicture>(rPicture))
{
}
@@ -163,6 +184,11 @@ RTFShape& RTFValue::getShape() const
return *m_pShape;
}
+RTFPicture& RTFValue::getPicture() const
+{
+ return *m_pPicture;
+}
+
writerfilter::Reference<Properties>::Pointer_t RTFValue::getProperties()
{
return std::make_shared<RTFReferenceProperties>(*m_pAttributes, *m_pSprms);
@@ -185,12 +211,12 @@ std::string RTFValue::toString() const
RTFValue* RTFValue::Clone()
{
- return new RTFValue(m_nValue, m_sValue, *m_pAttributes, *m_pSprms, m_xShape, m_xStream, m_xObject, m_bForceString, *m_pShape);
+ return new RTFValue(m_nValue, m_sValue, *m_pAttributes, *m_pSprms, m_xShape, m_xStream, m_xObject, m_bForceString, *m_pShape, *m_pPicture);
}
RTFValue* RTFValue::CloneWithSprms(RTFSprms const& rAttributes, RTFSprms const& rSprms)
{
- return new RTFValue(m_nValue, m_sValue, rAttributes, rSprms, m_xShape, m_xStream, m_xObject, m_bForceString, *m_pShape);
+ return new RTFValue(m_nValue, m_sValue, rAttributes, rSprms, m_xShape, m_xStream, m_xObject, m_bForceString, *m_pShape, *m_pPicture);
}
bool RTFValue::equals(RTFValue& rOther)