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_TEXTPROPERTIES_HXX 29 #define _SDR_PROPERTIES_TEXTPROPERTIES_HXX 30 31 #include <svx/sdr/properties/attributeproperties.hxx> 32 #include "svx/svxdllapi.h" 33 34 ////////////////////////////////////////////////////////////////////////////// 35 36 namespace sdr 37 { 38 namespace properties 39 { 40 class SVX_DLLPUBLIC TextProperties : public AttributeProperties 41 { 42 private: 43 // #i101556# versioning support 44 sal_uInt32 maVersion; 45 46 protected: 47 // create a new itemset 48 virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); 49 50 // Do the ItemChange, may do special handling 51 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0); 52 53 // react on ItemSet changes 54 virtual void ItemSetChanged(const SfxItemSet& rSet); 55 56 public: 57 // basic constructor 58 TextProperties(SdrObject& rObj); 59 60 // constructor for copying, but using new object 61 TextProperties(const TextProperties& rProps, SdrObject& rObj); 62 63 // destructor 64 virtual ~TextProperties(); 65 66 // Clone() operator, normally just calls the local copy constructor 67 virtual BaseProperties& Clone(SdrObject& rObj) const; 68 69 // set a new StyleSheet and broadcast 70 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); 71 72 // force default attributes for a specific object type, called from 73 // DefaultProperties::GetObjectItemSet() if a new ItemSet is created 74 virtual void ForceDefaultAttributes(); 75 76 // force all attributes which come from styles to hard attributes 77 // to be able to live without the style. 78 virtual void ForceStyleToHardAttributes(); 79 80 // This is the notifyer from SfxListener 81 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); 82 83 // Set single item at the local ItemSet. *Does not use* AllowItemChange(), 84 // ItemChange(), PostItemChange() and ItemSetChanged() calls. 85 void SetObjectItemNoBroadcast(const SfxPoolItem& rItem); 86 87 // #i101556# versioning support 88 virtual sal_uInt32 getVersion() const; 89 }; 90 } // end of namespace properties 91 } // end of namespace sdr 92 93 ////////////////////////////////////////////////////////////////////////////// 94 95 #endif //_SDR_PROPERTIES_TEXTPROPERTIES_HXX 96 97 // eof 98