Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef FORMULA_FORMDATA_HXX
21 : : #define FORMULA_FORMDATA_HXX
22 : :
23 : : #include <tools/string.hxx>
24 : : #include <tools/gen.hxx>
25 : : #include "formula/formuladllapi.h"
26 : :
27 : : //============================================================================
28 : : namespace formula
29 : : {
30 : : class FORMULA_DLLPUBLIC FormEditData
31 : : {
32 : : public:
33 : : FormEditData();
34 : : virtual ~FormEditData();
35 : :
36 : : virtual void SaveValues();
37 : : sal_Bool HasParent() const { return pParent != NULL; }
38 : :
39 : 0 : inline sal_uInt16 GetMode() const { return nMode; }
40 : 0 : inline xub_StrLen GetFStart() const { return nFStart; }
41 : 0 : inline sal_uInt16 GetCatSel() const { return nCatSel; }
42 : 0 : inline sal_uInt16 GetFuncSel() const { return nFuncSel; }
43 : 0 : inline sal_uInt16 GetOffset() const { return nOffset; }
44 : 0 : inline sal_uInt16 GetEdFocus() const { return nEdFocus; }
45 : 0 : inline const String& GetUndoStr() const { return aUndoStr; }
46 : 0 : inline sal_Bool GetMatrixFlag()const{ return bMatrix;}
47 : 0 : inline rtl::OString GetUniqueId()const { return aUniqueId;}
48 : 0 : inline const Selection& GetSelection()const { return aSelection;}
49 : :
50 : 0 : inline void SetMode( sal_uInt16 nNew ) { nMode = nNew; }
51 : 0 : inline void SetFStart( xub_StrLen nNew ) { nFStart = nNew; }
52 : : inline void SetCatSel( sal_uInt16 nNew ) { nCatSel = nNew; }
53 : : inline void SetFuncSel( sal_uInt16 nNew ) { nFuncSel = nNew; }
54 : 0 : inline void SetOffset( sal_uInt16 nNew ) { nOffset = nNew; }
55 : 0 : inline void SetEdFocus( sal_uInt16 nNew ) { nEdFocus = nNew; }
56 : 0 : inline void SetUndoStr( const String& rNew ) { aUndoStr = rNew; }
57 : 0 : inline void SetMatrixFlag(sal_Bool bNew) { bMatrix=bNew;}
58 : 0 : inline void SetUniqueId(const rtl::OString nNew) { aUniqueId=nNew;}
59 : 0 : inline void SetSelection(const Selection& aSel) { aSelection=aSel;}
60 : : protected:
61 : : void Reset();
62 : : FormEditData( const FormEditData& );
63 : : const FormEditData& operator=( const FormEditData& r );
64 : :
65 : : FormEditData* pParent; // fuer Verschachtelung
66 : : private:
67 : : sal_uInt16 nMode; // enum ScFormulaDlgMode
68 : : xub_StrLen nFStart;
69 : : sal_uInt16 nCatSel;
70 : : sal_uInt16 nFuncSel;
71 : : sal_uInt16 nOffset;
72 : : sal_uInt16 nEdFocus;
73 : : String aUndoStr;
74 : : sal_Bool bMatrix;
75 : : rtl::OString aUniqueId;
76 : : Selection aSelection;
77 : : };
78 : :
79 : :
80 : : } // formula
81 : : #endif // FORMULA_FORMDATA_HXX
82 : :
83 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|