[Libreoffice-commits] core.git: scaddins/source

Alexander Wilms f.alexander.wilms at gmail.com
Wed Feb 26 06:43:43 PST 2014


 scaddins/source/analysis/analysis.hxx       |    2 -
 scaddins/source/analysis/analysishelper.hxx |   18 ++++++-------
 scaddins/source/analysis/bessel.cxx         |   18 ++++++-------
 scaddins/source/analysis/bessel.hxx         |    6 ++--
 scaddins/source/analysis/financial.cxx      |    4 +-
 scaddins/source/datefunc/datefunc.hxx       |   32 +++++++++++------------
 scaddins/source/pricing/black_scholes.cxx   |   26 +++++++++----------
 scaddins/source/pricing/black_scholes.hxx   |    2 -
 scaddins/source/pricing/pricing.cxx         |    2 -
 scaddins/source/pricing/pricing.hxx         |   38 ++++++++++++++--------------
 10 files changed, 74 insertions(+), 74 deletions(-)

New commits:
commit ca884aab652b2eba6e05e7fae0f2d2d9a8dae5db
Author: Alexander Wilms <f.alexander.wilms at gmail.com>
Date:   Tue Feb 25 20:03:56 2014 +0100

    Remove visual noise from scaddins
    
    Change-Id: I533b172ae62b6a2056109c0e6cf854ec89de8391
    Reviewed-on: https://gerrit.libreoffice.org/8302
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/scaddins/source/analysis/analysis.hxx b/scaddins/source/analysis/analysis.hxx
index 0f781b3..7fa1ef3 100644
--- a/scaddins/source/analysis/analysis.hxx
+++ b/scaddins/source/analysis/analysis.hxx
@@ -234,7 +234,7 @@ public:
     virtual double SAL_CALL     getFvschedule( double fPrinc, const css::uno::Sequence< css::uno::Sequence< double > >& rSchedule ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
 };
 
-//------------------------------------------------------------------
+
 
 #endif
 
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index f565820..bec214b 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -144,7 +144,7 @@ double              GetCoupdays( sal_Int32 nNullDate, sal_Int32 nSettle, sal_Int
 
 
 
-//-----------------------------------------------------------------------------
+
 
 
 
@@ -254,7 +254,7 @@ public:
 
 
 
-//-----------------------------------------------------------------------------
+
 
 /// sorted list with unique sal_Int32 values
 class SortedIndividualInt32List
@@ -300,7 +300,7 @@ public:
 };
 
 
-//-----------------------------------------------------------------------------
+
 
 class ScaDoubleList
 {
@@ -359,7 +359,7 @@ public:
 };
 
 
-//-----------------------------------------------------------------------------
+
 
 /// stores double values >0.0, throws exception for double values <0.0, does nothing for 0.0
 class ScaDoubleListGT0 : public ScaDoubleList
@@ -370,7 +370,7 @@ public:
 };
 
 
-//-----------------------------------------------------------------------------
+
 
 /// stores double values >=0.0, throws exception for double values <0.0
 class ScaDoubleListGE0 : public ScaDoubleList
@@ -381,7 +381,7 @@ public:
 };
 
 
