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 FORMULA_FORMDATA_HXX 25 #define FORMULA_FORMDATA_HXX 26 27 #include <tools/string.hxx> 28 #include <tools/gen.hxx> 29 #include "formula/formuladllapi.h" 30 31 //============================================================================ 32 namespace formula 33 { 34 class FORMULA_DLLPUBLIC FormEditData 35 { 36 public: 37 FormEditData(); 38 virtual ~FormEditData(); 39 40 virtual void SaveValues(); 41 void RestoreValues(); HasParent() const42 sal_Bool HasParent() const { return pParent != NULL; } 43 GetMode() const44 inline sal_uInt16 GetMode() const { return nMode; } GetFStart() const45 inline xub_StrLen GetFStart() const { return nFStart; } GetCatSel() const46 inline sal_uInt16 GetCatSel() const { return nCatSel; } GetFuncSel() const47 inline sal_uInt16 GetFuncSel() const { return nFuncSel; } GetOffset() const48 inline sal_uInt16 GetOffset() const { return nOffset; } GetEdFocus() const49 inline sal_uInt16 GetEdFocus() const { return nEdFocus; } GetUndoStr() const50 inline const String& GetUndoStr() const { return aUndoStr; } GetMatrixFlag() const51 inline sal_Bool GetMatrixFlag()const{ return bMatrix;} GetUniqueId() const52 inline rtl::OString GetUniqueId()const { return aUniqueId;} GetSelection() const53 inline const Selection& GetSelection()const { return aSelection;} 54 SetMode(sal_uInt16 nNew)55 inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; } SetFStart(xub_StrLen nNew)56 inline void SetFStart( xub_StrLen nNew ) { nFStart = nNew; } SetCatSel(sal_uInt16 nNew)57 inline void SetCatSel( sal_uInt16 nNew ) { nCatSel = nNew; } SetFuncSel(sal_uInt16 nNew)58 inline void SetFuncSel( sal_uInt16 nNew ) { nFuncSel = nNew; } SetOffset(sal_uInt16 nNew)59 inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; } SetEdFocus(sal_uInt16 nNew)60 inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; } SetUndoStr(const String & rNew)61 inline void SetUndoStr( const String& rNew ) { aUndoStr = rNew; } SetMatrixFlag(sal_Bool bNew)62 inline void SetMatrixFlag(sal_Bool bNew) { bMatrix=bNew;} SetUniqueId(const rtl::OString nNew)63 inline void SetUniqueId(const rtl::OString nNew) { aUniqueId=nNew;} SetSelection(const Selection & aSel)64 inline void SetSelection(const Selection& aSel) { aSelection=aSel;} 65 protected: 66 void Reset(); 67 FormEditData( const FormEditData& ); 68 const FormEditData& operator=( const FormEditData& r ); 69 70 FormEditData* pParent; // fuer Verschachtelung 71 private: 72 sal_uInt16 nMode; // enum ScFormulaDlgMode 73 xub_StrLen nFStart; 74 sal_uInt16 nCatSel; 75 sal_uInt16 nFuncSel; 76 sal_uInt16 nOffset; 77 sal_uInt16 nEdFocus; 78 String aUndoStr; 79 sal_Bool bMatrix; 80 rtl::OString aUniqueId; 81 Selection aSelection; 82 }; 83 84 85 } // formula 86 #endif // FORMULA_FORMDATA_HXX 87 88