1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: solvrdlg.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_SOLVRDLG_HXX
32 #define SC_SOLVRDLG_HXX
35 #include "address.hxx"
36 #include "anyrefdg.hxx"
39 #include <vcl/fixed.hxx>
40 #include <vcl/group.hxx>
42 //----------------------------------------------------------------------------
47 SOLVERR_INVALID_FORMULA
,
48 SOLVERR_INVALID_VARIABLE
,
49 SOLVERR_INVALID_TARGETVALUE
53 //============================================================================
55 class ScSolverDlg
: public ScAnyRefDlg
58 ScSolverDlg( SfxBindings
* pB
, SfxChildWindow
* pCW
, Window
* pParent
,
59 ScDocument
* pDocument
,
60 ScAddress aCursorPos
);
63 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
);
64 virtual BOOL
IsRefInputMode() const;
65 virtual void SetActive();
69 FixedLine aFlVariables
;
70 FixedText aFtFormulaCell
;
71 formula::RefEdit aEdFormulaCell
;
72 formula::RefButton aRBFormulaCell
;
74 FixedText aFtTargetVal
;
77 FixedText aFtVariableCell
;
78 formula::RefEdit aEdVariableCell
;
79 formula::RefButton aRBVariableCell
;
82 CancelButton aBtnCancel
;
85 ScAddress theFormulaCell
;
86 ScAddress theVariableCell
;
87 String theTargetValStr
;
91 formula::RefEdit
* pEdActive
;
93 const String errMsgInvalidVar
;
94 const String errMsgInvalidForm
;
95 const String errMsgNoFormula
;
96 const String errMsgInvalidVal
;
101 BOOL
CheckTargetValue( String
& rStrVal
);
102 void RaiseError( ScSolverErr eError
);
104 DECL_LINK( BtnHdl
, PushButton
* );
105 DECL_LINK( GetFocusHdl
, Control
* );
106 DECL_LINK( LoseFocusHdl
, Control
* );
107 #endif // _SOLVERDLG_CXX
110 #endif // SC_SOLVRDLG_HXX