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 55 void SetMoveDir(sal_uInt16 nNew) { nMoveDir = nNew; } 56 sal_uInt16 GetMoveDir() const { return nMoveDir; } 57 void SetMoveSelection(sal_Bool bSet) { bMoveSelection = bSet; } 58 sal_Bool GetMoveSelection() const { return bMoveSelection; } 59 void SetEnterEdit(sal_Bool bSet) { bEnterEdit = bSet; } 60 sal_Bool GetEnterEdit() const { return bEnterEdit; } 61 void SetExtendFormat(sal_Bool bSet) { bExtendFormat = bSet; } 62 sal_Bool GetExtendFormat() const { return bExtendFormat; } 63 void SetRangeFinder(sal_Bool bSet) { bRangeFinder = bSet; } 64 sal_Bool GetRangeFinder() const { return bRangeFinder; } 65 void SetExpandRefs(sal_Bool bSet) { bExpandRefs = bSet; } 66 sal_Bool GetExpandRefs() const { return bExpandRefs; } 67 void SetMarkHeader(sal_Bool bSet) { bMarkHeader = bSet; } 68 sal_Bool GetMarkHeader() const { return bMarkHeader; } 69 void SetUseTabCol(sal_Bool bSet) { bUseTabCol = bSet; } 70 sal_Bool GetUseTabCol() const { return bUseTabCol; } 71 void SetTextWysiwyg(sal_Bool bSet) { bTextWysiwyg = bSet; } 72 sal_Bool GetTextWysiwyg() const { return bTextWysiwyg; } 73 void SetReplaceCellsWarn(sal_Bool bSet) { bReplCellsWarn = bSet; } 74 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