Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / writerfilter / source / rtftok / rtfvalue.hxx
blob8fbd49bd0a8eaf14f19521cfe43e694acd70ee6e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFVALUE_HXX
11 #define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFVALUE_HXX
13 #include <dmapper/resourcemodel.hxx>
15 namespace com
17 namespace sun
19 namespace star
21 namespace embed
23 class XEmbeddedObject;
25 namespace io
27 class XInputStream;
33 namespace writerfilter
35 namespace rtftok
37 class RTFSprms;
38 class RTFShape;
39 class RTFPicture;
40 /// Value of an RTF keyword
41 class RTFValue : public Value
43 public:
44 using Pointer_t = tools::SvRef<RTFValue>;
45 RTFValue(int nValue, OUString sValue, const RTFSprms& rAttributes, const RTFSprms& rSprms,
46 css::uno::Reference<css::drawing::XShape> xShape,
47 css::uno::Reference<css::io::XInputStream> xStream,
48 css::uno::Reference<css::embed::XEmbeddedObject> xObject, bool bForceString,
49 const RTFShape& aShape, const RTFPicture& rPicture);
50 RTFValue();
51 explicit RTFValue(int nValue);
52 RTFValue(OUString sValue, bool bForce = false);
53 explicit RTFValue(const RTFSprms& rAttributes);
54 RTFValue(const RTFSprms& rAttributes, const RTFSprms& rSprms);
55 explicit RTFValue(css::uno::Reference<css::drawing::XShape> xShape);
56 explicit RTFValue(css::uno::Reference<css::io::XInputStream> xStream);
57 explicit RTFValue(css::uno::Reference<css::embed::XEmbeddedObject> xObject);
58 explicit RTFValue(const RTFShape& aShape);
59 explicit RTFValue(const RTFPicture& rPicture);
60 ~RTFValue() override;
61 void setString(const OUString& sValue);
62 int getInt() const override;
63 OUString getString() const override;
64 css::uno::Any getAny() const override;
65 writerfilter::Reference<Properties>::Pointer_t getProperties() override;
66 writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
67 #ifdef DBG_UTIL
68 std::string toString() const override;
69 #endif
70 RTFValue* Clone();
71 RTFValue* CloneWithSprms(RTFSprms const& rAttributes, RTFSprms const& rSprms);
72 RTFSprms& getAttributes();
73 RTFSprms& getSprms();
74 RTFShape& getShape() const;
75 RTFPicture& getPicture() const;
76 bool equals(const RTFValue& rOther) const;
77 RTFValue& operator=(RTFValue const& rOther) = delete;
79 private:
80 int const m_nValue = 0;
81 OUString m_sValue;
82 tools::SvRef<RTFSprms> m_pAttributes;
83 tools::SvRef<RTFSprms> m_pSprms;
84 css::uno::Reference<css::drawing::XShape> m_xShape;
85 css::uno::Reference<css::io::XInputStream> m_xStream;
86 css::uno::Reference<css::embed::XEmbeddedObject> m_xObject;
87 bool const m_bForceString = false;
88 tools::SvRef<RTFShape> m_pShape;
89 tools::SvRef<RTFPicture> m_pPicture;
91 } // namespace rtftok
92 } // namespace writerfilter
94 #endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFVALUE_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */