summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfvalue.hxx
blob: d42be11e73c3a61d21a78fe2655c95a2e0fd35dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef _RTFVALUE_HXX_
#define _RTFVALUE_HXX_

#include <resourcemodel/WW8ResourceModel.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>

namespace writerfilter {
    namespace rtftok {
        class RTFSprms;
        class RTFShape;
        /// Value of an RTF keyword
        class RTFValue
            : public Value
        {
            public:
                typedef boost::shared_ptr<RTFValue> Pointer_t;
                RTFValue(int nValue, OUString sValue, RTFSprms rAttributes, RTFSprms rSprms, uno::Reference<drawing::XShape> rShape,
                        uno::Reference<io::XInputStream> rStream, uno::Reference<embed::XEmbeddedObject> rObject, bool bForceString,
                        RTFShape aShape);
                RTFValue(int nValue);
                RTFValue(OUString sValue, bool bForce = false);
                RTFValue(RTFSprms rAttributes);
                RTFValue(RTFSprms rAttributes, RTFSprms rSprms);
                RTFValue(uno::Reference<drawing::XShape> rShape);
                RTFValue(uno::Reference<io::XInputStream> rStream);
                RTFValue(uno::Reference<embed::XEmbeddedObject> rObject);
                RTFValue(RTFShape aShape);
                virtual ~RTFValue();
                void setString(OUString sValue);
                virtual int getInt() const;
                virtual OUString getString() const;
                virtual uno::Any getAny() const;
                virtual writerfilter::Reference<Properties>::Pointer_t getProperties();
                virtual writerfilter::Reference<Stream>::Pointer_t getStream();
                virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary();
                virtual std::string toString() const;
                virtual RTFValue* Clone();
                RTFSprms& getAttributes();
                RTFSprms& getSprms();
                RTFShape& getShape() const;
                bool equals(RTFValue& rOther);
            private:
                RTFValue& operator=(RTFValue const& rOther);
                int m_nValue;
                OUString m_sValue;
                boost::shared_ptr<RTFSprms> m_pAttributes;
                boost::shared_ptr<RTFSprms> m_pSprms;
                uno::Reference<drawing::XShape> m_xShape;
                uno::Reference<io::XInputStream> m_xStream;
                uno::Reference<embed::XEmbeddedObject> m_xObject;
                bool m_bForceString;
                boost::shared_ptr<RTFShape> m_pShape;
        };
    } // namespace rtftok
} // namespace writerfilter

#endif // _RTFVALUE_HXX_

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */