LibreOffice Module writerfilter (master) 1
rtfvalue.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
10#pragma once
11
13
14namespace com::sun::star
15{
16namespace embed
17{
18class XEmbeddedObject;
19}
20namespace io
21{
22class XInputStream;
23}
24}
25
27{
28class RTFSprms;
29class RTFShape;
30class RTFPicture;
32class RTFValue : public Value
33{
34 RTFValue(int nValue, OUString sValue, const RTFSprms* pAttributes, const RTFSprms* pSprms,
35 css::uno::Reference<css::drawing::XShape> xShape,
36 css::uno::Reference<css::io::XInputStream> xStream,
37 css::uno::Reference<css::embed::XEmbeddedObject> xObject, bool bForceString,
38 const RTFShape* pShape, const RTFPicture* pPicture);
39
40public:
42 RTFValue();
43 explicit RTFValue(int nValue);
44 RTFValue(OUString sValue, bool bForce = false);
45 explicit RTFValue(const RTFSprms& rAttributes);
46 RTFValue(const RTFSprms& rAttributes, const RTFSprms& rSprms);
47 explicit RTFValue(css::uno::Reference<css::drawing::XShape> xShape);
48 explicit RTFValue(css::uno::Reference<css::io::XInputStream> xStream);
49 explicit RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> xObject);
50 explicit RTFValue(const RTFShape& aShape);
51 explicit RTFValue(const RTFPicture& rPicture);
52 ~RTFValue() override;
53 void setString(const OUString& sValue);
54 int getInt() const override;
55 OUString getString() const override;
56 css::uno::Any getAny() const override;
59#ifdef DBG_UTIL
60 std::string toString() const override;
61#endif
62 RTFValue* Clone() const;
63 RTFValue* CloneWithSprms(RTFSprms const& rAttributes, RTFSprms const& rSprms) const;
64 RTFSprms& getAttributes() const;
65 RTFSprms& getSprms() const;
66 RTFShape& getShape() const;
67 RTFPicture& getPicture() const;
68 bool equals(const RTFValue& rOther) const;
69 RTFValue& operator=(RTFValue const& rOther) = delete;
70
71private:
72 int m_nValue = 0;
73 OUString m_sValue;
76 css::uno::Reference<css::drawing::XShape> m_xShape;
77 css::uno::Reference<css::io::XInputStream> m_xStream;
78 css::uno::Reference<css::embed::XEmbeddedObject> m_xObject;
79 bool m_bForceString = false;
82};
83} // namespace writerfilter::rtftok
84
85/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Stores the properties of a picture.
Stores the properties of a shape.
A list of RTFSprm with a copy constructor that performs a deep copy.
Definition: rtfsprm.hxx:39
Value of an RTF keyword.
Definition: rtfvalue.hxx:33
writerfilter::Reference< BinaryObj >::Pointer_t getBinary() override
Returns binary object of this value.
Definition: rtfvalue.cxx:137
RTFValue & operator=(RTFValue const &rOther)=delete
RTFValue * CloneWithSprms(RTFSprms const &rAttributes, RTFSprms const &rSprms) const
Definition: rtfvalue.cxx:158
css::uno::Reference< css::drawing::XShape > m_xShape
Definition: rtfvalue.hxx:76
RTFValue(int nValue, OUString sValue, const RTFSprms *pAttributes, const RTFSprms *pSprms, css::uno::Reference< css::drawing::XShape > xShape, css::uno::Reference< css::io::XInputStream > xStream, css::uno::Reference< css::embed::XEmbeddedObject > xObject, bool bForceString, const RTFShape *pShape, const RTFPicture *pPicture)
tools::SvRef< RTFShape > m_pShape
Definition: rtfvalue.hxx:80
tools::SvRef< RTFSprms > m_pAttributes
Definition: rtfvalue.hxx:74
tools::SvRef< RTFPicture > m_pPicture
Definition: rtfvalue.hxx:81
RTFValue(css::uno::Reference< css::embed::XEmbeddedObject > xObject)
RTFSprms & getAttributes() const
Definition: rtfvalue.cxx:206
css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
Definition: rtfvalue.cxx:102
RTFShape & getShape() const
Definition: rtfvalue.cxx:118
RTFValue(css::uno::Reference< css::drawing::XShape > xShape)
void setString(const OUString &sValue)
Definition: rtfvalue.cxx:100
std::string toString() const override
Returns string representation of this value.
Definition: rtfvalue.cxx:143
css::uno::Reference< css::embed::XEmbeddedObject > m_xObject
Definition: rtfvalue.hxx:78
RTFValue(css::uno::Reference< css::io::XInputStream > xStream)
RTFSprms & getSprms() const
Definition: rtfvalue.cxx:213
RTFValue * Clone() const
Definition: rtfvalue.cxx:152
tools::SvRef< RTFSprms > m_pSprms
Definition: rtfvalue.hxx:75
RTFPicture & getPicture() const
Definition: rtfvalue.cxx:125
int getInt() const override
Returns integer representation of the value.
Definition: rtfvalue.cxx:90
css::uno::Reference< css::io::XInputStream > m_xStream
Definition: rtfvalue.hxx:77
OUString getString() const override
Returns string representation of the value.
Definition: rtfvalue.cxx:92
bool equals(const RTFValue &rOther) const
Definition: rtfvalue.cxx:164
writerfilter::Reference< Properties >::Pointer_t getProperties() override
Returns properties of this value.
Definition: rtfvalue.cxx:132
The classes in this file define the interfaces for the resource model of the DocTokenizer: