summaryrefslogtreecommitdiff
path: root/scaddins/source/analysis/analysis.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scaddins/source/analysis/analysis.cxx')
-rw-r--r--scaddins/source/analysis/analysis.cxx138
1 files changed, 9 insertions, 129 deletions
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 8e9590b04750..bf600cf765b1 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -18,19 +18,18 @@
*/
#include "analysis.hxx"
-
-#include <comphelper/processfactory.hxx>
+#include "analysis.hrc"
+#include "bessel.hxx"
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <sal/macros.h>
#include <string.h>
-
#include <tools/resmgr.hxx>
#include <tools/rcid.h>
-#include "analysis.hrc"
-#include "bessel.hxx"
#define ADDIN_SERVICE "com.sun.star.sheet.AddIn"
#define MY_SERVICE "com.sun.star.sheet.addin.Analysis"
@@ -38,7 +37,6 @@
using namespace ::com::sun::star;
-
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL analysis_component_getFactory(
const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
@@ -62,14 +60,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL analysis_component_getFactory(
return pRet;
}
-
-//------------------------------------------------------------------------
-//
-// "normal" service implementation
-//
-//------------------------------------------------------------------------
-
-
ResMgr& AnalysisAddIn::GetResMgr( void ) throw( uno::RuntimeException )
{
if( !pResMgr )
@@ -83,13 +73,11 @@ ResMgr& AnalysisAddIn::GetResMgr( void ) throw( uno::RuntimeException )
return *pResMgr;
}
-
OUString AnalysisAddIn::GetDisplFuncStr( sal_uInt16 nFuncNum ) throw( uno::RuntimeException )
{
return AnalysisRscStrLoader( RID_ANALYSIS_FUNCTION_NAMES, nFuncNum, GetResMgr() ).GetString();
}
-
class AnalysisResourcePublisher : public Resource
{
public:
@@ -98,14 +86,12 @@ public:
void FreeResource() { Resource::FreeResource(); }
};
-
class AnalysisFuncRes : public Resource
{
public:
AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, OUString& rRet );
};
-
AnalysisFuncRes::AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, OUString& rRet ) : Resource( rRes )
{
rRet = AnalysisResId(nInd, rResMgr).toString();
@@ -113,7 +99,6 @@ AnalysisFuncRes::AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd,
FreeResource();
}
-
OUString AnalysisAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) throw( uno::RuntimeException )
{
OUString aRet;
@@ -130,7 +115,6 @@ OUString AnalysisAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex
return aRet;
}
-
void AnalysisAddIn::InitData( void )
{
if( pResMgr )
@@ -154,7 +138,6 @@ void AnalysisAddIn::InitData( void )
}
}
-
AnalysisAddIn::AnalysisAddIn( const uno::Reference< uno::XComponentContext >& xContext ) :
pDefLocales( NULL ),
pFD( NULL ),
@@ -165,7 +148,6 @@ AnalysisAddIn::AnalysisAddIn( const uno::Reference< uno::XComponentContext >& xC
{
}
-
AnalysisAddIn::~AnalysisAddIn()
{
if( pFD )
@@ -181,7 +163,6 @@ AnalysisAddIn::~AnalysisAddIn()
delete[] pDefLocales;
}
-
sal_Int32 AnalysisAddIn::getDateMode(
const uno::Reference< beans::XPropertySet >& xPropSet,
const uno::Any& rAny ) throw( uno::RuntimeException, lang::IllegalArgumentException )
@@ -192,11 +173,6 @@ sal_Int32 AnalysisAddIn::getDateMode(
return nMode;
}
-
-
-//-----------------------------------------------------------------------------
-
-
#define MAXFACTDOUBLE 300
double AnalysisAddIn::FactDouble( sal_Int32 nNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
@@ -239,13 +215,11 @@ double AnalysisAddIn::FactDouble( sal_Int32 nNum ) throw( uno::RuntimeException,
return pFactDoubles[ nNum ];
}
-
OUString AnalysisAddIn::getImplementationName_Static()
{
return OUString( MY_IMPLNAME );
}
-
uno::Sequence< OUString > AnalysisAddIn::getSupportedServiceNames_Static()
{
uno::Sequence< OUString > aRet(2);
@@ -255,7 +229,6 @@ uno::Sequence< OUString > AnalysisAddIn::getSupportedServiceNames_Static()
return aRet;
}
-
uno::Reference< uno::XInterface > SAL_CALL AnalysisAddIn_CreateInstance(
const uno::Reference< lang::XMultiServiceFactory >& xServiceFact )
{
@@ -263,38 +236,30 @@ uno::Reference< uno::XInterface > SAL_CALL AnalysisAddIn_CreateInstance(
return xInst;
}
-
// XServiceName
-
OUString SAL_CALL AnalysisAddIn::getServiceName() throw( uno::RuntimeException )
{
// name of specific AddIn service
return OUString( MY_SERVICE );
}
-
// XServiceInfo
-
OUString SAL_CALL AnalysisAddIn::getImplementationName() throw( uno::RuntimeException )
{
return getImplementationName_Static();
}
-
sal_Bool SAL_CALL AnalysisAddIn::supportsService( const OUString& aName ) throw( uno::RuntimeException )
{
- return aName.equalsAscii( ADDIN_SERVICE ) || aName.equalsAscii( MY_SERVICE );
+ return cppu::supportsService(this, aName);
}
-
uno::Sequence< OUString > SAL_CALL AnalysisAddIn::getSupportedServiceNames() throw( uno::RuntimeException )
{
return getSupportedServiceNames_Static();
}
-
// XLocalizable
-
void SAL_CALL AnalysisAddIn::setLocale( const lang::Locale& eLocale ) throw( uno::RuntimeException )
{
aFuncLoc = eLocale;
@@ -307,9 +272,7 @@ lang::Locale SAL_CALL AnalysisAddIn::getLocale() throw( uno::RuntimeException )
return aFuncLoc;
}
-
// XAddIn
-
OUString SAL_CALL AnalysisAddIn::getProgrammaticFuntionName( const OUString& ) throw( uno::RuntimeException )
{
// not used by calc
@@ -318,7 +281,6 @@ OUString SAL_CALL AnalysisAddIn::getProgrammaticFuntionName( const OUString& ) t
return OUString();
}
-
OUString SAL_CALL AnalysisAddIn::getDisplayFunctionName( const OUString& aProgrammaticName ) throw( uno::RuntimeException )
{
OUString aRet;
@@ -338,7 +300,6 @@ OUString SAL_CALL AnalysisAddIn::getDisplayFunctionName( const OUString& aProgra
return aRet;
}
-
OUString SAL_CALL AnalysisAddIn::getFunctionDescription( const OUString& aProgrammaticName ) throw( uno::RuntimeException )
{
OUString aRet;
@@ -350,7 +311,6 @@ OUString SAL_CALL AnalysisAddIn::getFunctionDescription( const OUString& aProgra
return aRet;
}
-
OUString SAL_CALL AnalysisAddIn::getDisplayArgumentName( const OUString& aName, sal_Int32 nArg ) throw( uno::RuntimeException )
{
OUString aRet;
@@ -368,7 +328,6 @@ OUString SAL_CALL AnalysisAddIn::getDisplayArgumentName( const OUString& aName,
return aRet;
}
-
OUString SAL_CALL AnalysisAddIn::getArgumentDescription( const OUString& aName, sal_Int32 nArg ) throw( uno::RuntimeException )
{
OUString aRet;
@@ -386,14 +345,12 @@ OUString SAL_CALL AnalysisAddIn::getArgumentDescription( const OUString& aName,
return aRet;
}
-
static const OUString pDefCatName("Add-In");
-
OUString SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const OUString& aName ) throw( uno::RuntimeException )
{
// return non-translated strings
-// return OUString( "Add-In" );
+ // return OUString( "Add-In" );
const FuncData* p = pFD->Get( aName );
OUString aRet;
if( p )
@@ -415,11 +372,10 @@ OUString SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const OUString& aN
return aRet;
}
-
OUString SAL_CALL AnalysisAddIn::getDisplayCategoryName( const OUString& aProgrammaticFunctionName ) throw( uno::RuntimeException )
{
// return translated strings, not used for predefined categories
-// return OUString( "Add-In" );
+ // return OUString( "Add-In" );
const FuncData* p = pFD->Get( aProgrammaticFunctionName );
OUString aRet;
if( p )
@@ -441,12 +397,10 @@ OUString SAL_CALL AnalysisAddIn::getDisplayCategoryName( const OUString& aProgra
return aRet;
}
-
static const sal_Char* pLang[] = { "de", "en" };
static const sal_Char* pCoun[] = { "DE", "US" };
static const sal_uInt32 nNumOfLoc = SAL_N_ELEMENTS(pLang);
-
void AnalysisAddIn::InitDefLocales( void )
{
pDefLocales = new lang::Locale[ nNumOfLoc ];
@@ -458,7 +412,6 @@ void AnalysisAddIn::InitDefLocales( void )
}
}
-
inline const lang::Locale& AnalysisAddIn::GetLocale( sal_uInt32 nInd )
{
if( !pDefLocales )
@@ -470,7 +423,6 @@ inline const lang::Locale& AnalysisAddIn::GetLocale( sal_uInt32 nInd )
return aFuncLoc;
}
-
uno::Sequence< sheet::LocalizedName > SAL_CALL AnalysisAddIn::getCompatibilityNames( const OUString& aProgrammaticName ) throw( uno::RuntimeException )
{
const FuncData* p = pFD->Get( aProgrammaticName );
@@ -493,13 +445,8 @@ uno::Sequence< sheet::LocalizedName > SAL_CALL AnalysisAddIn::getCompatibilityNa
return aRet;
}
-
// XAnalysis
-
-/**
- * Workday
- */
-
+/** Workday */
sal_Int32 SAL_CALL AnalysisAddIn::getWorkday( const uno::Reference< beans::XPropertySet >& xOptions,
sal_Int32 nDate, sal_Int32 nDays, const uno::Any& aHDay ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
@@ -556,11 +503,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWorkday( const uno::Reference< beans::XProp
return nActDate - nNullDate;
}
-
-/**
- * Yearfrac
- */
-
+/** Yearfrac */
double SAL_CALL AnalysisAddIn::getYearfrac( const uno::Reference< beans::XPropertySet >& xOpt,
sal_Int32 nStartDate, sal_Int32 nEndDate, const uno::Any& rMode ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
@@ -568,7 +511,6 @@ double SAL_CALL AnalysisAddIn::getYearfrac( const uno::Reference< beans::XProper
RETURN_FINITE( fRet );
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getEdate( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nStartDate, sal_Int32 nMonths ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Int32 nNullDate = GetNullDate( xOpt );
@@ -577,7 +519,6 @@ sal_Int32 SAL_CALL AnalysisAddIn::getEdate( const uno::Reference< beans::XProper
return aDate.getDate( nNullDate );
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getWeeknum( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nDate, sal_Int32 nMode ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
nDate += GetNullDate( xOpt );
@@ -591,7 +532,6 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWeeknum( const uno::Reference< beans::XProp
return ( nDate - nFirstInYear + ( ( nMode == 1 )? ( nFirstDayInYear + 1 ) % 7 : nFirstDayInYear ) ) / 7 + 1;
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getEomonth( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nDate, sal_Int32 nMonths ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Int32 nNullDate = GetNullDate( xOpt );
@@ -618,7 +558,6 @@ sal_Int32 SAL_CALL AnalysisAddIn::getEomonth( const uno::Reference< beans::XProp
return DateToDays( DaysInMonth( sal_uInt16( nNewMonth ), nYear ), sal_uInt16( nNewMonth ), nYear ) - nNullDate;
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getNetworkdays( const uno::Reference< beans::XPropertySet >& xOpt,
sal_Int32 nStartDate, sal_Int32 nEndDate, const uno::Any& aHDay ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
@@ -656,13 +595,11 @@ sal_Int32 SAL_CALL AnalysisAddIn::getNetworkdays( const uno::Reference< beans::X
return nCnt;
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getIseven( sal_Int32 nVal ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
return ( nVal & 0x00000001 )? 0 : 1;
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getIsodd( sal_Int32 nVal ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
return ( nVal & 0x00000001 )? 1 : 0;
@@ -699,7 +636,6 @@ AnalysisAddIn::getMultinomial( const uno::Reference< beans::XPropertySet >& xOpt
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getSeriessum( double fX, double fN, double fM, const uno::Sequence< uno::Sequence< double > >& aCoeffList ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = 0.0;
@@ -732,7 +668,6 @@ double SAL_CALL AnalysisAddIn::getSeriessum( double fX, double fN, double fM, co
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getQuotient( double fNum, double fDenom ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet;
@@ -743,7 +678,6 @@ double SAL_CALL AnalysisAddIn::getQuotient( double fNum, double fDenom ) throw(
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getMround( double fNum, double fMult ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
if( fMult == 0.0 )
@@ -753,14 +687,12 @@ double SAL_CALL AnalysisAddIn::getMround( double fNum, double fMult ) throw( uno
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getSqrtpi( double fNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = sqrt( fNum * PI );
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getRandbetween( double fMin, double fMax ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
fMin = ::rtl::math::round( fMin, 0, rtl_math_RoundingMode_Up );
@@ -777,7 +709,6 @@ double SAL_CALL AnalysisAddIn::getRandbetween( double fMin, double fMax ) throw(
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getGcd( const uno::Reference< beans::XPropertySet >& xOpt, const uno::Sequence< uno::Sequence< double > >& aVLst, const uno::Sequence< uno::Any >& aOptVLst ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
ScaDoubleListGT0 aValList;
@@ -797,7 +728,6 @@ double SAL_CALL AnalysisAddIn::getGcd( const uno::Reference< beans::XPropertySet
RETURN_FINITE( f );
}
-
double SAL_CALL AnalysisAddIn::getLcm( const uno::Reference< beans::XPropertySet >& xOpt, const uno::Sequence< uno::Sequence< double > >& aVLst, const uno::Sequence< uno::Any >& aOptVLst ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
ScaDoubleListGE0 aValList;
@@ -825,21 +755,18 @@ double SAL_CALL AnalysisAddIn::getLcm( const uno::Reference< beans::XPropertySet
RETURN_FINITE( f );
}
-
double SAL_CALL AnalysisAddIn::getBesseli( double fNum, sal_Int32 nOrder ) throw( uno::RuntimeException, lang::IllegalArgumentException, sheet::NoConvergenceException )
{
double fRet = sca::analysis::BesselI( fNum, nOrder );
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getBesselj( double fNum, sal_Int32 nOrder ) throw( uno::RuntimeException, lang::IllegalArgumentException, sheet::NoConvergenceException )
{
double fRet = sca::analysis::BesselJ( fNum, nOrder );
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getBesselk( double fNum, sal_Int32 nOrder ) throw( uno::RuntimeException, lang::IllegalArgumentException, sheet::NoConvergenceException )
{
if( nOrder < 0 || fNum <= 0.0 )
@@ -849,7 +776,6 @@ double SAL_CALL AnalysisAddIn::getBesselk( double fNum, sal_Int32 nOrder ) throw
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getBessely( double fNum, sal_Int32 nOrder ) throw( uno::RuntimeException, lang::IllegalArgumentException, sheet::NoConvergenceException )
{
if( nOrder < 0 || fNum <= 0.0 )
@@ -859,7 +785,6 @@ double SAL_CALL AnalysisAddIn::getBessely( double fNum, sal_Int32 nOrder ) throw
RETURN_FINITE( fRet );
}
-
const double SCA_MAX2 = 511.0; // min. val for binary numbers (9 bits + sign)
const double SCA_MIN2 = -SCA_MAX2-1.0; // min. val for binary numbers (9 bits + sign)
const double SCA_MAX8 = 536870911.0; // max. val for octal numbers (29 bits + sign)
@@ -868,7 +793,6 @@ const double SCA_MAX16 = 549755813888.0; // max. val for hexadecimal
const double SCA_MIN16 = -SCA_MAX16-1.0; // min. val for hexadecimal numbers (39 bits + sign)
const sal_Int32 SCA_MAXPLACES = 10; // max. number of places
-
OUString SAL_CALL AnalysisAddIn::getBin2Oct( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
@@ -877,14 +801,12 @@ OUString SAL_CALL AnalysisAddIn::getBin2Oct( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
double SAL_CALL AnalysisAddIn::getBin2Dec( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = ConvertToDec( aNum, 2, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getBin2Hex( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
@@ -893,7 +815,6 @@ OUString SAL_CALL AnalysisAddIn::getBin2Hex( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
OUString SAL_CALL AnalysisAddIn::getOct2Bin( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
@@ -902,14 +823,12 @@ OUString SAL_CALL AnalysisAddIn::getOct2Bin( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
double SAL_CALL AnalysisAddIn::getOct2Dec( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = ConvertToDec( aNum, 8, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getOct2Hex( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
@@ -918,7 +837,6 @@ OUString SAL_CALL AnalysisAddIn::getOct2Hex( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
OUString SAL_CALL AnalysisAddIn::getDec2Bin( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Int32 nPlaces = 0;
@@ -926,7 +844,6 @@ OUString SAL_CALL AnalysisAddIn::getDec2Bin( const uno::Reference< beans::XPrope
return ConvertFromDec( nNum, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
OUString SAL_CALL AnalysisAddIn::getDec2Oct( const uno::Reference< beans::XPropertySet >& xOpt, sal_Int32 nNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Int32 nPlaces = 0;
@@ -934,7 +851,6 @@ OUString SAL_CALL AnalysisAddIn::getDec2Oct( const uno::Reference< beans::XPrope
return ConvertFromDec( nNum, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
OUString SAL_CALL AnalysisAddIn::getDec2Hex( const uno::Reference< beans::XPropertySet >& xOpt, double fNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Int32 nPlaces = 0;
@@ -942,7 +858,6 @@ OUString SAL_CALL AnalysisAddIn::getDec2Hex( const uno::Reference< beans::XPrope
return ConvertFromDec( fNum, SCA_MIN16, SCA_MAX16, 16, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
OUString SAL_CALL AnalysisAddIn::getHex2Bin( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
@@ -951,14 +866,12 @@ OUString SAL_CALL AnalysisAddIn::getHex2Bin( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN2, SCA_MAX2, 2, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
double SAL_CALL AnalysisAddIn::getHex2Dec( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = ConvertToDec( aNum, 16, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getHex2Oct( const uno::Reference< beans::XPropertySet >& xOpt, const OUString& aNum, const uno::Any& rPlaces ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
@@ -967,13 +880,11 @@ OUString SAL_CALL AnalysisAddIn::getHex2Oct( const uno::Reference< beans::XPrope
return ConvertFromDec( fVal, SCA_MIN8, SCA_MAX8, 8, nPlaces, SCA_MAXPLACES, bUsePlaces );
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getDelta( const uno::Reference< beans::XPropertySet >& xOpt, double fNum1, const uno::Any& rNum2 ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
return sal_Int32(fNum1 == aAnyConv.getDouble( xOpt, rNum2, 0.0 ));
}
-
double SAL_CALL AnalysisAddIn::getErf( const uno::Reference< beans::XPropertySet >& xOpt, double fLL, const uno::Any& rUL ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fUL, fRet;
@@ -983,41 +894,35 @@ double SAL_CALL AnalysisAddIn::getErf( const uno::Reference< beans::XPropertySet
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getErfc( double f ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = Erfc( f );
RETURN_FINITE( fRet );
}
-
sal_Int32 SAL_CALL AnalysisAddIn::getGestep( const uno::Reference< beans::XPropertySet >& xOpt, double fNum, const uno::Any& rStep ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
return sal_Int32(fNum >= aAnyConv.getDouble( xOpt, rStep, 0.0 ));
}
-
double SAL_CALL AnalysisAddIn::getFactdouble( sal_Int32 nNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = FactDouble( nNum );
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getImabs( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = Complex( aNum ).Abs();
RETURN_FINITE( fRet );
}
-
double SAL_CALL AnalysisAddIn::getImaginary( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = Complex( aNum ).Imag();
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getImpower( const OUString& aNum, double f ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1027,14 +932,12 @@ OUString SAL_CALL AnalysisAddIn::getImpower( const OUString& aNum, double f ) th
return z.GetString();
}
-
double SAL_CALL AnalysisAddIn::getImargument( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = Complex( aNum ).Arg();
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getImcos( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1044,7 +947,6 @@ OUString SAL_CALL AnalysisAddIn::getImcos( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImdiv( const OUString& aDivid, const OUString& aDivis ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aDivid );
@@ -1054,7 +956,6 @@ OUString SAL_CALL AnalysisAddIn::getImdiv( const OUString& aDivid, const OUStrin
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImexp( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1064,7 +965,6 @@ OUString SAL_CALL AnalysisAddIn::getImexp( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImconjugate( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1074,7 +974,6 @@ OUString SAL_CALL AnalysisAddIn::getImconjugate( const OUString& aNum ) throw( u
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImln( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1084,7 +983,6 @@ OUString SAL_CALL AnalysisAddIn::getImln( const OUString& aNum ) throw( uno::Run
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImlog10( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1094,7 +992,6 @@ OUString SAL_CALL AnalysisAddIn::getImlog10( const OUString& aNum ) throw( uno::
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImlog2( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1104,7 +1001,6 @@ OUString SAL_CALL AnalysisAddIn::getImlog2( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImproduct( const uno::Reference< beans::XPropertySet >&, const uno::Sequence< uno::Sequence< OUString > >& aNum1, const uno::Sequence< uno::Any >& aNL ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
ComplexList z_list;
@@ -1122,14 +1018,12 @@ OUString SAL_CALL AnalysisAddIn::getImproduct( const uno::Reference< beans::XPro
return z.GetString();
}
-
double SAL_CALL AnalysisAddIn::getImreal( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
double fRet = Complex( aNum ).Real();
RETURN_FINITE( fRet );
}
-
OUString SAL_CALL AnalysisAddIn::getImsin( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1139,7 +1033,6 @@ OUString SAL_CALL AnalysisAddIn::getImsin( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsub( const OUString& aNum1, const OUString& aNum2 ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum1 );
@@ -1149,7 +1042,6 @@ OUString SAL_CALL AnalysisAddIn::getImsub( const OUString& aNum1, const OUString
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsum( const uno::Reference< beans::XPropertySet >&, const uno::Sequence< uno::Sequence< OUString > >& aNum1, const uno::Sequence< uno::Any >& aFollowingPars ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
ComplexList z_list;
@@ -1167,7 +1059,6 @@ OUString SAL_CALL AnalysisAddIn::getImsum( const uno::Reference< beans::XPropert
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsqrt( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1177,7 +1068,6 @@ OUString SAL_CALL AnalysisAddIn::getImsqrt( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImtan( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1187,7 +1077,6 @@ OUString SAL_CALL AnalysisAddIn::getImtan( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsec( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1197,7 +1086,6 @@ OUString SAL_CALL AnalysisAddIn::getImsec( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImcsc( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1207,7 +1095,6 @@ OUString SAL_CALL AnalysisAddIn::getImcsc( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImcot( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1217,7 +1104,6 @@ OUString SAL_CALL AnalysisAddIn::getImcot( const OUString& aNum ) throw( uno::Ru
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsinh( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1227,7 +1113,6 @@ OUString SAL_CALL AnalysisAddIn::getImsinh( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImcosh( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1237,7 +1122,6 @@ OUString SAL_CALL AnalysisAddIn::getImcosh( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImsech( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1247,7 +1131,6 @@ OUString SAL_CALL AnalysisAddIn::getImsech( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getImcsch( const OUString& aNum ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
Complex z( aNum );
@@ -1257,7 +1140,6 @@ OUString SAL_CALL AnalysisAddIn::getImcsch( const OUString& aNum ) throw( uno::R
return z.GetString();
}
-
OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::Any& rSuff ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
sal_Bool bi;
@@ -1282,7 +1164,6 @@ OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::An
return Complex( fR, fI, bi ? 'i' : 'j' ).GetString();
}
-
double SAL_CALL AnalysisAddIn::getConvert( double f, const OUString& aFU, const OUString& aTU ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{
if( !pCDL )
@@ -1292,5 +1173,4 @@ double SAL_CALL AnalysisAddIn::getConvert( double f, const OUString& aFU, const
RETURN_FINITE( fRet );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */