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