xref: /AOO41X/main/svx/inc/svx/sdr/properties/emptyproperties.hxx (revision 3334a7e6acdae9820fa1a6f556bb10129a8de6b2)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SDR_PROPERTIES_EMPTYPROPERTIES_HXX
25 #define _SDR_PROPERTIES_EMPTYPROPERTIES_HXX
26 
27 #include <svx/sdr/properties/properties.hxx>
28 #include "svx/svxdllapi.h"
29 
30 //////////////////////////////////////////////////////////////////////////////
31 
32 namespace sdr
33 {
34     namespace properties
35     {
36         class SVX_DLLPUBLIC EmptyProperties : public BaseProperties
37         {
38         protected:
39             // the to be used ItemSet
40             SfxItemSet*                                     mpEmptyItemSet;
41 
42             // create a new itemset
43             virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool);
44 
45             // test changeability for a single item
46             virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const;
47 
48             // Do the ItemChange, may do special handling
49             virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0);
50 
51             // Called after ItemChange() is done for all items.
52             virtual void PostItemChange(const sal_uInt16 nWhich);
53 
54             // react on ItemSet changes
55             virtual void ItemSetChanged(const SfxItemSet& rSet);
56 
57         public:
58             // basic constructor
59             EmptyProperties(SdrObject& rObj);
60 
61             // constructor for copying, but using new object
62             EmptyProperties(const EmptyProperties& rProps, SdrObject& rObj);
63 
64             // destructor
65             virtual ~EmptyProperties();
66 
67             // Clone() operator, normally just calls the local copy constructor
68             virtual BaseProperties& Clone(SdrObject& rObj) const;
69 
70             // get itemset
71             virtual const SfxItemSet& GetObjectItemSet() const;
72 
73             // set single item
74             virtual void SetObjectItem(const SfxPoolItem& rItem);
75 
76             // set single item direct, do not do any notifies or things like that
77             virtual void SetObjectItemDirect(const SfxPoolItem& rItem);
78 
79             // clear single item
80             virtual void ClearObjectItem(const sal_uInt16 nWhich = 0);
81 
82             // clear single item direct, do not do any notifies or things like that.
83             // Also supports complete deleteion of items when default parameter 0 is used.
84             virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0);
85 
86             // set complete item set
87             virtual void SetObjectItemSet(const SfxItemSet& rSet);
88 
89             // set a new StyleSheet and broadcast
90             virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
91 
92             // get the installed StyleSheet
93             virtual SfxStyleSheet* GetStyleSheet() const;
94         };
95     } // end of namespace properties
96 } // end of namespace sdr
97 
98 #endif //_SDR_PROPERTIES_EMPTYPROPERTIES_HXX
99 
100 // eof
101