1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_EMPTYPROPERTIES_HXX
21 #define _SDR_PROPERTIES_EMPTYPROPERTIES_HXX
23 #include <svx/sdr/properties/properties.hxx>
24 #include "svx/svxdllapi.h"
26 //////////////////////////////////////////////////////////////////////////////
32 class SVX_DLLPUBLIC EmptyProperties
: public BaseProperties
35 // the to be used ItemSet
36 SfxItemSet
* mpEmptyItemSet
;
38 // create a new itemset
39 virtual SfxItemSet
& CreateObjectSpecificItemSet(SfxItemPool
& rPool
);
41 // test changeability for a single item
42 virtual sal_Bool
AllowItemChange(const sal_uInt16 nWhich
, const SfxPoolItem
* pNewItem
= 0) const;
44 // Do the ItemChange, may do special handling
45 virtual void ItemChange(const sal_uInt16 nWhich
, const SfxPoolItem
* pNewItem
= 0);
47 // Called after ItemChange() is done for all items.
48 virtual void PostItemChange(const sal_uInt16 nWhich
);
50 // react on ItemSet changes
51 virtual void ItemSetChanged(const SfxItemSet
& rSet
);
55 explicit EmptyProperties(SdrObject
& rObj
);
57 // constructor for copying, but using new object
58 EmptyProperties(const EmptyProperties
& rProps
, SdrObject
& rObj
);
61 virtual ~EmptyProperties();
63 // Clone() operator, normally just calls the local copy constructor
64 virtual BaseProperties
& Clone(SdrObject
& rObj
) const;
67 virtual const SfxItemSet
& GetObjectItemSet() const;
70 virtual void SetObjectItem(const SfxPoolItem
& rItem
);
72 // set single item direct, do not do any notifies or things like that
73 virtual void SetObjectItemDirect(const SfxPoolItem
& rItem
);
76 virtual void ClearObjectItem(const sal_uInt16 nWhich
= 0);
78 // clear single item direct, do not do any notifies or things like that.
79 // Also supports complete deleteion of items when default parameter 0 is used.
80 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich
= 0);
82 // set complete item set
83 virtual void SetObjectItemSet(const SfxItemSet
& rSet
);
85 // set a new StyleSheet and broadcast
86 virtual void SetStyleSheet(SfxStyleSheet
* pNewStyleSheet
, sal_Bool bDontRemoveHardAttr
);
88 // get the installed StyleSheet
89 virtual SfxStyleSheet
* GetStyleSheet() const;
91 } // end of namespace properties
92 } // end of namespace sdr
94 #endif //_SDR_PROPERTIES_EMPTYPROPERTIES_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */