LibreOffice Module sc (master)  1
stlsheet.hxx
Go to the documentation of this file.
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 INCLUDED_SC_INC_STLSHEET_HXX
21 #define INCLUDED_SC_INC_STLSHEET_HXX
22 
23 #include <svl/style.hxx>
24 
25 #include "scdllapi.h"
26 
27 class ScStyleSheetPool;
28 
29 class SAL_DLLPUBLIC_RTTI ScStyleSheet final : public SfxStyleSheet
30 {
31 friend class ScStyleSheetPool;
32 
33 public:
34 
35  enum class Usage
36  {
37  UNKNOWN,
38  USED,
39  NOTUSED
40  };
41 
42  ScStyleSheet( const ScStyleSheet& rStyle );
43 
44  virtual bool SetParent ( const OUString& rParentName ) override;
45  SC_DLLPUBLIC void ResetParent();
46  SC_DLLPUBLIC virtual SfxItemSet& GetItemSet() override;
47  virtual bool IsUsed () const override;
48  virtual bool HasFollowSupport () const override;
49  virtual bool HasParentSupport () const override;
50 
51  virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) override;
52 
53  void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; }
54  ScStyleSheet::Usage GetUsage() const { return eUsage; }
55 
57  virtual bool isScStyleSheet() const override { return true; }
58 private:
59  virtual ~ScStyleSheet() override;
60 
61  ScStyleSheet( const OUString& rName,
62  const ScStyleSheetPool& rPool,
63  SfxStyleFamily eFamily,
64  SfxStyleSearchBits nMask );
65 
66  virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
67 
69 };
70 
71 #endif // INCLUDED_SC_INC_STLSHEET_HXX
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool IsUsed() const
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual SfxItemSet & GetItemSet()
void SetUsage(ScStyleSheet::Usage eUse) const
Definition: stlsheet.hxx:53
SfxStyleFamily
UNKNOWN
virtual bool SetParent(const OUString &) override
virtual bool HasFollowSupport() const
ScStyleSheet::Usage GetUsage() const
Definition: stlsheet.hxx:54
virtual bool isScStyleSheet() const override
Fix for expensive dynamic_cast.
Definition: stlsheet.hxx:57
ScStyleSheet::Usage eUsage
Definition: stlsheet.hxx:68
virtual bool HasParentSupport() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
SfxStyleSearchBits