Line data Source code
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 : #ifndef INCLUDED_SC_INC_INPUTOPT_HXX
21 : #define INCLUDED_SC_INC_INPUTOPT_HXX
22 :
23 : #include <unotools/configitem.hxx>
24 :
25 : class ScInputOptions
26 : {
27 : private:
28 : sal_uInt16 nMoveDir; // enum ScDirection
29 : bool bMoveSelection;
30 : bool bEnterEdit;
31 : bool bExtendFormat;
32 : bool bRangeFinder;
33 : bool bExpandRefs;
34 : bool mbSortRefUpdate;
35 : bool bMarkHeader;
36 : bool bUseTabCol;
37 : bool bTextWysiwyg;
38 : bool bReplCellsWarn;
39 : bool bLegacyCellSelection;
40 :
41 : public:
42 : ScInputOptions();
43 : ScInputOptions( const ScInputOptions& rCpy );
44 : ~ScInputOptions();
45 :
46 : void SetDefaults();
47 :
48 76 : void SetMoveDir(sal_uInt16 nNew) { nMoveDir = nNew; }
49 20 : sal_uInt16 GetMoveDir() const { return nMoveDir; }
50 76 : void SetMoveSelection(bool bSet) { bMoveSelection = bSet; }
51 20 : bool GetMoveSelection() const { return bMoveSelection; }
52 76 : void SetEnterEdit(bool bSet) { bEnterEdit = bSet; }
53 20 : bool GetEnterEdit() const { return bEnterEdit; }
54 76 : void SetExtendFormat(bool bSet) { bExtendFormat = bSet; }
55 20 : bool GetExtendFormat() const { return bExtendFormat; }
56 76 : void SetRangeFinder(bool bSet) { bRangeFinder = bSet; }
57 20 : bool GetRangeFinder() const { return bRangeFinder; }
58 90 : void SetExpandRefs(bool bSet) { bExpandRefs = bSet; }
59 522 : bool GetExpandRefs() const { return bExpandRefs; }
60 112 : void SetSortRefUpdate(bool bSet) { mbSortRefUpdate = bSet; }
61 94 : bool GetSortRefUpdate() const { return mbSortRefUpdate; }
62 76 : void SetMarkHeader(bool bSet) { bMarkHeader = bSet; }
63 7930 : bool GetMarkHeader() const { return bMarkHeader; }
64 76 : void SetUseTabCol(bool bSet) { bUseTabCol = bSet; }
65 20 : bool GetUseTabCol() const { return bUseTabCol; }
66 76 : void SetTextWysiwyg(bool bSet) { bTextWysiwyg = bSet; }
67 14726 : bool GetTextWysiwyg() const { return bTextWysiwyg; }
68 136 : void SetReplaceCellsWarn(bool bSet) { bReplCellsWarn = bSet; }
69 50 : bool GetReplaceCellsWarn() const { return bReplCellsWarn; }
70 70 : void SetLegacyCellSelection(bool bSet) { bLegacyCellSelection = bSet; }
71 28 : bool GetLegacyCellSelection() const { return bLegacyCellSelection; }
72 :
73 : const ScInputOptions& operator= ( const ScInputOptions& rOpt );
74 : };
75 :
76 : // CfgItem for input options
77 :
78 40 : class ScInputCfg : public ScInputOptions,
79 : public utl::ConfigItem
80 : {
81 : com::sun::star::uno::Sequence<OUString> GetPropertyNames();
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 com::sun::star::uno::Sequence<OUString>& aPropertyNames ) SAL_OVERRIDE;
90 : virtual void Commit() SAL_OVERRIDE;
91 : };
92 :
93 : #endif
94 :
95 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|