1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_SOLVEROPTIONS_HXX 29 #define SC_SOLVEROPTIONS_HXX 30 31 #include <vcl/dialog.hxx> 32 33 #ifndef _SV_BUTTON_HXX //autogen 34 #include <vcl/button.hxx> 35 #endif 36 #include <vcl/fixed.hxx> 37 #include <vcl/lstbox.hxx> 38 #include <vcl/field.hxx> 39 #include <svx/checklbx.hxx> 40 #include <com/sun/star/uno/Sequence.hxx> 41 42 namespace com { namespace sun { namespace star { 43 namespace beans { struct PropertyValue; } 44 } } } 45 46 47 48 class ScSolverOptionsDialog : public ModalDialog 49 { 50 FixedText maFtEngine; 51 ListBox maLbEngine; 52 FixedText maFtSettings; 53 SvxCheckListBox maLbSettings; 54 PushButton maBtnEdit; 55 FixedLine maFlButtons; 56 HelpButton maBtnHelp; 57 OKButton maBtnOk; 58 CancelButton maBtnCancel; 59 60 SvLBoxButtonData* mpCheckButtonData; 61 com::sun::star::uno::Sequence<rtl::OUString> maImplNames; 62 com::sun::star::uno::Sequence<rtl::OUString> maDescriptions; 63 String maEngine; 64 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties; 65 66 DECL_LINK( EngineSelectHdl, ListBox* ); 67 DECL_LINK( SettingsSelHdl, SvxCheckListBox* ); 68 DECL_LINK( SettingsDoubleClickHdl, SvTreeListBox* ); 69 DECL_LINK( ButtonHdl, PushButton* ); 70 71 void ReadFromComponent(); 72 void FillListBox(); 73 void EditOption(); 74 75 public: 76 ScSolverOptionsDialog( Window* pParent, 77 const com::sun::star::uno::Sequence<rtl::OUString>& rImplNames, 78 const com::sun::star::uno::Sequence<rtl::OUString>& rDescriptions, 79 const String& rEngine, 80 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties ); 81 ~ScSolverOptionsDialog(); 82 83 const String& GetEngine() const; 84 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& GetProperties(); 85 }; 86 87 88 class ScSolverIntegerDialog : public ModalDialog 89 { 90 FixedText maFtName; 91 NumericField maNfValue; 92 FixedLine maFlButtons; 93 OKButton maBtnOk; 94 CancelButton maBtnCancel; 95 96 public: 97 ScSolverIntegerDialog( Window * pParent ); 98 ~ScSolverIntegerDialog(); 99 100 void SetOptionName( const String& rName ); 101 void SetValue( sal_Int32 nValue ); 102 sal_Int32 GetValue() const; 103 }; 104 105 class ScSolverValueDialog : public ModalDialog 106 { 107 FixedText maFtName; 108 Edit maEdValue; 109 FixedLine maFlButtons; 110 OKButton maBtnOk; 111 CancelButton maBtnCancel; 112 113 public: 114 ScSolverValueDialog( Window * pParent ); 115 ~ScSolverValueDialog(); 116 117 void SetOptionName( const String& rName ); 118 void SetValue( double fValue ); 119 double GetValue() const; 120 }; 121 122 #endif 123 124