Coverage Report

Created: 2025-11-16 09:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sc/inc/stlsheet.hxx
Line
Count
Source
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
0
    void                SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; }
53
0
    ScStyleSheet::Usage GetUsage() const { return eUsage; }
54
55
    /// Fix for expensive dynamic_cast
56
0
    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
                              const OUString& rParentStyleSheetName );
65
66
    virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
67
68
    mutable ScStyleSheet::Usage eUsage;
69
};
70
71
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */