Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / inputopt.hxx
blob3a46bf6c442cdfa9c7516917eed97977987d2661
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 #ifndef SC_INPUTOPT_HXX
21 #define SC_INPUTOPT_HXX
23 #include <unotools/configitem.hxx>
24 #include <tools/solar.h>
26 class ScInputOptions
28 private:
29 sal_uInt16 nMoveDir; // enum ScDirection
30 sal_Bool bMoveSelection;
31 sal_Bool bEnterEdit;
32 sal_Bool bExtendFormat;
33 sal_Bool bRangeFinder;
34 sal_Bool bExpandRefs;
35 sal_Bool bMarkHeader;
36 sal_Bool bUseTabCol;
37 sal_Bool bTextWysiwyg;
38 sal_Bool bReplCellsWarn;
39 sal_Bool bLegacyCellSelection;
41 public:
42 ScInputOptions();
43 ScInputOptions( const ScInputOptions& rCpy );
44 ~ScInputOptions();
46 void SetDefaults();
48 void SetMoveDir(sal_uInt16 nNew) { nMoveDir = nNew; }
49 sal_uInt16 GetMoveDir() const { return nMoveDir; }
50 void SetMoveSelection(sal_Bool bSet) { bMoveSelection = bSet; }
51 sal_Bool GetMoveSelection() const { return bMoveSelection; }
52 void SetEnterEdit(sal_Bool bSet) { bEnterEdit = bSet; }
53 sal_Bool GetEnterEdit() const { return bEnterEdit; }
54 void SetExtendFormat(sal_Bool bSet) { bExtendFormat = bSet; }
55 sal_Bool GetExtendFormat() const { return bExtendFormat; }
56 void SetRangeFinder(sal_Bool bSet) { bRangeFinder = bSet; }
57 sal_Bool GetRangeFinder() const { return bRangeFinder; }
58 void SetExpandRefs(sal_Bool bSet) { bExpandRefs = bSet; }
59 sal_Bool GetExpandRefs() const { return bExpandRefs; }
60 void SetMarkHeader(sal_Bool bSet) { bMarkHeader = bSet; }
61 sal_Bool GetMarkHeader() const { return bMarkHeader; }
62 void SetUseTabCol(sal_Bool bSet) { bUseTabCol = bSet; }
63 sal_Bool GetUseTabCol() const { return bUseTabCol; }
64 void SetTextWysiwyg(sal_Bool bSet) { bTextWysiwyg = bSet; }
65 sal_Bool GetTextWysiwyg() const { return bTextWysiwyg; }
66 void SetReplaceCellsWarn(sal_Bool bSet) { bReplCellsWarn = bSet; }
67 sal_Bool GetReplaceCellsWarn() const { return bReplCellsWarn; }
68 void SetLegacyCellSelection(sal_Bool bSet) { bLegacyCellSelection = bSet; }
69 sal_Bool GetLegacyCellSelection() const { return bLegacyCellSelection; }
71 const ScInputOptions& operator= ( const ScInputOptions& rOpt );
74 // CfgItem for input options
76 class ScInputCfg : public ScInputOptions,
77 public utl::ConfigItem
79 com::sun::star::uno::Sequence<OUString> GetPropertyNames();
81 public:
82 ScInputCfg();
84 void SetOptions( const ScInputOptions& rNew );
85 void OptionsChanged(); // after direct access to SetOptions base class
87 virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames );
88 virtual void Commit();
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */