ooo-build r11676 - in branches/opensuse-10-3: . patches/scsolver patches/src680



Author: kyoshida
Date: Fri Feb 22 01:23:07 2008
New Revision: 11676
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11676&view=rev

Log:
2008-02-21  Kohei Yoshida  <kyoshida novell com>

	Updated scsolver patch set to the latest from trunk.  Note that the 
	scsolver directory in the stractch directory is not updated.
	
added
	* patches/scsolver/scsolver-ext-makefile_sdk-mk.diff:
	* patches/scsolver/scsolver-ext-res-en-us-cxx.diff:
	* patches/scsolver/scsolver-ext-res-resource-hxx.diff:
	* patches/scsolver/scsolver-readme.diff:
	* patches/scsolver/scsolver-source-inc-numeric-polyeqnsolver-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-quadfitlinesearch-hxx.diff:
	* patches/scsolver/scsolver-source-inc-resmgr-hxx.diff:
	* patches/scsolver/scsolver-source-inc-scsolver-hrc.diff:
	* patches/scsolver/scsolver-source-numeric-matrix_test-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-polyeqnsolver-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-polyeqnsolver_test-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-quadfitlinesearch-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-quadfitlinesearch_test-cxx.diff:
	* patches/scsolver/scsolver-source-ui-resmgr-cxx.diff:
modified
	* patches/scsolver/scsolver-changelog.diff:
	* patches/scsolver/scsolver-source-inc-basedlg-hxx.diff:
	* patches/scsolver/scsolver-source-inc-dialog-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-cellfuncobj-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-diff-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-exception-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-funcobj-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-lpbase-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-lpmodel-hxx.diff:
	* patches/scsolver/scsolver-source-inc-numeric-matrix-hxx.diff:
	* patches/scsolver/scsolver-source-inc-solver-hxx.diff:
	* patches/scsolver/scsolver-source-inc-tool-global-hxx.diff:
	* patches/scsolver/scsolver-source-inc-unoglobal-hxx.diff:
	* patches/scsolver/scsolver-source-numeric-cellfuncobj-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-diff-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-diff_test-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-funcobj-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-lpbase-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-lpmodel-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-lpsimplex-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-lpsolve-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-makefile-mk.diff:
	* patches/scsolver/scsolver-source-numeric-matrix-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-nlpbase-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-nlpmodel-cxx.diff:
	* patches/scsolver/scsolver-source-numeric-nlpqnewton-cxx.diff:
	* patches/scsolver/scsolver-source-service-service-cxx.diff:
	* patches/scsolver/scsolver-source-tool-global-cxx.diff:
	* patches/scsolver/scsolver-source-ui-basedlg-cxx.diff:
	* patches/scsolver/scsolver-source-ui-baselistener-cxx.diff:
	* patches/scsolver/scsolver-source-ui-dialog-cxx.diff:
	* patches/scsolver/scsolver-source-ui-listener-cxx.diff:
	* patches/scsolver/scsolver-source-ui-lpbuilder-cxx.diff:
	* patches/scsolver/scsolver-source-ui-makefile-mk.diff:
	* patches/scsolver/scsolver-source-ui-msgdlg-cxx.diff:
	* patches/scsolver/scsolver-source-ui-optiondlg-cxx.diff:
	* patches/scsolver/scsolver-source-ui-scsolver-src.diff:
	* patches/scsolver/scsolver-source-ui-solvemodel-cxx.diff:
	* patches/scsolver/scsolver-source-ui-unoglobal-cxx.diff:
	* patches/scsolver/scsolver-source-ui-xcalc-cxx.diff:
	* patches/scsolver/scsolver-util-makefile-mk.diff:
	* patches/src680/apply:
deleted
	* patches/scsolver/scsolver-source-ui-scsolver-hrc.diff:


Added:
   branches/opensuse-10-3/patches/scsolver/scsolver-ext-makefile_sdk-mk.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-en-us-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-resource-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-readme.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-polyeqnsolver-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-quadfitlinesearch-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-resmgr-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-scsolver-hrc.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix_test-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver_test-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch_test-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-resmgr-cxx.diff
Removed:
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-scsolver-hrc.diff
Modified:
   branches/opensuse-10-3/ChangeLog
   branches/opensuse-10-3/patches/scsolver/scsolver-changelog.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-basedlg-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-dialog-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-cellfuncobj-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-diff-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-exception-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-funcobj-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpbase-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpmodel-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-matrix-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-solver-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-tool-global-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-unoglobal-hxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-cellfuncobj-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff_test-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-funcobj-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpbase-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpmodel-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsimplex-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsolve-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-makefile-mk.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpbase-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpmodel-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpqnewton-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-service-service-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-tool-global-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-basedlg-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-baselistener-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-dialog-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-listener-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-lpbuilder-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-makefile-mk.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-msgdlg-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-optiondlg-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-scsolver-src.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-solvemodel-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-unoglobal-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-xcalc-cxx.diff
   branches/opensuse-10-3/patches/scsolver/scsolver-util-makefile-mk.diff
   branches/opensuse-10-3/patches/src680/apply

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-changelog.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-changelog.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-changelog.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,469 @@
 --- /dev/null	
 +++ scsolver/ChangeLog	
-@@ -0,0 +1,545 @@
+@@ -0,0 +1,1008 @@
++2007-08-12  Kohei Yoshida  <kyoshida novell com>
++
++	* workben/addon_pkg/configure.ac: replace the leading '~' with
++	$(HOME) in file path.
++
++2007-08-12  Kohei Yoshida  <kyoshida novell com>
++
++	* workben/addon_pkg/configure.ac: convert the lp_solve path to absolute
++	path.
++	
++	* workben/addon_pkg/Makefile.in: set a symbolic link to lpsolve 
++	directory, fixed 'make regview', and added 'make install' to allow 
++	quick installation of the package.
++
++2007-08-12  Kohei Yoshida  <kyoshida novell com>
++
++	* workben/addon_pkg/autogen.sh:
++	* workben/addon_pkg/configure.ac:
++	* workben/addon_pkg/Makefile.in: added so that we can use autoconf.
++
++	* workben/addon_pkg/Makefile: moved to Makefile_build as a backup.
++
++2007-08-12  Kohei Yoshida  <kyoshida novell com>
++
++	* source/ui/scsolver.hrc: moved to source/inc/scsolver.hrc to make it 
++	globally accessible.
++	
++	* source/service/service.cxx: use my own string resource code for add-on
++	package build.
++
++	* workben/addon_pkg/Makefile:
++	* workben/addon_pkg/Makefile_SDK.mk:
++	* workben/addon_pkg/res/en-US.cxx:
++	* workben/addon_pkg/res/resource.hxx: added my own string resource 
++	handling for add-on package build, since UNO API does not provide a 
++	means for string resource localization.
++
++2007-08-08  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/basedlg.hxx:
++	* source/inc/solver.hxx:
++	* source/service/service.cxx: changed so that scsolver can be built 
++	externally using the SDK.
++	
++	* source/numeric/makefile.mk: fixed ooo-build breakage.
++
++	* workben/addon_pkg/Makefile_SDK.mk: added for building scsolver module
++	externally using the SDK.
++
++2007-07-26  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/numeric/funcobj.hxx:
++	* source/numeric/funcobj.cxx: added toBaseFuncObj method to wrap
++	SingleVarFuncObj inside a BaseFuncObj instance so that it can be passed
++	to NumericalDiffer, which expects BaseFuncObj instance.
++	
++	* source/numeric/diff.cxx:
++	* source/inc/numeric/quadfitlinesearch.hxx:
++	* source/numeric/quadfitlinesearch.cxx:
++	* source/numeric/quadfitlinesearch_test.cxx: adjusted for a slight 
++	change in BaseFuncObj's interface.
++	
++	* workben/unittest/Makefile: added diff.o to quadfitlinesearch build 
++	rule.
++
++2007-07-26  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/numeric/diff.hxx:
++	* source/numeric/diff.cxx:
++	* source/numeric/diff_test.cxx:
++	* source/numeric/nlpqnewton.cxx: changed the name of class Differentiate
++	to NumericalDiffer & removed its implementation class by moving all the
++	meat into the envelope class.
++	
++	* source/inc/numeric/quadfitlinesearch.hxx:
++	* source/numeric/quadfitlinesearch.cxx: renamed a variable.
++	
++	* source/ui/basedlg.cxx: removed unused variable.
++	
++	* workben/addon_pkg/Makefile: added compiler switch to supress massive
++	amount of warnings coming from the UNO code.
++
++2007-07-16  Kohei Yoshida  <kyoshida novell com>
++
++	* source/numeric/diff_test.cxx: beefed up the test code for numerical
++	differentiation.
++
++2007-07-14  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/numeric/funcobj.hxx:
++	* source/numeric/funcobj.cxx: added operator() for convenience.
++	
++	* source/numeric/diff_test.cxx: fixed the test code to reflect API 
++	change.
++	
++	* workben/unittest/Makefile: added diff test.
++	
++	* source/inc/numeric/quadfitlinesearch.hxx:
++	* source/numeric/quadfitlinesearch.cxx: added a little more meat.
++
++2007-07-10  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/numeric/funcobj.hxx:
++	* source/numeric/funcobj.cxx (SingleVarFuncObj): new class to handle
++	single-variable non-linear functions added.
++	
++	* source/inc/numeric/quadfitlinesearch.hxx:
++	* source/numeric/quadfitlinesearch.cxx: added just a little more code.
++	
++	* source/numeric/quadfitlinesearch_test.cxx:
++	* workben/unittest/Makefile: added test code for QuadFitLineSearch 
++	class.
++
++2007-06-18  Kohei Yoshida  <kyoshida novell com>
++	
++	* source/numeric/polyeqnsolver_test.cxx: re-organized the code a bit.
++	
++	* source/inc/numeric/quadfitlinesearch.hxx:
++	* source/numeric/quadfitlinesearch.cxx:
++	* source/numeric/quadfitlinesearch_test.cxx:
++	* workben/unittest/Makefile: added new class QuadFitLineSearch and its
++	  test case to implement a quadratic fit line search algorithm.
++
++2007-06-17  Kohei Yoshida  <kyoshida novell com>
++
++	* source/inc/numeric/polyeqnsolver.hxx: 
++	* source/numeric/polyeqnsolver.cxx (getQuadPeak): added.
++	
++	* source/numeric/polyeqnsolver_test.cxx: added test case for 
++	  getQuadPeak() function.
++	
++2007-06-16  Kohei Yoshida  <kyoshida novell com>
++
++	* workben/unittest/Makefile:	
++	* source/inc/tool/global.hxx: fixed compilation problem for unittest.
++	
++	* source/inc/numeric/polyeqnsolver.hxx:
++	* source/numeric/polyeqnsolver.cxx: added NotEnoughDataPoints exception
++	  class, added clear() and size() methods.
++	
++	* source/numeric/polyeqnsolver_test.cxx: added test case for clear() &
++	  added more test case.
++	
++	* workben/addon_pkg/Makefile: removed extra tab characters.
++
++2007-06-13  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/tool/global.hxx:
++    * source/numeric/lpmodel.cxx:
++    * source/service/service.cxx: added preprocessing to deal with standalone
++    scsolver uno component build.
++
++    * workben/addon_pkg/Makefile: fixed it to build a standalone component 
++    file once again.
++
++2007-06-12  Kohei Yoshida  <kyoshida novell com>
++
++    * workben/addon_pkg/*: re-added to make it possible to (once again) build
++    the Solver component as a standalone UNO package.  Still work in progress.
++
++2007-06-11  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/matrix.hxx:
++    * source/numeric/matrix.cxx: minor variable name changes.
++
++    * source/numeric/matrix_test.cxx: removed garbage from license header.
++
++    * source/inc/numeric/polyeqnsolver.hxx:
++    * source/numeric/polyeqnsolver.cxx:
++    * source/numeric/polyeqnsolver_test.cxx:
++    * source/numeric/makefile.mk: new class PolyEqnSolver added for solving
++      arbitrary-order polynomial equations.
++
++    * workben/unittest/Makefile: unit test for PolyEqnSolver.
++
++2007-05-04  Kohei Yoshida  <kyoshida novell com>
++
++    * source/service/service.cxx: commented out unused variables to remove 
++      warnings.  
++
++2007-05-04  Kohei Yoshida  <kyoshida novell com>
++
++    * source/numeric/nlpmodel.cxx: added #include <stdio.h> header to fix 
++      build breakage.  
++
++2007-04-30  Kohei Yoshida  <kyoshida novell com>
++
++    * workben/testcase/sudoku.ods:
++    * workben/testcase/tc1.ods:
++    * workben/testcase/tc2.ods:
++    * workben/testcase/tc3.ods:
++    * workben/testcase/tc4_timealloc.ods: added.
++
++    * workben/unittest:
++    * workben/unittest/Makefile:
++    * source/numeric/matrix_test.cxx: added for unit-testing.
++
++    * source/numeric/cellfuncobj.cxx:
++    * source/inc/numeric/cellfuncobj.hxx:
++    * source/inc/numeric/funcobj.hxx: changed signature of getFuncString().
++
++    * source/inc/numeric/matrix.hxx:
++    * source/numeric/matrix.cxx: cleaned up the Matrix class to remove its
++    implementation class & file-wide tab->space conversion.
++
++    * source/numeric/nlpmodel.cxx: removed unused header file #include.
++
++2007-04-08  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/cellfuncobj.hxx:
++    * source/inc/numeric/funcobj.hxx:
++    * source/inc/numeric/nlpbase.hxx:
++    * source/numeric/cellfuncobj.cxx:
++    * source/numeric/nlpbase.cxx:
++    * source/numeric/nlpqnewton.cxx: added getVars() method to function object
++    to return a reference of current variable values, and made changes to 
++    relevant algorithm/model code.  Because the solutions are now pulled 
++    directly from the funcion object (to avoid multiple copying of vector's),
++    there is no need to call setSolution(...) at the end of optimization run.
++    So, setSolution(...) method is now removed.
++
++    * workben/optimizer/nlp_skel/main.cxx:
++    * workben/optimizer/nlp_skel/myfunctor.cxx:
++    * workben/optimizer/nlp_skel/myfunctor.hxx:
++    * workben/optimizer/nlp_skel/myoptimizer.cxx: added some example code to
++    show how the goal is set & queried, and made mods for the above change.
++
++2007-03-25  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/nlpmodel.hxx: added in javadoc bits about
++      class instances life cycle management policy.
++
++    * source/numeric/nlpmodel.cxx: fixed an incorrect way of reserving array 
++      size, rewrote print() function to use fprintf instead of unreliable C++ 
++      iostream and to include variable boundaries.
++
++    * workben/optimizer/nlp_skel/main.cxx: included model initialization code
++      with variable boundaries.
++
++    * workben/optimizer/nlp_skel/myoptimizer.cxx: made changes to get initial
++      variable values from the model instance.
++
++2007-03-25  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/nlpbase.hxx:
++    * source/inc/numeric/nlpmodel.hxx: added javadoc comments for class 
++      instance methods, and changed the access of setSolution() from
++      public to protected.
++
++    * source/inc/numeric/nlpnewton.hxx: made the implementation class to a 
++      friend of the public class to have access to setSolution().
++
++2007-03-25  Kohei Yoshida  <kyoshida novell com>
++
++    This change is to remove dependency on boost::shared_ptr so that the 
++    non-linear optimizer can be independently compiled without dependency
++    on the boost library.
++
++    * source/inc/nlpbuilder.hxx:
++    * source/ui/nlpbuilder.cxx: modified NlpModelBuilder class so that this 
++      class now takes an external pointer to CellFuncObj instead of 
++      instantiating one itself.
++
++    * source/numeric/nlpqnewton.cxx:
++    * source/inc/numeric/nlpmodel.hxx:
++    * source/numeric/nlpmodel.cxx:
++    * source/inc/numeric/diff.hxx:
++    * source/numeric/diff.cxx: pass raw pointers to BaseFuncObj instead
++      of wrapping them inside shared_ptr.
++
++    * source/inc/numeric/funcobj.hxx: fixed javadoc format.
++
++    * source/ui/solvemodel.cxx: SolveModel class now manages the lifecycle
++      of CellFuncObj, which was previously managed via shared_ptr.
++
++    * workben/optimizer/nlp_skel/main.cxx:
++    * workben/optimizer/nlp_skel/Makefile
++    * workben/optimizer/nlp_skel/myfunctor.cxx:
++    * workben/optimizer/nlp_skel/myfunctor.hxx:
++    * workben/optimizer/nlp_skel/myoptimizer.cxx: an example function object
++      class added, and the optimizer now has some fake optimization code.
++
++2007-03-21  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/exception.hxx:
++    * source/numeric/exception.cxx (UnboundedException) : added.
++
++    * source/inc/numeric/nlpmodel.hxx:
++    * source/numeric/nlpmodel.cxx: added bounded variable support for Jorma's
++      direct optimizer integration, cleaned up header & added javadoc 
++      comment.
++
++    * source/numeric/nlpqnewton.cxx: made mods to adopt nlp::Model change.
++
++    * workben/optimizer/nlp_skel/Makefile: added exception.o to the mix of
++      dependent objects.
++
++2007-03-20  Kohei Yoshida  <kyoshida novell com>
++
++    * source/inc/numeric/cellfuncobj.hxx:
++    * source/numeric/cellfuncobj.cxx (CellFuncObj): removed test() method,
++    added setVar(), setVars(), and eval() methods.
++
++    * source/inc/numeric/matrix.hxx: added parameter names to operator().
++    * source/numeric/matrix.cxx:
++
++    * source/inc/numeric/nlpbase.hxx: 
++    * source/numeric/nlpbase.cxx:
++    * source/inc/numeric/nlpmodel.hxx:
++    * source/numeric/nlpmodel.cxx:
++    * source/numeric/nlpqnewton.cxx: removed dependency on Matrix class to
++    make these classes easier to instantiate outside of scsolver.
++
++    * source/inc/numeric/suppl.hxx: removed.
++
++    * source/tool/global.cxx: moved from source/ui/global.cxx.
++    * source/inc/tool/global.hxx: moved from source/inc/global.hxx.
++    * source/tool/makefile.mk: added global.obj.
++    * source/ui/makefile.mk: removed global.obj.
++    
++    * *.hxx; *.cxx: replaced #include <...> with #include "..." for headers
++    originating from within scsolver module, to distinguish them from system
++    headers.
++
++    * workben/optimizer/nlp_skel/*: added skeleton code as part of ongoing 
++    independent optimizer developement framework.
++
++2007-03-13  Kohei Yoshida  <kyoshida novell com>
++
++    * source/*/*.[ch]xx: removed opres namespace because use of this namespace
++    was probably not a good idea.
++
++    * source/inc/numeric/*funcobj.hxx:
++    * source/numeric/cellfuncobj.cxx:
++    * source/numeric/diff.cxx:
++    * source/numeric/nlpqnewton.cxx: added setVar(), setVars(), and eval() 
++    member functions to BaseFuncObj and CellFuncObj classes to separate 
++    variable update and function evaluation.  This is needed for Jorma Kuha's
++    direct optimizer which updates only changed variable(s) in each iteration.
++
++2007-01-08  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/inc/optiondlg.hxx:
++	* source/ui/optiondlg.cxx: added two new check boxes for integer and 
++	positive value constraints.
++
++	* source/ui/scsolver.hrc:
++	* source/ui/scsolver.src: added two new strings within Options dialog.
++
++2006-12-18  Kohei Yoshida  <kohei yoshida gmail com>
++
++	Merge from 2.0.4 branch
++
++2006-12-03  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/inc/numeric/lpmodel.hxx:
++	* source/numeric/lpmodel.cxx:
++	* source/inc/option.hxx:
++	* source/ui/option.cxx:
++	* source/numeric/lpsolve.cxx: added internal bits for enabling integer 
++	constraints on decision variables.  This is not enabled in the UI yet, but
++	eventually will show up in the Options dialog.
++	
++	* source/tool/timer.cxx: removed #include <stdio.h>.
++
++	* source/ui/basedlg.cxx: added extra checks for NULL widget to prevent
++	application crash on exit when trying to unregister a NULL-pointer 
++	listener.
++
++	* source/ui/dialog.cxx: (finally) fixed a rather serious typo here, which
++	was causing the whole soffice.bin process to segfault on exit every time
++	the Solver dialog is invoked.  I wonder why this problem did not surface
++	before....
++	
++	* source/ui/solvemodel.cxx: added bits for integer constraints & localized
++	the standard exception message.
++
++2006-12-01  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* scsolver/source/ui/scsolver.src: added German strings (contributed from
++	KAMI).
++
++2006-11-29  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* scsolver/source/inc/listener.hxx: removed debug output.
++	* scsolver/source/ui/basedlg.cxx: DEBUG -> SCSOLVER_DEBUG & removed debug
++	output.
++	* scsolver/source/ui/optiondlg.cxx: removed unused parameter & l10n work.
++	* scsolver/source/ui/scsolver.hrc: added new string IDs.
++	* scsolver/source/ui/scsolver.src: added new string items.
++	* scsolver/source/ui/solvemodel.cxx: removed 'static' keyword from typedef
++	of cell_address_t which caused the build to fail using older versions of 
++	gcc, safer and more automatic way of re-enabling cell updates after it's 
++	been turned off (parseConstraint), and some l10n work.
++
++2006-11-21  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/ui/listener.cxx (ConstEditBtnListener::actionPerformed): show the
++	constraint dialog before populating it with initial values, because the 
++	combo box seems to forget the value when its initial value is given before
++	the dialog is realized.
++
++2006-11-21  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/ui/dialog.hxx
++	* source/inc/dialog.cxx (updateWidgets): added.
++
++	* source/inc/global.hxx: added SCSOLVER_DEBUG define and removed unused
++	global functions.
++
++	* source/ui/lpbuilder.hxx
++	* source/inc/lpbuilder.cxx: made constraint parsing more flexible so that
++	even when the LHS value is a value instead of a cell reference it would
++	parse correctly.
++
++	* source/numeric/lpsolve.cxx: cleaned up debug output calls.  iostream
++	seems broken when used with stlports.
++
++	* source/service/service.cxx: cleaned up debug output calls.
++
++	* source/ui/basedlg.cxx: extra check for NULL-ness.
++	
++	* source/ui/global.cxx: replaced dysfunctional cout calls with printf
++	calls.
++
++	* source/ui/listener.cxx: fixed a weird behavior when the user cancels the
++	range selection mode.  also fixed one crasher bug when the Change or
++	Delete button is pressed when nothing in the constraint list box is 
++	highlighted.
++
++	* source/ui/solvemodel.cxx: fixed constraint parsing error when constant
++	term is present in either side of the constraint formula.
++
++2006-11-11  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/*/basedlg.?xx:
++	* source/*/dialog.?xx:
++	* source/*/msgdlg.?xx:
++	* source/*/optiondlg.?xx: added pure virtual function close() to
++	BaseDialog and their implementations in the derived classes.
++
++	* source/ui/listener.cxx (CloseBtnListener): switched to using
++	close() instead of setVisible(false) for closing action.
++
++2006-11-09  Kohei Yoshida  <kohei yoshida gmail com>
++
++	* source/*/baselistener.?xx: TopWindowListener and 
++	SimpleActionObject classes added.
++
++	* source/*/dialog.?xx: added listener to handle window closing
++	event to the main and constraint dialogs in order to handle 
++	closing by clicking the close button in the title bar or hitting
++	the escape key.
++
++	* source/*/optiondlg.?xx: added listener to handle window closing
++	event.  Refactored code to hide private member variables.
++
++	* source/*/basedlg.?xx (registerListener, unregisterListener): 
++	added to handle (un)registering of TopWindowListener instances.
++
++	* source/ui/xcalc.cxx: put some experimental code to add a new 
++	menu item via UNO added but turned it off by default.
++
 +2006-08-19  Kohei Yoshida  <kohei yoshida gmail com>
 +
 +	* prj/build.lst: 

Added: branches/opensuse-10-3/patches/scsolver/scsolver-ext-makefile_sdk-mk.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-ext-makefile_sdk-mk.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,262 @@
+--- /dev/null	
++++ scsolver/ext/Makefile_SDK.mk	
+@@ -0,0 +1,259 @@
++TARGET=scsolver.uno
++
++SCSOLVER_LANG=en-US
++SDKDIR=$(HOME)/ooo/install/SRC680_m224_sdk
++OOODIR=$(HOME)/ooo/install/SRC680_m224
++
++SCSOLVERDIR=../..
++SRCDIR=$(SCSOLVERDIR)/source
++OBJDIR=./obj
++BINDIR=$(SDKDIR)/linux/bin
++
++DEBUG=
++LDFLAGS= -lsal -lcppuhelpergcc3 -lcppu -lstlport_gcc $(DEBUG) -L$(OOODIR)
++CXXCPP=-I$(SDKDIR)/include -I$(SRCDIR)/inc -I. -I$(OBJDIR)
++CXX_DEFINES= \
++	-DUNX -DGCC -DLINUX -DCPPU_ENV=gcc3 -DHAVE_GCC_VISIBILITY_FEATURE \
++	-DSCSOLVER_UNO_COMPONENT
++
++CXX_SHARED_FLAGS=-fPIC -fno-common -export-dynamic -fvisibility=hidden
++LIBLPSOLVE=./lpsolve/lpsolve55/liblpsolve55.a
++CPPFLAGS=-DDEBUG -Wall -Wno-non-virtual-dtor -Wno-strict-aliasing -Os -mtune=pentium3
++
++SRVDIR=$(SRCDIR)/service
++UIDIR=$(SRCDIR)/ui
++TOOLDIR=$(SRCDIR)/tool
++
++HEADER= \
++	$(SRCDIR)/inc/tool/timer.hxx \
++	$(SRCDIR)/inc/tool/global.hxx \
++	$(SRCDIR)/inc/optiondlg.hxx \
++	$(SRCDIR)/inc/basedlg.hxx \
++	$(SRCDIR)/inc/type.hxx \
++	$(SRCDIR)/inc/unoglobal.hxx \
++	$(SRCDIR)/inc/xcalc.hxx \
++	$(SRCDIR)/inc/option.hxx \
++	$(SRCDIR)/inc/baselistener.hxx \
++	$(SRCDIR)/inc/dialog.hxx \
++	$(SRCDIR)/inc/lpbuilder.hxx \
++	$(SRCDIR)/inc/solver.hxx \
++	$(SRCDIR)/inc/listener.hxx \
++	$(SRCDIR)/inc/numeric/diff.hxx \
++	$(SRCDIR)/inc/numeric/lpuno.hxx \
++	$(SRCDIR)/inc/numeric/type.hxx \
++	$(SRCDIR)/inc/numeric/exception.hxx \
++	$(SRCDIR)/inc/numeric/nlpnewton.hxx \
++	$(SRCDIR)/inc/numeric/matrix.hxx \
++	$(SRCDIR)/inc/numeric/funcobj.hxx \
++	$(SRCDIR)/inc/numeric/lpsolve.hxx \
++	$(SRCDIR)/inc/numeric/lpbase.hxx \
++	$(SRCDIR)/inc/numeric/lpmodel.hxx \
++	$(SRCDIR)/inc/numeric/cellfuncobj.hxx \
++	$(SRCDIR)/inc/numeric/nlpmodel.hxx \
++	$(SRCDIR)/inc/numeric/lpsimplex.hxx \
++	$(SRCDIR)/inc/numeric/polyeqnsolver.hxx \
++	$(SRCDIR)/inc/numeric/nlpbase.hxx \
++	$(SRCDIR)/inc/unohelper.hxx \
++	$(SRCDIR)/inc/msgdlg.hxx \
++	$(SRCDIR)/inc/solvemodel.hxx \
++	$(SRCDIR)/inc/nlpbuilder.hxx
++
++OBJFILES= \
++	$(OBJDIR)/optiondlg.o \
++	$(OBJDIR)/basedlg.o \
++	$(OBJDIR)/unoglobal.o \
++	$(OBJDIR)/xcalc.o \
++	$(OBJDIR)/option.o \
++	$(OBJDIR)/baselistener.o \
++	$(OBJDIR)/dialog.o \
++	$(OBJDIR)/lpbuilder.o \
++	$(OBJDIR)/listener.o \
++	$(OBJDIR)/unohelper.o \
++	$(OBJDIR)/msgdlg.o \
++	$(OBJDIR)/solvemodel.o \
++	$(OBJDIR)/nlpbuilder.o \
++	$(OBJDIR)/timer.o \
++	$(OBJDIR)/global.o \
++	$(OBJDIR)/service.o
++
++NUMERIC_OBJFILES = \
++	$(OBJDIR)/diff.o \
++	$(OBJDIR)/exception.o \
++	$(OBJDIR)/matrix.o \
++	$(OBJDIR)/funcobj.o \
++	$(OBJDIR)/lpsolve.o \
++	$(OBJDIR)/lpbase.o \
++	$(OBJDIR)/lpmodel.o \
++	$(OBJDIR)/cellfuncobj.o \
++	$(OBJDIR)/nlpmodel.o \
++	$(OBJDIR)/nlpbase.o \
++	$(OBJDIR)/nlpqnewton.o
++
++MISC_OBJFILES = \
++	$(OBJDIR)/resource.o
++
++XCUFILES = Addons.xcu ProtocolHandler.xcu
++
++all: pre $(OBJDIR)/unoheaders $(TARGET).zip
++
++pre:
++	mkdir $(OBJDIR) 2> /dev/null || /bin/true
++
++#----------------------------------------------------------------------------
++# numeric
++
++NUMDIR=$(SRCDIR)/numeric
++
++$(OBJDIR)/numeric.a: pre $(NUMERIC_OBJFILES)
++	$(AR) r $@ $(NUMERIC_OBJFILES)
++
++$(OBJDIR)/funcobj.o: $(HEADER) $(NUMDIR)/funcobj.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/funcobj.cxx
++
++$(OBJDIR)/matrix.o: $(HEADER) $(NUMDIR)/matrix.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/matrix.cxx
++
++$(OBJDIR)/diff.o: $(HEADER) $(NUMDIR)/diff.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/diff.cxx
++
++$(OBJDIR)/lpbase.o: $(HEADER) $(NUMDIR)/lpbase.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpbase.cxx
++
++$(OBJDIR)/lpmodel.o: $(HEADER) $(NUMDIR)/lpmodel.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpmodel.cxx
++
++$(OBJDIR)/cellfuncobj.o: $(HEADER) $(NUMDIR)/cellfuncobj.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/cellfuncobj.cxx
++
++$(OBJDIR)/lpsimplex.o: $(HEADER) $(NUMDIR)/lpsimplex.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpsimplex.cxx
++
++$(OBJDIR)/lpsolve.o: $(HEADER) $(NUMDIR)/lpsolve.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/lpsolve.cxx
++
++$(OBJDIR)/nlpmodel.o: $(HEADER) $(NUMDIR)/nlpmodel.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpmodel.cxx
++
++$(OBJDIR)/nlpbase.o: $(HEADER) $(NUMDIR)/nlpbase.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpbase.cxx
++
++$(OBJDIR)/nlpqnewton.o: $(HEADER) $(NUMDIR)/nlpqnewton.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/nlpqnewton.cxx
++
++$(OBJDIR)/exception.o: $(HEADER) $(NUMDIR)/exception.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(NUMDIR)/exception.cxx
++
++$(OBJDIR)/scsolver.a: pre $(OBJFILES)
++	$(AR) r $@ $(OBJFILES)
++
++#----------------------------------------------------------------------------
++# scsolver
++
++$(OBJDIR)/service.o: $(HEADER) $(SRVDIR)/service.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(SRVDIR)/service.cxx
++
++$(OBJDIR)/basedlg.o: $(HEADER) $(UIDIR)/basedlg.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/basedlg.cxx
++
++$(OBJDIR)/baselistener.o: $(HEADER) $(UIDIR)/baselistener.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/baselistener.cxx
++
++$(OBJDIR)/dialog.o: $(HEADER) $(UIDIR)/dialog.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/dialog.cxx
++
++$(OBJDIR)/optiondlg.o: $(HEADER) $(UIDIR)/optiondlg.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/optiondlg.cxx
++
++$(OBJDIR)/option.o: $(HEADER) $(UIDIR)/option.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/option.cxx
++
++$(OBJDIR)/global.o: $(HEADER) $(TOOLDIR)/global.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(TOOLDIR)/global.cxx
++
++$(OBJDIR)/listener.o: $(HEADER) $(UIDIR)/listener.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/listener.cxx
++
++$(OBJDIR)/lpbuilder.o: $(HEADER) $(UIDIR)/lpbuilder.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/lpbuilder.cxx
++
++$(OBJDIR)/nlpbuilder.o: $(HEADER) $(UIDIR)/nlpbuilder.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/nlpbuilder.cxx
++
++$(OBJDIR)/msgdlg.o: $(HEADER) $(UIDIR)/msgdlg.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/msgdlg.cxx
++
++$(OBJDIR)/solvemodel.o: $(HEADER) $(UIDIR)/solvemodel.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/solvemodel.cxx
++
++$(OBJDIR)/unoglobal.o: $(HEADER) $(UIDIR)/unoglobal.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/unoglobal.cxx
++
++$(OBJDIR)/unohelper.o: $(HEADER) $(UIDIR)/unohelper.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/unohelper.cxx
++
++$(OBJDIR)/xcalc.o: $(HEADER) $(UIDIR)/xcalc.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(UIDIR)/xcalc.cxx
++
++$(OBJDIR)/timer.o: $(HEADER) $(TOOLDIR)/timer.cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c $(TOOLDIR)/timer.cxx
++
++#----------------------------------------------------------------------------
++# addon only
++
++$(OBJDIR)/resource.o: res/resource.hxx res/$(SCSOLVER_LANG).cxx
++	$(CXX) $(CPPFLAGS) $(CXXCPP) $(CXX_DEFINES) $(CPP_LIBS) \
++	-o $@ $(CXX_SHARED_FLAGS) -c res/$(SCSOLVER_LANG).cxx
++
++#----------------------------------------------------------------------------
++# misc
++
++$(OBJDIR)/unoheaders:
++	export LD_LIBRARY_PATH=$(OOODIR)/program && \
++	$(SDKDIR)/linux/bin/cppumaker -BUCR $(OOODIR)/program/types.rdb -O$(OBJDIR) && \
++	touch $@
++
++$(TARGET).zip: pre $(OBJDIR)/$(TARGET).so
++	zip -j $@ $(OBJDIR)/$(TARGET).so $(OBJDIR)/$(TARGET).rdb $(XCUFILES)
++
++$(OBJDIR)/$(TARGET).so: $(NUMERIC_OBJFILES) $(OBJFILES) $(MISC_OBJFILES)
++	export LD_LIBRARY_PATH=$(OOODIR)/program && \
++	$(CXX) -shared -Wl,-soname,$@ -o $@ -lc $(NUMERIC_OBJFILES) $(OBJFILES) $(MISC_OBJFILES) && \
++ 	$(BINDIR)/regcomp -register -r $(OBJDIR)/$(TARGET).rdb -c $@
++
++regview:
++	$(BINDIR)/regview $(TARGET).rdb
++
++clean:
++	rm -rf $(OBJDIR)
++
++distclean: clean
++	rm -f $(TARGET).zip
++

Added: branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-en-us-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-en-us-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,120 @@
+--- /dev/null	
++++ scsolver/ext/res/en-US.cxx	
+@@ -0,0 +1,117 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "resource.hxx"
++#include "scsolver.hrc"
++#include "unoglobal.hxx"
++
++#include "rtl/ustring.hxx"
++
++using ::rtl::OUString;
++
++namespace scsolver {
++
++OUString getLocaleStr(int resid)
++{
++    static const OUString strList[] = {
++        // SCSOLVER_STR_MAINDLG_TITLE
++        ascii("Optimization Solver"),
++        // SCSOLVER_STR_DEFINE_MODEL
++        ascii("Define model"),
++        // SCSOLVER_STR_SET_TARGET_CELL
++        ascii("Target cell"),
++        // SCSOLVER_STR_GOAL
++        ascii("Goal"),
++        // SCSOLVER_STR_MAXIMIZE
++        ascii("Maximize"),
++        // SCSOLVER_STR_MINIMIZE
++        ascii("Minimize"),
++        // SCSOLVER_STR_DECISIONVAR_CELLS
++        ascii("By changing cells"),
++        // SCSOLVER_STR_CONSTRAINT_SEP
++        ascii("Subject to the constraints"),
++        // SCSOLVER_STR_CONSTRAINTDLG_TITLE
++        ascii("Constraint"),
++        // SCSOLVER_STR_CELL_REFERENCE
++        ascii("Cell Reference"),
++        // SCSOLVER_STR_CONSTRAINT
++        ascii("Constraint"),
++        // SCSOLVER_STR_BTN_OK
++        ascii("OK"),
++        // SCSOLVER_STR_BTN_CANCEL
++        ascii("Cancel"),
++        // SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH
++        ascii("The reference and constraint ranges do not match."),
++        // SCSOLVER_STR_BTN_ADD
++        ascii("Add"),
++        // SCSOLVER_STR_BTN_CHANGE
++        ascii("Change"),
++        // SCSOLVER_STR_BTN_DELETE
++        ascii("Delete"),
++        // SCSOLVER_STR_BTN_SOLVE
++        ascii("Solve"),
++        // SCSOLVER_STR_BTN_RESET
++        ascii("Reset"),
++        // SCSOLVER_STR_BTN_OPTIONS
++        ascii("Options"),
++        // SCSOLVER_STR_BTN_SAVE_MODEL
++        ascii("Save"),
++        // SCSOLVER_STR_BTN_LOAD_MODEL
++        ascii("Load"),
++        // SCSOLVER_STR_BTN_CLOSE
++        ascii("Close"),
++        // SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND
++        ascii("Solution could not be found"),
++        // SCSOLVER_STR_MSG_SOLUTION_FOUND
++        ascii("Solution found"),
++        // SCSOLVER_STR_MSG_CELL_GEOMETRIES_DIFFER
++        ascii("Cell geometries differ"),
++        // SCSOLVER_STR_MSG_MAX_ITERATION_REACHED
++        ascii("Maximum iteration reached"),
++        // SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT
++        ascii("Standard exception caught"),
++        // SCSOLVER_STR_MSG_ITERATION_TIMED_OUT
++        ascii("Iteration timed out"),
++        // SCSOLVER_STR_MSG_GOAL_NOT_SET
++        ascii("Goal is not set"),
++        // SCSOLVER_STR_OPTIONDLG_TITLE
++        ascii("Options"),
++        // SCSOLVER_STR_OPTION_ASSUME_LINEAR
++        ascii("Assume linear model"),
++        // SCSOLVER_STR_OPTION_VAR_POSITIVE
++        ascii("Allow only positive values"),
++        // SCSOLVER_STR_OPTION_VAR_INTEGER
++        ascii("Allow only integer values")
++    };
++
++    if (resid - SCSOLVER_RES_START >= sizeof(strList)/sizeof(strList[0]))
++        return ascii("-");
++
++    return strList[resid - SCSOLVER_RES_START];
++}
++
++}

Added: branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-resource-hxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-ext-res-resource-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,44 @@
+--- /dev/null	
++++ scsolver/ext/res/resource.hxx	
+@@ -0,0 +1,41 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef _SCSOLVER_ADDON_PKG_RESMGR_HXX_
++#define _SCSOLVER_ADDON_PKG_RESMGR_HXX_
++
++namespace rtl {
++    class OUString;
++}
++
++namespace scsolver {
++
++::rtl::OUString getLocaleStr(int resid);
++
++}
++
++#endif

Added: branches/opensuse-10-3/patches/scsolver/scsolver-readme.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-readme.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,64 @@
+--- /dev/null	
++++ scsolver/README	
+@@ -0,0 +1,60 @@
++== HOW TO COMPILE SCSOLVER UNO PACKAGE ==
++
++=== Instructions ===
++
++To compile the separate UNO package named scsolver.uno.zip that can be 
++installed on a version of OO.o that doesn't have the Solver pre-installed, 
++follow these steps.  
++
++1. First, you need to have OO.o itself installed somewhere on your system, and
++   the version of OO.o SDK compatible with your OO.o installation.
++
++2. Download, unpack and build the lp_solve library in a separate directory.  
++   You can download the lp_solve 5.5.0.10 package from our mirror.  To do it, 
++   run these commands in this order:
++
++   wget http://download.go-oo.org/SRC680/lp_solve_5.5.0.10_source.tar.gz
++   tar xvf lp_solve_5.5.0.10_source.tar.gz
++   cd lp_solve_5.5/lpsolve55
++   sh ccc
++
++3. Now, change directory into workben/addon_pkg, and create and run 
++   autogen.sh.
++
++   cd workben/addon_pkg
++   ./autogen.sh \
++       --with-ooo=/path/to/ooo/install \
++       --with-ooo-sdk=/path/to/ooo/sdk \
++       --with-lpsolve=/path/to/lpsolve
++
++   NOTE 1) Use absolute path to specify the location of the OO.o installation,
++   OO.o SDK, and the base lpsolve path.
++
++4. If all goes well, simply run make to build scsolver.uno.zip.
++
++   make
++
++5. At this point, you can launch OO.o Calc and manually install this package
++   from GUI, or you can do this from the command line:
++
++   make install
++
++   this will execute the 'unopkg add' command to register scsolver.uno.zip.
++
++=== FAQ ===
++
++Q. I'm getting the following error:
++
++   ./autogen.sh: line 4: aclocal: command not found
++
++   What am I missing?
++
++A. You need to install 'autoconf' (and 'automake' too?) in order to successfully
++   run the autogen.sh script.
++
++Q. I'm getting boost/shared_ptr.hpp: no such file or directory error.  What 
++   should I do?
++
++A. You need to install boost-devel package to get the boost header files 
++   installed, because scsolver makes use of boost shared_ptr and ublas matrix 
++   libraries.
+\ No newline at end of file

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-basedlg-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-basedlg-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-basedlg-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/basedlg.hxx	
-@@ -0,0 +1,226 @@
+@@ -0,0 +1,236 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,11 +32,17 @@
 +#ifndef _BASEDLG_HXX_
 +#define _BASEDLG_HXX_
 +
-+#include <tools/resmgr.hxx>
++#include "tool/global.hxx"
 +#include <unoglobal.hxx>
 +#include <memory>
 +#include <com/sun/star/awt/PushButtonType.hpp>
 +
++#ifdef SCSOLVER_UNO_COMPONENT
++class ResMgr;
++#else
++#include <tools/resmgr.hxx>
++#endif
++
 +using namespace com::sun::star;
 +using uno::Reference;
 +using uno::XInterface;
@@ -45,6 +51,7 @@
 +
 +	namespace awt
 +	{
++        struct Rectangle;
 +		class XControlModel;
 +	}
 +
@@ -99,6 +106,9 @@
 +
 +	virtual void close() = 0;
 +
++    void setRefBoundingBox(const ::com::sun::star::awt::Rectangle* rect);
++    const ::com::sun::star::awt::Rectangle* getPosSize() const;
++
 +	// Widget creation methods
 +	
 +	apWidgetProp addButton( sal_Int32, sal_Int32, sal_Int32, sal_Int32,
@@ -149,14 +159,14 @@
 +	const Reference < awt::XControlModel > getWidgetModelByName( const rtl::OUString& ) const;
 +	void enableWidget( const rtl::OUString&, sal_Bool = true ) const;
 +	void toFront() const;
++    void setFocus() const;
 +	void execute() const;
 +
-+	ResMgr* getResMgr() const;
 +	rtl::OUString getResStr( int resid ) const;
 +
 +protected:
 +
-+	void initialize( sal_Int16, sal_Int16, const rtl::OUString& ) const;
++	void initializeDefault( sal_Int16, sal_Int16, const rtl::OUString& ) const;
 +	void setVisibleDefault( bool ) const;
 +
 +private:

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-dialog-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-dialog-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-dialog-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/dialog.hxx	
-@@ -0,0 +1,228 @@
+@@ -0,0 +1,223 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -9,7 +9,7 @@
 + *
 + *    GNU Lesser General Public License Version 2.1
 + *    =============================================
-+ *    Copyright 2005 by Kohei Yoshida.
++ *    Copyright 2005-2008 by Kohei Yoshida.
 + *    1039 Kingsway Dr., Apex, NC 27502, USA
 + *
 + *    This library is free software; you can redistribute it and/or
@@ -172,7 +172,7 @@
 +	
 +	void setConstraint( const rtl::OUString&, const rtl::OUString&, const Equality );
 +
-+	void showSolveError( const rtl::OUString& );
++	void showMessage( const rtl::OUString& );
 +	void showSolutionInfeasible();
 +	void showSolutionFound();
 +	
@@ -182,8 +182,6 @@
 +
 +	void updateWidgets();
 +
-+	ResMgr& GetResMgr();
-+
 +protected:
 +	
 +	virtual void registerListeners();
@@ -197,9 +195,6 @@
 +
 +	std::auto_ptr<ConstEditDialog> m_pConstEditDialog;
 +	std::auto_ptr<OptionDialog>  m_pOptionDialog;
-+	std::auto_ptr<MessageDialog> m_pSolveErrorDlg;
-+	std::auto_ptr<MessageDialog> m_pSolInfeasibleDlg;
-+	std::auto_ptr<MessageDialog> m_pSolFoundDlg;
 +
 +	// Action Listeners
 +	TopWindowListener* m_pTopWindowListener;

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-cellfuncobj-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-cellfuncobj-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-cellfuncobj-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/cellfuncobj.hxx	
-@@ -0,0 +1,81 @@
+@@ -0,0 +1,83 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,6 +32,7 @@
 +#define _SCSOLVER_NUMERIC_CELLFUNCOBJ_HXX_
 +
 +#include "numeric/funcobj.hxx"
++#include "unoglobal.hxx"
 +#include <memory>
 +#include <vector>
 +#include <string>
@@ -75,7 +76,8 @@
 +private:
 +	CellFuncObj();
 +
-+	std::auto_ptr<CellFuncObjImpl> m_pImpl;
++    ::std::vector<double> mFakeVars;
++    ::std::auto_ptr<CellFuncObjImpl> m_pImpl;
 +};
 +
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-diff-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-diff-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-diff-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/diff.hxx	
-@@ -0,0 +1,61 @@
+@@ -0,0 +1,84 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -38,25 +38,48 @@
 +namespace scsolver { namespace numeric {
 +
 +class BaseFuncObj;
-+class DifferentiateImpl;
 +
-+class FuncObjectNotSet : public std::exception {};
++class FuncObjectNotSet : public ::std::exception {};
 +
-+class Differentiate
++/** 
++ * Algorithm derived from Chapter 4.2 (p.93) of "A First Course In Numerical 
++ * Analysis 2nd ed. by Anthony Ralston and Philip Rabinowitz".
++ */
++class NumericalDiffer
 +{
++    static const double OMEGA;
++
 +public:
-+	Differentiate();
-+	~Differentiate() throw();
++    NumericalDiffer();
++    ~NumericalDiffer() throw();
++
++    void setPrecision(unsigned long n);
++    void setSecondOrder(bool b);
++    void setVariables(const ::std::vector<double>& cnX);
++    void setVarIndex(unsigned long n);
++    void setFuncObject(BaseFuncObj* p);
 +
-+	void setPrecision( unsigned long );
-+	void setSecondOrder( bool );
-+	void setVariables( const std::vector<double>& );
-+	void setVarIndex( unsigned long );
-+	void setFuncObject(BaseFuncObj* pFuncObj);
-+	double run();
++    double run();
++
++private:
++    void initialize();
++    void setDirty();
++    void appendNewH();
++    void setT(unsigned long m, unsigned long i, double fVal);
++    double getT(unsigned long m, unsigned long i);
++    double T0(unsigned long i);
++    double Tm();
++    double Tm(unsigned long m, unsigned long i = 0);
 +
 +private:
-+	std::auto_ptr<DifferentiateImpl> m_pImpl;
++    unsigned long m_nPrec;
++    unsigned long m_nVarIndex;
++    bool m_bSecondOrder;
++    BaseFuncObj* m_pFuncObj;
++
++    ::std::vector<double> m_cnX;
++    ::std::vector<double> m_cnH;
++    ::std::vector< ::std::vector<double> > m_cnT;
 +};
 +
 +}}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-exception-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-exception-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-exception-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -35,31 +35,31 @@
 +
 +namespace scsolver { namespace numeric {
 +
-+class ConstraintError : public std::exception
++class ConstraintError : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw();
 +};
 +
-+class AssertionWrong : public std::exception
++class AssertionWrong : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw();
 +};
 +
-+class ModelInfeasible : public std::exception
++class ModelInfeasible : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw();
 +};
 +
-+class MaxIterationReached : public std::exception
++class MaxIterationReached : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw();
 +};
 +
-+class IterationTimedOut : public std::exception
++class IterationTimedOut : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw();
@@ -69,7 +69,7 @@
 + * This exception is thrown when the caller attempts to retrieve a boundary
 + * value of a decision variable when it's not bounded.
 + */
-+class UnboundedException : public std::exception
++class UnboundedException : public ::std::exception
 +{
 +public:
 +    virtual const char * what() const throw();

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-funcobj-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-funcobj-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-funcobj-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/funcobj.hxx	
-@@ -0,0 +1,64 @@
+@@ -0,0 +1,95 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -46,21 +46,52 @@
 +    virtual ~BaseFuncObj() throw() = 0;
 +
 +    virtual const ::std::vector<double>& getVars() const = 0;
-+
 +    virtual void setVars(const ::std::vector<double>& vars) = 0;
++    virtual void setVar(size_t index, double var) = 0;
++    virtual double eval() = 0;
 +
-+    virtual void setVar(size_t index,  double var) = 0;
++    /**
++     * Return a display-friendly function string. 
++     */
++    virtual const std::string getFuncString() const = 0;
++};
 +
-+    virtual double eval() = 0;
++// --------------------------------------------------------------------------
++
++/** 
++ * Non-linear function object that only has one variable.  Used for a
++ * line-search algorithm.
++ */
++class SingleVarFuncObj
++{
++public:
++    SingleVarFuncObj();
++    virtual ~SingleVarFuncObj() throw() = 0;
++
++    virtual void setVar(double var) = 0;
++    virtual double getVar() const = 0;
++    virtual double eval() const = 0;
++
++    /** 
++     * Return a display-friendly function string (e.g. x^3 + 2*x^2 + 4). 
++     */
++    virtual const ::std::string getFuncString() const = 0;
++
++    double operator()(double var);
 +
 +    /**
-+     * Return a display-friendly function string.
++     * Return a new instance of type BaseFuncObj that wraps this SingleVarFuncObj 
++     * instance inside. Note that the lifetime of the returned instance must not 
++     * go beyond that of the parent class instance.  In the object returned by 
++     * this method, the only variable is at the index position of 0.
 +     * 
-+     * @return std::string
-+     **/
-+    virtual const std::string getFuncString() const = 0;
++     * @return BaseFuncObj* newly instantiated BaseFuncObj instance.  The caller 
++     *         is responsible for managing its lifetime.
++     */
++    BaseFuncObj* toBaseFuncObj();
 +};
 +
