xref: /aoo41x/main/sc/inc/inputopt.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_INPUTOPT_HXX
25cdf0e10cSrcweir #define SC_INPUTOPT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <unotools/configitem.hxx>
29cdf0e10cSrcweir #include <tools/solar.h>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir class SvStream;
32cdf0e10cSrcweir 
33cdf0e10cSrcweir 
34cdf0e10cSrcweir class ScInputOptions
35cdf0e10cSrcweir {
36cdf0e10cSrcweir private:
37cdf0e10cSrcweir 	sal_uInt16		nMoveDir;			// enum ScDirection
38cdf0e10cSrcweir 	sal_Bool		bMoveSelection;
39cdf0e10cSrcweir 	sal_Bool		bEnterEdit;
40cdf0e10cSrcweir 	sal_Bool		bExtendFormat;
41cdf0e10cSrcweir 	sal_Bool		bRangeFinder;
42cdf0e10cSrcweir 	sal_Bool		bExpandRefs;
43cdf0e10cSrcweir 	sal_Bool		bMarkHeader;
44cdf0e10cSrcweir 	sal_Bool		bUseTabCol;
45cdf0e10cSrcweir 	sal_Bool		bTextWysiwyg;
46cdf0e10cSrcweir     sal_Bool        bReplCellsWarn;
47cdf0e10cSrcweir 
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir 				ScInputOptions();
50cdf0e10cSrcweir 				ScInputOptions( const ScInputOptions& rCpy );
51cdf0e10cSrcweir 				~ScInputOptions();
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 	void		SetDefaults();
54cdf0e10cSrcweir 
SetMoveDir(sal_uInt16 nNew)55cdf0e10cSrcweir     void        SetMoveDir(sal_uInt16 nNew)         { nMoveDir = nNew;       }
GetMoveDir() const56cdf0e10cSrcweir     sal_uInt16      GetMoveDir() const              { return nMoveDir;       }
SetMoveSelection(sal_Bool bSet)57cdf0e10cSrcweir     void        SetMoveSelection(sal_Bool bSet)     { bMoveSelection = bSet; }
GetMoveSelection() const58cdf0e10cSrcweir     sal_Bool        GetMoveSelection() const        { return bMoveSelection; }
SetEnterEdit(sal_Bool bSet)59cdf0e10cSrcweir     void        SetEnterEdit(sal_Bool bSet)         { bEnterEdit = bSet;     }
GetEnterEdit() const60cdf0e10cSrcweir     sal_Bool        GetEnterEdit() const            { return bEnterEdit;     }
SetExtendFormat(sal_Bool bSet)61cdf0e10cSrcweir     void        SetExtendFormat(sal_Bool bSet)      { bExtendFormat = bSet;  }
GetExtendFormat() const62cdf0e10cSrcweir     sal_Bool        GetExtendFormat() const         { return bExtendFormat;  }
SetRangeFinder(sal_Bool bSet)63cdf0e10cSrcweir     void        SetRangeFinder(sal_Bool bSet)       { bRangeFinder = bSet;   }
GetRangeFinder() const64cdf0e10cSrcweir     sal_Bool        GetRangeFinder() const          { return bRangeFinder;   }
SetExpandRefs(sal_Bool bSet)65cdf0e10cSrcweir     void        SetExpandRefs(sal_Bool bSet)        { bExpandRefs = bSet;    }
GetExpandRefs() const66cdf0e10cSrcweir     sal_Bool        GetExpandRefs() const           { return bExpandRefs;    }
SetMarkHeader(sal_Bool bSet)67cdf0e10cSrcweir     void        SetMarkHeader(sal_Bool bSet)        { bMarkHeader = bSet;    }
GetMarkHeader() const68cdf0e10cSrcweir     sal_Bool        GetMarkHeader() const           { return bMarkHeader;    }
SetUseTabCol(sal_Bool bSet)69cdf0e10cSrcweir     void        SetUseTabCol(sal_Bool bSet)         { bUseTabCol = bSet;     }
GetUseTabCol() const70cdf0e10cSrcweir     sal_Bool        GetUseTabCol() const            { return bUseTabCol;     }
SetTextWysiwyg(sal_Bool bSet)71cdf0e10cSrcweir     void        SetTextWysiwyg(sal_Bool bSet)       { bTextWysiwyg = bSet;   }
GetTextWysiwyg() const72cdf0e10cSrcweir     sal_Bool        GetTextWysiwyg() const          { return bTextWysiwyg;   }
SetReplaceCellsWarn(sal_Bool bSet)73cdf0e10cSrcweir     void        SetReplaceCellsWarn(sal_Bool bSet)  { bReplCellsWarn = bSet; }
GetReplaceCellsWarn() const74cdf0e10cSrcweir     sal_Bool        GetReplaceCellsWarn() const     { return bReplCellsWarn; }
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	const ScInputOptions&	operator=	( const ScInputOptions& rOpt );
77cdf0e10cSrcweir };
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 
80cdf0e10cSrcweir //==================================================================
81cdf0e10cSrcweir // CfgItem fuer Eingabe-Optionen
82cdf0e10cSrcweir //==================================================================
83cdf0e10cSrcweir 
84cdf0e10cSrcweir class ScInputCfg : public ScInputOptions,
85cdf0e10cSrcweir 				  public utl::ConfigItem
86cdf0e10cSrcweir {
87cdf0e10cSrcweir 	com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
88cdf0e10cSrcweir 
89cdf0e10cSrcweir public:
90cdf0e10cSrcweir 			ScInputCfg();
91cdf0e10cSrcweir 
92cdf0e10cSrcweir 	void			SetOptions( const ScInputOptions& rNew );
93cdf0e10cSrcweir 	void			OptionsChanged();	// after direct access to SetOptions base class
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 	virtual void	Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames );
96cdf0e10cSrcweir 	virtual void	Commit();
97cdf0e10cSrcweir };
98cdf0e10cSrcweir 
99cdf0e10cSrcweir 
100cdf0e10cSrcweir #endif
101cdf0e10cSrcweir 
102