summaryrefslogtreecommitdiff
path: root/scaddins
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-09 15:28:37 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-09 15:48:42 +0100
commitb29c2bfc863349b81c40b9403dece019aa1a119d (patch)
tree89f2871f7ca15c0ba83328c5f6d1f419064cfb5d /scaddins
parente1c281c6c1a2bd55d99e1af2023444c960cf02a3 (diff)
scaddins: remove STRING macro
Change-Id: Ib8af7b4a84c96bbf1b7a0665ba05b83e5c023805
Diffstat (limited to 'scaddins')
-rw-r--r--scaddins/source/analysis/analysis.cxx142
-rw-r--r--scaddins/source/analysis/analysis.hxx114
-rw-r--r--scaddins/source/analysis/analysisdefs.hxx5
-rw-r--r--scaddins/source/analysis/analysishelper.cxx40
-rw-r--r--scaddins/source/analysis/analysishelper.hxx48
-rw-r--r--scaddins/source/pricing/pricing.cxx20
-rw-r--r--scaddins/source/pricing/pricing.hxx9
7 files changed, 188 insertions, 190 deletions
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index bf1ef36a25da..2a335f83215f 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -45,7 +45,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL analysis_component_getFactory(
{
void* pRet = 0;
- if( pServiceManager && STRING::createFromAscii( pImplName ) == AnalysisAddIn::getImplementationName_Static() )
+ if( pServiceManager && OUString::createFromAscii( pImplName ) == AnalysisAddIn::getImplementationName_Static() )
{
REF( lang::XSingleServiceFactory ) xFactory( cppu::createOneInstanceFactory(
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
@@ -85,7 +85,7 @@ ResMgr& AnalysisAddIn::GetResMgr( void ) THROWDEF_RTE
}
-STRING AnalysisAddIn::GetDisplFuncStr( sal_uInt16 nFuncNum ) THROWDEF_RTE
+OUString AnalysisAddIn::GetDisplFuncStr( sal_uInt16 nFuncNum ) THROWDEF_RTE
{
return String( AnalysisRscStrLoader( RID_ANALYSIS_FUNCTION_NAMES, nFuncNum, GetResMgr() ).GetString() );
}
@@ -103,11 +103,11 @@ public:
class AnalysisFuncRes : public Resource
{
public:
- AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, STRING& rRet );
+ AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, OUString& rRet );
};
-AnalysisFuncRes::AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, STRING& rRet ) : Resource( rRes )
+AnalysisFuncRes::AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd, OUString& rRet ) : Resource( rRes )
{
rRet = String( AnalysisResId( nInd, rResMgr ) );
@@ -115,9 +115,9 @@ AnalysisFuncRes::AnalysisFuncRes( ResId& rRes, ResMgr& rResMgr, sal_uInt16 nInd,
}
-STRING AnalysisAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) THROWDEF_RTE
+OUString AnalysisAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) THROWDEF_RTE
{
- STRING aRet;
+ OUString aRet;
AnalysisResourcePublisher aResPubl( AnalysisResId( RID_ANALYSIS_FUNCTION_DESCRIPTIONS, GetResMgr() ) );
AnalysisResId aRes( nResId, GetResMgr() );
aRes.SetRT( RSC_RESOURCE );
@@ -241,16 +241,16 @@ double AnalysisAddIn::FactDouble( sal_Int32 nNum ) THROWDEF_RTE_IAE
}
-STRING AnalysisAddIn::getImplementationName_Static()
+OUString AnalysisAddIn::getImplementationName_Static()
{
return STRFROMASCII( MY_IMPLNAME );
}
-SEQ( STRING ) AnalysisAddIn::getSupportedServiceNames_Static()
+SEQ( OUString ) AnalysisAddIn::getSupportedServiceNames_Static()
{
- SEQ( STRING ) aRet(2);
- STRING* pArray = aRet.getArray();
+ SEQ( OUString ) aRet(2);
+ OUString* pArray = aRet.getArray();
pArray[0] = STRFROMASCII( ADDIN_SERVICE );
pArray[1] = STRFROMASCII( MY_SERVICE );
return aRet;
@@ -267,7 +267,7 @@ REF( uno::XInterface ) SAL_CALL AnalysisAddIn_CreateInstance(
// XServiceName
-STRING SAL_CALL AnalysisAddIn::getServiceName() THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getServiceName() THROWDEF_RTE
{
// name of specific AddIn service
return STRFROMASCII( MY_SERVICE );
@@ -276,19 +276,19 @@ STRING SAL_CALL AnalysisAddIn::getServiceName() THROWDEF_RTE
// XServiceInfo
-STRING SAL_CALL AnalysisAddIn::getImplementationName() THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getImplementationName() THROWDEF_RTE
{
return getImplementationName_Static();
}
-sal_Bool SAL_CALL AnalysisAddIn::supportsService( const STRING& aName ) THROWDEF_RTE
+sal_Bool SAL_CALL AnalysisAddIn::supportsService( const OUString& aName ) THROWDEF_RTE
{
return aName.compareToAscii( ADDIN_SERVICE ) == 0 || aName.compareToAscii( MY_SERVICE ) == 0;
}
-SEQ( STRING ) SAL_CALL AnalysisAddIn::getSupportedServiceNames() THROWDEF_RTE
+SEQ( OUString ) SAL_CALL AnalysisAddIn::getSupportedServiceNames() THROWDEF_RTE
{
return getSupportedServiceNames_Static();
}
@@ -311,18 +311,18 @@ lang::Locale SAL_CALL AnalysisAddIn::getLocale() THROWDEF_RTE
// XAddIn
-STRING SAL_CALL AnalysisAddIn::getProgrammaticFuntionName( const STRING& ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getProgrammaticFuntionName( const OUString& ) THROWDEF_RTE
{
// not used by calc
// (but should be implemented for other uses of the AddIn service)
- return STRING();
+ return OUString();
}
-STRING SAL_CALL AnalysisAddIn::getDisplayFunctionName( const STRING& aProgrammaticName ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getDisplayFunctionName( const OUString& aProgrammaticName ) THROWDEF_RTE
{
- STRING aRet;
+ OUString aRet;
const FuncData* p = pFD->Get( aProgrammaticName );
if( p )
@@ -341,9 +341,9 @@ STRING SAL_CALL AnalysisAddIn::getDisplayFunctionName( const STRING& aProgrammat
}
-STRING SAL_CALL AnalysisAddIn::getFunctionDescription( const STRING& aProgrammaticName ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getFunctionDescription( const OUString& aProgrammaticName ) THROWDEF_RTE
{
- STRING aRet;
+ OUString aRet;
const FuncData* p = pFD->Get( aProgrammaticName );
if( p )
@@ -353,9 +353,9 @@ STRING SAL_CALL AnalysisAddIn::getFunctionDescription( const STRING& aProgrammat
}
-STRING SAL_CALL AnalysisAddIn::getDisplayArgumentName( const STRING& aName, sal_Int32 nArg ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getDisplayArgumentName( const OUString& aName, sal_Int32 nArg ) THROWDEF_RTE
{
- STRING aRet;
+ OUString aRet;
const FuncData* p = pFD->Get( aName );
if( p && nArg <= 0xFFFF )
@@ -371,9 +371,9 @@ STRING SAL_CALL AnalysisAddIn::getDisplayArgumentName( const STRING& aName, sal_
}
-STRING SAL_CALL AnalysisAddIn::getArgumentDescription( const STRING& aName, sal_Int32 nArg ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getArgumentDescription( const OUString& aName, sal_Int32 nArg ) THROWDEF_RTE
{
- STRING aRet;
+ OUString aRet;
const FuncData* p = pFD->Get( aName );
if( p && nArg <= 0xFFFF )
@@ -392,12 +392,12 @@ STRING SAL_CALL AnalysisAddIn::getArgumentDescription( const STRING& aName, sal_
static const char* pDefCatName = "Add-In";
-STRING SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const STRING& aName ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const OUString& aName ) THROWDEF_RTE
{
// return non-translated strings
// return STRFROMASCII( "Add-In" );
const FuncData* p = pFD->Get( aName );
- STRING aRet;
+ OUString aRet;
if( p )
{
const sal_Char* pStr;
@@ -422,12 +422,12 @@ STRING SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const STRING& aName
}
-STRING SAL_CALL AnalysisAddIn::getDisplayCategoryName( const STRING& aProgrammaticFunctionName ) THROWDEF_RTE
+OUString SAL_CALL AnalysisAddIn::getDisplayCategoryName( const OUString& aProgrammaticFunctionName ) THROWDEF_RTE
{
// return translated strings, not used for predefined categories
// return STRFROMASCII( "Add-In" );
const FuncData* p = pFD->Get( aProgrammaticFunctionName );
- STRING aRet;
+ OUString aRet;
if( p )
{
const sal_Char* pStr;
@@ -463,8 +463,8 @@ void AnalysisAddIn::InitDefLocales( void )
for( sal_uInt32 n = 0 ; n < nNumOfLoc ; n++ )
{
- pDefLocales[ n ].Language = STRING::createFromAscii( pLang[ n ] );
- pDefLocales[ n ].Country = STRING::createFromAscii( pCoun[ n ] );
+ pDefLocales[ n ].Language = OUString::createFromAscii( pLang[ n ] );
+ pDefLocales[ n ].Country = OUString::createFromAscii( pCoun[ n ] );
}
}
@@ -481,7 +481,7 @@ inline const ::com::sun::star::lang::Locale& AnalysisAddIn::GetLocale( sal_uInt3
}
-SEQofLocName SAL_CALL AnalysisAddIn::getCompatibilityNames( const STRING& aProgrammaticName ) THROWDEF_RTE
+SEQofLocName SAL_CALL AnalysisAddIn::getCompatibilityNames( const OUString& aProgrammaticName ) THROWDEF_RTE
{
const FuncData* p = pFD->Get( aProgrammaticName );
@@ -887,7 +887,7 @@ const double SCA_MIN16 = -SCA_MAX16-1.0; // min. val for hexadecimal
const sal_Int32 SCA_MAXPLACES = 10; // max. number of places
-STRING SAL_CALL AnalysisAddIn::getBin2Oct( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getBin2Oct( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -896,14 +896,14 @@ STRING SAL_CALL AnalysisAddIn::getBin2Oct( constREFXPS& xOpt, const STRING& aNum
}
-double SAL_CALL AnalysisAddIn::getBin2Dec( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getBin2Dec( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = ConvertToDec( aNum, 2, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getBin2Hex( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getBin2Hex( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 2, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -912,7 +912,7 @@ STRING SAL_CALL AnalysisAddIn::getBin2Hex( constREFXPS& xOpt, const STRING& aNum
}
-STRING SAL_CALL AnalysisAddIn::getOct2Bin( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getOct2Bin( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -921,14 +921,14 @@ STRING SAL_CALL AnalysisAddIn::getOct2Bin( constREFXPS& xOpt, const STRING& aNum
}
-double SAL_CALL AnalysisAddIn::getOct2Dec( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getOct2Dec( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = ConvertToDec( aNum, 8, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getOct2Hex( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getOct2Hex( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 8, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -937,7 +937,7 @@ STRING SAL_CALL AnalysisAddIn::getOct2Hex( constREFXPS& xOpt, const STRING& aNum
}
-STRING SAL_CALL AnalysisAddIn::getDec2Bin( constREFXPS& xOpt, sal_Int32 nNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getDec2Bin( constREFXPS& xOpt, sal_Int32 nNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
@@ -945,7 +945,7 @@ STRING SAL_CALL AnalysisAddIn::getDec2Bin( constREFXPS& xOpt, sal_Int32 nNum, co
}
-STRING SAL_CALL AnalysisAddIn::getDec2Oct( constREFXPS& xOpt, sal_Int32 nNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getDec2Oct( constREFXPS& xOpt, sal_Int32 nNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
@@ -953,7 +953,7 @@ STRING SAL_CALL AnalysisAddIn::getDec2Oct( constREFXPS& xOpt, sal_Int32 nNum, co
}
-STRING SAL_CALL AnalysisAddIn::getDec2Hex( constREFXPS& xOpt, double fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getDec2Hex( constREFXPS& xOpt, double fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
sal_Int32 nPlaces = 0;
sal_Bool bUsePlaces = aAnyConv.getInt32( nPlaces, xOpt, rPlaces );
@@ -961,7 +961,7 @@ STRING SAL_CALL AnalysisAddIn::getDec2Hex( constREFXPS& xOpt, double fNum, const
}
-STRING SAL_CALL AnalysisAddIn::getHex2Bin( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getHex2Bin( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -970,14 +970,14 @@ STRING SAL_CALL AnalysisAddIn::getHex2Bin( constREFXPS& xOpt, const STRING& aNum
}
-double SAL_CALL AnalysisAddIn::getHex2Dec( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getHex2Dec( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = ConvertToDec( aNum, 16, SCA_MAXPLACES );
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getHex2Oct( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getHex2Oct( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE
{
double fVal = ConvertToDec( aNum, 16, SCA_MAXPLACES );
sal_Int32 nPlaces = 0;
@@ -1022,21 +1022,21 @@ double SAL_CALL AnalysisAddIn::getFactdouble( sal_Int32 nNum ) THROWDEF_RTE_IAE
}
-double SAL_CALL AnalysisAddIn::getImabs( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getImabs( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = Complex( aNum ).Abs();
RETURN_FINITE( fRet );
}
-double SAL_CALL AnalysisAddIn::getImaginary( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getImaginary( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = Complex( aNum ).Imag();
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getImpower( const STRING& aNum, double f ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImpower( const OUString& aNum, double f ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1046,14 +1046,14 @@ STRING SAL_CALL AnalysisAddIn::getImpower( const STRING& aNum, double f ) THROWD
}
-double SAL_CALL AnalysisAddIn::getImargument( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getImargument( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = Complex( aNum ).Arg();
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getImcos( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImcos( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1063,7 +1063,7 @@ STRING SAL_CALL AnalysisAddIn::getImcos( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImdiv( const STRING& aDivid, const STRING& aDivis ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImdiv( const OUString& aDivid, const OUString& aDivis ) THROWDEF_RTE_IAE
{
Complex z( aDivid );
@@ -1073,7 +1073,7 @@ STRING SAL_CALL AnalysisAddIn::getImdiv( const STRING& aDivid, const STRING& aDi
}
-STRING SAL_CALL AnalysisAddIn::getImexp( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImexp( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1083,7 +1083,7 @@ STRING SAL_CALL AnalysisAddIn::getImexp( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImconjugate( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImconjugate( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1093,7 +1093,7 @@ STRING SAL_CALL AnalysisAddIn::getImconjugate( const STRING& aNum ) THROWDEF_RTE
}
-STRING SAL_CALL AnalysisAddIn::getImln( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImln( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1103,7 +1103,7 @@ STRING SAL_CALL AnalysisAddIn::getImln( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImlog10( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImlog10( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1113,7 +1113,7 @@ STRING SAL_CALL AnalysisAddIn::getImlog10( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImlog2( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImlog2( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1123,7 +1123,7 @@ STRING SAL_CALL AnalysisAddIn::getImlog2( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImproduct( constREFXPS&, const SEQSEQ( STRING )& aNum1, const SEQ( uno::Any )& aNL ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImproduct( constREFXPS&, const SEQSEQ( OUString )& aNum1, const SEQ( uno::Any )& aNL ) THROWDEF_RTE_IAE
{
ComplexList z_list;
@@ -1144,14 +1144,14 @@ STRING SAL_CALL AnalysisAddIn::getImproduct( constREFXPS&, const SEQSEQ( STRING
}
-double SAL_CALL AnalysisAddIn::getImreal( const STRING& aNum ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getImreal( const OUString& aNum ) THROWDEF_RTE_IAE
{
double fRet = Complex( aNum ).Real();
RETURN_FINITE( fRet );
}
-STRING SAL_CALL AnalysisAddIn::getImsin( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsin( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1161,7 +1161,7 @@ STRING SAL_CALL AnalysisAddIn::getImsin( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImsub( const STRING& aNum1, const STRING& aNum2 ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsub( const OUString& aNum1, const OUString& aNum2 ) THROWDEF_RTE_IAE
{
Complex z( aNum1 );
@@ -1171,7 +1171,7 @@ STRING SAL_CALL AnalysisAddIn::getImsub( const STRING& aNum1, const STRING& aNum
}
-STRING SAL_CALL AnalysisAddIn::getImsum( constREFXPS&, const SEQSEQ( STRING )& aNum1, const SEQ( ::com::sun::star::uno::Any )& aFollowingPars ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsum( constREFXPS&, const SEQSEQ( OUString )& aNum1, const SEQ( ::com::sun::star::uno::Any )& aFollowingPars ) THROWDEF_RTE_IAE
{
ComplexList z_list;
@@ -1192,7 +1192,7 @@ STRING SAL_CALL AnalysisAddIn::getImsum( constREFXPS&, const SEQSEQ( STRING )& a
}
-STRING SAL_CALL AnalysisAddIn::getImsqrt( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsqrt( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1202,7 +1202,7 @@ STRING SAL_CALL AnalysisAddIn::getImsqrt( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImtan( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImtan( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1212,7 +1212,7 @@ STRING SAL_CALL AnalysisAddIn::getImtan( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImsec( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsec( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1222,7 +1222,7 @@ STRING SAL_CALL AnalysisAddIn::getImsec( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImcsc( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImcsc( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1232,7 +1232,7 @@ STRING SAL_CALL AnalysisAddIn::getImcsc( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImcot( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImcot( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1242,7 +1242,7 @@ STRING SAL_CALL AnalysisAddIn::getImcot( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImsinh( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsinh( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1252,7 +1252,7 @@ STRING SAL_CALL AnalysisAddIn::getImsinh( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImcosh( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImcosh( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1262,7 +1262,7 @@ STRING SAL_CALL AnalysisAddIn::getImcosh( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImsech( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImsech( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1272,7 +1272,7 @@ STRING SAL_CALL AnalysisAddIn::getImsech( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getImcsch( const STRING& aNum ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getImcsch( const OUString& aNum ) THROWDEF_RTE_IAE
{
Complex z( aNum );
@@ -1282,7 +1282,7 @@ STRING SAL_CALL AnalysisAddIn::getImcsch( const STRING& aNum ) THROWDEF_RTE_IAE
}
-STRING SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const ANY& rSuff ) THROWDEF_RTE_IAE
+OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const ANY& rSuff ) THROWDEF_RTE_IAE
{
sal_Bool bi;
@@ -1293,7 +1293,7 @@ STRING SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const ANY& rSuf
break;
case uno::TypeClass_STRING:
{
- const STRING* pSuff = ( const STRING* ) rSuff.getValue();
+ const OUString* pSuff = ( const OUString* ) rSuff.getValue();
bi = pSuff->compareToAscii( "i" ) == 0 || pSuff->isEmpty();
if( !bi && pSuff->compareToAscii( "j" ) != 0 )
THROW_IAE;
@@ -1307,7 +1307,7 @@ STRING SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const ANY& rSuf
}
-double SAL_CALL AnalysisAddIn::getConvert( double f, const STRING& aFU, const STRING& aTU ) THROWDEF_RTE_IAE
+double SAL_CALL AnalysisAddIn::getConvert( double f, const OUString& aFU, const OUString& aTU ) THROWDEF_RTE_IAE
{
if( !pCDL )
pCDL = new ConvertDataList();
diff --git a/scaddins/source/analysis/analysis.hxx b/scaddins/source/analysis/analysis.hxx
index d89cbe251382..42bb70128784 100644
--- a/scaddins/source/analysis/analysis.hxx
+++ b/scaddins/source/analysis/analysis.hxx
@@ -62,8 +62,8 @@ private:
ScaAnyConverter aAnyConv;
ResMgr& GetResMgr( void ) THROWDEF_RTE;
- STRING GetDisplFuncStr( sal_uInt16 nFuncNum ) THROWDEF_RTE;
- STRING GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) THROWDEF_RTE;
+ OUString GetDisplFuncStr( sal_uInt16 nFuncNum ) THROWDEF_RTE;
+ OUString GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) THROWDEF_RTE;
void InitDefLocales( void );
inline const ::com::sun::star::lang::Locale& GetLocale( sal_uInt32 nInd );
void InitData( void );
@@ -81,32 +81,32 @@ public:
double FactDouble( sal_Int32 nNum ) THROWDEF_RTE_IAE;
- static STRING getImplementationName_Static();
- static SEQ( STRING ) getSupportedServiceNames_Static();
+ static OUString getImplementationName_Static();
+ static SEQ( OUString ) getSupportedServiceNames_Static();
// XAddIn
- virtual STRING SAL_CALL getProgrammaticFuntionName( const STRING& aDisplayName ) THROWDEF_RTE;
- virtual STRING SAL_CALL getDisplayFunctionName( const STRING& aProgrammaticName ) THROWDEF_RTE;
- virtual STRING SAL_CALL getFunctionDescription( const STRING& aProgrammaticName ) THROWDEF_RTE;
- virtual STRING SAL_CALL getDisplayArgumentName( const STRING& aProgrammaticFunctionName, sal_Int32 nArgument ) THROWDEF_RTE;
- virtual STRING SAL_CALL getArgumentDescription( const STRING& aProgrammaticFunctionName, sal_Int32 nArgument ) THROWDEF_RTE;
- virtual STRING SAL_CALL getProgrammaticCategoryName( const STRING& aProgrammaticFunctionName ) THROWDEF_RTE;
- virtual STRING SAL_CALL getDisplayCategoryName( const STRING& aProgrammaticFunctionName ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getDisplayFunctionName( const OUString& aProgrammaticName ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getFunctionDescription( const OUString& aProgrammaticName ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getDisplayArgumentName( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getArgumentDescription( const OUString& aProgrammaticFunctionName, sal_Int32 nArgument ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getProgrammaticCategoryName( const OUString& aProgrammaticFunctionName ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getDisplayCategoryName( const OUString& aProgrammaticFunctionName ) THROWDEF_RTE;
// XCompatibilityNames
- virtual SEQofLocName SAL_CALL getCompatibilityNames( const STRING& aProgrammaticName ) THROWDEF_RTE;
+ virtual SEQofLocName SAL_CALL getCompatibilityNames( const OUString& aProgrammaticName ) THROWDEF_RTE;
// XLocalizable
virtual void SAL_CALL setLocale( const ::com::sun::star::lang::Locale& eLocale ) THROWDEF_RTE;
virtual ::com::sun::star::lang::Locale SAL_CALL getLocale( ) THROWDEF_RTE;
// XServiceName
- virtual STRING SAL_CALL getServiceName( ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getServiceName( ) THROWDEF_RTE;
// XServiceInfo
- virtual STRING SAL_CALL getImplementationName( ) THROWDEF_RTE;
- virtual sal_Bool SAL_CALL supportsService( const STRING& ServiceName ) THROWDEF_RTE;
- virtual SEQ( STRING ) SAL_CALL getSupportedServiceNames( ) THROWDEF_RTE;
+ virtual OUString SAL_CALL getImplementationName( ) THROWDEF_RTE;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) THROWDEF_RTE;
+ virtual SEQ( OUString ) SAL_CALL getSupportedServiceNames( ) THROWDEF_RTE;
// methods from own interfaces start here
@@ -140,21 +140,21 @@ public:
virtual double SAL_CALL getBesselk( double fNum, sal_Int32 nOrder ) THROWDEF_RTE_IAE_NCE;
virtual double SAL_CALL getBessely( double fNum, sal_Int32 nOrder ) THROWDEF_RTE_IAE_NCE;
- virtual STRING SAL_CALL getBin2Oct( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getBin2Dec( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getBin2Hex( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getBin2Oct( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getBin2Dec( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getBin2Hex( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getOct2Bin( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getOct2Dec( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getOct2Hex( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getOct2Bin( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getOct2Dec( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getOct2Hex( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getDec2Bin( constREFXPS& xOpt, sal_Int32 fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getDec2Oct( constREFXPS& xOpt, sal_Int32 fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getDec2Hex( constREFXPS& xOpt, double fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getDec2Bin( constREFXPS& xOpt, sal_Int32 fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getDec2Oct( constREFXPS& xOpt, sal_Int32 fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getDec2Hex( constREFXPS& xOpt, double fNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getHex2Bin( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getHex2Dec( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getHex2Oct( constREFXPS& xOpt, const STRING& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getHex2Bin( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getHex2Dec( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getHex2Oct( constREFXPS& xOpt, const OUString& aNum, const ANY& rPlaces ) THROWDEF_RTE_IAE;
virtual sal_Int32 SAL_CALL getDelta( constREFXPS& xOpt, double fNum1, const ANY& rNum2 ) THROWDEF_RTE_IAE;
@@ -165,35 +165,35 @@ public:
virtual double SAL_CALL getFactdouble( sal_Int32 nNum ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getImabs( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getImaginary( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImpower( const STRING& aNum, double fPower ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getImargument( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImcos( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImdiv( const STRING& aDivident, const STRING& aDivisor ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImexp( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImconjugate( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImln( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImlog10( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImlog2( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImproduct( constREFXPS& xOpt, const SEQSEQ( STRING )& aNum1, const SEQ_ANY& aNumList ) THROWDEF_RTE_IAE;
- virtual double SAL_CALL getImreal( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsin( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsub( const STRING& aNum1, const STRING& aNum2 ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsum( constREFXPS& xOpt, const SEQSEQ( STRING )& aNum1, const SEQ( ANY )& aFollowingPars ) THROWDEF_RTE_IAE;
-
- virtual STRING SAL_CALL getImsqrt( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImtan( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsec( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImcsc( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImcot( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsinh( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImcosh( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImsech( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getImcsch( const STRING& aNum ) THROWDEF_RTE_IAE;
- virtual STRING SAL_CALL getComplex( double fReal, double fImaginary, const ANY& rSuffix ) THROWDEF_RTE_IAE;
-
- virtual double SAL_CALL getConvert( double fVal, const STRING& aFromUnit, const STRING& aToUnit ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getImabs( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getImaginary( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImpower( const OUString& aNum, double fPower ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getImargument( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImcos( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImdiv( const OUString& aDivident, const OUString& aDivisor ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImexp( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImconjugate( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImln( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImlog10( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImlog2( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImproduct( constREFXPS& xOpt, const SEQSEQ( OUString )& aNum1, const SEQ_ANY& aNumList ) THROWDEF_RTE_IAE;
+ virtual double SAL_CALL getImreal( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsin( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsub( const OUString& aNum1, const OUString& aNum2 ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsum( constREFXPS& xOpt, const SEQSEQ( OUString )& aNum1, const SEQ( ANY )& aFollowingPars ) THROWDEF_RTE_IAE;
+
+ virtual OUString SAL_CALL getImsqrt( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImtan( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsec( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImcsc( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImcot( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsinh( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImcosh( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImsech( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getImcsch( const OUString& aNum ) THROWDEF_RTE_IAE;
+ virtual OUString SAL_CALL getComplex( double fReal, double fImaginary, const ANY& rSuffix ) THROWDEF_RTE_IAE;
+
+ virtual double SAL_CALL getConvert( double fVal, const OUString& aFromUnit, const OUString& aToUnit ) THROWDEF_RTE_IAE;
virtual double SAL_CALL getAmordegrc( constREFXPS&, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const ANY& rOptBase ) THROWDEF_RTE_IAE;
virtual double SAL_CALL getAmorlinc( constREFXPS&, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer, double fRestVal, double fPer, double fRate, const ANY& rOptBase ) THROWDEF_RTE_IAE;
diff --git a/scaddins/source/analysis/analysisdefs.hxx b/scaddins/source/analysis/analysisdefs.hxx
index 07b18d070577..9ca0a9e7a54a 100644
--- a/scaddins/source/analysis/analysisdefs.hxx
+++ b/scaddins/source/analysis/analysisdefs.hxx
@@ -28,9 +28,8 @@
#define SEQofLocName SEQ( ::com::sun::star::sheet::LocalizedName )
#define ANY ::com::sun::star::uno::Any
#define SEQ_ANY SEQ(ANY)
-#define STRING ::rtl::OUString
-#define STRFROMASCII(s) STRING::createFromAscii( s )
-#define STRFROMANSI(s) STRING( s, strlen( s ), RTL_TEXTENCODING_MS_1252 )
+#define STRFROMASCII(s) OUString::createFromAscii( s )
+#define STRFROMANSI(s) OUString( s, strlen( s ), RTL_TEXTENCODING_MS_1252 )
#define THROWDEF_RTE throw(::com::sun::star::uno::RuntimeException)
#define THROW_RTE throw ::com::sun::star::uno::RuntimeException()
#define THROWDEF_RTE_IAE throw(::com::sun::star::uno::RuntimeException,::com::sun::star::lang::IllegalArgumentException)
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 8fddc7bd2d0a..ddcaec6462d6 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -562,7 +562,7 @@ double GetGcd( double f1, double f2 )
}
-double ConvertToDec( const STRING& aStr, sal_uInt16 nBase, sal_uInt16 nCharLim ) THROWDEF_RTE_IAE
+double ConvertToDec( const OUString& aStr, sal_uInt16 nBase, sal_uInt16 nCharLim ) THROWDEF_RTE_IAE
{
if ( nBase < 2 || nBase > 36 )
THROW_IAE;
@@ -628,7 +628,7 @@ static inline sal_Char GetMaxChar( sal_uInt16 nBase )
}
-STRING ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase,
+OUString ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase,
sal_Int32 nPlaces, sal_Int32 nMaxPlaces, sal_Bool bUsePlaces ) THROWDEF_RTE_IAE
{
fNum = ::rtl::math::approxFloor( fNum );
@@ -643,7 +643,7 @@ STRING ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase,
if( bNeg )
nNum = sal_Int64( pow( double( nBase ), double( nMaxPlaces ) ) ) + nNum;
- STRING aRet( STRING::valueOf( nNum, nBase ).toAsciiUpperCase() );
+ OUString aRet( OUString::valueOf( nNum, nBase ).toAsciiUpperCase() );
if( bUsePlaces )
@@ -659,7 +659,7 @@ STRING ConvertFromDec( double fNum, double fMin, double fMax, sal_uInt16 nBase,
sal_Char* p = new sal_Char[ nLeft + 1 ];
memset( p, bNeg? GetMaxChar( nBase ) : '0', nLeft );
p[ nLeft ] = 0x00;
- STRING aTmp( p, nLeft, RTL_TEXTENCODING_MS_1252 );
+ OUString aTmp( p, nLeft, RTL_TEXTENCODING_MS_1252 );
aTmp += aRet;
aRet = aTmp;
@@ -874,7 +874,7 @@ sal_Bool ParseDouble( const sal_Unicode*& rp, double& rRet )
}
-STRING GetString( double f, sal_Bool bLeadingSign, sal_uInt16 nMaxDig )
+OUString GetString( double f, sal_Bool bLeadingSign, sal_uInt16 nMaxDig )
{
const int nBuff = 256;
sal_Char aBuff[ nBuff + 1 ];
@@ -885,7 +885,7 @@ STRING GetString( double f, sal_Bool bLeadingSign, sal_uInt16 nMaxDig )
if ( nLen < 0 || nLen > nBuff )
nLen = strlen( aBuff );
- STRING aRet( aBuff, nLen, RTL_TEXTENCODING_MS_1252 );
+ OUString aRet( aBuff, nLen, RTL_TEXTENCODING_MS_1252 );
return aRet;
}
@@ -1352,7 +1352,7 @@ void MyList::Insert( void* p, sal_uInt32 n )
StringList::~StringList()
{
- for( STRING* p = ( STRING* ) First() ; p ; p = ( STRING* ) Next() )
+ for( OUString* p = ( OUString* ) First() ; p ; p = ( OUString* ) Next() )
delete p;
}
@@ -1695,7 +1695,7 @@ sal_Bool ScaDoubleListGE0::CheckInsert( double fValue ) const throw( uno::Runtim
//-----------------------------------------------------------------------------
-Complex::Complex( const STRING& rStr ) THROWDEF_RTE_IAE
+Complex::Complex( const OUString& rStr ) THROWDEF_RTE_IAE
{
if( !ParseString( rStr, *this ) )
THROW_IAE;
@@ -1707,7 +1707,7 @@ inline sal_Bool Complex::IsImagUnit( sal_Unicode c )
return c == 'i' || c == 'j';
}
-sal_Bool Complex::ParseString( const STRING& rStr, Complex& rCompl )
+sal_Bool Complex::ParseString( const OUString& rStr, Complex& rCompl )
{
rCompl.c = '\0'; // do not force a symbol, if only real part present
@@ -1776,7 +1776,7 @@ sal_Bool Complex::ParseString( const STRING& rStr, Complex& rCompl )
}
-STRING Complex::GetString() const THROWDEF_RTE_IAE
+OUString Complex::GetString() const THROWDEF_RTE_IAE
{
CHK_FINITE(r);
CHK_FINITE(i);
@@ -2116,7 +2116,7 @@ ComplexList::~ComplexList()
}
-void ComplexList::Append( const SEQSEQ( STRING )& r, ComplListAppendHandl eAH ) THROWDEF_RTE_IAE
+void ComplexList::Append( const SEQSEQ( OUString )& r, ComplListAppendHandl eAH ) THROWDEF_RTE_IAE
{
sal_Int32 n1, n2;
sal_Int32 nE1 = r.getLength();
@@ -2126,12 +2126,12 @@ void ComplexList::Append( const SEQSEQ( STRING )& r, ComplListAppendHandl eAH )
for( n1 = 0 ; n1 < nE1 ; n1++ )
{
- const SEQ( STRING )& rList = r[ n1 ];
+ const SEQ( OUString )& rList = r[ n1 ];
nE2 = rList.getLength();
for( n2 = 0 ; n2 < nE2 ; n2++ )
{
- const STRING& rStr = rList[ n2 ];
+ const OUString& rStr = rList[ n2 ];
if( !rStr.isEmpty() )
Append( new Complex( rStr ) );
@@ -2158,10 +2158,10 @@ void ComplexList::Append( const SEQ( ANY )& aMultPars, ComplListAppendHandl eAH
case uno::TypeClass_VOID: break;
case uno::TypeClass_STRING:
{
- const STRING* pStr = ( const STRING* ) r.getValue();
+ const OUString* pStr = ( const OUString* ) r.getValue();
if( !pStr->isEmpty() )
- Append( new Complex( *( STRING* ) r.getValue() ) );
+ Append( new Complex( *( OUString* ) r.getValue() ) );
else if( bEmpty0 )
Append( new Complex( 0.0 ) );
else if( bErrOnEmpty )
@@ -2206,16 +2206,16 @@ ConvertData::~ConvertData()
}
-sal_Int16 ConvertData::GetMatchingLevel( const STRING& rRef ) const
+sal_Int16 ConvertData::GetMatchingLevel( const OUString& rRef ) const
{
- STRING aStr = rRef;
+ OUString aStr = rRef;
sal_Int32 nLen = rRef.getLength();
sal_Int32 nIndex = rRef.lastIndexOf( '^' );
if( nIndex > 0 && nIndex == ( nLen - 2 ) )
{
const sal_Unicode* p = aStr.getStr();
- aStr = STRING( p, nLen - 2 );
- aStr += STRING( p[ nLen - 1 ] );
+ aStr = OUString( p, nLen - 2 );
+ aStr += OUString( p[ nLen - 1 ] );
}
if( aName.equals( aStr ) )
return 0;
@@ -2584,7 +2584,7 @@ ConvertDataList::~ConvertDataList()
}
-double ConvertDataList::Convert( double fVal, const STRING& rFrom, const STRING& rTo ) THROWDEF_RTE_IAE
+double ConvertDataList::Convert( double fVal, const OUString& rFrom, const OUString& rTo ) THROWDEF_RTE_IAE
{
ConvertData* pFrom = NULL;
ConvertData* pTo = NULL;
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index 395348cc5781..50092327be1c 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -97,14 +97,14 @@ inline void AlignDate( sal_uInt16& rDay, sal_uInt16 nMonth, sal_uInt16 n
double BinomialCoefficient( double n, double k );
double GetGcd( double f1, double f2 );
-double ConvertToDec( const STRING& rFromNum, sal_uInt16 nBaseFrom, sal_uInt16 nCharLim ) THROWDEF_RTE_IAE;
-STRING ConvertFromDec(
+double ConvertToDec( const OUString& rFromNum, sal_uInt16 nBaseFrom, sal_uInt16 nCharLim ) THROWDEF_RTE_IAE;
+OUString ConvertFromDec(
double fNum, double fMin, double fMax, sal_uInt16 nBase,
sal_Int32 nPlaces, sal_Int32 nMaxPlaces, sal_Bool bUsePlaces ) THROWDEF_RTE_IAE;
double Erf( double fX );
double Erfc( double fX );
sal_Bool ParseDouble( const sal_Unicode*& rpDoubleAsString, double& rReturn );
-STRING GetString( double fNumber, sal_Bool bLeadingSign = sal_False, sal_uInt16 nMaxNumOfDigits = 15 );
+OUString GetString( double fNumber, sal_Bool bLeadingSign = sal_False, sal_uInt16 nMaxNumOfDigits = 15 );
inline double Exp10( sal_Int16 nPower ); // 10 ^ nPower
double GetAmordegrc( sal_Int32 nNullDate, double fCost, sal_Int32 nDate, sal_Int32 nFirstPer,
@@ -189,13 +189,13 @@ class StringList : protected MyList
public:
virtual ~StringList();
- inline const STRING* First( void );
- inline const STRING* Next( void );
- inline const STRING* Get( sal_uInt32 nIndex ) const;
+ inline const OUString* First( void );
+ inline const OUString* Next( void );
+ inline const OUString* Get( sal_uInt32 nIndex ) const;
using MyList::Append;
- inline void Append( STRING* pNew );
- inline void Append( const STRING& rNew );
+ inline void Append( OUString* pNew );
+ inline void Append( const OUString& rNew );
using MyList::Count;
};
@@ -454,11 +454,11 @@ class Complex
public:
inline Complex( double fReal, double fImag = 0.0, sal_Unicode cC = '\0' );
- Complex( const STRING& rComplexAsString ) THROWDEF_RTE_IAE;
+ Complex( const OUString& rComplexAsString ) THROWDEF_RTE_IAE;
inline static sal_Bool IsImagUnit( sal_Unicode c );
- static sal_Bool ParseString( const STRING& rComplexAsString, Complex& rReturn );
- STRING GetString() const THROWDEF_RTE_IAE;
+ static sal_Bool ParseString( const OUString& rComplexAsString, Complex& rReturn );
+ OUString GetString() const THROWDEF_RTE_IAE;
inline double Real( void ) const;
inline double Imag( void ) const;
@@ -516,7 +516,7 @@ public:
using MyList::Append;
inline void Append( Complex* pNew );
- void Append( const SEQSEQ( STRING )& rComplexNumList, ComplListAppendHandl eAH = AH_EmpyAs0 ) THROWDEF_RTE_IAE;
+ void Append( const SEQSEQ( OUString )& rComplexNumList, ComplListAppendHandl eAH = AH_EmpyAs0 ) THROWDEF_RTE_IAE;
void Append( const SEQ( ANY )& aMultPars,ComplListAppendHandl eAH = AH_EmpyAs0 ) THROWDEF_RTE_IAE;
};
@@ -543,7 +543,7 @@ class ConvertData
protected:
friend class ConvertDataList;
double fConst;
- STRING aName;
+ OUString aName;
ConvertDataClass eClass;
sal_Bool bPrefixSupport;
public:
@@ -555,7 +555,7 @@ public:
virtual ~ConvertData();
- sal_Int16 GetMatchingLevel( const STRING& rRef ) const;
+ sal_Int16 GetMatchingLevel( const OUString& rRef ) const;
// 0.0 = no equality
// 1.0 = matches exact
// rest = matches without an assumed prefix of one character
@@ -611,7 +611,7 @@ public:
ConvertDataList( void );
virtual ~ConvertDataList();
- double Convert( double fVal, const STRING& rFrom, const STRING& rTo ) THROWDEF_RTE_IAE;
+ double Convert( double fVal, const OUString& rFrom, const OUString& rTo ) THROWDEF_RTE_IAE;
};
@@ -705,33 +705,33 @@ inline sal_uInt32 MyList::Count( void ) const
-inline const STRING* StringList::First( void )
+inline const OUString* StringList::First( void )
{
- return ( const STRING* ) MyList::First();
+ return ( const OUString* ) MyList::First();
}
-inline const STRING* StringList::Next( void )
+inline const OUString* StringList::Next( void )
{
- return ( const STRING* ) MyList::Next();
+ return ( const OUString* ) MyList::Next();
}
-inline const STRING* StringList::Get( sal_uInt32 n ) const
+inline const OUString* StringList::Get( sal_uInt32 n ) const
{
- return ( const STRING* ) MyList::GetObject( n );
+ return ( const OUString* ) MyList::GetObject( n );
}
-inline void StringList::Append( STRING* p )
+inline void StringList::Append( OUString* p )
{
MyList::Append( p );
}
-inline void StringList::Append( const STRING& r )
+inline void StringList::Append( const OUString& r )
{
- MyList::Append( new STRING( r ) );
+ MyList::Append( new OUString( r ) );
}
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 2e7e401c5717..525d9d94b569 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -537,7 +537,7 @@ uno::Sequence< sheet::LocalizedName > SAL_CALL ScaPricingAddIn::getCompatibility
// auxillary input handling functions
namespace {
-bool getinput_putcall(bs::types::PutCall& pc, const STRING& str) {
+bool getinput_putcall(bs::types::PutCall& pc, const OUString& str) {
if(str.compareToAscii("c",1)==0) {
pc=bs::types::Call;
} else if(str.compareToAscii("p",1)==0) {
@@ -549,7 +549,7 @@ bool getinput_putcall(bs::types::PutCall& pc, const STRING& str) {
}
bool getinput_putcall(bs::types::PutCall& pc, const ANY& anyval) {
- STRING str;
+ OUString str;
if(anyval.getValueTypeClass() == ::com::sun::star::uno::TypeClass_STRING) {
anyval >>= str;
} else if(anyval.getValueTypeClass() == ::com::sun::star::uno::TypeClass_VOID) {
@@ -571,7 +571,7 @@ bool getinput_strike(double& strike, const ANY& anyval) {
return true;
}
-bool getinput_inout(bs::types::BarrierKIO& kio, const STRING& str) {
+bool getinput_inout(bs::types::BarrierKIO& kio, const OUString& str) {
if(str.compareToAscii("i",1)==0) {
kio=bs::types::KnockIn;
} else if(str.compareToAscii("o",1)==0) {
@@ -582,7 +582,7 @@ bool getinput_inout(bs::types::BarrierKIO& kio, const STRING& str) {
return true;
}
-bool getinput_barrier(bs::types::BarrierActive& cont, const STRING& str) {
+bool getinput_barrier(bs::types::BarrierActive& cont, const OUString& str) {
if(str.compareToAscii("c",1)==0) {
cont=bs::types::Continuous;
} else if(str.compareToAscii("e",1)==0) {
@@ -593,7 +593,7 @@ bool getinput_barrier(bs::types::BarrierActive& cont, const STRING& str) {
return true;
}
-bool getinput_fordom(bs::types::ForDom& fd, const STRING& str) {
+bool getinput_fordom(bs::types::ForDom& fd, const OUString& str) {
if(str.compareToAscii("f",1)==0) {
fd=bs::types::Foreign;
} else if(str.compareToAscii("d",1)==0) {
@@ -605,7 +605,7 @@ bool getinput_fordom(bs::types::ForDom& fd, const STRING& str) {
}
bool getinput_greek(bs::types::Greeks& greek, const ANY& anyval) {
- STRING str;
+ OUString str;
if(anyval.getValueTypeClass() == ::com::sun::star::uno::TypeClass_STRING) {
anyval >>= str;
} else if(anyval.getValueTypeClass() == ::com::sun::star::uno::TypeClass_VOID) {
@@ -646,8 +646,8 @@ bool getinput_greek(bs::types::Greeks& greek, const ANY& anyval) {
double SAL_CALL ScaPricingAddIn::getOptBarrier( double spot, double vol,
double r, double rf, double T, double strike,
double barrier_low, double barrier_up, double rebate,
- const STRING& put_call, const STRING& in_out,
- const STRING& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE
+ const OUString& put_call, const OUString& in_out,
+ const OUString& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE
{
bs::types::PutCall pc;
bs::types::BarrierKIO kio;
@@ -672,8 +672,8 @@ double SAL_CALL ScaPricingAddIn::getOptBarrier( double spot, double vol,
double SAL_CALL ScaPricingAddIn::getOptTouch( double spot, double vol,
double r, double rf, double T,
double barrier_low, double barrier_up,
- const STRING& for_dom, const STRING& in_out,
- const STRING& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE
+ const OUString& for_dom, const OUString& in_out,
+ const OUString& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE
{
bs::types::ForDom fd;
bs::types::BarrierKIO kio;
diff --git a/scaddins/source/pricing/pricing.hxx b/scaddins/source/pricing/pricing.hxx
index ca02f9c87bad..67315cdcf439 100644
--- a/scaddins/source/pricing/pricing.hxx
+++ b/scaddins/source/pricing/pricing.hxx
@@ -44,7 +44,6 @@
#include <tools/resary.hxx>
#define ANY ::com::sun::star::uno::Any
-#define STRING ::rtl::OUString
#define THROWDEF_RTE_IAE throw(::com::sun::star::uno::RuntimeException,::com::sun::star::lang::IllegalArgumentException)
#define THROW_IAE throw ::com::sun::star::lang::IllegalArgumentException()
#define RETURN_FINITE(d) if( ::rtl::math::isFinite( d ) ) return d; else THROW_IAE
@@ -392,14 +391,14 @@ public:
virtual double SAL_CALL getOptBarrier( double spot, double vol,
double r, double rf, double T, double strike,
double barrier_low, double barrier_up, double rebate,
- const STRING& put_call, const STRING& in_out,
- const STRING& continuous, const ANY& greek ) THROWDEF_RTE_IAE;
+ const OUString& put_call, const OUString& in_out,
+ const OUString& continuous, const ANY& greek ) THROWDEF_RTE_IAE;
virtual double SAL_CALL getOptTouch( double spot, double vol,
double r, double rf, double T,
double barrier_low, double barrier_up,
- const STRING& for_dom, const STRING& in_out,
- const STRING& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE;
+ const OUString& for_dom, const OUString& in_out,
+ const OUString& barriercont, const ANY& greekstr ) THROWDEF_RTE_IAE;
virtual double SAL_CALL getOptProbHit( double spot, double vol,
double mu, double T,