1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef _RTFVALUE_HXX_
11 #define _RTFVALUE_HXX_
13 #include <resourcemodel/WW8ResourceModel.hxx>
14 #include <com/sun/star/io/XInputStream.hpp>
15 #include <com/sun/star/embed/XEmbeddedObject.hpp>
17 namespace writerfilter
{
20 /// Value of an RTF keyword
25 typedef boost::shared_ptr
<RTFValue
> Pointer_t
;
26 RTFValue(int nValue
, OUString sValue
, RTFSprms rAttributes
, RTFSprms rSprms
, uno::Reference
<drawing::XShape
> rShape
,
27 uno::Reference
<io::XInputStream
> rStream
, uno::Reference
<embed::XEmbeddedObject
> rObject
, bool bForceString
);
29 RTFValue(OUString sValue
, bool bForce
= false);
30 RTFValue(RTFSprms rAttributes
);
31 RTFValue(RTFSprms rAttributes
, RTFSprms rSprms
);
32 RTFValue(uno::Reference
<drawing::XShape
> rShape
);
33 RTFValue(uno::Reference
<io::XInputStream
> rStream
);
34 RTFValue(uno::Reference
<embed::XEmbeddedObject
> rObject
);
36 void setString(OUString sValue
);
37 virtual int getInt() const;
38 virtual OUString
getString() const;
39 virtual uno::Any
getAny() const;
40 virtual writerfilter::Reference
<Properties
>::Pointer_t
getProperties();
41 virtual writerfilter::Reference
<Stream
>::Pointer_t
getStream();
42 virtual writerfilter::Reference
<BinaryObj
>::Pointer_t
getBinary();
43 virtual std::string
toString() const;
44 virtual RTFValue
* Clone();
45 RTFSprms
& getAttributes();
47 bool equals(RTFValue
& rOther
);
49 RTFValue
& operator=(RTFValue
const& rOther
);
52 boost::shared_ptr
<RTFSprms
> m_pAttributes
;
53 boost::shared_ptr
<RTFSprms
> m_pSprms
;
54 uno::Reference
<drawing::XShape
> m_xShape
;
55 uno::Reference
<io::XInputStream
> m_xStream
;
56 uno::Reference
<embed::XEmbeddedObject
> m_xObject
;
60 } // namespace writerfilter
62 #endif // _RTFVALUE_HXX_
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */