Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _SVDTEXT_HXX
30 : : #define _SVDTEXT_HXX
31 : :
32 : : #include <sal/types.h>
33 : : #include "svx/svxdllapi.h"
34 : : #include <tools/weakbase.hxx>
35 : :
36 : : // --------------------------------------------------------------------
37 : :
38 : : class OutlinerParaObject;
39 : : class SdrOutliner;
40 : : class SdrTextObj;
41 : : class SdrModel;
42 : : class SfxItemSet;
43 : :
44 : : namespace sdr { namespace properties {
45 : : class TextProperties;
46 : : }}
47 : :
48 : : /** This class stores information about one text inside a shape.
49 : : */
50 : :
51 : : class SfxStyleSheet;
52 : : class SVX_DLLPUBLIC SdrText : public tools::WeakBase< SdrText >
53 : : {
54 : : public:
55 : : SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = 0 );
56 : : virtual ~SdrText();
57 : :
58 : : virtual void SetModel(SdrModel* pNewModel);
59 : : virtual void ForceOutlinerParaObject( sal_uInt16 nOutlMode );
60 : :
61 : : virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
62 : : virtual OutlinerParaObject* GetOutlinerParaObject() const;
63 : :
64 : : virtual void CheckPortionInfo( SdrOutliner& rOutliner );
65 : : virtual void ReformatText();
66 : :
67 : : // default uses GetObjectItemSet, but may be overloaded to
68 : : // return a text-specific ItemSet
69 : : virtual const SfxItemSet& GetItemSet() const;
70 : :
71 : 313860 : SdrModel* GetModel() const { return mpModel; }
72 : 154911 : SdrTextObj& GetObject() const { return mrObject; }
73 : :
74 : : /** returns the current OutlinerParaObject and removes it from this instance */
75 : : OutlinerParaObject* RemoveOutlinerParaObject();
76 : :
77 : : protected:
78 : : virtual const SfxItemSet& GetObjectItemSet();
79 : : virtual void SetObjectItem(const SfxPoolItem& rItem);
80 : : virtual SfxStyleSheet* GetStyleSheet() const;
81 : :
82 : : private:
83 : : OutlinerParaObject* mpOutlinerParaObject;
84 : : SdrTextObj& mrObject;
85 : : SdrModel* mpModel;
86 : : bool mbPortionInfoChecked;
87 : : };
88 : :
89 : : #endif //_SVDTEXT_HXX
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|