-//-----------------------------------------------------------------------------
+
 
 class Complex
 {
@@ -744,7 +744,7 @@ inline ConvertDataLinear::ConvertDataLinear( const sal_Char* p, double fC, doubl
 
 
 
-//-----------------------------------------------------------------------------
+
 
 /// Helper class for date calculation for various financial functions
 class ScaDate
@@ -836,7 +836,7 @@ inline void ScaDate::addYears( sal_Int32 nYearCount ) throw( css::lang::IllegalA
 }
 
 
-//-----------------------------------------------------------------------------
+
 
 /// Helper class for Any->double conversion, using current language settings
 class ScaAnyConverter
@@ -924,7 +924,7 @@ public:
 };
 
 
-//-----------------------------------------------------------------------------
+
 
 
 #endif
diff --git a/scaddins/source/analysis/bessel.cxx b/scaddins/source/analysis/bessel.cxx
index 9aa720e..3e1ac27 100644
--- a/scaddins/source/analysis/bessel.cxx
+++ b/scaddins/source/analysis/bessel.cxx
@@ -28,16 +28,16 @@ using ::com::sun::star::sheet::NoConvergenceException;
 namespace sca {
 namespace analysis {
 
-// ============================================================================
+
 
 const double f_PI       = 3.1415926535897932385;
 const double f_PI_DIV_2 = f_PI / 2.0;
 const double f_PI_DIV_4 = f_PI / 4.0;
 const double f_2_DIV_PI = 2.0 / f_PI;
 
-// ============================================================================
+
 // BESSEL J
-// ============================================================================
+
 
 /*  The BESSEL function, first kind, unmodified:
     The algorithm follows
@@ -158,9 +158,9 @@ double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConve
         throw NoConvergenceException(); // unlikely to happen
 }
 
-// ============================================================================
+
 // BESSEL I
-// ============================================================================
+
 
 /*  The BESSEL function, first kind, modified:
 
@@ -229,7 +229,7 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve
 }
 
 
-// ============================================================================
+
 
 double Besselk0( double fNum ) throw( IllegalArgumentException, NoConvergenceException )
 {
@@ -310,9 +310,9 @@ double BesselK( double fNum, sal_Int32 nOrder ) throw( IllegalArgumentException,
     }
 }
 
-// ============================================================================
+
 // BESSEL Y
-// ============================================================================
+
 
 /*  The BESSEL function, second kind, unmodified:
     The algorithm for order 0 and for order 1 follows
@@ -464,7 +464,7 @@ double BesselY( double fNum, sal_Int32 nOrder ) throw( IllegalArgumentException,
     }
 }
 
-// ============================================================================
+
 
 } // namespace analysis
 } // namespace sca
diff --git a/scaddins/source/analysis/bessel.hxx b/scaddins/source/analysis/bessel.hxx
index 5eaba09..d4a0492 100644
--- a/scaddins/source/analysis/bessel.hxx
+++ b/scaddins/source/analysis/bessel.hxx
@@ -27,9 +27,9 @@
 namespace sca {
 namespace analysis {
 
-// ============================================================================
+
 //     BESSEL functions
-// ============================================================================
+
 
 /** Returns the result for the unmodified BESSEL function of first kind (J), n-th order, at point x. */
 double BesselJ( double x, sal_Int32 n ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sheet::NoConvergenceException );
@@ -43,7 +43,7 @@ double BesselY( double x, sal_Int32 n ) throw( ::com::sun::star::lang::IllegalAr
 /** Returns the result for the modified BESSEL function of second kind (K), n-th order, at point x. */
 double BesselK( double x, sal_Int32 n ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sheet::NoConvergenceException );
 
-// ============================================================================
+
 
 } // namespace analysis
 } // namespace sca
diff --git a/scaddins/source/analysis/financial.cxx b/scaddins/source/analysis/financial.cxx
index d518667..cfbe7ee 100644
--- a/scaddins/source/analysis/financial.cxx
+++ b/scaddins/source/analysis/financial.cxx
@@ -458,7 +458,7 @@ double SAL_CALL AnalysisAddIn::getOddlyield( const css::uno::Reference< css::bea
 }
 
 
-// ============================================================================
+
 // XIRR helper functions
 
 #define V_(i) (rValues.Get(i))
@@ -562,7 +562,7 @@ double SAL_CALL AnalysisAddIn::getXirr(
 }
 
 
-// ============================================================================
+
 
 double SAL_CALL AnalysisAddIn::getXnpv(
     double fRate, const css::uno::Sequence< css::uno::Sequence< double > >& rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& rDates ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException )
diff --git a/scaddins/source/datefunc/datefunc.hxx b/scaddins/source/datefunc/datefunc.hxx
index dfc86e8..ee7b4ae 100644
--- a/scaddins/source/datefunc/datefunc.hxx
+++ b/scaddins/source/datefunc/datefunc.hxx
@@ -17,11 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-//------------------------------------------------------------------
-//
+
+
 // date functions add in
-//
-//------------------------------------------------------------------
+
+
 
 #ifndef _SCA_DATEFUNC_HXX
 #define _SCA_DATEFUNC_HXX
@@ -38,7 +38,7 @@
 #include <tools/rc.hxx>
 #include <tools/resary.hxx>
 
-//------------------------------------------------------------------
+
 
 class ScaList
 {
@@ -83,7 +83,7 @@ inline void ScaList::Append( void* pNew )
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaStringList : protected ScaList
 {
@@ -130,7 +130,7 @@ inline void ScaStringList::Append( const OUString& rNew )
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResId : public ResId
 {
@@ -139,7 +139,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaResStringLoader : public Resource
 {
@@ -162,7 +162,7 @@ inline ScaResStringLoader::ScaResStringLoader( sal_uInt16 nResId, sal_uInt16 nSt
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResStringArrLoader : public Resource
 {
@@ -185,7 +185,7 @@ inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResPublisher : public Resource
 {
@@ -199,7 +199,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaFuncRes : public Resource
 {
@@ -208,7 +208,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 enum ScaCategory
 {
@@ -264,7 +264,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaFuncDataList : private ScaList
 {
@@ -303,8 +303,8 @@ inline ScaFuncData* ScaFuncDataList::Next()
 }
 
 
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
 
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DateFunctionAddIn_CreateInstance(
     const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
@@ -413,7 +413,7 @@ public:
                                 throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
 };
 
-//------------------------------------------------------------------
+
 
 #endif  // _SCA_DATEFUNC_HXX
 
diff --git a/scaddins/source/pricing/black_scholes.cxx b/scaddins/source/pricing/black_scholes.cxx
index cf5087c..c6d989f 100644
--- a/scaddins/source/pricing/black_scholes.cxx
+++ b/scaddins/source/pricing/black_scholes.cxx
@@ -20,21 +20,21 @@
 
 // options prices and greeks in the Black-Scholes model
 // also known as TV (theoretical value)
-//
+
 // the code is structured as follows:
-//
+
 // (1) basic assets
 //   - cash-or-nothing option:  bincash()
 //   - asset-or-nothing option: binasset()
-//
+
 // (2) derived basic assets, can all be priced based on (1)
 //   - vanilla put/call:  putcall() = +/- ( binasset() - K*bincash() )
 //   - truncated put/call (barriers active at maturity only)
-//
+
 // (3) write a wrapper function to include all vanilla pricers
 //   - this is so we don't duplicate code when pricing barriers
 //     as this is derived from vanillas
-//
+
 // (4) single barrier options (knock-out), priced based on truncated vanillas
 //   - it follows from the reflection principle that the price W(S) of a
 //     single barrier option is given by
@@ -44,28 +44,28 @@
 //   - to reduce code duplication and in anticipation of double barrier
 //     options we write the following function
 //        barrier_term(S,c) = V(c*S) - (B/S)^a V(c*B^2/S)
-//
+
 //  (5) double barrier options (knock-out)
 //   - value is an infinite sum over option prices of the corresponding
 //     truncated vanillas (truncated at both barriers):
-//
+
 //   W(S)=sum (B2/B1)^(i*a) (V(S(B2/B1)^(2i)) - (B1/S)^a V(B1^2/S (B2/B1)^(2i))
-//
+
 //  (6) write routines for put/call barriers and touch options which
 //     mainly call the general double barrier pricer
 //     the main routines are touch() and barrier()
 //     both can price in/out barriers, double/single barriers as well as
 //     vanillas
-//
-//
+
+
 // the framework allows any barriers to be priced as long as we define
 // the value/greek functions for the corresponding truncated vanilla
 // and wrap them into internal::vanilla() and internal::vanilla_trunc()
-//
+
 // disadvantage of that approach is that due to the rules of
 // differentiations the formulas for greeks become long and possible
 // simplifications in the formulas won't be made
-//
+
 // other code inefficiency due to multiplication with pm (+/- 1)
 //   cvtsi2sd: int-->double, 6/3 cycles
 //   mulsd: double-double multiplication, 5/1 cycles
@@ -73,7 +73,7 @@
 //   which are efficient
 //   note this is tiny anyway as compared to exp/log (100 cycles),
 //   pow (200 cycles), erf (70 cycles)
-//
+
 // this code is not tested for numerical instability, ie overruns,
 // underruns, accuracy, etc
 
diff --git a/scaddins/source/pricing/black_scholes.hxx b/scaddins/source/pricing/black_scholes.hxx
index 5e665c5..ae24395 100644
--- a/scaddins/source/pricing/black_scholes.hxx
+++ b/scaddins/source/pricing/black_scholes.hxx
@@ -24,7 +24,7 @@ namespace bs {
 
 namespace types {
 enum Greeks {
-    Value    = 0,        //
+    Value    = 0,
     Delta    = 1,        // d/dS
     Gamma    = 2,        // d^2/dS^2
     Theta    = 3,        // d/dt
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 24c6609..b079942 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -18,7 +18,7 @@
  */
 
 // pricing functions add in
-//
+
 // all of the UNO add-in technical details have been copied from
 // ../datefunc/datefunc.cxx
 
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index 7a5673e..5f9a066 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -17,16 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-//------------------------------------------------------------------
-//
+
+
 // option pricing functions add in
-//
+
 // most parts of this files are technical UNO details which are
 // all copied from ../datefunc/datefunc.hxx
 // to avoid having to rename all classes to do with UNO
 // technicalities we use our own namespace
-//
-//------------------------------------------------------------------
+
+
 
 #ifndef _SCA_PRICING_HXX
 #define _SCA_PRICING_HXX
@@ -47,7 +47,7 @@
 
 
 
-//------------------------------------------------------------------
+
 
 namespace sca {
 namespace pricing {
@@ -95,7 +95,7 @@ inline void ScaList::Append( void* pNew )
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaStringList : protected ScaList
 {
@@ -142,7 +142,7 @@ inline void ScaStringList::Append( const OUString& rNew )
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResId : public ResId
 {
@@ -151,7 +151,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaResStringLoader : public Resource
 {
@@ -174,7 +174,7 @@ inline ScaResStringLoader::ScaResStringLoader( sal_uInt16 nResId, sal_uInt16 nSt
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResStringArrLoader : public Resource
 {
@@ -197,7 +197,7 @@ inline ScaResStringArrLoader::ScaResStringArrLoader( sal_uInt16 nResId, sal_uInt
 }
 
 
-//------------------------------------------------------------------
+
 
 class ScaResPublisher : public Resource
 {
@@ -211,7 +211,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaFuncRes : public Resource
 {
@@ -220,7 +220,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 enum ScaCategory
 {
@@ -276,7 +276,7 @@ public:
 };
 
 
-//------------------------------------------------------------------
+
 
 class ScaFuncDataList : private ScaList
 {
@@ -319,8 +319,8 @@ inline ScaFuncData* ScaFuncDataList::Next()
 
 
 
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
 
 css::uno::Reference< css::uno::XInterface > SAL_CALL PricingFunctionAddIn_CreateInstance(
     const css::uno::Reference< css::lang::XMultiServiceFactory >& );
@@ -381,9 +381,9 @@ public:
     virtual sal_Bool SAL_CALL   supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException );
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException );
 
-    // ----------------------------------------
+
     //  methods from own interfaces start here
-    // ----------------------------------------
+
 
     virtual double SAL_CALL getOptBarrier( double spot, double vol,
             double r, double rf, double T, double strike,
@@ -407,7 +407,7 @@ public:
             const css::uno::Any& strikeval, const css::uno::Any& put_call ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
 
 };
-//------------------------------------------------------------------
+
 
 #endif
 


More information about the Libreoffice-commits mailing list