bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / sdr / properties / groupproperties.hxx
blob3de8abf71ea286fd76e263333a9fd4361d5d68b4
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SDR_PROPERTIES_GROUPPROPERTIES_HXX
21 #define _SDR_PROPERTIES_GROUPPROPERTIES_HXX
23 #include <svx/sdr/properties/defaultproperties.hxx>
25 /////////////////////////////////////////////////////////////////////////////
27 namespace sdr
29 namespace properties
31 class GroupProperties : public DefaultProperties
33 protected:
34 // create a new itemset
35 virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool);
37 // test changeability for a single item
38 virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const;
40 // Do the ItemChange, may do special handling
41 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0);
43 // Called after ItemChange() is done for all items.
44 virtual void PostItemChange(const sal_uInt16 nWhich);
46 // react on ItemSet changes
47 virtual void ItemSetChanged(const SfxItemSet& rSet);
49 public:
50 // basic constructor
51 explicit GroupProperties(SdrObject& rObj);
53 // copy constructor
54 GroupProperties(const GroupProperties& rProps, SdrObject& rObj);
56 // destructor
57 virtual ~GroupProperties();
59 // Clone() operator, normally just calls the local copy constructor
60 virtual BaseProperties& Clone(SdrObject& rObj) const;
62 // get itemset
63 virtual const SfxItemSet& GetObjectItemSet() const;
65 // get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may
66 // be overloaded e.g for group objects to return a merged ItemSet of the object.
67 // When using this method the returned ItemSet may contain items in the state
68 // SFX_ITEM_DONTCARE which means there were several such items with different
69 // values.
70 virtual const SfxItemSet& GetMergedItemSet() const;
72 // Set merged ItemSet. Normally, this maps to SetObjectItemSet().
73 virtual void SetMergedItemSet(const SfxItemSet& rSet, sal_Bool bClearAllItems = sal_False);
75 // set single item
76 virtual void SetObjectItem(const SfxPoolItem& rItem);
78 // set single item direct, do not do any notifies or things like that
79 virtual void SetObjectItemDirect(const SfxPoolItem& rItem);
81 // clear single item
82 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0);
84 // clear single item direct, do not do any notifies or things like that.
85 // Also supports complete deleteion of items when default parameter 0 is used.
86 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0);
88 // Set a single item, iterate over hierarchies if necessary.
89 virtual void SetMergedItem(const SfxPoolItem& rItem);
91 // Clear a single item, iterate over hierarchies if necessary.
92 virtual void ClearMergedItem(const sal_uInt16 nWhich = 0);
94 // set complete item set
95 virtual void SetObjectItemSet(const SfxItemSet& rSet);
97 // set a new StyleSheet
98 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr);
100 // get the local StyleSheet
101 virtual SfxStyleSheet* GetStyleSheet() const;
103 // force default attributes for a specific object type, called from
104 // DefaultProperties::GetObjectItemSet() if a new ItemSet is created
105 virtual void ForceDefaultAttributes();
107 // Move properties to a new ItemPool.
108 virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel = 0L);
110 // force all attributes which come from styles to hard attributes
111 // to be able to live without the style.
112 virtual void ForceStyleToHardAttributes();
114 } // end of namespace properties
115 } // end of namespace sdr
117 //////////////////////////////////////////////////////////////////////////////
119 #endif //_SDR_PROPERTIES_GROUPPROPERTIES_HXX
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */