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