LibreOffice Module scaddins (master) 1
analysis.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22
23#include <com/sun/star/sheet/XAddIn.hpp>
24#include <com/sun/star/lang/XServiceName.hpp>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/sheet/addin/XAnalysis.hpp>
27#include <com/sun/star/sheet/XCompatibilityNames.hpp>
28
31#include <unotools/resmgr.hxx>
32
33#include "analysishelper.hxx"
34
35#include <memory>
36
37namespace com::sun::star::lang { class XMultiServiceFactory; }
38namespace com::sun::star::sheet { struct LocalizedName; }
39
40typedef cppu::WeakComponentImplHelper<
41 css::sheet::XAddIn,
42 css::sheet::XCompatibilityNames,
43 css::sheet::addin::XAnalysis,
44 css::lang::XServiceName,
45 css::lang::XServiceInfo > AnalysisAddIn_Base;
46
48{
49private:
50 css::lang::Locale aFuncLoc;
51 std::unique_ptr<css::lang::Locale[]> pDefLocales;
52 std::unique_ptr<sca::analysis::FuncDataList> pFD;
53 std::unique_ptr<double[]> pFactDoubles;
54 std::unique_ptr<sca::analysis::ConvertDataList> pCDL;
55 std::locale aResLocale;
56
58
60 OUString GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex);
61 void InitDefLocales();
62 inline const css::lang::Locale& GetLocale( sal_uInt32 nInd );
63 void InitData();
64
69 sal_Int32 getDateMode(
70 const css::uno::Reference< css::beans::XPropertySet >& xPropSet,
71 const css::uno::Any& rAny );
72
73public:
74 explicit AnalysisAddIn(
75 const css::uno::Reference< css::uno::XComponentContext >& xContext );
76
77 OUString AnalysisResId(TranslateId aId);
78
79 virtual ~AnalysisAddIn() override;
80
83 double FactDouble( sal_Int32 nNum );
84
85 // XAddIn
86 virtual OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName ) override;
87 virtual OUString SAL_CALL getDisplayFunctionName( const OUString& aProgrammaticName ) override;
88 virtual OUString SAL_CALL getFunctionDescription( const OUString& aProgrammaticName ) override;
89 virtual OUString SAL_CALL getDisplayArgumentName( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) override;
90 virtual OUString SAL_CALL getArgumentDescription( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) override;
91 virtual OUString SAL_CALL getProgrammaticCategoryName( const OUString& aProgrammaticFunctionName ) override;
92 virtual OUString SAL_CALL getDisplayCategoryName( const OUString& aProgrammaticFunctionName ) override;
93
94 // XCompatibilityNames
95 virtual css::uno::Sequence< css::sheet::LocalizedName > SAL_CALL getCompatibilityNames( const OUString& aProgrammaticName ) override;
96
97 // XLocalizable
98 virtual void SAL_CALL setLocale( const css::lang::Locale& eLocale ) override;
99 virtual css::lang::Locale SAL_CALL getLocale( ) override;
100
101 // XServiceName
102 virtual OUString SAL_CALL getServiceName( ) override;
103
104 // XServiceInfo
105 virtual OUString SAL_CALL getImplementationName( ) override;
106 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
107 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
108
109 // methods from own interfaces start here
110
111 // XAnalysis
112// virtual double SAL_CALL get_Test( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nMode, double f1, double f2, double f3 ) throw( css::uno::RuntimeException );
113
114 virtual sal_Int32 SAL_CALL getWorkday( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nDays, const css::uno::Any& aHDay ) override;
115 virtual double SAL_CALL getYearfrac( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nEndDate, const css::uno::Any& aMode ) override;
116 virtual sal_Int32 SAL_CALL getEdate( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nMonths ) override;
117 virtual sal_Int32 SAL_CALL getWeeknum( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nMode ) override;
118 virtual sal_Int32 SAL_CALL getEomonth( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nMonths ) override;
119 virtual sal_Int32 SAL_CALL getNetworkdays( const css::uno::Reference< css::beans::XPropertySet >&, sal_Int32 nStartDate, sal_Int32 nEndDate, const css::uno::Any& aHDay ) override;
120
121 virtual sal_Int32 SAL_CALL getIseven( sal_Int32 nVal ) override;
122 virtual sal_Int32 SAL_CALL getIsodd( sal_Int32 nVal ) override;
123
124 virtual double SAL_CALL getMultinomial( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& aVLst, const css::uno::Sequence< css::uno::Any >& aOptVLst ) override;
125 virtual double SAL_CALL getSeriessum( double fX, double fN, double fM, const css::uno::Sequence< css::uno::Sequence< double > >& aCoeffList ) override;
126 virtual double SAL_CALL getQuotient( double fNum, double fDenum ) override;
127
128 virtual double SAL_CALL getMround( double fNum, double fMult ) override;
129 virtual double SAL_CALL getSqrtpi( double fNum ) override;
130
131 virtual double SAL_CALL getRandbetween( double fMin, double fMax ) override;
132
133 virtual double SAL_CALL getGcd( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< double > >& aVLst, const css::uno::Sequence< css::uno::Any >& aOptVLst ) override;
134 virtual double SAL_CALL getLcm( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< double > >& aVLst, const css::uno::Sequence< css::uno::Any >& aOptVLst ) override;
135
136 virtual double SAL_CALL getBesseli( double fNum, sal_Int32 nOrder ) override;
137 virtual double SAL_CALL getBesselj( double fNum, sal_Int32 nOrder ) override;
138 virtual double SAL_CALL getBesselk( double fNum, sal_Int32 nOrder ) override;
139 virtual double SAL_CALL getBessely( double fNum, sal_Int32 nOrder ) override;
140
141 virtual OUString SAL_CALL getBin2Oct( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
142 virtual double SAL_CALL getBin2Dec( const OUString& aNum ) override;
143 virtual OUString SAL_CALL getBin2Hex( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
144
145 virtual OUString SAL_CALL getOct2Bin( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
146 virtual double SAL_CALL getOct2Dec( const OUString& aNum ) override;
147 virtual OUString SAL_CALL getOct2Hex( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
148
149 virtual OUString SAL_CALL getDec2Bin( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 fNum, const css::uno::Any& rPlaces ) override;
150 virtual OUString SAL_CALL getDec2Oct( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 fNum, const css::uno::Any& rPlaces ) override;
151 virtual OUString SAL_CALL getDec2Hex( const css::uno::Reference< css::beans::XPropertySet >& xOpt, double fNum, const css::uno::Any& rPlaces ) override;
152
153 virtual OUString SAL_CALL getHex2Bin( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
154 virtual double SAL_CALL getHex2Dec( const OUString& aNum ) override;
155 virtual OUString SAL_CALL getHex2Oct( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const OUString& aNum, const css::uno::Any& rPlaces ) override;
156
157 virtual sal_Int32 SAL_CALL getDelta( const css::uno::Reference< css::beans::XPropertySet >& xOpt, double fNum1, const css::uno::Any& rNum2 ) override;
158
159 virtual double SAL_CALL getErf( const css::uno::Reference< css::beans::XPropertySet >& xOpt, double fLowerLimit, const css::uno::Any& rUpperLimit ) override;
160 virtual double SAL_CALL getErfc( double fLowerLimit ) override;
161
162 virtual sal_Int32 SAL_CALL getGestep( const css::uno::Reference< css::beans::XPropertySet >& xOpt, double fNum, const css::uno::Any& rStep ) override;
163
164 virtual double SAL_CALL getFactdouble( sal_Int32 nNum ) override;
165
166 virtual double SAL_CALL getImabs( const OUString& aNum ) override;
167 virtual double SAL_CALL getImaginary( const OUString& aNum ) override;
168 virtual OUString SAL_CALL getImpower( const OUString& aNum, double fPower ) override;
169 virtual double SAL_CALL getImargument( const OUString& aNum ) override;
170 virtual OUString SAL_CALL getImcos( const OUString& aNum ) override;
171 virtual OUString SAL_CALL getImdiv( const OUString& aDivident, const OUString& aDivisor ) override;
172 virtual OUString SAL_CALL getImexp( const OUString& aNum ) override;
173 virtual OUString SAL_CALL getImconjugate( const OUString& aNum ) override;
174 virtual OUString SAL_CALL getImln( const OUString& aNum ) override;
175 virtual OUString SAL_CALL getImlog10( const OUString& aNum ) override;
176 virtual OUString SAL_CALL getImlog2( const OUString& aNum ) override;
177 virtual OUString SAL_CALL getImproduct( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< OUString > >& aNum1, const css::uno::Sequence< css::uno::Any >& aNumList ) override;
178 virtual double SAL_CALL getImreal( const OUString& aNum ) override;
179 virtual OUString SAL_CALL getImsin( const OUString& aNum ) override;
180 virtual OUString SAL_CALL getImsub( const OUString& aNum1, const OUString& aNum2 ) override;
181 virtual OUString SAL_CALL getImsum( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< OUString > >& aNum1, const css::uno::Sequence< css::uno::Any >& aFollowingPars ) override;
182
183 virtual OUString SAL_CALL getImsqrt( const OUString& aNum ) override;
184 virtual OUString SAL_CALL getImtan( const OUString& aNum ) override;
185 virtual OUString SAL_CALL getImsec( const OUString& aNum ) override;
186 virtual OUString SAL_CALL getImcsc( const OUString& aNum ) override;
187 virtual OUString SAL_CALL getImcot( const OUString& aNum ) override;
188 virtual OUString SAL_CALL getImsinh( const OUString& aNum ) override;
189 virtual OUString SAL_CALL getImcosh( const OUString& aNum ) override;
190 virtual OUString SAL_CALL getImsech( const OUString& aNum ) override;
191 virtual OUString SAL_CALL getImcsch( const OUString& aNum ) override;
192 virtual OUString SAL_CALL getComplex( double fReal, double fImaginary, const css::uno::Any& rSuffix ) override;
193
194 virtual double SAL_CALL getConvert( double fVal, const OUString& aFromUnit, const OUString& aToUnit ) override;
195
196 virtual double SAL_CALL getAmordegrc( const css::uno::Reference< css::beans::XPropertySet >&, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const css::uno::Any& rOptBase ) override;
197 virtual double SAL_CALL getAmorlinc( const css::uno::Reference< css::beans::XPropertySet >&, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const css::uno::Any& rOptBase ) override;
198 virtual double SAL_CALL getAccrint( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nIssue, sal_Int32 nFirstInter, sal_Int32 nSettle, double fRate, const css::uno::Any& rVal, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
199 virtual double SAL_CALL getAccrintm( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nIssue, sal_Int32 nSettle, double fRate, const css::uno::Any& rVal, const css::uno::Any& rOptBase ) override;
200 virtual double SAL_CALL getReceived( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fDisc, const css::uno::Any& rOptBase ) override;
201 virtual double SAL_CALL getDisc( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice, double fRedemp, const css::uno::Any& rOptBase ) override;
202 virtual double SAL_CALL getDuration( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
203 virtual double SAL_CALL getEffect( double fNominal, sal_Int32 nPeriods ) override;
204 virtual double SAL_CALL getCumprinc( double fRate, sal_Int32 nNumPeriods, double fVal, sal_Int32 nStartPer, sal_Int32 nEndPer, sal_Int32 nPayType ) override;
205 virtual double SAL_CALL getCumipmt( double fRate, sal_Int32 nNumPeriods, double fVal, sal_Int32 nStartPer, sal_Int32 nEndPer, sal_Int32 nPayType ) override;
206 virtual double SAL_CALL getPrice( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
207 virtual double SAL_CALL getPricedisc( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc, double fRedemp, const css::uno::Any& rOptBase ) override;
208 virtual double SAL_CALL getPricemat( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fYield, const css::uno::Any& rOptBase ) override;
209 virtual double SAL_CALL getMduration( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
210 virtual double SAL_CALL getNominal( double fRate, sal_Int32 nPeriods ) override;
211 virtual double SAL_CALL getDollarfr( double fDollarDec, sal_Int32 nFrac ) override;
212 virtual double SAL_CALL getDollarde( double fDollarFrac, sal_Int32 nFrac ) override;
213 virtual double SAL_CALL getYield( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
214 virtual double SAL_CALL getYielddisc( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice, double fRedemp, const css::uno::Any& rOptBase ) override;
215 virtual double SAL_CALL getYieldmat( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fPrice, const css::uno::Any& rOptBase ) override;
216 virtual double SAL_CALL getTbilleq( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc ) override;
217 virtual double SAL_CALL getTbillprice( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc ) override;
218 virtual double SAL_CALL getTbillyield( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice ) override;
219 virtual double SAL_CALL getOddfprice( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
220 virtual double SAL_CALL getOddfyield( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
221 virtual double SAL_CALL getOddlprice( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
222 virtual double SAL_CALL getOddlyield( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any& rOptBase) override;
223 virtual double SAL_CALL getXirr( const css::uno::Reference< css::beans::XPropertySet >& xOpt, const css::uno::Sequence< css::uno::Sequence< double > >& rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& rDates, const css::uno::Any& rGuess ) override;
224 virtual double SAL_CALL getXnpv( double fRate, const css::uno::Sequence< css::uno::Sequence< double > >& rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > >& rDates ) override;
225 virtual double SAL_CALL getIntrate( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fRedemp, const css::uno::Any& rOptBase ) override;
226 virtual double SAL_CALL getCoupncd( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
227 virtual double SAL_CALL getCoupdays( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
228 virtual double SAL_CALL getCoupdaysnc( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
229 virtual double SAL_CALL getCoupdaybs( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
230 virtual double SAL_CALL getCouppcd( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
231 virtual double SAL_CALL getCoupnum( const css::uno::Reference< css::beans::XPropertySet >& xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any& rOptBase ) override;
232 virtual double SAL_CALL getFvschedule( double fPrinc, const css::uno::Sequence< css::uno::Sequence< double > >& rSchedule ) override;
233};
234
235/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
cppu::WeakComponentImplHelper< css::sheet::XAddIn, css::sheet::XCompatibilityNames, css::sheet::addin::XAnalysis, css::lang::XServiceName, css::lang::XServiceInfo > AnalysisAddIn_Base
Definition: analysis.hxx:45
virtual double SAL_CALL getAccrintm(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nIssue, sal_Int32 nSettle, double fRate, const css::uno::Any &rVal, const css::uno::Any &rOptBase) override
Definition: financial.cxx:67
virtual double SAL_CALL getMduration(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:245
std::unique_ptr< sca::analysis::ConvertDataList > pCDL
Definition: analysis.hxx:54
virtual OUString SAL_CALL getImexp(const OUString &aNum) override
Definition: analysis.cxx:830
virtual double SAL_CALL getMultinomial(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > > &aVLst, const css::uno::Sequence< css::uno::Any > &aOptVLst) override
Definition: analysis.cxx:489
virtual double SAL_CALL getQuotient(double fNum, double fDenum) override
Definition: analysis.cxx:543
virtual double SAL_CALL getXnpv(double fRate, const css::uno::Sequence< css::uno::Sequence< double > > &rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > > &rDates) override
Definition: financial.cxx:578
virtual OUString SAL_CALL getImlog10(const OUString &aNum) override
Definition: analysis.cxx:857
virtual OUString SAL_CALL getDisplayCategoryName(const OUString &aProgrammaticFunctionName) override
Definition: analysis.cxx:259
virtual OUString SAL_CALL getOct2Hex(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:703
virtual double SAL_CALL getYielddisc(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice, double fRedemp, const css::uno::Any &rOptBase) override
Definition: financial.cxx:319
virtual OUString SAL_CALL getImsec(const OUString &aNum) override
Definition: analysis.cxx:951
virtual double SAL_CALL getAmordegrc(const css::uno::Reference< css::beans::XPropertySet > &, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const css::uno::Any &rOptBase) override
Definition: financial.cxx:27
virtual double SAL_CALL getCumprinc(double fRate, sal_Int32 nNumPeriods, double fVal, sal_Int32 nStartPer, sal_Int32 nEndPer, sal_Int32 nPayType) override
Definition: financial.cxx:124
virtual OUString SAL_CALL getImcsc(const OUString &aNum) override
Definition: analysis.cxx:960
virtual double SAL_CALL getPricemat(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fYield, const css::uno::Any &rOptBase) override
Definition: financial.cxx:223
virtual double SAL_CALL getDollarfr(double fDollarDec, sal_Int32 nFrac) override
Definition: financial.cxx:268
virtual double SAL_CALL getCoupnum(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:654
virtual OUString SAL_CALL getDisplayFunctionName(const OUString &aProgrammaticName) override
Definition: analysis.cxx:164
virtual double SAL_CALL getFvschedule(double fPrinc, const css::uno::Sequence< css::uno::Sequence< double > > &rSchedule) override
Definition: financial.cxx:662
virtual double SAL_CALL getAmorlinc(const css::uno::Reference< css::beans::XPropertySet > &, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const css::uno::Any &rOptBase) override
Definition: financial.cxx:40
css::lang::Locale aFuncLoc
Definition: analysis.hxx:50
std::locale aResLocale
Definition: analysis.hxx:55
virtual double SAL_CALL getImabs(const OUString &aNum) override
Definition: analysis.cxx:785
virtual double SAL_CALL getSqrtpi(double fNum) override
Definition: analysis.cxx:562
virtual OUString SAL_CALL getDec2Hex(const css::uno::Reference< css::beans::XPropertySet > &xOpt, double fNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:725
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: analysis.cxx:137
virtual double SAL_CALL getBesseli(double fNum, sal_Int32 nOrder) override
Definition: analysis.cxx:629
virtual double SAL_CALL getDollarde(double fDollarFrac, sal_Int32 nFrac) override
Definition: financial.cxx:288
virtual double SAL_CALL getDuration(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fYield, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:101
virtual OUString SAL_CALL getBin2Oct(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:667
virtual double SAL_CALL getCoupncd(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:614
virtual OUString SAL_CALL getImsum(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< OUString > > &aNum1, const css::uno::Sequence< css::uno::Any > &aFollowingPars) override
Definition: analysis.cxx:916
virtual OUString SAL_CALL getServiceName() override
Definition: analysis.cxx:120
virtual sal_Int32 SAL_CALL getNetworkdays(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nEndDate, const css::uno::Any &aHDay) override
Definition: analysis.cxx:441
virtual OUString SAL_CALL getImln(const OUString &aNum) override
Definition: analysis.cxx:848
virtual sal_Int32 SAL_CALL getEomonth(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nMonths) override
Definition: analysis.cxx:415
virtual OUString SAL_CALL getProgrammaticCategoryName(const OUString &aProgrammaticFunctionName) override
Definition: analysis.cxx:236
std::unique_ptr< css::lang::Locale[]> pDefLocales
Definition: analysis.hxx:51
virtual sal_Int32 SAL_CALL getGestep(const css::uno::Reference< css::beans::XPropertySet > &xOpt, double fNum, const css::uno::Any &rStep) override
Definition: analysis.cxx:774
virtual double SAL_CALL getRandbetween(double fMin, double fMax) override
Definition: analysis.cxx:568
virtual OUString SAL_CALL getImcosh(const OUString &aNum) override
Definition: analysis.cxx:987
virtual double SAL_CALL getPricedisc(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc, double fRedemp, const css::uno::Any &rOptBase) override
Definition: financial.cxx:212
virtual double SAL_CALL getYieldmat(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, double fRate, double fPrice, const css::uno::Any &rOptBase) override
Definition: financial.cxx:334
virtual sal_Int32 SAL_CALL getIsodd(sal_Int32 nVal) override
Definition: analysis.cxx:483
virtual double SAL_CALL getReceived(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fDisc, const css::uno::Any &rOptBase) override
Definition: financial.cxx:80
virtual double SAL_CALL getYield(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fCoup, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:308
virtual OUString SAL_CALL getFunctionDescription(const OUString &aProgrammaticName) override
Definition: analysis.cxx:189
virtual OUString SAL_CALL getImsech(const OUString &aNum) override
Definition: analysis.cxx:996
virtual css::lang::Locale SAL_CALL getLocale() override
Definition: analysis.cxx:150
virtual OUString SAL_CALL getDisplayArgumentName(const OUString &aProgrammaticFunctionName, sal_Int32 nArgument) override
Definition: analysis.cxx:200
virtual OUString SAL_CALL getImsin(const OUString &aNum) override
Definition: analysis.cxx:898
virtual OUString SAL_CALL getImlog2(const OUString &aNum) override
Definition: analysis.cxx:866
virtual OUString SAL_CALL getDec2Bin(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 fNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:711
virtual double SAL_CALL getCoupdaybs(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:638
virtual OUString SAL_CALL getImsinh(const OUString &aNum) override
Definition: analysis.cxx:978
virtual double SAL_CALL getErfc(double fLowerLimit) override
Definition: analysis.cxx:768
virtual OUString SAL_CALL getHex2Bin(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:732
virtual double SAL_CALL getImaginary(const OUString &aNum) override
Definition: analysis.cxx:791
virtual double SAL_CALL getEffect(double fNominal, sal_Int32 nPeriods) override
Definition: financial.cxx:112
void InitData()
Definition: analysis.cxx:47
virtual double SAL_CALL getSeriessum(double fX, double fN, double fM, const css::uno::Sequence< css::uno::Sequence< double > > &aCoeffList) override
Definition: analysis.cxx:519
virtual OUString SAL_CALL getImcos(const OUString &aNum) override
Definition: analysis.cxx:812
virtual double SAL_CALL getOddfprice(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:400
virtual css::uno::Sequence< css::sheet::LocalizedName > SAL_CALL getCompatibilityNames(const OUString &aProgrammaticName) override
Definition: analysis.cxx:307
virtual OUString SAL_CALL getBin2Hex(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:681
virtual OUString SAL_CALL getDec2Oct(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 fNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:718
virtual double SAL_CALL getXirr(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< double > > &rValues, const css::uno::Sequence< css::uno::Sequence< sal_Int32 > > &rDates, const css::uno::Any &rGuess) override
Definition: financial.cxx:518
virtual double SAL_CALL getOct2Dec(const OUString &aNum) override
Definition: analysis.cxx:697
std::unique_ptr< sca::analysis::FuncDataList > pFD
Definition: analysis.hxx:52
virtual OUString SAL_CALL getImplementationName() override
Definition: analysis.cxx:127
OUString GetFuncDescrStr(const TranslateId *pResId, sal_uInt16 nStrIndex)
Definition: analysis.cxx:42
virtual OUString SAL_CALL getImproduct(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< OUString > > &aNum1, const css::uno::Sequence< css::uno::Any > &aNumList) override
Definition: analysis.cxx:875
const css::lang::Locale & GetLocale(sal_uInt32 nInd)
Definition: analysis.cxx:296
virtual void SAL_CALL setLocale(const css::lang::Locale &eLocale) override
Definition: analysis.cxx:143
virtual double SAL_CALL getPrice(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:200
virtual double SAL_CALL getNominal(double fRate, sal_Int32 nPeriods) override
Definition: financial.cxx:257
virtual OUString SAL_CALL getImsub(const OUString &aNum1, const OUString &aNum2) override
Definition: analysis.cxx:907
virtual OUString SAL_CALL getImpower(const OUString &aNum, double fPower) override
Definition: analysis.cxx:797
virtual OUString SAL_CALL getImdiv(const OUString &aDivident, const OUString &aDivisor) override
Definition: analysis.cxx:821
OUString AnalysisResId(TranslateId aId)
Definition: analysis.cxx:1047
virtual OUString SAL_CALL getOct2Bin(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:689
virtual double SAL_CALL getImreal(const OUString &aNum) override
Definition: analysis.cxx:892
virtual OUString SAL_CALL getImconjugate(const OUString &aNum) override
Definition: analysis.cxx:839
virtual double SAL_CALL getDisc(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice, double fRedemp, const css::uno::Any &rOptBase) override
Definition: financial.cxx:91
virtual double SAL_CALL getConvert(double fVal, const OUString &aFromUnit, const OUString &aToUnit) override
Definition: analysis.cxx:1038
virtual OUString SAL_CALL getImcot(const OUString &aNum) override
Definition: analysis.cxx:969
virtual OUString SAL_CALL getComplex(double fReal, double fImaginary, const css::uno::Any &rSuffix) override
Definition: analysis.cxx:1014
virtual double SAL_CALL getCouppcd(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:646
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: analysis.cxx:132
virtual OUString SAL_CALL getArgumentDescription(const OUString &aProgrammaticFunctionName, sal_Int32 nArgument) override
Definition: analysis.cxx:217
virtual double SAL_CALL getAccrint(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nIssue, sal_Int32 nFirstInter, sal_Int32 nSettle, double fRate, const css::uno::Any &rVal, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:53
virtual OUString SAL_CALL getImsqrt(const OUString &aNum) override
Definition: analysis.cxx:933
virtual OUString SAL_CALL getProgrammaticFuntionName(const OUString &aDisplayName) override
Definition: analysis.cxx:156
virtual OUString SAL_CALL getHex2Oct(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const OUString &aNum, const css::uno::Any &rPlaces) override
Definition: analysis.cxx:746
virtual double SAL_CALL getOddlyield(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:445
virtual double SAL_CALL getTbillprice(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc) override
Definition: financial.cxx:360
void InitDefLocales()
Definition: analysis.cxx:285
double FactDouble(sal_Int32 nNum)
Definition: analysis.cxx:79
virtual double SAL_CALL getBesselj(double fNum, sal_Int32 nOrder) override
Definition: analysis.cxx:635
virtual sal_Int32 SAL_CALL getWorkday(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nDays, const css::uno::Any &aHDay) override
Workday.
Definition: analysis.cxx:330
virtual sal_Int32 SAL_CALL getWeeknum(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nMode) override
Definition: analysis.cxx:402
virtual double SAL_CALL getErf(const css::uno::Reference< css::beans::XPropertySet > &xOpt, double fLowerLimit, const css::uno::Any &rUpperLimit) override
Definition: analysis.cxx:759
virtual double SAL_CALL getHex2Dec(const OUString &aNum) override
Definition: analysis.cxx:740
virtual double SAL_CALL getFactdouble(sal_Int32 nNum) override
Definition: analysis.cxx:779
virtual double SAL_CALL getCoupdays(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:622
virtual double SAL_CALL getGcd(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< double > > &aVLst, const css::uno::Sequence< css::uno::Any > &aOptVLst) override
Definition: analysis.cxx:579
virtual double SAL_CALL getCoupdaysnc(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:630
virtual sal_Int32 SAL_CALL getDelta(const css::uno::Reference< css::beans::XPropertySet > &xOpt, double fNum1, const css::uno::Any &rNum2) override
Definition: analysis.cxx:754
virtual double SAL_CALL getBessely(double fNum, sal_Int32 nOrder) override
Definition: analysis.cxx:650
virtual double SAL_CALL getIntrate(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fInvest, double fRedemp, const css::uno::Any &rOptBase) override
Definition: financial.cxx:603
virtual double SAL_CALL getOddlprice(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nLastInterest, double fRate, double fYield, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:432
virtual double SAL_CALL getTbilleq(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fDisc) override
Definition: financial.cxx:345
virtual sal_Int32 SAL_CALL getEdate(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nMonths) override
Definition: analysis.cxx:394
virtual double SAL_CALL getImargument(const OUString &aNum) override
Definition: analysis.cxx:806
virtual double SAL_CALL getLcm(const css::uno::Reference< css::beans::XPropertySet > &xOpt, const css::uno::Sequence< css::uno::Sequence< double > > &aVLst, const css::uno::Sequence< css::uno::Any > &aOptVLst) override
Definition: analysis.cxx:598
virtual double SAL_CALL getBesselk(double fNum, sal_Int32 nOrder) override
Definition: analysis.cxx:641
sca::analysis::ScaAnyConverter aAnyConv
Definition: analysis.hxx:57
virtual sal_Int32 SAL_CALL getIseven(sal_Int32 nVal) override
Definition: analysis.cxx:478
virtual ~AnalysisAddIn() override
Definition: analysis.cxx:63
sal_Int32 getDateMode(const css::uno::Reference< css::beans::XPropertySet > &xPropSet, const css::uno::Any &rAny)
Converts an Any to sal_Int32 in the range from 0 to 4 (date calculation mode).
Definition: analysis.cxx:67
virtual double SAL_CALL getMround(double fNum, double fMult) override
Definition: analysis.cxx:553
virtual double SAL_CALL getTbillyield(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, double fPrice) override
Definition: financial.cxx:378
virtual OUString SAL_CALL getImtan(const OUString &aNum) override
Definition: analysis.cxx:942
virtual double SAL_CALL getYearfrac(const css::uno::Reference< css::beans::XPropertySet > &, sal_Int32 nStartDate, sal_Int32 nEndDate, const css::uno::Any &aMode) override
Yearfrac.
Definition: analysis.cxx:387
virtual double SAL_CALL getBin2Dec(const OUString &aNum) override
Definition: analysis.cxx:675
virtual OUString SAL_CALL getImcsch(const OUString &aNum) override
Definition: analysis.cxx:1005
virtual double SAL_CALL getCumipmt(double fRate, sal_Int32 nNumPeriods, double fVal, sal_Int32 nStartPer, sal_Int32 nEndPer, sal_Int32 nPayType) override
Definition: financial.cxx:162
AnalysisAddIn(const css::uno::Reference< css::uno::XComponentContext > &xContext)
Definition: analysis.cxx:57
std::unique_ptr< double[]> pFactDoubles
Definition: analysis.hxx:53
virtual double SAL_CALL getOddfyield(const css::uno::Reference< css::beans::XPropertySet > &xOpt, sal_Int32 nSettle, sal_Int32 nMat, sal_Int32 nIssue, sal_Int32 nFirstCoup, double fRate, double fPrice, double fRedemp, sal_Int32 nFreq, const css::uno::Any &rOptBase) override
Definition: financial.cxx:418
Helper class for Any->double conversion, using current language settings.
unsigned char sal_Bool