merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / sheet / XSolver.idl
blobaaf54ddb75866b06a556ffa63abf030fdbb07f00
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_sheet_XSolver_idl__
29 #define __com_sun_star_sheet_XSolver_idl__
31 #ifndef __com_sun_star_sheet_XSpreadsheetDocument_idl__
32 #include <com/sun/star/sheet/XSpreadsheetDocument.idl>
33 #endif
35 #ifndef __com_sun_star_sheet_SolverConstraint_idl__
36 #include <com/sun/star/sheet/SolverConstraint.idl>
37 #endif
39 //=============================================================================
41 module com { module sun { module star { module sheet {
43 //=============================================================================
45 /** allows to call a solver for a model that is defined by spreadsheet cells.
47 interface XSolver: com::sun::star::uno::XInterface
49 /// The spreadsheet document that contains the cells.
50 [attribute] XSpreadsheetDocument Document;
52 /// The address of the cell that contains the objective value.
53 [attribute] com::sun::star::table::CellAddress Objective;
55 /// The addresses of the cells that contain the variables.
56 [attribute] sequence< com::sun::star::table::CellAddress > Variables;
58 /// The constraints of the model.
59 [attribute] sequence< SolverConstraint > Constraints;
61 /// selects if the objective value is maximized or minimized.
62 [attribute] boolean Maximize;
64 /// executes the calculation and tries to find a solution.
65 void solve();
67 /// contains <TRUE/> if a solution was found.
68 [attribute, readonly] boolean Success;
70 /// contains the objective value for the solution, if a solution was found.
71 [attribute, readonly] double ResultValue;
73 /** contains the solution's value for each of the variables,
74 if a solution was found.
76 [attribute, readonly] sequence< double > Solution;
79 //=============================================================================
81 }; }; }; };
83 #endif