LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / inputopt.hxx
blob5f20276cbbc68a229f737f76a942a26fe2f60ae0
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 <unotools/configitem.hxx>
24 class ScInputOptions
26 private:
27 sal_uInt16 nMoveDir; // enum ScDirection
28 bool bMoveSelection;
29 bool bEnterEdit;
30 bool bExtendFormat;
31 bool bRangeFinder;
32 bool bExpandRefs;
33 bool mbSortRefUpdate;
34 bool bMarkHeader;
35 bool bUseTabCol;
36 bool bTextWysiwyg;
37 bool bReplCellsWarn;
38 bool bLegacyCellSelection;
39 bool bEnterPasteMode;
41 public:
42 ScInputOptions();
44 void SetDefaults();
46 void SetMoveDir(sal_uInt16 nNew) { nMoveDir = nNew; }
47 sal_uInt16 GetMoveDir() const { return nMoveDir; }
48 void SetMoveSelection(bool bSet) { bMoveSelection = bSet; }
49 bool GetMoveSelection() const { return bMoveSelection; }
50 void SetEnterEdit(bool bSet) { bEnterEdit = bSet; }
51 bool GetEnterEdit() const { return bEnterEdit; }
52 void SetExtendFormat(bool bSet) { bExtendFormat = bSet; }
53 bool GetExtendFormat() const { return bExtendFormat; }
54 void SetRangeFinder(bool bSet) { bRangeFinder = bSet; }
55 bool GetRangeFinder() const { return bRangeFinder; }
56 void SetExpandRefs(bool bSet) { bExpandRefs = bSet; }
57 bool GetExpandRefs() const { return bExpandRefs; }
58 void SetSortRefUpdate(bool bSet) { mbSortRefUpdate = bSet; }
59 bool GetSortRefUpdate() const { return mbSortRefUpdate; }
60 void SetMarkHeader(bool bSet) { bMarkHeader = bSet; }
61 bool GetMarkHeader() const { return bMarkHeader; }
62 void SetUseTabCol(bool bSet) { bUseTabCol = bSet; }
63 bool GetUseTabCol() const { return bUseTabCol; }
64 void SetTextWysiwyg(bool bSet) { bTextWysiwyg = bSet; }
65 bool GetTextWysiwyg() const { return bTextWysiwyg; }
66 void SetReplaceCellsWarn(bool bSet) { bReplCellsWarn = bSet; }
67 bool GetReplaceCellsWarn() const { return bReplCellsWarn; }
68 void SetLegacyCellSelection(bool bSet) { bLegacyCellSelection = bSet; }
69 bool GetLegacyCellSelection() const { return bLegacyCellSelection; }
70 void SetEnterPasteMode(bool bSet) { bEnterPasteMode = bSet; }
71 bool GetEnterPasteMode() const { return bEnterPasteMode; }
74 // CfgItem for input options
76 class ScInputCfg final : public ScInputOptions,
77 public utl::ConfigItem
79 static css::uno::Sequence<OUString> GetPropertyNames();
81 virtual void ImplCommit() override;
83 public:
84 ScInputCfg();
86 void SetOptions( const ScInputOptions& rNew );
87 void OptionsChanged(); // after direct access to SetOptions base class
89 virtual void Notify( const css::uno::Sequence<OUString>& aPropertyNames ) override;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */