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