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
27
28class SAL_DLLPUBLIC_RTTI ScStyleSheet final : public SfxStyleSheet
29{
30friend class ScStyleSheetPool;
31
32public:
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; }
57private:
58 virtual ~ScStyleSheet() override;
59
60 ScStyleSheet( const OUString& rName,
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: */
ScStyleSheet::Usage GetUsage() const
Definition: stlsheet.hxx:53
virtual bool isScStyleSheet() const override
Fix for expensive dynamic_cast.
Definition: stlsheet.hxx:56
void SetUsage(ScStyleSheet::Usage eUse) const
Definition: stlsheet.hxx:52
ScStyleSheet::Usage eUsage
Definition: stlsheet.hxx:67
SfxItemPool & rPool
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
virtual bool HasFollowSupport() const
virtual bool HasParentSupport() const
virtual SfxItemSet & GetItemSet()
virtual bool IsUsed() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual bool SetParent(const OUString &) override
UNKNOWN
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
SfxStyleFamily
SfxStyleSearchBits