Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / solvrdlg.hxx
blobbc48636793da41fe00243dafbff9ac07a0515c37
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SC_SOLVRDLG_HXX
21 #define SC_SOLVRDLG_HXX
23 #include "global.hxx"
24 #include "address.hxx"
25 #include "anyrefdg.hxx"
28 #include <vcl/fixed.hxx>
29 #include <vcl/group.hxx>
31 //----------------------------------------------------------------------------
33 enum ScSolverErr
35 SOLVERR_NOFORMULA,
36 SOLVERR_INVALID_FORMULA,
37 SOLVERR_INVALID_VARIABLE,
38 SOLVERR_INVALID_TARGETVALUE
42 //============================================================================
44 class ScSolverDlg : public ScAnyRefDlg
46 public:
47 ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
48 ScDocument* pDocument,
49 ScAddress aCursorPos );
50 ~ScSolverDlg();
52 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
53 virtual sal_Bool IsRefInputMode() const;
54 virtual void SetActive();
55 virtual sal_Bool Close();
57 private:
58 FixedText* m_pFtFormulaCell;
59 formula::RefEdit* m_pEdFormulaCell;
60 formula::RefButton* m_pRBFormulaCell;
62 Edit* m_pEdTargetVal;
64 FixedText* m_pFtVariableCell;
65 formula::RefEdit* m_pEdVariableCell;
66 formula::RefButton* m_pRBVariableCell;
68 OKButton* m_pBtnOk;
69 CancelButton* m_pBtnCancel;
71 ScAddress theFormulaCell;
72 ScAddress theVariableCell;
73 OUString theTargetValStr;
75 ScDocument* pDoc;
76 const SCTAB nCurTab;
77 formula::RefEdit* pEdActive;
78 sal_Bool bDlgLostFocus;
79 const OUString errMsgInvalidVar;
80 const OUString errMsgInvalidForm;
81 const OUString errMsgNoFormula;
82 const OUString errMsgInvalidVal;
85 #ifdef _SOLVRDLG_CXX
86 void Init();
87 sal_Bool CheckTargetValue( const OUString& rStrVal );
88 void RaiseError( ScSolverErr eError );
90 DECL_LINK( BtnHdl, PushButton* );
91 DECL_LINK( GetFocusHdl, Control* );
92 DECL_LINK( LoseFocusHdl, void* );
93 #endif // _SOLVERDLG_CXX
96 #endif // SC_SOLVRDLG_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */