LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / stlsheet.hxx
blobe1e2c5b85ef50b36505ec4cb3eeec89f0e0f7ac6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <svl/style.hxx>
24 #include "scdllapi.h"
26 class ScStyleSheetPool;
28 class SAL_DLLPUBLIC_RTTI ScStyleSheet final : public SfxStyleSheet
30 friend class ScStyleSheetPool;
32 public:
34 enum class Usage
36 UNKNOWN,
37 USED,
38 NOTUSED
41 ScStyleSheet( const ScStyleSheet& rStyle );
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;
50 virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) override;
52 void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; }
53 ScStyleSheet::Usage GetUsage() const { return eUsage; }
55 /// Fix for expensive dynamic_cast
56 virtual bool isScStyleSheet() const override { return true; }
57 private:
58 virtual ~ScStyleSheet() override;
60 ScStyleSheet( const OUString& rName,
61 const ScStyleSheetPool& rPool,
62 SfxStyleFamily eFamily,
63 SfxStyleSearchBits nMask );
65 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
67 mutable ScStyleSheet::Usage eUsage;
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */