Update ooo320-m1
[ooovba.git] / sc / inc / inputopt.hxx
blobc141d77cfa26b721ad4d4aea1a5e9a687afad737
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: inputopt.hxx,v $
10 * $Revision: 1.5.32.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_INPUTOPT_HXX
32 #define SC_INPUTOPT_HXX
35 #include <unotools/configitem.hxx>
36 #include <tools/solar.h>
38 class SvStream;
41 class ScInputOptions
43 private:
44 USHORT nMoveDir; // enum ScDirection
45 BOOL bMoveSelection;
46 BOOL bEnterEdit;
47 BOOL bExtendFormat;
48 BOOL bRangeFinder;
49 BOOL bExpandRefs;
50 BOOL bMarkHeader;
51 BOOL bUseTabCol;
52 BOOL bTextWysiwyg;
53 BOOL bReplCellsWarn;
55 public:
56 ScInputOptions();
57 ScInputOptions( const ScInputOptions& rCpy );
58 ~ScInputOptions();
60 void SetDefaults();
62 void SetMoveDir(USHORT nNew) { nMoveDir = nNew; }
63 USHORT GetMoveDir() const { return nMoveDir; }
64 void SetMoveSelection(BOOL bSet) { bMoveSelection = bSet; }
65 BOOL GetMoveSelection() const { return bMoveSelection; }
66 void SetEnterEdit(BOOL bSet) { bEnterEdit = bSet; }
67 BOOL GetEnterEdit() const { return bEnterEdit; }
68 void SetExtendFormat(BOOL bSet) { bExtendFormat = bSet; }
69 BOOL GetExtendFormat() const { return bExtendFormat; }
70 void SetRangeFinder(BOOL bSet) { bRangeFinder = bSet; }
71 BOOL GetRangeFinder() const { return bRangeFinder; }
72 void SetExpandRefs(BOOL bSet) { bExpandRefs = bSet; }
73 BOOL GetExpandRefs() const { return bExpandRefs; }
74 void SetMarkHeader(BOOL bSet) { bMarkHeader = bSet; }
75 BOOL GetMarkHeader() const { return bMarkHeader; }
76 void SetUseTabCol(BOOL bSet) { bUseTabCol = bSet; }
77 BOOL GetUseTabCol() const { return bUseTabCol; }
78 void SetTextWysiwyg(BOOL bSet) { bTextWysiwyg = bSet; }
79 BOOL GetTextWysiwyg() const { return bTextWysiwyg; }
80 void SetReplaceCellsWarn(BOOL bSet) { bReplCellsWarn = bSet; }
81 BOOL GetReplaceCellsWarn() const { return bReplCellsWarn; }
83 const ScInputOptions& operator= ( const ScInputOptions& rOpt );
87 //==================================================================
88 // CfgItem fuer Eingabe-Optionen
89 //==================================================================
91 class ScInputCfg : public ScInputOptions,
92 public utl::ConfigItem
94 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
96 public:
97 ScInputCfg();
99 void SetOptions( const ScInputOptions& rNew );
100 void OptionsChanged(); // after direct access to SetOptions base class
102 virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames );
103 virtual void Commit();
107 #endif