1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SDR_PROPERTIES_EMPTYPROPERTIES_HXX 29 #define _SDR_PROPERTIES_EMPTYPROPERTIES_HXX 30 31 #include <svx/sdr/properties/properties.hxx> 32 #include "svx/svxdllapi.h" 33 34 ////////////////////////////////////////////////////////////////////////////// 35 36 namespace sdr 37 { 38 namespace properties 39 { 40 class SVX_DLLPUBLIC EmptyProperties : public BaseProperties 41 { 42 protected: 43 // the to be used ItemSet 44 SfxItemSet* mpEmptyItemSet; 45 46 // create a new itemset 47 virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); 48 49 // test changeability for a single item 50 virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; 51 52 // Do the ItemChange, may do special handling 53 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); 54 55 // Called after ItemChange() is done for all items. 56 virtual void PostItemChange(const sal_uInt16 nWhich); 57 58 // react on ItemSet changes 59 virtual void ItemSetChanged(const SfxItemSet& rSet); 60 61 public: 62 // basic constructor 63 EmptyProperties(SdrObject& rObj); 64 65 // constructor for copying, but using new object 66 EmptyProperties(const EmptyProperties& rProps, SdrObject& rObj); 67 68 // destructor 69 virtual ~EmptyProperties(); 70 71 // Clone() operator, normally just calls the local copy constructor 72 virtual BaseProperties& Clone(SdrObject& rObj) const; 73 74 // get itemset 75 virtual const SfxItemSet& GetObjectItemSet() const; 76 77 // set single item 78 virtual void SetObjectItem(const SfxPoolItem& rItem); 79 80 // set single item direct, do not do any notifies or things like that 81 virtual void SetObjectItemDirect(const SfxPoolItem& rItem); 82 83 // clear single item 84 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); 85 86 // clear single item direct, do not do any notifies or things like that. 87 // Also supports complete deleteion of items when default parameter 0 is used. 88 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); 89 90 // set complete item set 91 virtual void SetObjectItemSet(const SfxItemSet& rSet); 92 93 // set a new StyleSheet and broadcast 94 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); 95 96 // get the installed StyleSheet 97 virtual SfxStyleSheet* GetStyleSheet() const; 98 }; 99 } // end of namespace properties 100 } // end of namespace sdr 101 102 #endif //_SDR_PROPERTIES_EMPTYPROPERTIES_HXX 103 104 // eof 105