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_CUSTOMSHAPEPROPERTIES_HXX 25 #define _SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX 26 27 #include <svx/sdr/properties/textproperties.hxx> 28 29 ////////////////////////////////////////////////////////////////////////////// 30 31 namespace sdr 32 { 33 namespace properties 34 { 35 class CustomShapeProperties : public TextProperties 36 { 37 private: 38 void UpdateTextFrameStatus(bool bInvalidateRenderGeometry); 39 40 protected: 41 // create a new itemset 42 virtual SfxItemSet& CreateObjectSpecificItemSet(SfxItemPool& rPool); 43 44 // test changeability for a single item 45 virtual sal_Bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = 0) const; 46 47 // react on ItemSet changes 48 virtual void ItemSetChanged(const SfxItemSet& rSet); 49 50 // react on Item change 51 virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem); 52 53 // Called after ItemChange() is done for all items. Allows local reactions on 54 // specific item changes 55 virtual void PostItemChange(const sal_uInt16 nWhich); 56 57 // clear single item 58 virtual void ClearObjectItem(const sal_uInt16 nWhich = 0); 59 60 // clear single item direct, do not do any notifies or things like that. 61 // Also supports complete deleteion of items when default parameter 0 is used. 62 virtual void ClearObjectItemDirect(const sal_uInt16 nWhich = 0); 63 64 public: 65 66 // set a new StyleSheet and broadcast 67 virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, sal_Bool bDontRemoveHardAttr); 68 69 // force default attributes for a specific object type, called from 70 // DefaultProperties::GetObjectItemSet() if a new ItemSet is created 71 virtual void ForceDefaultAttributes(); 72 73 // basic constructor 74 CustomShapeProperties(SdrObject& rObj); 75 76 // constructor for copying, but using new object 77 CustomShapeProperties(const CustomShapeProperties& rProps, SdrObject& rObj); 78 79 // destructor 80 virtual ~CustomShapeProperties(); 81 82 // Clone() operator, normally just calls the local copy constructor 83 virtual BaseProperties& Clone(SdrObject& rObj) const; 84 85 // This is the notifyer from SfxListener 86 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); 87 }; 88 } // end of namespace properties 89 } // end of namespace sdr 90 91 ////////////////////////////////////////////////////////////////////////////// 92 93 #endif //_SDR_PROPERTIES_CUSTOMSHAPEPROPERTIES_HXX 94 95 // eof 96