++
 +}}
 +
 +#endif

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpbase-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpbase-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpbase-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/lpbase.hxx	
-@@ -0,0 +1,83 @@
+@@ -0,0 +1,85 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,15 +32,17 @@
 +#ifndef _LPBASE_HXX_
 +#define _LPBASE_HXX_
 +
-+#include <numeric/matrix.hxx>
 +#include <memory>
 +
-+namespace scsolver { namespace numeric { namespace lp {
++namespace scsolver { namespace numeric {
++
++class Matrix;
++
++namespace lp {
 +
 +class Model;
 +class BaseAlgorithmImpl;
 +
-+
 +class BaseAlgorithm
 +{
 +public:
@@ -63,8 +65,8 @@
 +	 */
 +	Model* getCanonicalModel() const;
 +	
-+	Matrix getSolution() const;
-+	void setSolution( const Matrix& );
++	::scsolver::numeric::Matrix getSolution() const;
++	void setSolution( const ::scsolver::numeric::Matrix& );
 +
 +	/**
 +     * This method must be called to set a final solution if a canonical model
@@ -75,7 +77,7 @@
 +     * 
 +     * @param mx solution matrix
 +	 */
-+	void setCanonicalSolution( const Matrix& mx );
++	void setCanonicalSolution( const ::scsolver::numeric::Matrix& mx );
 +
 +private:
 +	::std::auto_ptr<BaseAlgorithmImpl> m_pImpl;

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpmodel-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpmodel-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-lpmodel-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/lpmodel.hxx	
-@@ -0,0 +1,120 @@
+@@ -0,0 +1,118 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -36,13 +36,11 @@
 +#include <vector>
 +#include <memory>
 +
-+namespace scsolver { namespace numeric {
++namespace scsolver { namespace numeric { 
 +
 +class Matrix;
 +
-+}}
-+
-+namespace scsolver { namespace numeric { namespace lp {
++namespace lp {
 +
 +
 +class BaseAlgorithm;
@@ -75,13 +73,13 @@
 +	double getCost( size_t rowid ) const;
 +	::scsolver::numeric::Matrix getCostVector() const;
 +	void setCostVectorElement( size_t, double );
-+	void setCostVector( const std::vector<double>& );
++	void setCostVector( const ::std::vector<double>& );
 +
 +	double   getVarBound( size_t, Bound ) const;
 +	void     setVarBound( size_t, Bound, double );
 +	bool isVarBounded( size_t, Bound ) const;
 +
-+	void deleteVariables( const std::vector<size_t>& );
++	void deleteVariables( const ::std::vector<size_t>& );
 +
 +	Goal getGoal() const;
 +	void setGoal( Goal );
@@ -106,9 +104,9 @@
 +	::scsolver::numeric::Matrix getRhsVector() const;
 +	double getRhsValue( size_t ) const;
 +	void setRhsValue( size_t, double );
-+	std::vector<Equality> getEqualityVector() const;
-+	Equality getEquality( size_t ) const;
-+	void addConstraint( const std::vector<double>&, Equality, double );
++	::std::vector< ::scsolver::numeric::Equality > getEqualityVector() const;
++	::scsolver::numeric::Equality getEquality( size_t ) const;
++	void addConstraint( const ::std::vector<double>&, Equality, double );
 +	void setStandardConstraintMatrix( const ::scsolver::numeric::Matrix&, const ::scsolver::numeric::Matrix& );
 +
 +private:

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-matrix-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-matrix-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-matrix-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/numeric/matrix.hxx	
-@@ -0,0 +1,174 @@
+@@ -0,0 +1,186 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -29,10 +29,12 @@
 + ************************************************************************/
 +
 +
-+#ifndef _MATRIX_HXX_
-+#define _MATRIX_HXX_
++#ifndef _SCSOLVER_NUMERIC_MATRIX_HXX_
++#define _SCSOLVER_NUMERIC_MATRIX_HXX_
 +
 +#include <boost/numeric/ublas/matrix.hpp>
++#include <boost/numeric/ublas/matrix_proxy.hpp>
++
 +#include <vector>
 +#include <memory>
 +
@@ -42,37 +44,37 @@
 + * This exception is thrown when an element being accessed is
 + * outside the current matrix boundary.
 + */
-+class BadIndex : public std::exception 
++class BadIndex : public ::std::exception 
 +{
 +public:
 +    virtual const char* what() const throw();
 +};
 +
-+class MatrixSizeMismatch : public std::exception 
++class MatrixSizeMismatch : public ::std::exception 
 +{
 +public:
 +    virtual const char* what() const throw();
 +};
 +
-+class MatrixNotDiagonal : public std::exception
++class MatrixNotDiagonal : public ::std::exception
 +{
 +public:
 +    virtual const char* what() const throw();
 +};
 +
-+class OperationOnEmptyMatrix : public std::exception
++class OperationOnEmptyMatrix : public ::std::exception
 +{
 +public:
 +    virtual const char* what() const throw();
 +};
 +
-+class SingularMatrix : public std::exception
++class SingularMatrix : public ::std::exception
 +{
 +public:
 +    virtual const char* what() const throw();
 +};
 +
-+class NonSquareMatrix : public std::exception
++class NonSquareMatrix : public ::std::exception
 +{
 +public:
 +    virtual const char* what() const throw();
@@ -81,6 +83,10 @@
 +class Matrix
 +{
 +public:
++    typedef ::boost::numeric::ublas::matrix<double, ::boost::numeric::ublas::row_major, ::std::vector<double> > 
++        NumericMatrixType;
++    typedef ::boost::numeric::ublas::matrix< ::std::string > StringMatrixType;
++
 +    Matrix();
 +    Matrix(size_t row, size_t col, bool identity_matrix = false);
 +    Matrix( const Matrix& );
@@ -97,8 +103,16 @@
 +    const double getValue(size_t row, size_t col) const;
 +    double& getValue(size_t row, size_t col);
 +    void setValue(size_t row, size_t col, double val);
-+    ::boost::numeric::ublas::matrix< ::std::string > getDisplayElements(int prec, size_t colspace, bool formula) const;    
-+    void print( size_t = 2, size_t = 1 ) const;
++
++    StringMatrixType getDisplayElements(int prec, size_t colspace, bool formula) const;    
++
++    /**
++     * Print the content of a matrix in to standard output. 
++     *  
++     * @param prec desired precision
++     * @param colspace desired column space for each column.
++     */
++    void print(size_t prec = 2, size_t colspace = 1) const;
 +    
 +    Matrix getColumn(size_t col);
 +    Matrix getRow(size_t row);
@@ -108,9 +122,6 @@
 +    void deleteRow( size_t );
 +    void deleteRows( const std::vector<size_t>& );
 +    
-+    const Matrix adj() const;
-+    double cofactor( size_t, size_t ) const;
-+
 +    /**
 +     * This method calculates the determinant of a square matrix. 
 +     * It throws a NonSquareMatrix exception of the matrix being 
@@ -161,12 +172,13 @@
 +    bool operator!=( const Matrix& ) const;
 +    
 +private:
-+
++    const Matrix adj() const;
++    double cofactor( size_t, size_t ) const;
 +    void maybeExpand(size_t row, size_t col);
 +    void throwIfEmpty() const;
 +
 +    bool m_bResizable;
-+    ::boost::numeric::ublas::matrix<double, ::boost::numeric::ublas::row_major, std::vector<double> > m_aArray;
++    NumericMatrixType m_aArray;
 +};
 +
 +const Matrix operator+( const Matrix&, double );

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-polyeqnsolver-hxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-polyeqnsolver-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,95 @@
+--- /dev/null	
++++ scsolver/source/inc/numeric/polyeqnsolver.hxx	
+@@ -0,0 +1,92 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef _SCSOLVER_NUMERIC_POLYEQNSOLVER_HXX_
++#define _SCSOLVER_NUMERIC_POLYEQNSOLVER_HXX
++
++#include <list>
++#include <exception>
++
++namespace scsolver { namespace numeric {
++
++class Matrix;
++
++class NotEnoughDataPoints : public ::std::exception 
++{
++public:
++    virtual const char* what() const throw();
++};
++
++struct DataPoint
++{
++    double X;
++    double Y;
++
++    DataPoint(double x, double y);
++};
++
++/**
++ * This class is used to solve a polynomial equation of an arbitrary degree
++ * based on a set of data points.  It returns an array of coefficients from 
++ * the lowest order to highest, and the order of the equation equals the 
++ * number of data points minus 1 e.g. if two data points are given, the 
++ * equation to be solved will be linear, if three data points are given, the 
++ * equation will be quadratic, and so on.
++ */
++class PolyEqnSolver
++{
++public:
++    PolyEqnSolver();
++    ~PolyEqnSolver() throw();
++
++    void addDataPoint(double x, double y);
++    const Matrix solve();
++    void clear();
++    size_t size() const;
++
++private:
++    ::std::list<DataPoint> m_DataPoints;
++};
++
++//--------------------------------------------------------------------
++
++/**
++ * Calculate the peak position of a quadratic equation.  The quadratic 
++ * equation must be specified in terms of a set of three coefficients: A, B 
++ * and C as in f(x) = Ax^2 + Bx + C, and they must be given as a column matrix 
++ * of (C, B, A) (note the reverse order). 
++ *  
++ * @param x the x position of the quadratic peak
++ * @param y the y value at the quadratic peak
++ * @param coef = (C, B, A) as in f(x) = Ax^2 + Bx + C.  Note that the order of
++ *             the coefficients are from the x^0 term toward x^2.
++ */
++void getQuadraticPeak(double& x, double& y, const Matrix& coef);
++
++}}
++
++#endif

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-quadfitlinesearch-hxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-numeric-quadfitlinesearch-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,61 @@
+--- /dev/null	
++++ scsolver/source/inc/numeric/quadfitlinesearch.hxx	
+@@ -0,0 +1,58 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef _SCSOLVER_NUMERIC_QUADFIT_LINESEARCH_HXX_
++#define _SCSOLVER_NUMERIC_QUADFIT_LINESEARCH_HXX_
++
++namespace scsolver { namespace numeric {
++
++class SingleVarFuncObj;
++
++class QuadFitLineSearch
++{
++public:
++    enum GoalType
++    {
++        MAXIMIZE,
++        MINIMIZE
++    };
++
++    explicit QuadFitLineSearch(SingleVarFuncObj* pFuncObj);
++    ~QuadFitLineSearch() throw();
++
++    void setGoal(QuadFitLineSearch::GoalType goal);
++
++    bool solve();
++
++private:
++    SingleVarFuncObj* mpFuncObj;
++    QuadFitLineSearch::GoalType m_eGoal;
++};
++
++}}
++
++#endif

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-resmgr-hxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-resmgr-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,170 @@
+--- /dev/null	
++++ scsolver/source/inc/resmgr.hxx	
+@@ -0,0 +1,167 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef _SCSOLVER_UI_RESMGR_HXX_
++#define _SCSOLVER_UI_RESMGR_HXX_
++
++#include <com/sun/star/uno/XComponentContext.hpp>
++#include <com/sun/star/resource/XStringResourceManager.hpp>
++#include "rtl/ustring.hxx"
++
++#include <vector>
++
++namespace com { namespace sun { namespace star { 
++    namespace lang {
++        struct Locale;
++    }
++    namespace ucb {
++        class XSimpleFileAccess;
++    }
++}}}
++
++namespace scsolver {
++
++class CalcInterface;
++
++class StringResMgr
++{
++public:
++    struct Entry
++    {
++        ::rtl::OUString Name;
++        ::rtl::OUString Value;
++    };
++
++    StringResMgr(CalcInterface* pCalc);
++    ~StringResMgr();
++
++    /** 
++     * Get current system locale. 
++     * 
++     * @return const ::rtl::OUString current system locale, or empty string if
++     *         it is unknown.
++     */
++    const ::rtl::OUString getSystemLocaleString() const;
++
++    const ::com::sun::star::lang::Locale getSystemLocale() const;
++
++    /** 
++     * Get a localized string from a numeric resource ID.  Internally this 
++     * method maps the numeric resource ID with an associated string resource 
++     * name. 
++     * 
++     * @param resid resource ID
++     * 
++     * @return ::rtl::OUString
++     */
++    const ::rtl::OUString getLocaleStr(int resid);
++
++    const ::rtl::OUString getLocaleStr(const ::rtl::OUString& resName);
++
++private:
++    struct PropertiesFile
++    {
++        ::rtl::OUString FilePath;
++        ::com::sun::star::lang::Locale Locale;
++    };
++
++    void init();
++
++    ::rtl::OUString getResNameByID(int resid);
++
++    /** 
++     * Load locale strings from embedded translation file based on current
++     * system locale.
++     */
++    void loadStrings();
++
++    void loadStrings(const PropertiesFile& propFile);
++
++    void getPropertiesFiles(::std::vector<PropertiesFile>& files);
++
++    void parsePropertiesStream(const ::com::sun::star::uno::Sequence<sal_Int8>& bytes,
++                               ::std::vector<Entry>& rEntries);
++
++    ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
++        getSimpleFileAccess();
++
++private:
++    ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager >
++        mxStrResMgr;
++    ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess >
++        mxFileAccess;
++    CalcInterface* mpCalc;
++    ::rtl::OUString msBaseTransDirPath;
++    ::std::vector< ::rtl::OUString > mResNameMapper;
++    bool mbStringLoaded:1;
++};
++
++// ---------------------------------------------------------------------------
++
++class PropStreamParser
++{
++public:
++
++    PropStreamParser(const ::com::sun::star::uno::Sequence<sal_Int8>& bytes);
++    ~PropStreamParser();
++
++    /** 
++     * Parse a string line like this:
++     * 
++     * 23.DialogName.WidgetName.Label=This is text label
++     * 
++     * The first numerical segment must be ignored.  A comment begins with a
++     * '#' and all characters after it will be ignored until it reaches the
++     * linefeed.
++     */
++    void parse();
++    void getEntries(::std::vector<StringResMgr::Entry>& rEntries) const;
++
++private:
++    PropStreamParser();
++
++    void advanceToLinefeed(sal_Int32& i) const;
++    void purgeBuffer(::rtl::OUString& rValue, ::std::vector<sal_Char>& rBuf) const;
++    void pushEntry(const ::rtl::OUString& name, const ::rtl::OUString& value);
++
++private:
++    const ::com::sun::star::uno::Sequence<sal_Int8>& mrBytes;
++    ::std::vector<StringResMgr::Entry> mEntries;
++};
++
++
++
++
++
++
++
++
++
++
++}
++
++#endif

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-scsolver-hrc.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-scsolver-hrc.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,46 @@
+--- /dev/null	
++++ scsolver/source/inc/scsolver.hrc	
+@@ -0,0 +1,43 @@
++#ifndef SCSOLVER_HRC
++#define SCSOLVER_HRC
++
++#define SCSOLVER_RES_START 1000
++
++#define SCSOLVER_STR_MAINDLG_TITLE                (SCSOLVER_RES_START)
++#define SCSOLVER_STR_DEFINE_MODEL                 (SCSOLVER_RES_START+1)
++#define SCSOLVER_STR_SET_TARGET_CELL              (SCSOLVER_RES_START+2)
++#define SCSOLVER_STR_GOAL                         (SCSOLVER_RES_START+3)
++#define SCSOLVER_STR_MAXIMIZE                     (SCSOLVER_RES_START+4)
++#define SCSOLVER_STR_MINIMIZE                     (SCSOLVER_RES_START+5)
++#define SCSOLVER_STR_DECISIONVAR_CELLS            (SCSOLVER_RES_START+6)
++#define SCSOLVER_STR_CONSTRAINT_SEP               (SCSOLVER_RES_START+7)
++#define SCSOLVER_STR_CONSTRAINTDLG_TITLE          (SCSOLVER_RES_START+8)
++#define SCSOLVER_STR_CELL_REFERENCE               (SCSOLVER_RES_START+9)
++#define SCSOLVER_STR_CONSTRAINT                   (SCSOLVER_RES_START+10)
++#define SCSOLVER_STR_BTN_OK                       (SCSOLVER_RES_START+11)
++#define SCSOLVER_STR_BTN_CANCEL                   (SCSOLVER_RES_START+12)
++#define SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH   (SCSOLVER_RES_START+13)
++#define SCSOLVER_STR_BTN_ADD                      (SCSOLVER_RES_START+14)
++#define SCSOLVER_STR_BTN_CHANGE                   (SCSOLVER_RES_START+15)
++#define SCSOLVER_STR_BTN_DELETE                   (SCSOLVER_RES_START+16)
++#define SCSOLVER_STR_BTN_SOLVE                    (SCSOLVER_RES_START+17)
++#define SCSOLVER_STR_BTN_RESET                    (SCSOLVER_RES_START+18)
++#define SCSOLVER_STR_BTN_OPTIONS                  (SCSOLVER_RES_START+19)
++#define SCSOLVER_STR_BTN_SAVE_MODEL               (SCSOLVER_RES_START+20)
++#define SCSOLVER_STR_BTN_LOAD_MODEL               (SCSOLVER_RES_START+21)
++#define SCSOLVER_STR_BTN_CLOSE                    (SCSOLVER_RES_START+22)
++#define SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND       (SCSOLVER_RES_START+23)
++#define SCSOLVER_STR_MSG_SOLUTION_FOUND           (SCSOLVER_RES_START+24)
++#define SCSOLVER_STR_MSG_CELL_GEOMETRIES_DIFFER   (SCSOLVER_RES_START+25)
++#define SCSOLVER_STR_MSG_MAX_ITERATION_REACHED    (SCSOLVER_RES_START+26)
++#define SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT     (SCSOLVER_RES_START+27)
++#define SCSOLVER_STR_MSG_ITERATION_TIMED_OUT      (SCSOLVER_RES_START+28)
++#define SCSOLVER_STR_MSG_GOAL_NOT_SET             (SCSOLVER_RES_START+29)
++#define SCSOLVER_STR_OPTIONDLG_TITLE              (SCSOLVER_RES_START+30)
++#define SCSOLVER_STR_OPTION_ASSUME_LINEAR         (SCSOLVER_RES_START+31)
++#define SCSOLVER_STR_OPTION_VAR_POSITIVE          (SCSOLVER_RES_START+32)
++#define SCSOLVER_STR_OPTION_VAR_INTEGER           (SCSOLVER_RES_START+33)
++#define SCSOLVER_STR_TARGET_NOT_SET               (SCSOLVER_RES_START+34)
++#define SCSOLVER_STR_DECISIONVAR_NOT_SET          (SCSOLVER_RES_START+35)
++
++#endif

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-solver-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-solver-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-solver-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/solver.hxx	
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,180 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,7 +32,6 @@
 +#ifndef _SOLVER_HXX_
 +#define _SOLVER_HXX_
 +
-+#include <tools/resmgr.hxx>
 +#include <cppuhelper/implbase6.hxx>
 +#include <com/sun/star/lang/XInitialization.hpp>
 +#include <com/sun/star/frame/XNotifyingDispatch.hpp>
@@ -42,15 +41,19 @@
 +
 +#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
 +
++#include "tool/global.hxx"
 +#include "type.hxx"
 +#include <vector>
 +#include <memory>
 +
-+#define	SERVICE_NAME		"org.openoffice.sc.solver.Solver"
-+#define	IMPLEMENTATION_NAME	"scsolver.SolverImpl"
++#ifdef SCSOLVER_UNO_COMPONENT
++class ResMgr;
++#else
++#include <tools/resmgr.hxx>
++#endif
 +
-+using namespace ::com::sun::star;
-+using namespace ::com::sun::star::uno;
++#define	SERVICE_NAME		"org.go-oo.CalcSolver"
++#define	IMPLEMENTATION_NAME	"scsolver.SolverImpl"
 +
 +namespace com { namespace sun { namespace star { 
 +	
@@ -75,61 +78,66 @@
 +class CalcInterface;
 +class OptionData;
 +class SolverDialog;
++class StringResMgr;
 +
 +//--------------------------------------------------------------------------
 +// SolverImpl
 +
 +class SolverImpl : public ::cppu::WeakImplHelper6<
-+        ::com::sun::star::ui::dialogs::XExecutableDialog,
-+		lang::XServiceInfo, lang::XInitialization,
-+        frame::XDispatchProvider, frame::XNotifyingDispatch,
-+	    lang::XLocalizable>
++    ::com::sun::star::ui::dialogs::XExecutableDialog,
++    ::com::sun::star::lang::XServiceInfo, 
++    ::com::sun::star::lang::XInitialization,
++    ::com::sun::star::frame::XDispatchProvider,
++    ::com::sun::star::frame::XNotifyingDispatch,
++    ::com::sun::star::lang::XLocalizable >
 +{
 +public:
 +
-+    SolverImpl( Reference< uno::XComponentContext > const & );
++    SolverImpl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext);
 +    ~SolverImpl();
 +
-+	//--------------------------------------------------------------------------
-+	// UNO Component Interface Methods
++    //--------------------------------------------------------------------------
++    // UNO Component Interface Methods
 +
 +    // XInitialization
-+    virtual void SAL_CALL initialize( const Sequence< Any >& aArgs )
-+        throw ( Exception );
++    virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArgs )
++        throw (::com::sun::star::uno::Exception);
 +
 +    // XServiceInfo
 +    virtual rtl::OUString SAL_CALL getImplementationName()
-+        throw ( RuntimeException );
++        throw (::com::sun::star::uno::RuntimeException);
 +    virtual sal_Bool SAL_CALL supportsService( rtl::OUString const & )
-+        throw ( RuntimeException );
-+    virtual Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
-+        throw ( RuntimeException );
++        throw (::com::sun::star::uno::RuntimeException);
++    virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
++        throw (::com::sun::star::uno::RuntimeException);
 +
 +    // XDispatchProvider
-+    virtual Reference< frame::XDispatch > SAL_CALL queryDispatch( 
-+        const util::URL&, const ::rtl::OUString &, sal_Int32 )
-+        throw ( RuntimeException );
++    virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( 
++        const ::com::sun::star::util::URL&, const ::rtl::OUString &, sal_Int32 )
++        throw (::com::sun::star::uno::RuntimeException);
 +        
-+    virtual Sequence< Reference< frame::XDispatch > > SAL_CALL queryDispatches(
-+        const Sequence< frame::DispatchDescriptor >& )
-+        throw ( RuntimeException );
++    virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL 
++        queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& )
++        throw (::com::sun::star::uno::RuntimeException);
 +        
 +    // XDispatch
-+    virtual void SAL_CALL dispatch( const util::URL&, const Sequence< beans::PropertyValue >& )
-+        throw( RuntimeException );
++    virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL&, 
++                                    const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& )
++        throw(::com::sun::star::uno::RuntimeException);
 +        
-+    virtual void SAL_CALL addStatusListener( const Reference< frame::XStatusListener >&, 
-+		const util::URL& ) throw ( RuntimeException );
++    virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >&, 
++		const ::com::sun::star::util::URL& ) 
++        throw (::com::sun::star::uno::RuntimeException);
 +        
 +    virtual void SAL_CALL removeStatusListener( 
-+		const Reference< frame::XStatusListener >&, const util::URL& )
-+        throw ( RuntimeException );
++		const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >&, const ::com::sun::star::util::URL& )
++        throw (::com::sun::star::uno::RuntimeException);
 +
 +    // XNotifyingDispatch
 +    virtual void SAL_CALL dispatchWithNotification( 
-+        const util::URL&, const Sequence< beans::PropertyValue >&, 
-+		const Reference< frame::XDispatchResultListener >& )
-+        throw ( RuntimeException );
++        const ::com::sun::star::util::URL&, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&, 
++		const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& )
++        throw (::com::sun::star::uno::RuntimeException);
 +
 +    // XExecutableDialog
 +	virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
@@ -149,18 +157,22 @@
 +	SolverDialog* getMainDialog();
 +
 +	sal_Bool solveModel();
-+
-+	ResMgr* getResMgr();
-+	rtl::OUString getResStr( int resid );
++    rtl::OUString getResStr( int resid );
 +
 +private:
 +
-+	void initLocale();
-+	ResMgr *m_pResMgr;
-+	com::sun::star::lang::Locale m_eLocale;
-+	::std::auto_ptr<SolverDialog> m_pDlg;
-+	::std::auto_ptr<CalcInterface> m_pCalc;
-+	::std::auto_ptr<OptionData> m_pOption;
++#ifndef SCSOLVER_UNO_COMPONENT
++    ResMgr* getResMgr();
++    ResMgr *m_pResMgr;
++#endif
++
++    void initLocale();
++
++    com::sun::star::lang::Locale    m_eLocale;
++    ::std::auto_ptr<SolverDialog>   m_pDlg;
++    ::std::auto_ptr<CalcInterface>  m_pCalc;
++    ::std::auto_ptr<OptionData>     m_pOption;
++    ::std::auto_ptr<StringResMgr>   m_pStringResMgr;
 +};
 +
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-tool-global-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-tool-global-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-tool-global-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/inc/tool/global.hxx	
-@@ -0,0 +1,64 @@
+@@ -0,0 +1,76 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -35,7 +35,19 @@
 +#include <iterator>
 +#include <iostream>
 +
-+#define SCSOLVER_DEBUG 1
++#define SCSOLVER_DEBUG 0
++
++#define REWRITE_FOR_SUN_STUDIO_COMPILER 1
++
++#if defined(SCSOLVER_UNO_COMPONENT) || defined(SCSOLVER_UNITTEST)
++
++#ifndef OSL_ASSERT
++#define OSL_ASSERT assert
++#endif
++
++#else
++#include <osl/diagnose.h>
++#endif
 +
 +namespace {
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-unoglobal-hxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-unoglobal-hxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-inc-unoglobal-hxx.diff	Fri Feb 22 01:23:07 2008
@@ -32,18 +32,18 @@
 +#ifndef _UNOGLOBAL_HXX_
 +#define _UNOGLOBAL_HXX_
 +
++#include <sal/config.h>
 +#include <cppuhelper/implementationentry.hxx>
 +#include <vector>
 +#include <string>
 +
-+using namespace com::sun::star;
-+
-+
 +namespace scsolver {
 +
 +void printOUStr( const rtl::OUString & );
 +#define ascii_i18n ascii
-+rtl::OUString ascii( const sal_Char* );
++const ::rtl::OUString ascii(const sal_Char* text);
++const ::com::sun::star::uno::Any asciiAny(const sal_Char* text);
++
 +void split( const rtl::OUString&, const rtl::OUString&, std::vector<rtl::OUString>& );
 +
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-cellfuncobj-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-cellfuncobj-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-cellfuncobj-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/cellfuncobj.cxx	
-@@ -0,0 +1,123 @@
+@@ -0,0 +1,124 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -37,8 +37,10 @@
 +#include <iostream>
 +#include <stdio.h>
 +
-+using namespace std;
 +using com::sun::star::table::CellAddress;
++using ::std::vector;
++using ::std::string;
++using ::std::ostringstream;
 +
 +namespace scsolver { namespace numeric {
 +
@@ -71,8 +73,7 @@
 +const vector<double>& CellFuncObj::getVars() const
 +{
 +    // Does absolutely nothing....
-+    static vector<double> fake;
-+    return fake;
++    return mFakeVars;
 +}
 +
 +void CellFuncObj::setVars(const vector<double>& vars)

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/diff.cxx	
-@@ -0,0 +1,320 @@
+@@ -0,0 +1,223 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -35,63 +35,15 @@
 +#include <stdexcept>
 +#include <cmath>
 +
-+using namespace std;
++using ::std::vector;
++using ::std::cout;
++using ::std::endl;
 +
 +namespace scsolver { namespace numeric {
 +
-+//---------------------------------------------------------------------------
-+// Implementation
++const double NumericalDiffer::OMEGA = 2.0;
 +
-+/** 
-+    Algorithm derived from Chapter 4.2 (p.93) of
-+ 
-+    "A First Course In Numerical Analysis 2nd ed. by Anthony
-+    Ralston and Philip Rabinowitz"
-+ */
-+class DifferentiateImpl
-+{
-+	static double OMEGA;
-+
-+public:
-+	DifferentiateImpl();
-+	~DifferentiateImpl() throw();
-+
-+	void setPrecision( unsigned long );
-+	void setSecondOrder( bool );
-+	void setVariables( const vector<double>& );
-+	void setVarIndex( unsigned long );
-+
-+    void setFuncObject(BaseFuncObj* p)
-+    {
-+    	m_pFuncObj = p;
-+    	setDirty();
-+    }
-+
-+	double run();
-+
-+private:
-+	unsigned long m_nPrec;
-+	unsigned long m_nVarIndex;
-+	bool m_bSecondOrder;
-+    BaseFuncObj* m_pFuncObj;
-+
-+	vector<double> m_cnX;
-+	vector<double> m_cnH;
-+	vector< vector<double> > m_cnT;
-+
-+	void initialize();
-+	void setDirty();
-+	void appendNewH();
-+	void setT( unsigned long, unsigned long, double );
-+	double getT( unsigned long, unsigned long );
-+	double T0( unsigned long );
-+	double Tm();
-+	double Tm( unsigned long, unsigned long = 0 );
-+};
-+
-+double DifferentiateImpl::OMEGA = 2.0;
-+
-+DifferentiateImpl::DifferentiateImpl() : 
++NumericalDiffer::NumericalDiffer() : 
 +	m_nPrec( 2 ), 
 +	m_nVarIndex( 0 ), 
 +	m_bSecondOrder( false ),
@@ -99,28 +51,28 @@
 +{
 +}
 +
-+DifferentiateImpl::~DifferentiateImpl() throw()
++NumericalDiffer::~NumericalDiffer() throw()
 +{
 +}
 +
-+void DifferentiateImpl::setPrecision( unsigned long n )
++void NumericalDiffer::setPrecision( unsigned long n )
 +{
 +	m_nPrec = n;
 +}
 +
-+void DifferentiateImpl::setSecondOrder( bool b )
++void NumericalDiffer::setSecondOrder( bool b )
 +{
 +	m_bSecondOrder = b;
 +	setDirty();
 +}
 +
-+void DifferentiateImpl::setVariables( const vector<double>& cnX )
++void NumericalDiffer::setVariables( const vector<double>& cnX )
 +{
 +	m_cnX = cnX;
 +	setDirty();
 +}
 +
-+void DifferentiateImpl::setVarIndex( unsigned long n )
++void NumericalDiffer::setVarIndex( unsigned long n )
 +{
 +	if ( m_nVarIndex != n )
 +	{
@@ -129,7 +81,13 @@
 +	}
 +}
 +
-+void DifferentiateImpl::initialize()
++void NumericalDiffer::setFuncObject(BaseFuncObj* p)
++{
++    m_pFuncObj = p;
++    setDirty();
++}
++
++void NumericalDiffer::initialize()
 +{
 +	const double fInitH = 0.0512;
 +	m_cnH.clear();
@@ -137,17 +95,17 @@
 +	m_cnH.push_back( fInitH / 3.0 * 2.0 );
 +}
 +
-+void DifferentiateImpl::setDirty()
++void NumericalDiffer::setDirty()
 +{
 +	m_cnT.clear();
 +}
 +
-+void DifferentiateImpl::appendNewH()
++void NumericalDiffer::appendNewH()
 +{
 +	m_cnH.push_back( m_cnH.at( m_cnH.size() - 2 ) / 2.0 );
 +}
 +
-+void DifferentiateImpl::setT( unsigned long m, unsigned long i, double fVal )
++void NumericalDiffer::setT( unsigned long m, unsigned long i, double fVal )
 +{
 +	size_t nTSize = m_cnT.size();
 +	if ( nTSize < m + 1 )
@@ -166,7 +124,7 @@
 +	cnRow.at( i ) = fVal;
 +}
 +
-+double DifferentiateImpl::getT( unsigned long m, unsigned long i )
++double NumericalDiffer::getT( unsigned long m, unsigned long i )
 +{
 +	if ( m_cnT.empty() || m_cnT.size() - 1 < m )
 +		throw std::out_of_range( "" );
@@ -178,52 +136,46 @@
 +	return cnRow.at( i );
 +}
 +
-+double DifferentiateImpl::T0( unsigned long i )
++double NumericalDiffer::T0( unsigned long i )
 +{
-+	vector<double> cnX( m_cnX );
-+
-+	double fXOrig = cnX.at( m_nVarIndex );
++	double fXOrig = m_cnX.at(m_nVarIndex);
 +	double fVal = 0.0;
-+	double fH = m_cnH.at( i );
++	double fH = m_cnH.at(i);
++    m_pFuncObj->setVars(m_cnX);
 +
-+	if ( m_bSecondOrder )
++	if (m_bSecondOrder)
 +	{
-+		cnX.at( m_nVarIndex ) = fXOrig + fH;
-+        m_pFuncObj->setVars(cnX);
++        m_pFuncObj->setVar(m_nVarIndex, fXOrig + fH);
 +        fVal = m_pFuncObj->eval();
-+		cnX.at( m_nVarIndex ) = fXOrig;
-+        m_pFuncObj->setVars(cnX);
++        m_pFuncObj->setVar(m_nVarIndex, fXOrig);
 +		fVal -= 2.0*m_pFuncObj->eval();
-+		cnX.at( m_nVarIndex ) = fXOrig - fH;
-+        m_pFuncObj->setVars(cnX);
++        m_pFuncObj->setVar(m_nVarIndex, fXOrig - fH);
 +		fVal += m_pFuncObj->eval();
 +		fVal /= fH*fH;
 +	}
 +	else
 +	{
-+		cnX.at( m_nVarIndex ) = fXOrig + fH;
-+        m_pFuncObj->setVars(cnX);
++        m_pFuncObj->setVar(m_nVarIndex, fXOrig + fH);
 +		fVal = m_pFuncObj->eval();
-+		cnX.at( m_nVarIndex ) = fXOrig - fH;
-+        m_pFuncObj->setVars(cnX);
++        m_pFuncObj->setVar(m_nVarIndex, fXOrig - fH);
 +		fVal -= m_pFuncObj->eval();
 +		fVal /= 2.0*fH;
 +	}
-+	setT( 0, i, fVal );
 +
++	setT(0, i, fVal);
 +	return fVal;
 +}
 +
-+double DifferentiateImpl::Tm()
++double NumericalDiffer::Tm()
 +{
 +	unsigned long m = m_cnH.size() - 1;
 +	return Tm( m );
 +}
 +
-+double DifferentiateImpl::Tm( unsigned long m, unsigned long i )
++double NumericalDiffer::Tm( unsigned long m, unsigned long i )
 +{
 +	if ( m_cnH.empty() )
-+		throw exception();
++		throw ::std::exception();
 +
 +	try
 +	{
@@ -238,13 +190,13 @@
 +
 +	double fT1 = Tm( m-1, i+1 );
 +	double fT2 = Tm( m-1, i );
-+	double fVal = fT1 + ( fT1 - fT2 ) / ( pow( m_cnH.at( i )/m_cnH.at( i+m ), DifferentiateImpl::OMEGA ) - 1 );
++	double fVal = fT1 + ( fT1 - fT2 ) / ( pow( m_cnH.at( i )/m_cnH.at( i+m ), NumericalDiffer::OMEGA ) - 1 );
 +	setT( m, i, fVal );
 +
 +	return fVal;
 +}
 +
-+double DifferentiateImpl::run()
++double NumericalDiffer::run()
 +{
 +	if ( m_pFuncObj == NULL )
 +		throw FuncObjectNotSet();
@@ -267,56 +219,7 @@
 +		fOldVal = fVal;
 +	}
 +	
-+	throw std::exception();
-+
-+	return 0.0;
-+}
-+
-+//---------------------------------------------------------------------------
-+// Public Interface
-+
-+Differentiate::Differentiate() : m_pImpl( new DifferentiateImpl )
-+{
-+}
-+
-+Differentiate::~Differentiate() throw()
-+{
-+}
-+
-+void Differentiate::setPrecision( unsigned long n )
-+{
-+	m_pImpl->setPrecision( n );
-+}
-+
-+void Differentiate::setSecondOrder( bool b )
-+{
-+	m_pImpl->setSecondOrder( b );
-+}
-+
-+void Differentiate::setVariables( const vector<double>& cnX )
-+{
-+	m_pImpl->setVariables( cnX );
-+}
-+
-+/** Set an variable index with respect of which to differentiate.  For example,
-+	an index of 0 will differentiate with respect to the first variable, and an
-+	index of 1 will with respect to the second, and so on.
-+
-+	@param nIndex variable index
-+ */
-+void Differentiate::setVarIndex( unsigned long nIndex )
-+{
-+	m_pImpl->setVarIndex( nIndex );
-+}
-+
-+void Differentiate::setFuncObject(BaseFuncObj* p)
-+{
-+	m_pImpl->setFuncObject( p );
-+}
-+
-+double Differentiate::run()
-+{
-+	return m_pImpl->run();
++    throw ::std::exception();
 +}
 +
 +}}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff_test-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff_test-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-diff_test-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/diff_test.cxx	
-@@ -0,0 +1,110 @@
+@@ -0,0 +1,217 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -28,72 +28,179 @@
 + *
 + ************************************************************************/
 +
-+#include <numeric/diff.hxx>
-+#include <numeric/funcobj.hxx>
++#include "numeric/diff.hxx"
++#include "numeric/funcobj.hxx"
 +#include <vector>
 +#include <string>
 +#include <iostream>
-+#include <boost/shared_ptr.hpp>
++#include <cmath>
++#include <memory>
 +
-+using namespace std;
++using ::std::vector;
++using ::std::cout;
++using ::std::endl;
 +using namespace scsolver::numeric;
-+using namespace boost;
 +
-+class TestFunc : public BaseFuncObj
++class TestFailed {};
++
++class BaseTestFunc : public BaseFuncObj
 +{
 +public:
-+	virtual string getFuncString() const
-+	{
-+		string s( "f(x) = 2x^2 + 5x" );
-+		return s;
-+	}
++    virtual ~BaseTestFunc() throw() {}
++    virtual double evalDef1() const = 0;
++    virtual double evalDef2() const = 0;
++};
++
++class TestFunc : public BaseTestFunc
++{
++public:
++
++    virtual ~TestFunc() throw()
++    {
++    }
 +
-+	virtual double operator()( const std::vector<double>& cnX ) const
++	virtual const string getFuncString() const
 +	{
-+		double x = cnX.at( 0 );
-+		return 2.0*x*x + 5.0*x;
++		return string("f(x) = 2x^2 + 5x");
 +	}
++
++    virtual const vector<double>& getVars() const
++    {
++        return m_Vars;
++    }
++
++    virtual void setVars(const vector<double>& vars)
++    {
++        vector<double> tmp(vars);
++        m_Vars.swap(tmp);
++    }
++
++    virtual void setVar(size_t index, double var)
++    {
++        m_Vars.at(index) = var;
++    }
++
++    virtual double eval()
++    {
++		double x = m_Vars.at(0);
++        return (2*x + 5)*x;
++    }
++
++    virtual double evalDef1() const
++    {
++        double x = m_Vars.at(0);
++        return 4*x + 5;
++    }
++
++    virtual double evalDef2() const
++    {
++        return 4;
++    }
++
++private:
++    vector<double> m_Vars;
 +};
 +
-+class TestFunc2 : public BaseFuncObj
++class TestFunc2 : public BaseTestFunc
 +{
 +public:
-+	virtual string getFuncString() const
++    virtual ~TestFunc2() throw()
++    {
++    }
++
++	virtual const string getFuncString() const
 +	{
-+		string s( "f(x) = 2x^3 + 5x^2 - 2x" );
-+		return s;
++		return string("f(x) = 2x^3 + 5x^2 - 2x");
 +	}
 +
-+	virtual double operator()( const std::vector<double>& cnX ) const
++	virtual double eval()
 +	{
-+		double x = cnX.at( 0 );
-+		return 2.0*x*x*x + 5.0*x*x - 2.0*x;
++        // ( (2*x + 5) * x - 2)*x
++		double x = m_Vars.at( 0 );
++        double f = ((2*x + 5)*x - 2)*x;
++        return f;
 +	}
++
++    virtual double evalDef1() const
++    {
++        // 6x^2 + 10x - 2 = (6x + 10) * x - 2
++        double x = m_Vars.at(0);
++        double f = (6*x + 10) * x - 2;
++        return f;
++    }
++
++    virtual double evalDef2() const
++    {
++        double x = m_Vars.at(0);
++        return 12*x + 10;
++    }
++
++    virtual const vector<double>& getVars() const
++    {
++        return m_Vars;
++    }
++
++    virtual void setVars(const vector<double>& vars)
++    {
++        vector<double> tmp(vars);
++        m_Vars.swap(tmp);
++    }
++
++    virtual void setVar(size_t index, double var)
++    {
++        m_Vars.at(index) = var;
++    }
++
++private:
++    vector<double> m_Vars;
 +};
 +
-+void test( const shared_ptr<BaseFuncObj>& pF )
++void checkDelta(double delta)
++{
++    cout << "delta = " << delta << endl;
++    if (delta > 0.05)
++        throw TestFailed();
++}
++
++void test(BaseTestFunc* pF)
 +{
-+	vector<double> cnX;
-+	cnX.push_back( 1.0 );
-+	shared_ptr<Differentiate> pDiff( new Differentiate );
-+	pDiff->setVariables( cnX );
-+	pDiff->setPrecision( 5 );
-+	pDiff->setFuncObject( pF );
-+	double fAns = pDiff->run();
-+	cout << fAns << endl;
-+	pDiff->setSecondOrder( true );
-+	fAns = pDiff->run();
-+	cout << fAns << endl;
++    static const double vars[] = {0, 1.5, 10.0, 20.5, 50.0};
++    for (int i = 0; i < 5; ++i)
++    {
++        double var = vars[i];
++        cout << "----------------------------------------" << endl;
++        cout << " x = " << var << endl;
++        vector<double> cnX;
++        cnX.push_back(var);
++        auto_ptr<NumericalDiffer> pDiff( new NumericalDiffer );
++        pDiff->setVariables( cnX );
++        pDiff->setPrecision(5);
++        pDiff->setFuncObject(pF);
++        double answer = pDiff->run();
++        double delta = fabs(answer - pF->evalDef1())/fabs(answer);
++        checkDelta(delta);
++        
++        pDiff->setSecondOrder(true);
++        answer = pDiff->run();
++        delta = (answer - pF->evalDef2())/answer;
++        checkDelta(delta);
++    }
 +}
 +
 +int main()
 +{
-+// 	TestFunc oF;
-+	shared_ptr<TestFunc> pF( new TestFunc );
-+	test( pF );
-+	shared_ptr<TestFunc2> pF2( new TestFunc2 );
-+// 	TestFunc2 oF2;
-+	test( pF2 );
++    try
++    {
++        auto_ptr<TestFunc> pF( new TestFunc );
++        test(pF.get());
++        auto_ptr<TestFunc2> pF2( new TestFunc2 );
++        test(pF2.get());
++        cout << "Test passed!" << endl;
++    }
++    catch (const TestFailed& )
++    {
++        cout << "Test failed" << endl;
++    }
 +}
 +
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-funcobj-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-funcobj-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-funcobj-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/funcobj.cxx	
-@@ -0,0 +1,43 @@
+@@ -0,0 +1,125 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -29,6 +29,11 @@
 + ************************************************************************/
 +
 +#include "numeric/funcobj.hxx"
++#include <vector>
++#include <string>
++
++using ::std::vector;
++using ::std::string;
 +
 +namespace scsolver { namespace numeric {
 +
@@ -43,4 +48,81 @@
 +{
 +}
 +
++// --------------------------------------------------------------------------
++
++/**
++ * Class that wraps an instance of class SinglVarFuncObj in case one needs to 
++ * pass the instance as type BaseFuncObj.  The lifetime of this class instance 
++ * must end before the enclosed class instance.
++ */
++class SingleBaseFuncObj : public BaseFuncObj
++{
++public:
++    explicit SingleBaseFuncObj(SingleVarFuncObj* pFuncObj) :
++        mpFuncObj(pFuncObj)
++    {
++        mVars.push_back(pFuncObj->getVar());
++    }
++
++    virtual ~SingleBaseFuncObj() throw()
++    {
++    }
++
++    virtual double eval()
++    {
++        return mpFuncObj->eval();
++    }
++
++    virtual const string getFuncString() const
++    {
++        return mpFuncObj->getFuncString();
++    }
++
++    virtual const vector<double> & getVars() const
++    {
++        return mVars;
++    }
++
++    virtual void setVar(size_t index, double var)
++    {
++        if (index != 0)
++            return;
++
++        mpFuncObj->setVar(var);
++        mVars[0] = var;
++    }
++
++    virtual void setVars(const::std::vector<double> &vars)
++    {
++        if ( vars.empty() )
++            return;
++
++        mpFuncObj->setVar(vars[0]);
++        mVars[0] = vars[0];
++    }
++
++private:
++    SingleVarFuncObj* mpFuncObj;
++    vector<double> mVars;
++};
++
++SingleVarFuncObj::SingleVarFuncObj()
++{
++}
++
++SingleVarFuncObj::~SingleVarFuncObj() throw()
++{
++}
++
++double SingleVarFuncObj::operator()(double var)
++{
++    setVar(var);
++    return eval();
++}
++
++BaseFuncObj* SingleVarFuncObj::toBaseFuncObj()
++{
++    return new SingleBaseFuncObj(this);
++}
++
 +}}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpbase-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpbase-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpbase-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/lpbase.cxx	
-@@ -0,0 +1,269 @@
+@@ -0,0 +1,273 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -31,12 +31,16 @@
 +
 +#include "numeric/lpbase.hxx"
 +#include "numeric/lpmodel.hxx"
++#include "numeric/matrix.hxx"
 +#include <list>
 +#include <vector>
 +#include <cstddef>
 +#include "tool/global.hxx"
 +
-+using namespace std;
++using ::std::vector;
++using ::std::list;
++using ::std::cout;
++using ::std::endl;
 +
 +namespace scsolver { namespace numeric { namespace lp {
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpmodel-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpmodel-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpmodel-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/lpmodel.cxx	
-@@ -0,0 +1,675 @@
+@@ -0,0 +1,680 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -28,7 +28,6 @@
 + *
 + ************************************************************************/
 +
-+#include <osl/diagnose.h>
 +
 +#include "numeric/lpmodel.hxx"
 +#include "numeric/lpbase.hxx"
@@ -40,14 +39,20 @@
 +#include <algorithm>
 +#include <vector>
 +#include <map>
-+#include <boost/numeric/ublas/matrix.hpp>
 +
-+using namespace std;
++using ::std::vector;
++using ::std::string;
++using ::std::map;
++using ::std::cout;
++using ::std::endl;
++using ::std::ostringstream;
 +using ::scsolver::numeric::Matrix;
++using ::std::distance;
++using ::std::find;
 +
 +namespace scsolver { namespace numeric { namespace lp {
 +
-+class NonBoundingException : public std::exception
++class NonBoundingException : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw()

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsimplex-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsimplex-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsimplex-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/lpsimplex.cxx	
-@@ -0,0 +1,1562 @@
+@@ -0,0 +1,1565 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -42,7 +42,10 @@
 +#include <map>
 +#include <list>
 +
-+using namespace std;
++using ::std::vector;
++using ::std::string;
++using ::std::cout;
++using ::std::endl;
 +	
 +namespace scsolver { namespace numeric { namespace lp {
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsolve-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsolve-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-lpsolve-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/lpsolve.cxx	
-@@ -0,0 +1,201 @@
+@@ -0,0 +1,206 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,6 +32,7 @@
 +#include "numeric/lpsolve.hxx"
 +#include "numeric/lpmodel.hxx"
 +#include "numeric/exception.hxx"
++#include "numeric/matrix.hxx"
 +#include "unoglobal.hxx"
 +#include "tool/global.hxx"
 +#include "numeric/type.hxx"
@@ -67,7 +68,7 @@
 +
 +void LpSolveImpl::solve()
 +{
-+	using namespace std;
++    using ::std::vector;
 +
 +	Model* model = getModel();
 +	size_t nDecVarSize = model->getDecisionVarSize();
@@ -136,7 +137,7 @@
 +		}
 +		set_obj_fnex( lp, nDecVarSize,  &row[0],  &cols[0] );
 +	}
-+	catch ( std::out_of_range& e )
++	catch ( ::std::out_of_range& e )
 +	{
 +		Debug( e.what() );
 +		delete_lp(lp);
@@ -159,7 +160,11 @@
 +
 +	write_LP(lp, stdout);
 +
-+	set_verbose(lp, IMPORTANT);
++#if SCSOLVER_DEBUG	
++    set_verbose(lp, IMPORTANT);
++#else
++    set_verbose(lp, NEUTRAL);
++#endif    
 +
 +	if ( ::solve(lp) == OPTIMAL )
 +	{

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-makefile-mk.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-makefile-mk.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-makefile-mk.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/makefile.mk	
-@@ -0,0 +1,31 @@
+@@ -0,0 +1,32 @@
 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 +
 +PRJ=..$/..
@@ -26,7 +26,8 @@
 +	$(SLO)$/nlpmodel.obj \
 +	$(SLO)$/nlpqnewton.obj \
 +	$(SLO)$/lpsolve.obj \
-+	$(SLO)$/exception.obj
++	$(SLO)$/exception.obj \
++	$(SLO)$/polyeqnsolver.obj
 +
 +# --- Tagets -------------------------------------------------------
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/matrix.cxx	
-@@ -0,0 +1,1349 @@
+@@ -0,0 +1,1279 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -37,6 +37,7 @@
 +#include <set>
 +#include <exception>
 +#include <iterator>
++#include <sstream>
 +
 +#ifdef __GNUC__
 +#warning "noalias not present in boost 1.30.2"
@@ -44,14 +45,12 @@
 +#undef noalias
 +#define noalias(a) (a)
 +
-+#include <boost/numeric/ublas/matrix_proxy.hpp>
-+#include <boost/numeric/ublas/io.hpp>
-+#include <boost/numeric/ublas/matrix_expression.hpp>
-+
 +namespace bnu = ::boost::numeric::ublas;
 +
-+using std::cout;
-+using std::endl;
++using ::std::cout;
++using ::std::endl;
++using ::boost::numeric::ublas::prod;
++using ::std::vector;
 +
 +namespace scsolver { namespace numeric {
 +
@@ -85,81 +84,6 @@
 +    return "Matrix not square where a square matrix is required";
 +}
 +
-+#if 0
-+class MatrixImpl
-+{
-+public:
-+	MatrixImpl();
-+	MatrixImpl( size_t, size_t, bool = false );
-+	MatrixImpl( const MatrixImpl& );
-+	MatrixImpl( const MatrixImpl* );
-+	MatrixImpl( ::bnu::matrix<double> );
-+	~MatrixImpl() throw();
-+	
-+	void setResizable( bool b ) { m_bResizable = b; }
-+	bool getResizable() const { return m_bResizable; }
-+	void swap( MatrixImpl& ) throw();
-+	void clear();
-+	void copy( const MatrixImpl& );
-+	
-+	const double getValue( size_t, size_t ) const;
-+	double& getValue( size_t, size_t );
-+	void setValue( size_t, size_t, double );
-+	
-+	MatrixImpl getColumn( size_t );
-+	MatrixImpl getRow( size_t );
-+	void deleteColumn( size_t );
-+	void deleteColumns( const std::vector<size_t>& );
-+	void deleteRow( size_t );
-+	void deleteRows( const std::vector<size_t>& );
-+	
-+	const MatrixImpl adj() const;
-+	double cofactor( size_t, size_t ) const;
-+	double det() const;
-+	const MatrixImpl inverse() const;
-+	const MatrixImpl trans() const;
-+	double minors( size_t, size_t ) const;
-+	void resize( size_t, size_t );
-+
-+	size_t rows() const { return m_aArray.size1(); }
-+	size_t cols() const { return m_aArray.size2(); }
-+	
-+	bool empty() const;
-+	bool isRowEmpty( size_t ) const;
-+	bool isColumnEmpty( size_t ) const;
-+	bool isSameSize( const MatrixImpl& ) const;
-+	bool isSquare() const;
-+	
-+	// Overloaded Operators
-+	
-+	MatrixImpl& operator=( const MatrixImpl& );
-+	const MatrixImpl operator+( const MatrixImpl& ) const;
-+	const MatrixImpl operator-( const MatrixImpl& ) const;
-+	const MatrixImpl operator*( double ) const;
-+	const MatrixImpl operator*( const MatrixImpl& ) const;
-+	const MatrixImpl operator/( double ) const;
-+	MatrixImpl& operator+=( const MatrixImpl& );
-+	MatrixImpl& operator+=( double );
-+	MatrixImpl& operator-=( const MatrixImpl& );
-+	MatrixImpl& operator*=( double );
-+	MatrixImpl& operator/=( double );
-+	const double operator()( size_t i, size_t j ) const { return getValue( i, j ); }
-+	double& operator()( size_t, size_t );
-+	
-+	bool operator==( const MatrixImpl& ) const;
-+	bool operator!=( const MatrixImpl& ) const;
-+	
-+	bool m_bResizable;
-+	bnu::matrix<double, bnu::row_major, std::vector<double> > m_aArray;
-+
-+private:
-+
-+	void expandAsNeeded( size_t, size_t );
-+	void throwIfEmpty() const;
-+
-+}; // class MatrixImpl
-+#endif
-+
 +//---------------------------------------------------------------------------
 +// Local helper functions
 +
@@ -330,9 +254,15 @@
 +                U( i, j ) = A( i, j );
 +        }
 +
++#if REWRITE_FOR_SUN_STUDIO_COMPILER
++    n = cnP.size();
++    for (size_t i = 0; i < n; ++i)
++        P(i, cnP[i]) = 1.0;
++#else
 +    ::std::vector<size_t>::const_iterator it, itBeg = cnP.begin(), itEnd = cnP.end();
 +    for ( it = itBeg; it != itEnd; ++it )
-+        P( std::distance( itBeg, it ), *it ) = 1.0;
++        P( ::std::distance( itBeg, it ), *it ) = 1.0;
++#endif
 +
 +    noalias( mxU ) = U;
 +    noalias( mxL ) = L;
@@ -450,14 +380,14 @@
 +//---------------------------------------------------------------------------
 +
 +Matrix::Matrix() : 
-+    m_bResizable(false)
++    m_bResizable(true)
 +{
 +    bnu::matrix<double> m( 0, 0 );
 +    m_aArray = m;
 +}
 +
 +Matrix::Matrix(size_t row, size_t col, bool identity_matrix) :
-+    m_bResizable(false)
++    m_bResizable(true)
 +{   
 +    bnu::matrix<double> m(row, col);
 +    for ( unsigned int i = 0; i < m.size1(); ++i )
@@ -1030,7 +960,7 @@
 +}
 +#endif
 +
-+bnu::matrix< std::string > Matrix::getDisplayElements( 
++Matrix::StringMatrixType Matrix::getDisplayElements( 
 +        int prec, size_t nColSpace, bool bFormula) const
 +{
 +    using std::string;
@@ -1042,11 +972,11 @@
 +        aColLen.push_back( 0 );
 +    
 +    // Get string matrix.
-+    bnu::matrix<std::string> mxElements( m_aArray.size1(), m_aArray.size2() );
++    StringMatrixType mxElements( m_aArray.size1(), m_aArray.size2() );
 +    for ( unsigned int i = 0; i < m_aArray.size1(); ++i )
 +        for ( unsigned int j = 0; j < m_aArray.size2(); ++j )
 +        {
-+            ostringstream osElem;
++            ::std::ostringstream osElem;
 +            double fVal = m_aArray( i, j );
 +            for ( unsigned int k = 0; k < nColSpace; ++k )
 +                osElem << " ";
@@ -1125,14 +1055,14 @@
 +    return mxElements;
 +}
 +
-+void Matrix::print( size_t nPrec, size_t nColSpace ) const
++void Matrix::print(size_t prec, size_t colspace) const
 +{
 +    using std::string;
 +    using std::ostringstream;
 +
 +    // Print to stdout
 +    ostringstream os;
-+    const bnu::matrix< string > mElements = getDisplayElements( nPrec, nColSpace, false );
++    const bnu::matrix< string > mElements = getDisplayElements(prec, colspace, false);
 +    for ( unsigned int i = 0; i < mElements.size1(); ++i )
 +    {
 +        os << "|";
@@ -1141,7 +1071,7 @@
 +            std::string s = mElements( i, j );
 +            os << s;
 +        }
-+        os << repeatString( " ", nColSpace ) << "|" << endl;
++        os << repeatString( " ", colspace ) << "|" << endl;
 +    }
 +    cout << os.str();
 +}

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix_test-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-matrix_test-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,121 @@
+--- /dev/null	
++++ scsolver/source/numeric/matrix_test.cxx	
+@@ -0,0 +1,118 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "numeric/matrix.hxx"
++#include <stdio.h>
++
++using namespace ::scsolver::numeric;
++
++void basicIO()
++{
++    printf("Original empty matrix\n");
++    Matrix mx(3, 3);
++    mx.print();     // empty matrix
++    printf("Simple assignment: (0, 0) = 4.54   (0, 2) = 12.55   (1, 1) = 1.2   (2, 1) = 35.4   (2, 2) = 5\n");
++    mx(0, 0) = 4.54;
++    mx(0, 2) = 12.55;
++    mx(1, 1) = 1.2;
++    mx(2, 1) = 35.4;
++    mx(2, 2) = 5.0;
++    mx.print();
++
++    printf("Transposing matrix\n");
++    mx.trans().print();
++
++    // Automatic resizing.
++    printf("Automatic resizing\n");
++    mx.setResizable(true);
++    mx(3, 10) = 100;
++    mx.print();
++    mx.setResizable(false);
++
++    // Shrink the matrix.
++    printf("Shrinking the matrix to 3 x 3\n");
++    mx.resize(3, 3);
++    mx.print();
++
++    // Expanding the matrix
++    printf("Expanding the matrix to 5 x 5\n");
++    mx.resize(5, 5);
++    mx.print();
++
++    // Shrinking it again.
++    printf("Shrinking it again\n");
++    mx.resize(3, 3);
++    mx.print();
++
++    // Bad index
++    mx.setResizable(false);
++    try
++    {
++        printf("Bad index: (-1, 0) = 999\n");
++        mx(-1, 0) = 999;
++    }
++    catch (const BadIndex&)
++    {
++        printf("BadIndex exception caught on assigning a new value.\n");
++    }
++    mx.print();
++
++    try
++    {
++        printf("Bad index: (0, -1) = 999\n");
++        mx(0, -1) = 999;
++    }
++    catch (const BadIndex&)
++    {
++        printf("BadIndex exception caught on assigning a new value.\n");
++    }
++    mx.print();
++
++    try
++    {
++        printf("Bad index: r = (10, 10)\n");
++        double r = mx(10, 10);
++        r = 20.5;
++    }
++    catch (const BadIndex&)
++    {
++        printf("BadIndex exception caught on querying a value.\n");
++    }
++    mx.print();
++    mx.setResizable(true);
++
++    printf("3 x 3 identity matrix\n");
++    Matrix mxi(3, 3, true);
++    mxi.print();
++}
++
++int main()
++{
++    printf("unit test: Matrix\n");
++    basicIO();
++    printf("Unit test passed!\n");
++}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpbase-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpbase-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpbase-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -32,7 +32,7 @@
 +#include "numeric/nlpmodel.hxx"
 +#include "numeric/funcobj.hxx"
 +
-+using namespace std;
++using ::std::vector;
 +
 +namespace scsolver { namespace numeric { namespace nlp {
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpmodel-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpmodel-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpmodel-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -39,7 +39,7 @@
 +#include <stdio.h>
 +
 +using namespace ::scsolver::numeric;
-+using namespace std;
++using ::std::vector;
 +
 +namespace scsolver { namespace numeric { namespace nlp {
 +

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpqnewton-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpqnewton-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-nlpqnewton-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/numeric/nlpqnewton.cxx	
-@@ -0,0 +1,370 @@
+@@ -0,0 +1,377 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -45,9 +45,14 @@
 +
 +using namespace scsolver::numeric;
 +using scsolver::numeric::Matrix;
-+using scsolver::numeric::Differentiate;
++using scsolver::numeric::NumericalDiffer;
 +using boost::shared_ptr;
-+using namespace std;
++using ::std::vector;
++using ::std::string;
++using ::std::cout;
++using ::std::endl;
++using ::std::distance;
++using ::std::setprecision;
 +
 +namespace scsolver { namespace numeric { namespace nlp {
 +
@@ -95,7 +100,7 @@
 +public:
 +	QuasiNewtonImpl( QuasiNewton* p ) :
 +		m_pSelf(p),
-+		m_pDiff(new Differentiate()),
++		m_pDiff(new NumericalDiffer()),
 +		m_nIter(0),
 +		m_pModel(NULL),
 +		m_mxVars(0, 0),
@@ -154,7 +159,7 @@
 +
 +private:
 +	QuasiNewton* m_pSelf;
-+	boost::shared_ptr<Differentiate> m_pDiff;
++	boost::shared_ptr<NumericalDiffer> m_pDiff;
 +
 +	// These data members are expected to be initialized at start of 'void solve()' call.
 +	unsigned long m_nIter;
@@ -175,7 +180,9 @@
 +
 +	bool evaluateFunc()
 +	{
-+		using namespace std;
++        using ::std::vector;
++        using ::std::cout;
++        using ::std::endl;
 +
 +		// Solve f(x) given the x vector
 +

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,110 @@
+--- /dev/null	
++++ scsolver/source/numeric/polyeqnsolver.cxx	
+@@ -0,0 +1,107 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "numeric/polyeqnsolver.hxx"
++#include "numeric/matrix.hxx"
++#include <stdio.h>
++
++using ::std::list;
++
++namespace scsolver { namespace numeric {
++
++const char* NotEnoughDataPoints::what() const throw()
++{
++    return "not enough data points to solve a polynomial equation (minimum of 2 required)";
++}
++
++DataPoint::DataPoint(double x, double y) :
++    X(x), Y(y)
++{
++}
++
++PolyEqnSolver::PolyEqnSolver()
++{
++}
++
++PolyEqnSolver::~PolyEqnSolver() throw()
++{
++}
++
++void PolyEqnSolver::addDataPoint(double x, double y)
++{
++    DataPoint pt(x, y);
++    m_DataPoints.push_back(pt);
++}
++
++const Matrix PolyEqnSolver::solve()
++{
++    size_t nDPSize = m_DataPoints.size();
++    if (nDPSize < 2)
++    {
++        // We need at least 2 data points to form a polynomial equation.
++        throw NotEnoughDataPoints();
++    }
++
++    Matrix mxRight(nDPSize, nDPSize), mxLeft(nDPSize, 1);
++    list<DataPoint>::const_iterator itr = m_DataPoints.begin(), itrEnd = m_DataPoints.end();
++    for (size_t nRow = 0; itr != itrEnd; ++itr, ++nRow)
++    {
++        double varTerm = 1.0;
++        for (size_t nCol = 0; nCol < nDPSize; ++nCol)
++        {
++            mxRight(nRow, nCol) = varTerm;
++            varTerm *= itr->X;
++        }
++        mxLeft(nRow, 0) = itr->Y;
++    }
++
++    return mxRight.inverse() * mxLeft;
++}
++
++void PolyEqnSolver::clear()
++{
++    m_DataPoints.clear();
++}
++
++size_t PolyEqnSolver::size() const
++{
++    return m_DataPoints.size();
++}
++
++//--------------------------------------------------------------------
++
++void getQuadraticPeak(double& x, double& y, const Matrix& coef)
++{
++    // coef = (c, b, a)
++    double a = coef(2, 0);
++    double b = coef(1, 0);
++    double c = coef(0, 0);
++    x = b / (-2.0*a);
++    y = x * x * a + x * b + c;
++}
++
++}}

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver_test-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-polyeqnsolver_test-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,272 @@
+--- /dev/null	
++++ scsolver/source/numeric/polyeqnsolver_test.cxx	
+@@ -0,0 +1,269 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "numeric/polyeqnsolver.hxx"
++#include "numeric/matrix.hxx"
++#include <list>
++#include <cmath>
++#include <stdio.h>
++
++using namespace ::scsolver::numeric;
++using namespace ::std;
++
++class TestFailed {};
++
++class PolyEqnSolverTest : public PolyEqnSolver
++{
++public:
++    void addDataPoint(double x, double y)
++    {
++        fprintf(stdout, "PolyEqnSolverTest::addDataPoint: adding (%g, %g)\n", x, y);
++        DataPoint pt(x, y);
++        m_DataPoints.push_back(pt);
++        PolyEqnSolver::addDataPoint(x, y);
++    }
++
++    const Matrix solve()
++    {
++        fprintf(stdout, "PolyEqnSolverTest::solve: ------------------------------\n");
++        Matrix sol = PolyEqnSolver::solve();
++
++        if (sol.cols() != 1)
++        {
++            printf("solution must be a single-column matrix.\n");
++            throw TestFailed();
++        }
++
++        printf("solution = ");
++        sol.trans().print(5);
++        verifySolution(sol);
++        return sol;
++    }
++
++    void clear()
++    {
++        PolyEqnSolver::clear();
++        size_t n = PolyEqnSolver::size();
++        if (n != 0)
++        {
++            fprintf(stdout, "PolyEqnSolverTest::clear: data point size is not zero.\n");
++            throw TestFailed();
++        }
++
++        // Don't forget to clear this too.
++        m_DataPoints.clear();
++    }
++
++private:
++
++    void verifySolution(const Matrix& solution)
++    {
++        size_t deltaCount = 0;
++        size_t n = solution.rows();
++        list<DataPoint>::const_iterator itr = m_DataPoints.begin(), itrEnd = m_DataPoints.end();
++        for (; itr != itrEnd; ++itr)
++        {
++            double verTerm = 1.0, leftSum = 0.0;
++            for (size_t i = 0; i < n; ++i)
++            {
++                leftSum += solution(i, 0) * verTerm;
++                verTerm *= itr->X;
++            }
++
++            if (itr->Y != leftSum)
++            {
++                printf("  delta = %.20f\n", itr->Y - leftSum);
++                ++deltaCount;
++            }
++        }
++
++        if (!deltaCount)
++            printf("solution verified\n");
++        else
++        {
++            printf("delta count = %d\n", deltaCount);
++            throw TestFailed();
++        }
++    }
++
++    list<DataPoint> m_DataPoints;
++};
++
++//--------------------------------------------------------------------
++
++class QuadPeakTest
++{
++public:
++    QuadPeakTest()
++    {
++    }
++
++    void set(double a, double b, double c)
++    {
++        printf("--------------------------------------------------------------------\n");
++        m_A = a;
++        m_B = b;
++        m_C = c;
++        Matrix coef(3, 1);
++        coef(0, 0) = m_C;
++        coef(1, 0) = m_B;
++        coef(2, 0) = m_A;
++        getQuadraticPeak(m_X, m_Y, coef);
++    }
++
++    void print() const
++    {
++        printf("f(x) = %g x^2 ", m_A);
++        if (m_B >= 0.0)
++            printf("+ ");
++        else
++            printf("- ");
++        printf("%g x ", fabs(m_B));
++        if (m_C >= 0.0)
++            printf("+ ");
++        else
++            printf("- ");
++        printf("%g : f(x) peaks at (%g, %g)\n", m_C, m_X, m_Y);
++    }
++
++    void verify() const
++    {
++        static const double step = 1.0;
++        static const int count = 10;
++
++        double lambda = step;
++        for (int i = 0; i < count; ++i)
++        {
++            double left  = eval(m_X - lambda);
++            double right = eval(m_X + lambda);
++            double delta = fabs(left - right);
++            //printf("  f(%.2f) = %.3f  f(%.2f) = %.3f  (delta = %.4f)\n", m_X - lambda, left, m_X + lambda, right, delta);
++            if (delta/left > 0.00000000000005)
++            {
++                printf("  delta is not zero (%.20f)\n", delta/left);
++                throw TestFailed();
++            }
++
++            lambda += step;
++        }
++        printf("quadratic peak verified\n");
++    }
++
++private:
++
++    double eval(double x) const
++    {
++        return x*x*m_A + x*m_B + m_C;
++    }
++
++    double m_A; // coefficient of the x^2 term
++    double m_B; // coefficient of the x^1 term
++    double m_C; // coefficient of the x^0 term (constant)
++
++    double m_X;
++    double m_Y;
++};
++
++void runTest()
++{
++    PolyEqnSolverTest polySolver;
++    polySolver.addDataPoint(1.0, 32.0);
++    polySolver.addDataPoint(5.0, 2.0);
++    polySolver.addDataPoint(9.0, 10.0);
++    polySolver.solve();
++
++    polySolver.clear();
++    polySolver.addDataPoint(0.0, 2.0);
++    polySolver.addDataPoint(2.0, 6.0);
++    polySolver.solve();
++
++    polySolver.clear();
++    polySolver.addDataPoint(1, 12);
++    polySolver.addDataPoint(2, 8);
++    polySolver.addDataPoint(3, 7);
++    polySolver.solve();
++
++    try
++    {
++        polySolver.clear();
++        polySolver.solve();
++        throw TestFailed();
++    }
++    catch( const NotEnoughDataPoints& )
++    {
++        printf("NotEnoughDataPoints exception caught on zero data point (expected).\n");
++    }
++
++    try
++    {
++        polySolver.clear();
++        polySolver.addDataPoint(1.0, 1.0);
++        polySolver.solve();
++        throw TestFailed();
++    }
++    catch( const NotEnoughDataPoints& )
++    {
++        printf("NotEnoughDataPoints exception caught on 1 data point (expected).\n");
++    }
++}
++
++void runQuadPeakTest()
++{
++    QuadPeakTest qpt;
++    for (int a = -8; a < 9; ++a)
++    {
++        for (int b = -4; b < 5; ++b)
++        {
++            for (int c = -10; c < 11; ++c)
++            {
++                qpt.set(a, b, c);
++                qpt.print();
++                qpt.verify();
++            }
++        }
++    }
++}
++
++int main()
++{
++    try
++    {
++        runTest();
++        runQuadPeakTest();
++    }
++    catch ( const TestFailed& )
++    {
++        printf("***************************\n");
++        printf("*    UNIT TEST FAILED...  *\n");
++        printf("***************************\n");
++        return 1;
++    }
++
++    printf("***************************\n");
++    printf("*    UNIT TEST PASSED!!!  *\n");
++    printf("***************************\n");
++}

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,152 @@
+--- /dev/null	
++++ scsolver/source/numeric/quadfitlinesearch.cxx	
+@@ -0,0 +1,149 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "numeric/quadfitlinesearch.hxx"
++#include "numeric/funcobj.hxx"
++#include "numeric/polyeqnsolver.hxx"
++#include "numeric/matrix.hxx"
++#include "numeric/diff.hxx"
++
++#include <stdio.h>
++#include <memory>
++
++namespace scsolver { namespace numeric {
++
++struct SearchData
++{
++    double P1;
++    double P2;
++    double P3;
++
++    QuadFitLineSearch::GoalType Goal;
++    SingleVarFuncObj* pFunc;
++
++    explicit SearchData(SingleVarFuncObj* p) :
++        pFunc(p)
++    {
++    }
++};
++
++bool iterate(SearchData& data)
++{
++    // Given three points, 
++    return false;
++}
++
++void evalStepLength(SingleVarFuncObj* pFunc, double step)
++{
++    double e = 0.2;
++    auto_ptr<BaseFuncObj> pBaseFunc(pFunc->toBaseFuncObj());
++
++    NumericalDiffer diff;
++    diff.setFuncObject(pBaseFunc.get());
++
++    // TODO: to be continued ...
++}
++
++/**
++ * Find an initial set of points (P1, P2 and P3 in this order from left to 
++ * right) such that P1 > P2 and P2 < P3.
++ *  
++ * @param data
++ * 
++ * @return bool true if successful, or false otherwise.
++ */
++bool findInitialPoints(SearchData& data)
++{
++    fprintf(stdout, "numeric::lclFindInitialPoints: \n");fflush(stdout);
++
++    // First, find an acceptable step length.
++    double step = 0.1;
++    evalStepLength(data.pFunc, step);
++
++    data.P1 = 0.0;
++
++    data.pFunc->setVar(1.0);
++    double f = data.pFunc->eval();
++    exit(0);
++    return false;
++}
++
++// --------------------------------------------------------------------------
++
++QuadFitLineSearch::QuadFitLineSearch(SingleVarFuncObj* pFuncObj) :
++    mpFuncObj(pFuncObj),
++    m_eGoal(QuadFitLineSearch::MINIMIZE)
++{
++}
++
++QuadFitLineSearch::~QuadFitLineSearch() throw()
++{
++}
++
++void QuadFitLineSearch::setGoal(QuadFitLineSearch::GoalType goal)
++{
++    m_eGoal = goal;
++}
++
++bool QuadFitLineSearch::solve()
++{
++    if ( !mpFuncObj )
++        return false;
++
++    printf("%s\n", mpFuncObj->getFuncString().c_str());
++
++    SearchData data(mpFuncObj);
++    data.Goal = m_eGoal;
++
++    // 1.  Find three points such that the 2nd point be the lowest.
++    // 2.  Find the quadratic function that passes through all three points.
++    // 3.  Find the minimizer point of that quadratic function.
++    // 4.  Replace one of the three points with the minimizer point based on some conditions.
++    // 5.  Terminate when P1 - P3 < e.
++    findInitialPoints(data);
++    
++    // Solve the quadratic function.
++    PolyEqnSolver eqnSolver;
++    mpFuncObj->setVar(data.P1);
++    eqnSolver.addDataPoint(data.P1, mpFuncObj->eval());
++    mpFuncObj->setVar(data.P2);
++    eqnSolver.addDataPoint(data.P2, mpFuncObj->eval());
++    mpFuncObj->setVar(data.P3);
++    eqnSolver.addDataPoint(data.P3, mpFuncObj->eval());
++    Matrix sol = eqnSolver.solve();
++    sol.print();
++    double x, y;
++
++    // Get the peak of that quad function.
++    getQuadraticPeak(x, y, sol);
++    fprintf(stdout, "QuadFitLineSearch::solve: peak at (%g, %g)\n", x, y);
++    fflush(stdout);
++
++    return true;
++}
++
++}}

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch_test-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-numeric-quadfitlinesearch_test-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,87 @@
+--- /dev/null	
++++ scsolver/source/numeric/quadfitlinesearch_test.cxx	
+@@ -0,0 +1,84 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "numeric/quadfitlinesearch.hxx"
++#include "numeric/funcobj.hxx"
++#include <memory>
++#include <string>
++
++using namespace ::scsolver::numeric;
++using namespace ::std;
++
++class TestFunc1 : public SingleVarFuncObj
++{
++public:
++    TestFunc1()
++    {
++    }
++
++    virtual ~TestFunc1() throw()
++    {
++    }
++
++    virtual void setVar(double var)
++    {
++        mVar = var;
++    }
++
++    virtual double getVar() const
++    {
++        return mVar;
++    }
++
++    virtual double eval() const
++    {
++        return (mVar - 2.0)*(mVar*2.0 + 5.0) + 10.0;
++    }
++
++    /**
++     * Return a display-friendly function string (e.g. x^3 + 2*x^2 + 4).
++     */
++    virtual const string getFuncString() const
++    {
++        return string("(x - 2) * (2x + 5) + 10");
++    }
++private:
++    double mVar;
++};
++
++void run()
++{
++    auto_ptr<SingleVarFuncObj> pFuncObj(new TestFunc1);
++    QuadFitLineSearch qfSearch(pFuncObj.get());
++    qfSearch.setGoal(QuadFitLineSearch::MINIMIZE);
++    qfSearch.solve();
++}
++
++int main()
++{
++    run();
++}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-service-service-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-service-service-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-service-service-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/service/service.cxx	
-@@ -0,0 +1,320 @@
+@@ -0,0 +1,337 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -35,6 +35,7 @@
 +#include "lpbuilder.hxx"
 +#include "xcalc.hxx"
 +#include "option.hxx"
++#include "resmgr.hxx"
 +#include "solvemodel.hxx"
 +#include "numeric/matrix.hxx"
 +
@@ -44,7 +45,9 @@
 +
 +#include <memory>
 +
-+using namespace std;
++#include <stdio.h>
++
++using ::rtl::OUString;
 +
 +namespace scsolver {
 +
@@ -59,15 +62,21 @@
 +
 +
 +SolverImpl::SolverImpl( Reference< uno::XComponentContext > const & xContext ) :
-+	m_pResMgr( NULL ),
-+	m_pDlg( NULL ), m_pCalc( new CalcInterface( xContext ) ),
-+	m_pOption( new OptionData )
++#ifndef SCSOLVER_UNO_COMPONENT
++    m_pResMgr( NULL ),
++#endif    
++	m_pDlg( NULL ), 
++    m_pCalc(new CalcInterface(xContext)),
++	m_pOption(new OptionData),
++    m_pStringResMgr(new StringResMgr(m_pCalc.get()))
 +{
 +}
 +
 +SolverImpl::~SolverImpl()
 +{
-+	delete m_pResMgr;
++#ifndef SCSOLVER_UNO_COMPONENT	
++    delete m_pResMgr;
++#endif    
 +}
 +
 +//--------------------------------------------------------------------------
@@ -188,14 +197,14 @@
 +{	
 +	Debug("solveModel --------------------------------------------------------");
 +
-+	std::auto_ptr<SolveModel> p( new SolveModel( this ) );
++	::std::auto_ptr<SolveModel> p( new SolveModel( this ) );
 +	try
 +	{
 +		p->solve();
 +	}
 +	catch( const RuntimeError& e )
 +	{
-+		getMainDialog()->showSolveError( e.getMessage() );
++		getMainDialog()->showMessage( e.getMessage() );
 +	}
 +
 +	if ( p->isSolved() )
@@ -209,26 +218,34 @@
 +
 +void SolverImpl::initLocale()
 +{
++#ifndef SCSOLVER_UNO_COMPONENT
 +	rtl::OString aModName( "scsolver" );
 +	aModName += rtl::OString::valueOf( sal_Int32( SUPD ) );
 +
 +	m_pResMgr = ResMgr::CreateResMgr( aModName.getStr(), m_eLocale );
++#endif
 +}
 +
++#ifndef SCSOLVER_UNO_COMPONENT
 +ResMgr* SolverImpl::getResMgr()
 +{
-+	if( !m_pResMgr )
-+		initLocale();
-+	return m_pResMgr;
++    if ( !m_pResMgr )
++        initLocale();
++    return m_pResMgr;
 +}
++#endif
 +
-+rtl::OUString SolverImpl::getResStr( int resid )
++OUString SolverImpl::getResStr( int resid )
 +{
++#ifdef SCSOLVER_UNO_COMPONENT
++    return m_pStringResMgr->getLocaleStr(resid);
++#else
 +   	ResMgr *pResMgr = getResMgr();
 +	if ( pResMgr )
-+		return rtl::OUString( String( ResId( resid, *getResMgr() ) ) );
-+	
-+	return rtl::OUString();
++        return OUString( String( ResId( resid, *getResMgr() ) ) );
++    else
++        return OUString();
++#endif
 +}
 +
 +// XLocalizable

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-tool-global-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-tool-global-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-tool-global-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/tool/global.cxx	
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,57 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -32,21 +32,26 @@
 +#include <sstream>
 +#include <stdio.h>
 +
-+using namespace std;
++using ::std::string;
++using ::std::ostringstream;
 +
 +namespace scsolver {
 +
++#if SCSOLVER_DEBUG
 +void Debug( const char* s )
 +{
-+#if SCSOLVER_DEBUG
 +	fprintf(stdout, "%s\n", s);
 +	fflush(stdout);
-+#endif
 +}
++#else
++void Debug( const char* )
++{
++}
++#endif
 +
-+std::string repeatString( const char* str, unsigned long nNum )
++string repeatString( const char* str, unsigned long nNum )
 +{
-+	std::ostringstream os;
++    ostringstream os;
 +	for ( unsigned int i = 0; i < nNum; ++i )
 +		os << str;
 +	return os.str();

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-basedlg-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-basedlg-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-basedlg-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/basedlg.cxx	
-@@ -0,0 +1,940 @@
+@@ -0,0 +1,1024 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -55,9 +55,11 @@
 +#include <com/sun/star/awt/XTopWindow.hpp>
 +#include <com/sun/star/awt/XWindow.hpp>
 +
-+using namespace std;
++#include <memory>
++
 +using namespace com::sun::star;
 +using uno::Any;
++using ::std::auto_ptr;
 +
 +namespace scsolver {
 +
@@ -66,9 +68,9 @@
 + * terminate. This function is for debug purposes only, and
 + * should never be reached under normal circumstances.
 + */
++#if SCSOLVER_DEBUG
 +void lcl_dumpServiceNames( const Reference< uno::XInterface >& oWgt )
 +{
-+#if SCSOLVER_DEBUG
 +	if (oWgt == NULL)
 +		return;
 +	Reference< lang::XServiceInfo > xSN( oWgt, UNO_QUERY );
@@ -77,8 +79,12 @@
 +		printOUStr( sSN[nIdx] );
 +
 +	OSL_ASSERT( !"No appropriate widget type got picked up!" );
-+#endif
 +}
++#else
++void lcl_dumpServiceNames( const Reference< uno::XInterface >& )
++{
++}
++#endif
 +
 +//--------------------------------------------------------------------------
 +// BaseDialogImpl
@@ -89,8 +95,8 @@
 +public:
 +	BaseDialogImpl( SolverImpl* );
 +	~BaseDialogImpl();
-+	
-+	void initialize( sal_Int16, sal_Int16, const rtl::OUString& );
++
++    void initialize( sal_Int32 nW, sal_Int32 nH, const rtl::OUString& );
 +	void setVisibleDefault( bool );
 +	
 +	uno::Reference < uno::XInterface > getDialog() const { return m_oDlg; }
@@ -101,8 +107,12 @@
 +	
 +	void enableWidget( const rtl::OUString&, sal_Bool );
 +	void toFront();
++    void setFocus() const;
 +	void execute();
 +			
++    void setRefBoundingBox(const awt::Rectangle* rect);
++    const awt::Rectangle* getPosSize();
++
 +	apWidgetProp addButton( sal_Int32, sal_Int32, sal_Int32, sal_Int32,
 +		const rtl::OUString &, const rtl::OUString &, sal_Int16 = awt::PushButtonType_STANDARD );
 +		
@@ -181,9 +191,9 @@
 +private:
 +
 +	SolverImpl* m_pSolverImpl;
-+	
-+	awt::Rectangle m_aRect;
-+	bool m_bHasClosed;
++	auto_ptr<awt::Rectangle> mpDlgPosSize;
++    auto_ptr<awt::Rectangle> mpRefBoundingBox;
++    bool mbIsVisible;
 +	
 +	uno::Reference< uno::XInterface > m_oDlg;
 +	uno::Reference< uno::XInterface > m_oDlgModel;
@@ -192,8 +202,9 @@
 +
 +
 +BaseDialogImpl::BaseDialogImpl( SolverImpl* p ) :
-+	m_pSolverImpl( p ),
-+	m_bHasClosed( false )
++    m_pSolverImpl(p),
++    mpDlgPosSize(NULL),
++    mbIsVisible(false)
 +{
 +}
 +
@@ -201,7 +212,7 @@
 +{
 +}
 +
-+void BaseDialogImpl::initialize( sal_Int16 nW, sal_Int16 nH, const rtl::OUString& sTitle )
++void BaseDialogImpl::initialize( sal_Int32 nW, sal_Int32 nH, const rtl::OUString& sTitle )
 +{
 +	CalcInterface* pCalc = getSolverImpl()->getCalcInterface();
 +	Reference< lang::XMultiComponentFactory > xSM = pCalc->getServiceManager();
@@ -231,19 +242,51 @@
 +
 +void BaseDialogImpl::setVisibleDefault( bool bVisible )
 +{
-+	Reference< awt::XWindow > xWnd( m_oDlg, UNO_QUERY );
-+	if ( xWnd.is() )
-+	{
-+		if ( bVisible && m_bHasClosed )
-+			xWnd->setPosSize( m_aRect.X, m_aRect.Y, m_aRect.Width, m_aRect.Height, awt::PosSize::POS );
-+		xWnd->setVisible( bVisible );
-+		if ( bVisible )
-+			xWnd->setFocus();
-+		else
-+			m_bHasClosed = true;
-+	}
-+	else
-+		Debug("xWnd is NULL!");
++    if (bVisible == mbIsVisible)
++        return;
++
++    Reference< awt::XWindow > xWnd(m_oDlg, UNO_QUERY);
++    if (!xWnd.is())
++    {
++        Debug("xWnd is NULL!");
++        return;
++    }
++
++    if (bVisible)
++    {
++        // show dialog.
++        if (mpDlgPosSize.get())
++        {
++            // previous dialog position is stored.  use it.
++            xWnd->setPosSize(mpDlgPosSize->X, mpDlgPosSize->Y, mpDlgPosSize->Width, 
++                             mpDlgPosSize->Height, awt::PosSize::POS);
++        }
++        else if (mpRefBoundingBox.get())
++        {
++            // Reference bounding box (e.g. dialog size & position of the 
++            // parent dialog) exists.  Compute desired dialog position from 
++            // it.
++            const awt::Rectangle* pRect = getPosSize();
++            if (pRect)
++            {
++                sal_Int32 xoffset = (mpRefBoundingBox->Width - pRect->Width)/2;
++                sal_Int32 yoffset = (mpRefBoundingBox->Height - pRect->Height)/2;
++                xWnd->setPosSize(mpRefBoundingBox->X + xoffset, 
++                                 mpRefBoundingBox->Y + yoffset,
++                                 0, 0, awt::PosSize::POS);
++            }
++        }
++    }
++    else
++    {
++        // hide dialog.
++        if (!mpDlgPosSize.get())
++            mpDlgPosSize.reset(new awt::Rectangle);
++        *mpDlgPosSize = xWnd->getPosSize();
++    }
++
++    xWnd->setVisible(bVisible);
++    mbIsVisible = bVisible;
 +}
 +
 +apWidgetProp BaseDialogImpl::addButton( 
@@ -537,21 +580,52 @@
 +{
 +	Reference< uno::XInterface > oWgt = getWidgetByName( sName );
 +	Reference< awt::XWindow > xWnd( oWgt, UNO_QUERY );
++    if (!xWnd.is())
++        return;
 +	xWnd->setEnable( bEnable );
 +}
 +
 +void BaseDialogImpl::toFront()
 +{
 +	Reference< awt::XTopWindow > xWnd( m_oDlg, UNO_QUERY );
++    if (!xWnd.is())
++        return;
 +	xWnd->toFront();
 +}
 +
++void BaseDialogImpl::setFocus() const
++{
++    Reference<awt::XWindow> xWnd(m_oDlg, UNO_QUERY);
++    if (!xWnd.is())
++        return;
++
++    xWnd->setFocus();
++}
++
 +void BaseDialogImpl::execute()
 +{
 +	setVisibleDefault( true );
 +	toFront();
 +	Reference< awt::XDialog > xDlg( m_oDlg, UNO_QUERY );
-+	sal_Int16 r = xDlg->execute();
++	xDlg->execute();
++}
++
++void BaseDialogImpl::setRefBoundingBox(const awt::Rectangle* rect)
++{
++    if (!rect)
++        return;
++
++    if (!mpRefBoundingBox.get())
++        mpRefBoundingBox.reset(new awt::Rectangle);
++    *mpRefBoundingBox = *rect;
++}
++
++const awt::Rectangle* BaseDialogImpl::getPosSize()
++{
++    Reference< awt::XWindow > xWnd(m_oDlg, UNO_QUERY);
++    if (xWnd.is())
++        mpDlgPosSize.reset(new awt::Rectangle(xWnd->getPosSize()));
++    return mpDlgPosSize.get();
 +}
 +
 +//--------------------------------------------------------------------------
@@ -565,19 +639,24 @@
 +{
 +}
 +
-+void BaseDialog::initialize( sal_Int16 nW, sal_Int16 nH, const rtl::OUString& sTitle ) const
++void BaseDialog::setRefBoundingBox(const awt::Rectangle* rect)
 +{
-+	m_pImpl->initialize( nW, nH, sTitle );
++    m_pImpl->setRefBoundingBox(rect);
 +}
 +
-+void BaseDialog::setVisibleDefault( bool b ) const
++const awt::Rectangle* BaseDialog::getPosSize() const
 +{
-+	m_pImpl->setVisibleDefault( b );
++    return m_pImpl->getPosSize();
 +}
 +
-+ResMgr* BaseDialog::getResMgr() const
++void BaseDialog::initializeDefault( sal_Int16 nW, sal_Int16 nH, const rtl::OUString& sTitle ) const
 +{
-+	return getSolverImpl()->getResMgr();
++	m_pImpl->initialize( nW, nH, sTitle );
++}
++
++void BaseDialog::setVisibleDefault( bool b ) const
++{
++	m_pImpl->setVisibleDefault( b );
 +}
 +
 +rtl::OUString BaseDialog::getResStr( int resid ) const
@@ -729,7 +808,12 @@
 +
 +void BaseDialog::toFront() const
 +{
-+	return m_pImpl->toFront();
++    m_pImpl->toFront();
++}
++
++void BaseDialog::setFocus() const
++{
++    m_pImpl->setFocus();
 +}
 +
 +void BaseDialog::execute() const

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-baselistener-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-baselistener-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-baselistener-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -71,7 +71,7 @@
 +{
 +}
 +
-+void SAL_CALL ActionListener::disposing( const lang::EventObject& e )
++void SAL_CALL ActionListener::disposing( const lang::EventObject& )
 +	throw ( RuntimeException )
 +{
 +}
@@ -127,7 +127,7 @@
 +{
 +}
 +
-+void SAL_CALL TopWindowListener::windowClosing( const lang::EventObject& e )
++void SAL_CALL TopWindowListener::windowClosing( const lang::EventObject& )
 +		throw(RuntimeException)
 +{
 +	BaseDialog* p = getDialog();

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-dialog-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-dialog-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-dialog-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/dialog.cxx	
-@@ -0,0 +1,1008 @@
+@@ -0,0 +1,1010 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -67,9 +67,12 @@
 +
 +#include <iostream>
 +
-+using namespace std;
 +using namespace ::scsolver::numeric;
 +using ::com::sun::star::uno::Reference;
++using ::std::vector;
++using ::std::cout;
++using ::std::endl;
++using ::std::distance;
 +
 +namespace scsolver {
 +
@@ -143,7 +146,7 @@
 +
 +void ConstEditDialog::initialize()
 +{
-+	BaseDialog::initialize( static_cast<sal_Int16>(180), static_cast<sal_Int16>(55), 
++	initializeDefault( static_cast<sal_Int16>(180), static_cast<sal_Int16>(55), 
 +		getResStr(SCSOLVER_STR_CONSTRAINTDLG_TITLE) );
 +	
 +	sal_Int32 nX, nY;
@@ -214,10 +217,11 @@
 +{
 +	SolverDialog* pDlg = getSolverImpl()->getMainDialog();
 +	pDlg->setVisible( true );
++    setFocus();
 +
 +	if ( !isCellRangeGeometryEqual() )
 +	{
-+		pDlg->showSolveError( getResStr(SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH) );
++		pDlg->showMessage( getResStr(SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH) );
 +		return false;
 +	}
 +
@@ -255,13 +259,10 @@
 +		{
 +			case 0:
 +				return LESS_THAN_EQUAL;
-+				break;
 +			case 1:
 +				return EQUAL;
-+				break;
 +			case 2:
 +				return GREATER_THAN_EQUAL;
-+				break;
 +			default:
 +				OSL_ASSERT( !"Unexpected (in)equal sign" );
 +		}
@@ -378,9 +379,6 @@
 +
 +	m_pConstEditDialog( NULL ),
 +	m_pOptionDialog( NULL ),
-+	m_pSolveErrorDlg( NULL ),
-+	m_pSolInfeasibleDlg( NULL ),
-+	m_pSolFoundDlg( NULL ),
 +	m_pTopWindowListener(NULL),
 +	m_pTargetRngListener( NULL ),
 +	m_pVarCellsRngListener( NULL ),
@@ -407,7 +405,7 @@
 +
 +void SolverDialog::initialize()
 +{
-+	BaseDialog::initialize( static_cast<sal_Int16>(260), static_cast<sal_Int16>(200), 
++	initializeDefault( static_cast<sal_Int16>(260), static_cast<sal_Int16>(200), 
 +		getResStr(SCSOLVER_STR_MAINDLG_TITLE) );
 +
 +	// START CREATING WIDGETS
@@ -423,11 +421,11 @@
 +	nY += 18;
 +	addFixedText( 10, nY, 35, 12, ascii( "ftObj" ), getResStr(SCSOLVER_STR_GOAL) );
 +	addRadioButton( 50, nY, 40, 12, ascii( "rbMax" ), getResStr(SCSOLVER_STR_MAXIMIZE) );
-+	addRadioButton( 95, nY, 40, 12, ascii( "rbMin" ), getResStr(SCSOLVER_STR_MINIMIZE) );
++	addRadioButton( 115, nY, 40, 12, ascii( "rbMin" ), getResStr(SCSOLVER_STR_MINIMIZE) );
 +	
 +	nY += 15;
 +	addFixedText( 10, nY+2, 60, 12, ascii( "ftDecVars" ), getResStr(SCSOLVER_STR_DECISIONVAR_CELLS) );
-+	addRangeEdit( 70, nY, 115, 12, ascii( "editVarCells" ), ascii( "btnRangeSelect" ) );
++	addRangeEdit( 85, nY, 115, 12, ascii( "editVarCells" ), ascii( "btnRangeSelect" ) );
 +	
 +	nY += 20;
 +	addFixedLine( 5, nY, 195, 12, ascii( "flConstraints" ), getResStr(SCSOLVER_STR_CONSTRAINT_SEP) );
@@ -547,7 +545,7 @@
 +
 +		Reference< sheet::XSpreadsheet > xSheet = pCalc->getActiveSheet();
 +		Reference< container::XNamed > xNamed( xSheet, UNO_QUERY );
-+		printOUStr( ascii( "Current sheet is " ) + xNamed->getName() );
++//      printOUStr( ascii( "Current sheet is " ) + xNamed->getName() );
 +	}
 +	else
 +		getConstEditDialog()->setVisible( false );
@@ -565,18 +563,24 @@
 +
 +ConstEditDialog* SolverDialog::getConstEditDialog()
 +{
-+	if ( m_pConstEditDialog.get() == NULL )
-+		m_pConstEditDialog.reset( new ConstEditDialog( getSolverImpl() ) );
-+
-+	return m_pConstEditDialog.get();
++    if (!m_pConstEditDialog.get())
++    {
++        m_pConstEditDialog.reset( new ConstEditDialog(getSolverImpl()) );
++        m_pConstEditDialog->setRefBoundingBox(getPosSize());
++    }
++    
++    return m_pConstEditDialog.get();
 +}
 +
 +OptionDialog* SolverDialog::getOptionDialog()
 +{
-+	if( m_pOptionDialog.get() == NULL )
-+		m_pOptionDialog.reset( new OptionDialog( getSolverImpl() ) );
++    if(!m_pOptionDialog.get())
++    {
++        m_pOptionDialog.reset( new OptionDialog( getSolverImpl() ) );
++        m_pOptionDialog->setRefBoundingBox(getPosSize());
++    }
 +
-+	return m_pOptionDialog.get();
++    return m_pOptionDialog.get();
 +}
 +
 +sal_Int16 SolverDialog::getSelectedConstraintPos()
@@ -720,7 +724,9 @@
 +	aConstItem.Equal = eEq;
 +	m_aConstraint.push_back( aConstItem );
 +	
-+	output();
++#if SCSOLVER_DEBUG	
++    output();
++#endif    
 +	setConstraintImpl( sLeft, sRight, eEq, false );
 +}
 +
@@ -747,7 +753,9 @@
 +		++pos; ++nCurId;
 +	}
 +	
-+	output();
++#if SCSOLVER_DEBUG	
++    output();
++#endif    
 +	setConstraintImpl( sLeft, sRight, eEqVal, true, nId );
 +}
 +
@@ -768,7 +776,9 @@
 +		++pos; ++nCurId;
 +	}
 +
-+	output();
++#if SCSOLVER_DEBUG	
++    output();
++#endif    
 +	
 +	removeConstraintsFromListBox( nIdx, 1 );
 +}
@@ -852,29 +862,21 @@
 + 		OSL_ASSERT( !"oLB is NULL" );
 +}
 +
-+void SolverDialog::showSolveError( const rtl::OUString& sMsg )
++void SolverDialog::showMessage( const rtl::OUString& sMsg )
 +{
-+	if ( m_pSolveErrorDlg.get() == NULL )
-+		m_pSolveErrorDlg.reset( new MessageDialog( getSolverImpl(), sMsg ) );
-+	else
-+		m_pSolveErrorDlg->setMessage( sMsg );
-+	m_pSolveErrorDlg->execute();
++    MessageDialog dlg(getSolverImpl(), sMsg);
++    dlg.setRefBoundingBox(getPosSize());
++    dlg.execute();
 +}
 +
 +void SolverDialog::showSolutionInfeasible()
 +{
-+	if ( m_pSolInfeasibleDlg.get() == NULL )
-+		m_pSolInfeasibleDlg.reset( new MessageDialog( getSolverImpl(), 
-+				getResStr(SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND) ) );
-+	m_pSolInfeasibleDlg->execute();
++    showMessage(getResStr(SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND));
 +}
 +
 +void SolverDialog::showSolutionFound()
 +{
-+	if ( m_pSolFoundDlg.get() == NULL )
-+		m_pSolFoundDlg.reset( new MessageDialog( getSolverImpl(), 
-+				getResStr(SCSOLVER_STR_MSG_SOLUTION_FOUND) ) );
-+	m_pSolFoundDlg->execute();
++    showMessage(getResStr(SCSOLVER_STR_MSG_SOLUTION_FOUND));
 +}
 +
 +void SolverDialog::reset()

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-listener-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-listener-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-listener-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/listener.cxx	
-@@ -0,0 +1,535 @@
+@@ -0,0 +1,527 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -57,7 +57,6 @@
 +#include <com/sun/star/table/XCellRange.hpp>
 +#include <com/sun/star/uno/XComponentContext.hpp>
 +
-+using namespace std;
 +
 +namespace scsolver {
 +
@@ -516,19 +515,12 @@
 +		rtl::OUString sRight = pDlg->getRightCellReference();
 +		Equality         eEq = pDlg->getEquality();
 +		
-+		SolverImpl* p = getDialog()->getSolverImpl();
-+		SolverDialog* pMainDlg = p->getMainDialog();
 +		if ( pDlg->isChangeMode() )
 +			pMainDlg->editConstraint( pDlg->getConstraintId(), sLeft, sRight, eEq );
 +		else
 +			pMainDlg->setConstraint( sLeft, sRight, eEq );
 +	}
 +	
-+#if 0	
-+	if ( m_sMode.equals( ascii( "Cancel" ) ) )
-+		Debug( "Cancel pressed" );
-+#endif	
-+
 +	pDlg->setVisible( false );
 +	pDlg->reset();
 +	pMainDlg->updateWidgets();

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-lpbuilder-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-lpbuilder-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-lpbuilder-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/lpbuilder.cxx	
-@@ -0,0 +1,651 @@
+@@ -0,0 +1,659 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -29,25 +29,29 @@
 + ************************************************************************/
 +
 +
++#include <algorithm>
++#include <exception>
++
 +#include "lpbuilder.hxx"
 +#include "tool/global.hxx"
++#include "unoglobal.hxx"
 +#include "type.hxx"
 +#include "numeric/type.hxx"
 +#include "numeric/lpmodel.hxx"
 +#include "numeric/matrix.hxx"
 +
-+#include <algorithm>
-+#include <exception>
-+
-+using namespace std;
 +using namespace ::com::sun::star;
 +using com::sun::star::table::CellAddress;
 +using scsolver::numeric::Matrix;
++using ::std::vector;
++using ::std::cout;
++using ::std::endl;
++using ::std::distance;
 +
 +namespace scsolver {
 +
-+class NoMatchingElementsFound : public std::exception {};
-+class LogicError : public std::exception
++class NoMatchingElementsFound : public ::std::exception {};
++class LogicError : public ::std::exception
 +{
 +public:
 +	virtual const char* what() const throw()
@@ -343,7 +347,6 @@
 +			return distance( m_cnConstraintAddress.begin(), pos );
 +	
 +	throw NoMatchingElementsFound();
-+	return 0;
 +}
 +
 +void LpModelBuilderImpl::setConstraintAddress( const ConstraintAddress& aItem )
@@ -368,8 +371,15 @@
 +	sal_uInt32 nRowId = getConstraintId( aConstAddr );
 +	
 +// 	cout << "(" << nRowId << ", " << nColId << ") = " << fCoef << "  RHS = " << fRHS << endl;
-+	m_mxConstraint( nRowId, nColId ) = fCoef;
-+	m_mxRHS( nRowId, 0 ) = fRHS;
++    try
++    {
++        m_mxConstraint( nRowId, nColId ) = fCoef;
++        m_mxRHS( nRowId, 0 ) = fRHS;
++    }
++    catch (const numeric::BadIndex& )
++    {
++        throw RuntimeError(ascii("Error assigning value to a matrix"));
++    }
 +}
 +
 +/** Returns a value of Equality enum by constraint ID.  A constraint ID 
@@ -394,7 +404,6 @@
 +	}
 +
 +	throw NoMatchingElementsFound();
-+	return 0;
 +}
 +
 +/** Append the address of a cell whose value represents the value of a decision
@@ -434,7 +443,6 @@
 +	
 +	// This should NOT be reached!
 +	throw NoMatchingElementsFound();
-+	return 0.0;
 +}
 +
 +void LpModelBuilderImpl::setCostVector( const table::CellAddress& aAddr, double fCost )

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-makefile-mk.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-makefile-mk.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-makefile-mk.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/makefile.mk	
-@@ -0,0 +1,36 @@
+@@ -0,0 +1,37 @@
 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 +
 +PRJ=..$/..
@@ -27,6 +27,7 @@
 +	$(SLO)$/lpbuilder.obj \
 +	$(SLO)$/nlpbuilder.obj \
 +	$(SLO)$/msgdlg.obj \
++	$(SLO)$/resmgr.obj \
 +	$(SLO)$/solvemodel.obj \
 +	$(SLO)$/unoglobal.obj \
 +	$(SLO)$/unohelper.obj \

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-msgdlg-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-msgdlg-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-msgdlg-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/msgdlg.cxx	
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,90 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -70,9 +70,8 @@
 +	const sal_Int16 nBtnWidth = 30, nBtnHeight = 14, nMargin = 3;
 +	sal_Int16 nWidth = 120, nHeight = 40;
 +
-+	BaseDialog::initialize( nWidth, nHeight, ascii_i18n( "Message Dialog" ) );
++	initializeDefault( nWidth, nHeight, ascii_i18n( "Message Dialog" ) );
 +
-+	sal_Int32 nX, nY;
 +	addFixedText( 5, 5, nWidth - 10, 10, ascii( "ftMessage" ), m_sMessage );
 +	addButton( (nWidth - nBtnWidth)/2, nHeight - nBtnHeight - nMargin, nBtnWidth, nBtnHeight, 
 +			ascii( "btnOk" ), ascii( "OK" ), awt::PushButtonType_OK );

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-optiondlg-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-optiondlg-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-optiondlg-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/optiondlg.cxx	
-@@ -0,0 +1,229 @@
+@@ -0,0 +1,231 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -34,13 +34,15 @@
 +#include "listener.hxx"
 +#include "solver.hxx"
 +
++#include <memory>
++
 +#include "com/sun/star/awt/XCheckBox.hpp"
 +
 +#include "scsolver.hrc"
 +
 +using namespace ::com::sun::star;
 +using namespace ::com::sun::star::uno;
-+using namespace std;
++using ::std::auto_ptr;
 +
 +namespace scsolver {
 +
@@ -112,7 +114,7 @@
 +void OptionDialog::initialize()
 +{
 +	int nWidth = 200, nHeight = 150;
-+	BaseDialog::initialize( 
++	initializeDefault( 
 +		static_cast<sal_Int16>(nWidth), static_cast<sal_Int16>(nHeight), 
 +		getResStr(SCSOLVER_STR_OPTIONDLG_TITLE) );
 +

Added: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-resmgr-cxx.diff
==============================================================================
--- (empty file)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-resmgr-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -0,0 +1,604 @@
+--- /dev/null	
++++ scsolver/source/ui/resmgr.cxx	
+@@ -0,0 +1,601 @@
++/*************************************************************************
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2005 by Kohei Yoshida.
++ *    1039 Kingsway Dr., Apex, NC 27502, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#include "resmgr.hxx"
++#include "xcalc.hxx"
++#include "unoglobal.hxx"
++#include "tool/global.hxx"
++#include "solver.hxx"
++#include "scsolver.hrc"
++
++#include "rtl/ustrbuf.hxx"
++
++#include <com/sun/star/beans/PropertyValue.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
++#include <com/sun/star/lang/Locale.hpp>
++#include <com/sun/star/lang/XMultiComponentFactory.hpp>
++#include <com/sun/star/deployment/PackageInformationProvider.hpp>
++#include <com/sun/star/deployment/XPackageInformationProvider.hpp>
++#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
++#include <com/sun/star/io/XInputStream.hpp>
++
++#include <vector>
++#include <stdio.h>
++
++#define DEBUG_SCSOLVER_RESMGR 0
++
++using namespace ::com::sun::star;
++using namespace ::std;
++
++using ::com::sun::star::uno::Any;
++using ::com::sun::star::uno::Exception;
++using ::com::sun::star::uno::UNO_QUERY;
++using ::com::sun::star::uno::UNO_QUERY_THROW;
++using ::com::sun::star::uno::Reference;
++using ::com::sun::star::uno::Sequence;
++using ::com::sun::star::uno::XComponentContext;
++using ::com::sun::star::deployment::PackageInformationProvider;
++using ::com::sun::star::deployment::XPackageInformationProvider;
++using ::com::sun::star::io::XInputStream;
++using ::com::sun::star::resource::MissingResourceException;
++using ::com::sun::star::ucb::XSimpleFileAccess;
++
++using ::rtl::OUString;
++using ::rtl::OUStringBuffer;
++
++namespace scsolver {
++
++StringResMgr::StringResMgr(CalcInterface* pCalc) :
++    mpCalc(pCalc),
++    mbStringLoaded(false)
++{
++}
++
++StringResMgr::~StringResMgr()
++{
++}
++
++void StringResMgr::loadStrings()
++{
++    init();
++
++    // Get all text files with names formatted this way (/<locale name>/*.properties).
++    vector<PropertiesFile> files;
++    getPropertiesFiles(files);
++
++    vector<PropertiesFile>::const_iterator itr = files.begin(), itrEnd = files.end();
++    for (; itr != itrEnd; ++itr)
++        loadStrings(*itr);
++
++#if DEBUG_SCSOLVER_RESMGR
++    Sequence<OUString> resids = mxStrResMgr->getResourceIDs();
++    for (sal_Int32 i = 0; i < resids.getLength(); ++i)
++    {
++        fprintf(stdout, "StringResMgr::loadStrings: id = '%s'\n",
++                OUStringToOString(resids[i], RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++        OUString str = mxStrResMgr->resolveString(resids[i]);
++        fprintf(stdout, "StringResMgr::loadStrings: str = '%s'\n",
++                OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++    }
++#endif    
++    lang::Locale en_US;
++    en_US.Language = ascii("en");
++    en_US.Country = ascii("US");
++    en_US.Variant = ascii("");
++    mxStrResMgr->setDefaultLocale(en_US);
++    mxStrResMgr->setCurrentLocale(getSystemLocale(), true);
++}
++
++const OUString StringResMgr::getSystemLocaleString() const
++{
++    Reference<lang::XMultiComponentFactory> xFactory = mpCalc->getServiceManager();
++    
++    try
++    {
++        Reference<lang::XMultiServiceFactory> xConfig(
++            xFactory->createInstanceWithContext(
++                ascii("com.sun.star.configuration.ConfigurationProvider"),
++                mpCalc->getComponentContext() ),
++            UNO_QUERY_THROW );
++    
++        beans::PropertyValue prop;
++        prop.Name = ascii("nodepath");
++        prop.Value = asciiAny("/org.openoffice.Setup/L10N");
++        Any any;
++        any <<= prop;
++        Sequence<Any> props(1);
++        props[0] = any;
++        Reference<container::XNameAccess> xNA(
++            xConfig->createInstanceWithArguments(
++                ascii("com.sun.star.configuration.ConfigurationAccess"), props),
++            UNO_QUERY_THROW );
++    
++        any = xNA->getByName(ascii("ooLocale"));
++        OUString localeName;
++        if (any >>= localeName)
++            // successfully obtained the system locale name!
++            return localeName;
++    }
++    catch (const Exception&)
++    {
++        Debug("exception caught during locale query.");
++    }
++
++    return OUString();
++}
++
++const lang::Locale StringResMgr::getSystemLocale() const
++{
++    lang::Locale locale;
++
++    OUString localeStr = getSystemLocaleString();
++    sal_Int32 n = localeStr.getLength();
++    const sal_Unicode* chars = localeStr.getStr();
++    OUStringBuffer buf;
++    for (sal_Int32 i = 0; i < n; ++i)
++    {
++        if (i == 2)
++            // Ignore the 3rd character ('_').
++            continue;
++
++        const sal_Unicode c = chars[i];
++        buf.append(c);
++        if (i == 1)
++            locale.Language = buf.makeStringAndClear();
++        else if (i == 4)
++        {
++            locale.Country = buf.makeStringAndClear();
++            break;
++        }
++    }
++
++#if DEBUG_SCSOLVER_RESMGR || 1
++    fprintf(stdout, "StringResMgr::getSystemLocale: language = '%s'  country = '%s'\n",
++            OUStringToOString(locale.Language, RTL_TEXTENCODING_UTF8).getStr(),
++            OUStringToOString(locale.Country, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++#endif    
++
++    return locale;
++}
++
++const OUString StringResMgr::getLocaleStr(int resid)
++{
++    return getLocaleStr(getResNameByID(resid));
++}
++
++const OUString StringResMgr::getLocaleStr(const OUString& resName)
++{
++    if (!mbStringLoaded)
++    {
++        loadStrings();
++        mbStringLoaded = true;
++    }
++
++    if (!mxStrResMgr.is() || !resName.getLength())
++        return ascii("(empty)");
++
++    try
++    {
++        return mxStrResMgr->resolveString(resName);
++    }
++    catch (const MissingResourceException&)
++    {
++    }
++
++    return ascii("(missing)");
++}
++
++void StringResMgr::init()
++{
++    // Get the base directory path where the translation files are stored.
++
++    Reference<XPackageInformationProvider> xPkgInfo = PackageInformationProvider::get(
++        mpCalc->getComponentContext() );
++
++    OUStringBuffer filePathBuf( xPkgInfo->getPackageLocation(ascii("org.go-oo.CalcSolver")) );
++    filePathBuf.appendAscii("/translation/");
++    msBaseTransDirPath = filePathBuf.makeStringAndClear();
++
++    // Initialize the UNO string resource manager.
++
++    Reference<lang::XMultiComponentFactory> xFactory = mpCalc->getServiceManager();
++
++    mxStrResMgr.set(
++        xFactory->createInstanceWithContext( 
++            ascii("com.sun.star.resource.StringResource"),
++            mpCalc->getComponentContext() ),
++        UNO_QUERY );
++
++    if (!mxStrResMgr.is())
++        return;
++}
++
++OUString StringResMgr::getResNameByID(int resid)
++{
++    static const OUString resNameList[] = {
++        // SCSOLVER_STR_MAINDLG_TITLE
++        ascii("SolverDialog.Title"),
++        // SCSOLVER_STR_DEFINE_MODEL
++        ascii("SolverDialog.flModel.Label"),
++        // SCSOLVER_STR_SET_TARGET_CELL
++        ascii("SolverDialog.ftTargetCell.Label"),
++        // SCSOLVER_STR_GOAL
++        ascii("SolverDialog.ftObj.Label"),
++        // SCSOLVER_STR_MAXIMIZE
++        ascii("SolverDialog.rbMax.Label"),
++        // SCSOLVER_STR_MINIMIZE
++        ascii("SolverDialog.rbMin.Label"),
++        // SCSOLVER_STR_DECISIONVAR_CELLS
++        ascii("SolverDialog.ftDecVars.Label"),
++        // SCSOLVER_STR_CONSTRAINT_SEP
++        ascii("SolverDialog.flConstraints.Label"),
++        // SCSOLVER_STR_CONSTRAINTDLG_TITLE
++        ascii("ConstEditDialog.Title"),
++        // SCSOLVER_STR_CELL_REFERENCE
++        ascii("ConstEditDialog.ftLeft.Label"),
++        // SCSOLVER_STR_CONSTRAINT
++        ascii("ConstEditDialog.ftRight.Label"),
++        // SCSOLVER_STR_BTN_OK
++        ascii("Common.OK.Label"),
++        // SCSOLVER_STR_BTN_CANCEL
++        ascii("Common.Cancel.Label"),
++        // SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH
++        ascii("Common.ConstRangeMismatch.Label"),
++        // SCSOLVER_STR_BTN_ADD
++        ascii("SolverDialog.btnConstAdd.Label"),
++        // SCSOLVER_STR_BTN_CHANGE
++        ascii("SolverDialog.btnConstChange.Label"),
++        // SCSOLVER_STR_BTN_DELETE
++        ascii("SolverDialog.btnConstDelete.Label"),
++        // SCSOLVER_STR_BTN_SOLVE
++        ascii("SolverDialog.btnSolve.Label"),
++        // SCSOLVER_STR_BTN_RESET
++        ascii("SolverDialog.btnReset.Label"),
++        // SCSOLVER_STR_BTN_OPTIONS
++        ascii("SolverDialog.btnOptions.Label"),
++        // SCSOLVER_STR_BTN_SAVE_MODEL
++        ascii("SolverDialog.btnSave.Label"),
++        // SCSOLVER_STR_BTN_LOAD_MODEL
++        ascii("SolverDialog.btnLoad.Label"),
++        // SCSOLVER_STR_BTN_CLOSE
++        ascii("SolverDialog.btnClose.Label"),
++        // SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND
++        ascii("Common.SolutionNotFound.Label"),
++        // SCSOLVER_STR_MSG_SOLUTION_FOUND
++        ascii("Common.SolutionFound.Label"),
++        // SCSOLVER_STR_MSG_CELL_GEOMETRIES_DIFFER
++        ascii("Common.CellGeometriesDiffer.Label"),
++        // SCSOLVER_STR_MSG_MAX_ITERATION_REACHED
++        ascii("Common.MaxIterationReached.Label"),
++        // SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT
++        ascii("Common.StdException.Label"),
++        // SCSOLVER_STR_MSG_ITERATION_TIMED_OUT
++        ascii("Common.IterationTimedOut.Label"),
++        // SCSOLVER_STR_MSG_GOAL_NOT_SET
++        ascii("Common.GoalNotSet.Label"),
++        // SCSOLVER_STR_OPTIONDLG_TITLE
++        ascii("OptionDialog.Title"),
++        // SCSOLVER_STR_OPTION_ASSUME_LINEAR
++        ascii("OptionDialog.cbLinear.Label"),
++        // SCSOLVER_STR_OPTION_VAR_POSITIVE
++        ascii("OptionDialog.cbPositiveValue.Label"),
++        // SCSOLVER_STR_OPTION_VAR_INTEGER
++        ascii("OptionDialog.cbIntegerValue.Label"),
++        // SCSOLVER_STR_TARGET_NOT_SET
++        ascii("Common.TargetNotSet.Label"),
++        // SCSOLVER_STR_DECISIONVAR_NOT_SET
++        ascii("Common.DecisionNotSet.Label")
++    };
++
++    if (resid - SCSOLVER_RES_START >= sizeof(resNameList)/sizeof(resNameList[0]))
++        return ascii("");
++
++    return resNameList[resid - SCSOLVER_RES_START];
++}
++
++void StringResMgr::loadStrings(const PropertiesFile& propFile)
++{
++    Reference<ucb::XSimpleFileAccess> xFileAccess = getSimpleFileAccess();
++
++    if (!xFileAccess.is())
++        return;
++
++    if (!xFileAccess->exists(propFile.FilePath))
++        // file does not exist.
++        return;
++
++    Reference<XInputStream> xInStrm = xFileAccess->openFileRead(propFile.FilePath);
++    if (!xInStrm.is())
++        // The input stream is empty.  Bail out.
++        return;
++
++    sal_Int32 fileSize = xFileAccess->getSize(propFile.FilePath);
++    Sequence<sal_Int8> bytes;
++    xInStrm->readBytes(bytes, fileSize);
++    vector<Entry> entries;
++    parsePropertiesStream(bytes, entries);
++    try
++    {
++        mxStrResMgr->newLocale(propFile.Locale);
++    }
++    catch(const container::ElementExistException&)
++    {
++    }
++    mxStrResMgr->setCurrentLocale(propFile.Locale, false);
++    vector<Entry>::const_iterator itr = entries.begin(), itrEnd = entries.end();
++    for (; itr != itrEnd; ++itr)
++    {
++#if DEBUG_SCSOLVER_RESMGR        
++        fprintf(stdout, "StringResMgr::loadStrings: '%s' = '%s'\n",
++                OUStringToOString(itr->Name, RTL_TEXTENCODING_UTF8).getStr(),
++                OUStringToOString(itr->Value, RTL_TEXTENCODING_UTF8).getStr());fflush(stdout);
++#endif        
++        mxStrResMgr->setString(itr->Name, itr->Value);
++    }
++}
++
++void StringResMgr::getPropertiesFiles(vector<PropertiesFile>& files)
++{
++    Reference<XSimpleFileAccess> xFileAccess = getSimpleFileAccess();
++    if (!xFileAccess.is())
++        return;
++
++    Sequence<OUString> alldirs = xFileAccess->getFolderContents(msBaseTransDirPath, true);
++    sal_Int32 dirCount = alldirs.getLength();
++    if (!dirCount)
++        return;
++
++    const sal_Int32 beginPos = msBaseTransDirPath.getLength();
++
++    const sal_Unicode dash   = sal_Unicode('-');
++    const sal_Unicode a = sal_Unicode('a');
++    const sal_Unicode z = sal_Unicode('z');
++    const sal_Unicode A = sal_Unicode('A');
++    const sal_Unicode Z = sal_Unicode('Z');
++
++    const OUString ext = ascii(".properties");
++
++    files.clear();
++    for (sal_Int32 i = 0; i < dirCount; ++i)
++    {
++        if (!xFileAccess->isFolder(alldirs[i]))
++            continue;
++
++        // Parse the directory name to make sure it's a valid locale name.
++
++        const sal_Unicode* chars = alldirs[i].getStr();
++        sal_Int32 strSize = alldirs[i].getLength();
++        OUStringBuffer buf;
++        vector<OUString> names;
++        lang::Locale locale;
++        bool validName = true;
++        for (sal_Int32 j = beginPos; j < strSize; ++j)
++        {
++            const sal_Unicode c = chars[j];
++            if (c == dash)
++            {
++                if (!buf.getLength())
++                {
++                    validName = false;
++                    break;
++                }
++
++                if (!locale.Language.getLength())
++                    locale.Language = buf.makeStringAndClear();
++                else if (!locale.Country.getLength())
++                    locale.Country = buf.makeStringAndClear();
++                else if (!locale.Variant.getLength())
++                    locale.Variant = buf.makeStringAndClear();
++                else
++                {
++                    validName = false;
++                    break;
++                }
++            }
++            else if ( !((a <= c && c <= z) || (A <= c && c <= Z)) )
++            {
++                // only alphabets are allowed.
++                validName = false;
++                break;
++            }
++            else
++                buf.append(c);
++        }
++
++        if (buf.getLength())
++        {
++            if (!locale.Language.getLength())
++                locale.Language = buf.makeStringAndClear();
++            else if (!locale.Country.getLength())
++                locale.Country = buf.makeStringAndClear();
++            else if (!locale.Variant.getLength())
++                locale.Variant = buf.makeStringAndClear();
++            else
++                validName = false;
++        }
++
++        if (!validName)
++            continue;
++
++#if DEBUG_SCSOLVER_RESMGR        
++        fprintf(stdout, "StringResMgr::getPropertiesFiles: locale '%s' '%s' '%s'\n",
++                OUStringToOString(locale.Language, RTL_TEXTENCODING_UTF8).getStr(),
++                OUStringToOString(locale.Country, RTL_TEXTENCODING_UTF8).getStr(),
++                OUStringToOString(locale.Variant, RTL_TEXTENCODING_UTF8).getStr());
++        fflush(stdout);
++#endif        
++
++        // Pick up all *.properties files.
++        Sequence<OUString> allfiles = xFileAccess->getFolderContents(alldirs[i], false);
++        sal_Int32 fileCount = allfiles.getLength();
++        for (sal_Int32 j = 0; j < fileCount; ++j)
++        {
++            sal_Int32 extPos = allfiles[j].indexOf(ext);
++            if (extPos < 0 || extPos != allfiles[j].getLength() - ext.getLength())
++                // the desired extension not found.  skip it.
++                continue;
++
++            PropertiesFile file;
++            file.FilePath = allfiles[j];
++            file.Locale = locale;
++            files.push_back(file);
++        }
++    }
++}
++
++void StringResMgr::parsePropertiesStream(const Sequence<sal_Int8>& bytes, 
++                                         vector<Entry>& rEntries)
++{
++    PropStreamParser parser(bytes);
++    parser.parse();
++    parser.getEntries(rEntries);
++    
++}
++
++Reference<ucb::XSimpleFileAccess> StringResMgr::getSimpleFileAccess()
++{
++    if (!mxFileAccess.is())
++    {
++        Reference<lang::XMultiComponentFactory> xFactory = mpCalc->getServiceManager();
++        mxFileAccess.set( 
++            xFactory->createInstanceWithContext(
++                ascii("com.sun.star.ucb.SimpleFileAccess"),
++                mpCalc->getComponentContext() ), 
++            UNO_QUERY );
++    }
++
++    return mxFileAccess;
++}
++
++// ---------------------------------------------------------------------------
++
++PropStreamParser::PropStreamParser(const Sequence<sal_Int8>& bytes) :
++    mrBytes(bytes)
++{
++}
++
++PropStreamParser::~PropStreamParser()
++{
++}
++
++void PropStreamParser::parse()
++{
++    sal_Int32 size = mrBytes.getLength();
++    vector<sal_Char> buf;
++    OUString name, value;
++    buf.reserve(80);
++    bool inRHS = false;
++    bool inNumericID = true;
++    for (sal_Int32 i = 0; i < size; ++i)
++    {
++        switch (mrBytes[i])
++        {
++            case '#':
++                advanceToLinefeed(i);
++            case 0x0A: // linefeed
++                purgeBuffer(value, buf);
++                pushEntry(name, value);
++                inRHS = false;
++                inNumericID = true;
++                name = OUString();
++            break;
++            case '=':
++                if (inRHS)
++                    buf.push_back(mrBytes[i]);
++                else
++                {
++                    inRHS = true;
++                    purgeBuffer(name, buf);
++                }
++            break;
++            case '.':
++                if (inNumericID)
++                    // First dot is encountered.
++                    inNumericID = false;
++                else
++                    buf.push_back(mrBytes[i]);
++            break;
++            case '0':
++            case '1':
++            case '2':
++            case '3':
++            case '4':
++            case '5':
++            case '6':
++            case '7':
++            case '8':
++            case '9':
++                if (!inNumericID)
++                    buf.push_back(mrBytes[i]);
++            break;
++            default:
++                buf.push_back(mrBytes[i]);
++                inNumericID = false;
++            break;
++        }
++    }
++}
++
++void PropStreamParser::getEntries(vector<StringResMgr::Entry>& rEntries) const
++{
++    vector<StringResMgr::Entry> entries(mEntries.begin(), mEntries.end());
++    rEntries.swap(entries);
++}
++
++void PropStreamParser::advanceToLinefeed(sal_Int32& i) const
++{
++    sal_Int32 size = mrBytes.getLength();
++    for (; i < size; ++i)
++        if (mrBytes[i] == 0x0a)
++            return;
++}
++
++void PropStreamParser::purgeBuffer(OUString& rValue, vector<sal_Char>& rBuf) const
++{
++    if (rBuf.empty())
++        rValue = OUString();
++    else
++    {
++        const sal_Char* p = &rBuf[0];
++        OUString _value(p, rBuf.size(), RTL_TEXTENCODING_UTF8);
++        rBuf.clear();
++        rValue = _value;
++    }
++}
++
++void PropStreamParser::pushEntry(const OUString& name, const OUString& value)
++{
++    if (!name.getLength())
++        return;
++
++    StringResMgr::Entry entry;
++    entry.Name = name.trim();
++    entry.Value = value.trim();
++    mEntries.push_back(entry);
++}
++
++}

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-scsolver-src.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-scsolver-src.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-scsolver-src.diff	Fri Feb 22 01:23:07 2008
@@ -1,206 +1,322 @@
 --- /dev/null	
 +++ scsolver/source/ui/scsolver.src	
-@@ -0,0 +1,203 @@
+@@ -0,0 +1,319 @@
 +#include "scsolver.hrc"
 +
 +String SCSOLVER_STR_MAINDLG_TITLE
 +{
 +	Text [ en-US ] = "Optimization Solver";
-+	Text [ de ] = "OptimierungslÃser"; 
++	Text [ de ] = "OptimierungslÃser";
++	Text [ fr ] = "Solveur";
++	Text [ hu ] = "OptimalizÃlà megoldÃ";
++	Text [ ru ] = "ÐÐÑÐÐÐÐÑÐÐÐ ÑÐÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_DEFINE_MODEL
 +{
-+	Text [ en-US ] = "Define Model";
++	Text [ en-US ] = "Model";
 +	Text [ de ] = "Modell definieren";
++	Text [ fr ] = "DÃfinition du modÃle";
++	Text [ hu ] = "Modell";
++	Text [ ru ] = "ÐÐÑÐÐÐÐÐÑÑ ÐÐÐÐÐÑ";
 +};
 +
 +String SCSOLVER_STR_SET_TARGET_CELL
 +{
-+	Text [ en-US ] = "Set target cell";
++	Text [ en-US ] = "Target";
 +	Text [ de ] = "Zielzelle angeben";
++	Text [ fr ] = "Cellule cible";
++	Text [ hu ] = "EredmÃny";
++	Text [ ru ] = "ÐÐÐÐÐÐÑ ÑÑÐÐÑÐÑ";
 +};
 +
 +String SCSOLVER_STR_GOAL
 +{
 +	Text [ en-US ] = "Goal";
 +	Text [ de ] = "Ziel";
++	Text [ fr ] = "Valeur cible";
++	Text [ hu ] = "CÃl";
++	Text [ ru ] = "ÐÐÐÑ";
 +};
 +
 +String SCSOLVER_STR_MAXIMIZE
 +{
 +	Text [ en-US ] = "Maximize";
 +	Text [ de ] = "Maximieren";
++	Text [ fr ] = "Maximiser";
++	Text [ hu ] = "MaximalizÃlÃs";
++	Text [ ru ] = "ÐÐÐÑÐÐÑÐ";
 +};
 +
 +String SCSOLVER_STR_MINIMIZE
 +{
 +	Text [ en-US ] = "Minimize";
 +	Text [ de ] = "Minimieren";
++	Text [ fr ] = "Minimiser";
++	Text [ hu ] = "MinimalizÃlÃs";
++	Text [ ru ] = "ÐÐÐÐÐÑÐ";
 +};
 +
 +String SCSOLVER_STR_DECISIONVAR_CELLS
 +{
 +	Text [ en-US ] = "By changing cells";
 +	Text [ de ] = "Durch das Ãndern der Zellen";
++	Text [ fr ] = "En modifiant les cellules";
++	Text [ hu ] = "MegvÃltoztatandà cellÃk";
++	Text [ ru ] = "ÐÐÑÐÐÐÑÑÑ ÑÑÐÐÑÐÐ";
 +};
 +
 +String SCSOLVER_STR_CONSTRAINT_SEP
 +{
 +	Text [ en-US ] = "Subject to the constraints";
 +	Text [ de ] = "AbhÃngig von den Begrenzungen";
++	Text [ fr ] = "Contraintes appliquÃes";
++	Text [ hu ] = "KÃnyszerÃtÅ tÃnyezÅk";
++	Text [ ru ] = "ÐÐÑÐÐÐÑÐÐÐÑ ÐÐÐÑÐÐÐÐ ÐÐÑÐÐÐÑÑÐÐ";
 +};
 +
 +String SCSOLVER_STR_CONSTRAINTDLG_TITLE
 +{
 +	Text [ en-US ] = "Constraint";
 +	Text [ de ] = "Begrenzung";
++	Text [ fr ] = "Contrainte";
++	Text [ hu ] = "KÃnyszerÃtÅ";
++	Text [ ru ] = "ÐÐÑÐÐÐÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_CELL_REFERENCE
 +{
 +	Text [ en-US ] = "Cell Reference";
 +	Text [ de ] = "Zellenhinweis";
++	Text [ fr ] = "RÃfÃrence de la cellule";
++	Text [ hu ] = "CellahivatkozÃs";
++	Text [ ru ] = "ÐÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_CONSTRAINT
 +{
 +	Text [ en-US ] = "Constraint";
 +	Text [ de ] = "Begrenzung";
++	Text [ fr ] = "Contrainte";
++	Text [ hu ] = "KÃnyszerÃtÅ";
++	Text [ ru ] = "ÐÐÑÐÐÐÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_BTN_OK
 +{
 +	Text [ en-US ] = "OK";
 +	Text [ de ] = "OK";
++	Text [ fr ] = "OK";
++	Text [ hu ] = "OK";
++	Text [ ru ] = "OK";
 +};
 +
 +String SCSOLVER_STR_BTN_CANCEL
 +{
 +	Text [ en-US ] = "Cancel";
 +	Text [ de ] = "Abbrechen";
++	Text [ fr ] = "Annuler";
++	Text [ hu ] = "MÃgse";
++	Text [ ru ] = "ÐÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_MSG_REF_CON_RANGE_MISMATCH
 +{
 +	Text [ en-US ] = "The reference and constraint ranges do not match.";
 +	Text [ de ] = "Die Bezugs- und Begrenzungslinien passen nicht zusammen.";
++	Text [ fr ] = "La rÃfÃrence et la contrainte ne correspondent pas";
++	Text [ hu ] = "A cellahivatkozÃs Ãs a kÃnyszerÃtÅktartomÃnyai nem egyeznek meg.";
++	Text [ ru ] = "ÐÐÐÐÐÐÐÐÑ ÑÑÐÐÐ ÐÐ ÑÐÐÐÐÐÐÑÑ.";
 +};
 +
 +String SCSOLVER_STR_BTN_ADD
 +{
 +	Text [ en-US ] = "Add";
 +	Text [ de ] = "HinzufÃgen";
++	Text [ fr ] = "Ajouter";
++	Text [ hu ] = "HozzÃadÃs";
++	Text [ ru ] = "ÐÐÐÐÐÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_CHANGE
 +{
 +	Text [ en-US ] = "Change";
 +	Text [ de ] = "Ãndern";
++	Text [ fr ] = "Modifier";
++	Text [ hu ] = "MÃdosÃtÃs";
++	Text [ ru ] = "ÐÐÐÐÐÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_DELETE
 +{
 +	Text [ en-US ] = "Delete";
 +	Text [ de ] = "LÃschen";
++	Text [ fr ] = "Effacer";
++	Text [ hu ] = "TÃrlÃs";
++	Text [ ru ] = "ÐÐÐÐÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_SOLVE
 +{
 +	Text [ en-US ] = "Solve";
 +	Text [ de ] = "LÃsen";
++	Text [ fr ] = "RÃsoudre";
++	Text [ hu ] = "MegoldÃs";
++	Text [ ru ] = "ÐÐÑÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_RESET
 +{
 +	Text [ en-US ] = "Reset";
 +	Text [ de ] = "ZurÃckstellen";
++	Text [ fr ] = "RÃinitialiser";
++	Text [ hu ] = "AlapÃllapot";
++	Text [ ru ] = "ÐÐÑÐÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_OPTIONS
 +{
 +	Text [ en-US ] = "Options";
 +	Text [ de ] = "Optionen";
++	Text [ fr ] = "Options";
++	Text [ hu ] = "BeÃllÃtÃsok";
++	Text [ ru ] = "ÐÐÑÑÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_BTN_SAVE_MODEL
 +{
 +	Text [ en-US ] = "Save";
 +	Text [ de ] = "Speichern";
++	Text [ fr ] = "Enregistrer";
++	Text [ hu ] = "MentÃs";
++	Text [ ru ] = "ÐÐÑÑÐÐÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_LOAD_MODEL
 +{
 +	Text [ en-US ] = "Load";
 +	Text [ de ] = "Laden";
++	Text [ fr ] = "Charger";
++	Text [ hu ] = "MegnyitÃs";
++	Text [ ru ] = "ÐÐÐÑÑÐÐÑÑ";
 +};
 +
 +String SCSOLVER_STR_BTN_CLOSE
 +{
 +	Text [ en-US ] = "Close";
 +	Text [ de ] = "SchlieÃen";
++	Text [ fr ] = "Fermer";
++	Text [ hu ] = "BezÃrÃs";
++	Text [ ru ] = "ÐÐÐÑÑÑÑ";
 +};
 +
 +String SCSOLVER_STR_MSG_SOLUTION_NOT_FOUND
 +{
 +	Text [ en-US ] = "Solution could not be found";
 +	Text [ de ] = "LÃsung kann nicht gefunden werden";
++	Text [ fr ] = "La solution ne peut Ãtre trouvÃe";
++	Text [ hu ] = "Nem sikerÃlt megoldÃst talÃlni";
++	Text [ ru ] = "ÐÐÑÐÐÐÐ ÐÐ ÐÐÐÐÑ ÐÑÑÑ ÐÐÐÐÐÐÐ.";
 +};
 +
 +String SCSOLVER_STR_MSG_SOLUTION_FOUND
 +{
 +	Text [ en-US ] = "Solution found";
 +	Text [ de ] = "LÃsung gefunden";
++	Text [ fr ] = "Solution trouvÃe";
++	Text [ hu ] = "SikerÃlt megtalÃlni a megoldÃst";
++	Text [ ru ] = "ÐÐÑÐÐÐÐ ÐÐÐÐÐÐÐ.";
 +};
 +
 +String SCSOLVER_STR_MSG_CELL_GEOMETRIES_DIFFER
 +{
 +	Text [ en-US ] = "Cell geometries differ";
 +	Text [ de ] = "Zellform unterschiedlich";
++	Text [ fr ] = "Les geomÃtries de plage de cellules diffÃrent";
++	Text [ hu ] = "A cellÃk ÃsszeÃllÃtÃsa eltÃrÅ";
++	Text [ ru ] = "ÐÐÑÐÐÑ ÑÑÐÐÐÐ ÐÑÐÐÑÐÐÑÑÑ.";
 +};
 +
 +String SCSOLVER_STR_MSG_MAX_ITERATION_REACHED
 +{
 +	Text [ en-US ] = "Maximum iteration reached";
 +	Text [ de ] = "Maximale Iterationen erreicht";
++	Text [ fr ] = "Maximum d'itÃration atteint";
++	Text [ hu ] = "A kÃzelÃtÃs lÃpÃsszÃma elÃrte a maximÃlis ÃrtÃket";
++	Text [ ru ] = "ÐÑÐÐÐÐÐÐÐ ÐÐÐÑÐÐÐÐÑÐÐÐ ÐÐÐÐÑÐÑÑÐÐ ÐÑÐÑÐÑÐÐ.";
 +};
 +
 +String SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT
 +{
 +	Text [ en-US ] = "Standard exception caught";
 +	Text [ de ] = "Standardauswahl treffen";
++	Text [ fr ] = "Erreur standard dÃtectÃe";
++	Text [ hu ] = "ÃltalÃnos kivÃteli hiba";
++	Text [ ru ] = "ÐÑÐÐÐÐÐ ÑÑÐÐÐÐÑÑÐÐÐ ÐÑÐÐÑÑÐÐÐÐ.";
 +};
 +
 +String SCSOLVER_STR_MSG_ITERATION_TIMED_OUT
 +{
 +	Text [ en-US ] = "Iteration timed out";
 +	Text [ de ] = "Iteration unterbrochen";
++	Text [ fr ] = "Limite de temps d'itÃrations atteinte";
++	Text [ hu ] = "A kÃzelÃtÃs idÅtÃllÃpÃst okozott";
++	Text [ ru ] = "ÐÑÐÐÐÐÐÐÐ ÐÐÐÑÐÐÐÐÑÐÐÐ ÐÐÐÐÑÐÑÑÐÐ ÐÑÐÑÐÑÐÐ.";
 +};
 +
 +String SCSOLVER_STR_MSG_GOAL_NOT_SET
 +{
 +	Text [ en-US ] = "Goal is not set";
 +	Text [ de ] = "Ziel ist nicht gesetzt";
++	Text [ fr ] = "Valeur cible non renseignÃe";
++	Text [ hu ] = "Nincsen megadva cÃl";
++	Text [ ru ] = "ÐÐ ÑÐÐÐÐÐÐ ÑÐÐÑ";
 +};
 +
 +String SCSOLVER_STR_OPTIONDLG_TITLE
 +{
 +	Text [ en-US ] = "Options";
 +	Text [ de ] = "Optionen";
++	Text [ fr ] = "Options";
++	Text [ hu ] = "BeÃllÃtÃsok";
++	Text [ ru ] = "ÐÐÑÑÑÐÐÐÐ";
 +};
 +
 +String SCSOLVER_STR_OPTION_ASSUME_LINEAR
 +{
 +	Text [ en-US ] = "Assume linear model";
 +	Text [ de ] = "Lineares Modell angenommen";
++	Text [ fr ] = "HypothÃse de modÃle linÃaire";
++	Text [ hu ] = "LineÃris modell alkalmazÃsa";
++	Text [ ru ] = "ÐÐÐÐÐÐÐÑ ÐÐÐÐÐÑ";
 +};
 +
 +String SCSOLVER_STR_OPTION_VAR_POSITIVE
 +{
 +	Text [ en-US ] = "Allow only positive values";
++	Text [ fr ] = "N'autoriser que les valeurs positives";
++	Text [ hu ] = "KizÃrÃlag pozitÃv ÃrtÃkek engedÃlyezÃse";
++	Text [ ru ] = "ÐÐÐÑÐÐ ÐÐÐÐÐÐÑÐÐÑÐÑÐ ÐÐÐÑÐÐÐÑ";
 +};
 +
 +String SCSOLVER_STR_OPTION_VAR_INTEGER
 +{
 +	Text [ en-US ] = "Allow only integer values";
++	Text [ fr ] = "N'autoriser que des valeurs entiÃres";
++	Text [ hu ] = "KizÃrÃlag egÃsz ÃrtÃkek engedÃlyezÃse";
++	Text [ ru ] = "ÐÐÐÑÐÐ ÑÐÐÑÐ ÐÐÐÑÐÐÐÑ";
 +};
++
++String SCSOLVER_STR_TARGET_NOT_SET
++{
++    Text [ en-US ] = "Target cell address empty";
++    Text [ ru ] = "ÐÐ ÐÐÐÐÐÐ ÑÑÐÐÐÐ ÑÐÐÐÐÐÐ ÑÑÐÐÑÐÐ";
++};
++
++String SCSOLVER_STR_DECISIONVAR_NOT_SET
++{
++    Text [ en-US ] = "Decision variable cells empty";
++    Text [ ru ] = "ÐÐ ÐÐÐÐÐÑ ÑÑÐÐÐÐ ÐÐÑÐÐÐÑÑÐÐ";
++};
++
++

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-solvemodel-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-solvemodel-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-solvemodel-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/solvemodel.cxx	
-@@ -0,0 +1,742 @@
+@@ -0,0 +1,750 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -40,6 +40,7 @@
 +#include "option.hxx"
 +#include "numeric/lpmodel.hxx"
 +#include "numeric/nlpmodel.hxx"
++#include "numeric/matrix.hxx"
 +#include "numeric/type.hxx"
 +#include "numeric/lpbase.hxx"
 +#include "numeric/exception.hxx"
@@ -58,10 +59,15 @@
 +
 +#include "scsolver.hrc"
 +
-+using namespace std;
 +using namespace scsolver::numeric;
 +using scsolver::numeric::Matrix;
 +using com::sun::star::table::CellAddress;
++using ::std::vector;
++using ::std::cout;
++using ::std::endl;
++using ::std::map;
++using ::std::auto_ptr;
++using ::std::distance;
 +
 +namespace scsolver {
 +
@@ -232,7 +238,7 @@
 +		Goal eGoal = pMainDlg->getGoal();
 +		if ( eGoal == GOAL_UNKNOWN )
 +		{
-+			pMainDlg->showSolveError( 
++			pMainDlg->showMessage( 
 +				pMainDlg->getResStr(SCSOLVER_STR_MSG_GOAL_NOT_SET) );
 +			return;
 +		}
@@ -259,8 +265,8 @@
 +		aModel.setVarPositive( pOption->getVarPositive() );
 +		aModel.setVarInteger( pOption->getVarInteger() );
 +
-+#ifdef SCSOLVER_DEBUG
-+		aModel.print(); // prints model to stdout
++#if SCSOLVER_DEBUG
++        aModel.print(); // prints model to stdout
 +#endif
 +		aModel.setPrecision( 2 );
 +		auto_ptr<lp::BaseAlgorithm> algorithm = getLpAlgorithm();
@@ -284,12 +290,12 @@
 +		catch( const scsolver::RuntimeError& e )
 +		{
 +			// This error message is localizable.
-+			pMainDlg->showSolveError( e.getMessage() );
++			pMainDlg->showMessage( e.getMessage() );
 +		}
-+		catch( const std::exception& e )
++		catch( const ::std::exception& e )
 +		{
 +			// standard exception.  should rarely happen.
-+			pMainDlg->showSolveError(
++			pMainDlg->showMessage(
 +				pMainDlg->getResStr(SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT) );
 +		}
 +	}
@@ -305,7 +311,8 @@
 +		Goal eGoal = pMainDlg->getGoal();
 +		if ( eGoal == GOAL_UNKNOWN )
 +		{
-+			pMainDlg->showSolveError( ascii_i18n("Goal is not set") );
++			pMainDlg->showMessage(
++                pMainDlg->getResStr(SCSOLVER_STR_MSG_GOAL_NOT_SET) );
 +			return;
 +		}
 +
@@ -338,21 +345,21 @@
 +		}
 +		catch ( const IterationTimedOut& )
 +		{
-+			pMainDlg->showSolveError(
++			pMainDlg->showMessage(
 +				getSolverImpl()->getResStr(SCSOLVER_STR_MSG_ITERATION_TIMED_OUT) );
 +		}
 +		catch ( const MaxIterationReached& )
 +		{
-+			pMainDlg->showSolveError(
++			pMainDlg->showMessage(
 +				getSolverImpl()->getResStr(SCSOLVER_STR_MSG_MAX_ITERATION_REACHED) );
 +		}
 +		catch ( const RuntimeError& e )
 +		{
-+			pMainDlg->showSolveError( e.getMessage() );
++			pMainDlg->showMessage( e.getMessage() );
 +		}
 +		catch ( const ::std::exception& )
 +		{
-+			pMainDlg->showSolveError(
++			pMainDlg->showMessage(
 +				getSolverImpl()->getResStr(SCSOLVER_STR_MSG_STD_EXCEPTION_CAUGHT) );
 +		}
 +	}
@@ -507,7 +514,7 @@
 +	{
 +		rtl::OUString sTargetCellAddr = m_pSolverImpl->getMainDialog()->getTargetCellAddress();
 +		if ( !sTargetCellAddr.getLength() )
-+			throw RuntimeError( ascii_i18n("Target cell address empty") );
++			throw RuntimeError( getSolverImpl()->getResStr(SCSOLVER_STR_TARGET_NOT_SET) );
 +
 +		CellAddress aAddr = m_pSolverImpl->getCalcInterface()->getCellAddress(
 +			sTargetCellAddr );
@@ -528,7 +535,8 @@
 +	
 +		rtl::OUString sAddr = m_pSolverImpl->getMainDialog()->getVarCellAddress();
 +		if ( !sAddr.getLength() )
-+			throw RuntimeError( ascii_i18n("Decision variable cells empty") );
++			throw RuntimeError( 
++                getSolverImpl()->getResStr(SCSOLVER_STR_DECISIONVAR_NOT_SET) );
 +
 +		CellRangeAddress aRangeAddr = m_pSolverImpl->getCalcInterface()->getCellRangeAddress(sAddr);
 +		

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-unoglobal-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-unoglobal-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-unoglobal-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/unoglobal.cxx	
-@@ -0,0 +1,102 @@
+@@ -0,0 +1,110 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -33,6 +33,7 @@
 +#include <com/sun/star/lang/XServiceInfo.hpp>
 +#include <com/sun/star/table/CellAddress.hpp>
 +
++using ::com::sun::star::uno::Any;
 +
 +namespace scsolver {
 +
@@ -42,9 +43,16 @@
 +    std::cout << o.getStr() << std::endl;
 +}
 +
-+rtl::OUString ascii( const sal_Char* sAscii )
++const ::rtl::OUString ascii(const sal_Char* text)
 +{
-+	return rtl::OUString::createFromAscii( sAscii );
++	return rtl::OUString::createFromAscii(text);
++}
++
++const Any asciiAny(const sal_Char* text)
++{
++    Any any;
++    any <<= ascii(text);
++    return any;
 +}
 +
 +/** Splits a string into a list of string elements separated by a specified

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-xcalc-cxx.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-xcalc-cxx.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-source-ui-xcalc-cxx.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/source/ui/xcalc.cxx	
-@@ -0,0 +1,450 @@
+@@ -0,0 +1,449 @@
 +/*************************************************************************
 + *
 + *  The Contents of this file are made available subject to
@@ -66,7 +66,6 @@
 +
 +using com::sun::star::uno::UNO_QUERY;
 +using namespace ::com::sun::star::sheet;
-+using namespace std;
 +
 +namespace scsolver {	
 +
@@ -266,7 +265,7 @@
 +	
 +	Reference< sheet::XCellRangeAddressable > xCRA( xCR2, UNO_QUERY );
 +	aCRAddr = xCRA->getRangeAddress();
-+#ifdef DEBUG
++#if SCSOLVER_DEBUG
 +	sal_Int16 nSheetId = aCRAddr.Sheet;
 +	sal_Int32 nSCol = aCRAddr.StartColumn;
 +	sal_Int32 nSRow = aCRAddr.StartRow;

Modified: branches/opensuse-10-3/patches/scsolver/scsolver-util-makefile-mk.diff
==============================================================================
--- branches/opensuse-10-3/patches/scsolver/scsolver-util-makefile-mk.diff	(original)
+++ branches/opensuse-10-3/patches/scsolver/scsolver-util-makefile-mk.diff	Fri Feb 22 01:23:07 2008
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ scsolver/util/makefile.mk	
-@@ -0,0 +1,40 @@
+@@ -0,0 +1,62 @@
 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 +
 +PRJ=..
@@ -38,6 +38,28 @@
 +RESLIB1NAME=scsolver
 +RESLIB1SRSFILES= $(SRS)/scsolver.srs
 +
++EXTPACKFILES= \
++	$(BIN)/$(SHL1TARGET).oxt \
++	$(BIN)/$(SHL1TARGET).rdb \
++	$(LB)/$(SHL1TARGET).so \
++	../ext/translation \
++	../ext/META-INF \
++	../ext/description.xml \
++	../ext/*.xcu
++
++EXTPACKPATH= \
++	-p ../ext \
++	-p $(BIN) \
++	-p $(LB)
++
 +# --- Targets ------------------------------------------------------------
 +
 +.INCLUDE :	target.mk
++
++COMP=
++
++ALLTAR: $(COMP)
++
++build_ext:
++	$(REGCOMP) -register -wop -r $(BIN)/$(SHL1TARGET).rdb -c $(LB)/$(SHL1TARGET).so
++	python ./packExtension.py $(EXTPACKPATH) $(EXTPACKFILES)

Modified: branches/opensuse-10-3/patches/src680/apply
==============================================================================
--- branches/opensuse-10-3/patches/src680/apply	(original)
+++ branches/opensuse-10-3/patches/src680/apply	Fri Feb 22 01:23:07 2008
@@ -1311,6 +1311,9 @@
 scsolver-changelog.diff
 scsolver-docs-changelog-txt.diff
 scsolver-docs-readme-txt.diff
+scsolver-ext-makefile_sdk-mk.diff
+scsolver-ext-res-en-us-cxx.diff
+scsolver-ext-res-resource-hxx.diff
 scsolver-idl-org-openoffice-sc-solver-bound-idl.diff
 scsolver-idl-org-openoffice-sc-solver-equality-idl.diff
 scsolver-idl-org-openoffice-sc-solver-goal-idl.diff
@@ -1319,6 +1322,7 @@
 scsolver-idl-org-openoffice-sc-solver-xlpmodel-idl.diff
 scsolver-prj-build-lst.diff
 scsolver-prj-d-lst.diff
+scsolver-readme.diff
 scsolver-source-inc-basedlg-hxx.diff
 scsolver-source-inc-baselistener-hxx.diff
 scsolver-source-inc-dialog-hxx.diff
@@ -1339,10 +1343,14 @@
 scsolver-source-inc-numeric-nlpbase-hxx.diff
 scsolver-source-inc-numeric-nlpmodel-hxx.diff
 scsolver-source-inc-numeric-nlpnewton-hxx.diff
+scsolver-source-inc-numeric-polyeqnsolver-hxx.diff
+scsolver-source-inc-numeric-quadfitlinesearch-hxx.diff
 scsolver-source-inc-numeric-suppl-hxx.diff
 scsolver-source-inc-numeric-type-hxx.diff
-scsolver-source-inc-option-hxx.diff
 scsolver-source-inc-optiondlg-hxx.diff
+scsolver-source-inc-option-hxx.diff
+scsolver-source-inc-resmgr-hxx.diff
+scsolver-source-inc-scsolver-hrc.diff
 scsolver-source-inc-solvemodel-hxx.diff
 scsolver-source-inc-solver-hxx.diff
 scsolver-source-inc-tool-global-hxx.diff
@@ -1363,9 +1371,14 @@
 scsolver-source-numeric-lpuno-cxx.diff
 scsolver-source-numeric-makefile-mk.diff
 scsolver-source-numeric-matrix-cxx.diff
+scsolver-source-numeric-matrix_test-cxx.diff
 scsolver-source-numeric-nlpbase-cxx.diff
 scsolver-source-numeric-nlpmodel-cxx.diff
 scsolver-source-numeric-nlpqnewton-cxx.diff
+scsolver-source-numeric-polyeqnsolver-cxx.diff
+scsolver-source-numeric-polyeqnsolver_test-cxx.diff
+scsolver-source-numeric-quadfitlinesearch-cxx.diff
+scsolver-source-numeric-quadfitlinesearch_test-cxx.diff
 scsolver-source-service-makefile-mk.diff
 scsolver-source-service-service-cxx.diff
 scsolver-source-tool-global-cxx.diff
@@ -1381,7 +1394,7 @@
 scsolver-source-ui-nlpbuilder-cxx.diff
 scsolver-source-ui-option-cxx.diff
 scsolver-source-ui-optiondlg-cxx.diff
-scsolver-source-ui-scsolver-hrc.diff
+scsolver-source-ui-resmgr-cxx.diff
 scsolver-source-ui-scsolver-src.diff
 scsolver-source-ui-solvemodel-cxx.diff
 scsolver-source-ui-unoglobal-cxx.diff
@@ -1391,13 +1404,13 @@
 scsolver-util-makefile-pmk.diff
 scsolver-util-scsolver-map.diff
 scsolver-workben-addon_pkg-addons-xcu.diff
-scsolver-workben-addon_pkg-makefile.diff
 scsolver-workben-addon_pkg-makefile_build.diff
+scsolver-workben-addon_pkg-makefile.diff
 scsolver-workben-addon_pkg-protocolhandler-xcu.diff
 scsolver-workben-makefile.diff
-scsolver-workben-matrix-txt.diff
 scsolver-workben-matrix2-txt.diff
 scsolver-workben-matrix_test-cxx.diff
+scsolver-workben-matrix-txt.diff
 scsolver-workben-mx3-txt.diff
 scsolver-workben-nlptest-cxx.diff
 scsolver-workben-optimizer-nlp_skel-main-cxx.diff
@@ -1406,8 +1419,9 @@
 scsolver-workben-optimizer-nlp_skel-myoptimizer-cxx.diff
 scsolver-workben-optimizer-nlp_skel-myoptimizer-hxx.diff
 scsolver-workben-simplex_test-cxx.diff
-scsolver-workben-ublas_test-cxx.diff
 scsolver-workben-ublas_test2-cxx.diff
+scsolver-workben-ublas_test-cxx.diff
+
 # configure check for system-lpsolve
 system-lpsolve-config_office.diff
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]