Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef SC_STLSHEET_HXX
21 : #define SC_STLSHEET_HXX
22 :
23 : #include <svl/style.hxx>
24 :
25 : //------------------------------------------------------------------------
26 :
27 : #define SCSTYLEBIT_STANDARD 0x0001
28 :
29 : //------------------------------------------------------------------------
30 :
31 : class ScStyleSheetPool;
32 :
33 : class ScStyleSheet : public SfxStyleSheet
34 : {
35 : friend class ScStyleSheetPool;
36 :
37 : public:
38 :
39 : enum Usage
40 : {
41 : UNKNOWN,
42 : USED,
43 : NOTUSED
44 : };
45 :
46 : private:
47 : mutable ScStyleSheet::Usage eUsage;
48 :
49 : public:
50 : TYPEINFO();
51 :
52 : ScStyleSheet( const ScStyleSheet& rStyle );
53 :
54 : virtual bool SetParent ( const OUString& rParentName );
55 : virtual SfxItemSet& GetItemSet ();
56 : virtual bool IsUsed () const;
57 : virtual bool HasFollowSupport () const;
58 : virtual bool HasParentSupport () const;
59 :
60 : virtual const OUString& GetName() const;
61 : virtual const OUString& GetParent() const;
62 : virtual const OUString& GetFollow() const;
63 :
64 : virtual bool SetName( const OUString& );
65 :
66 0 : void SetUsage( ScStyleSheet::Usage eUse ) const
67 0 : { eUsage = eUse; }
68 0 : ScStyleSheet::Usage GetUsage() const
69 0 : { return eUsage; }
70 :
71 : protected:
72 : virtual ~ScStyleSheet();
73 :
74 : ScStyleSheet( const OUString& rName,
75 : ScStyleSheetPool& rPool,
76 : SfxStyleFamily eFamily,
77 : sal_uInt16 nMask );
78 :
79 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
80 : };
81 :
82 : #endif // SC_STLSHEET_HXX
83 :
84 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|