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 SC_STLSHEET_HXX 25 #define SC_STLSHEET_HXX 26 27 #include <svl/style.hxx> 28 29 //------------------------------------------------------------------------ 30 31 #define SCSTYLEBIT_STANDARD 0x0001 32 33 //------------------------------------------------------------------------ 34 35 class ScStyleSheetPool; 36 37 class ScStyleSheet : public SfxStyleSheet 38 { 39 friend class ScStyleSheetPool; 40 41 public: 42 43 enum Usage 44 { 45 UNKNOWN, 46 USED, 47 NOTUSED 48 }; 49 50 private: 51 mutable ScStyleSheet::Usage eUsage; 52 53 public: 54 TYPEINFO(); 55 56 ScStyleSheet( const ScStyleSheet& rStyle ); 57 58 virtual sal_Bool SetParent ( const String& rParentName ); 59 virtual SfxItemSet& GetItemSet (); 60 virtual sal_Bool IsUsed () const; 61 virtual sal_Bool HasFollowSupport () const; 62 virtual sal_Bool HasParentSupport () const; 63 64 virtual const String& GetName() const; 65 virtual const String& GetParent() const; 66 virtual const String& GetFollow() const; 67 68 virtual sal_Bool SetName( const String& ); 69 SetUsage(ScStyleSheet::Usage eUse) const70 void SetUsage( ScStyleSheet::Usage eUse ) const 71 { eUsage = eUse; } GetUsage() const72 ScStyleSheet::Usage GetUsage() const 73 { return eUsage; } 74 75 protected: 76 virtual ~ScStyleSheet(); 77 78 ScStyleSheet( const String& rName, 79 ScStyleSheetPool& rPool, 80 SfxStyleFamily eFamily, 81 sal_uInt16 nMask ); 82 83 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 84 }; 85 86 #endif // SC_STLSHEET_HXX 87 88