diff options
Diffstat (limited to 'scaddins/source/analysis')
-rw-r--r-- | scaddins/source/analysis/analysis.cxx | 8 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 18 | ||||
-rw-r--r-- | scaddins/source/analysis/analysishelper.hxx | 12 |
3 files changed, 9 insertions, 29 deletions
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx index 2fe57cea1356..db051847789d 100644 --- a/scaddins/source/analysis/analysis.cxx +++ b/scaddins/source/analysis/analysis.cxx @@ -931,8 +931,8 @@ OUString SAL_CALL AnalysisAddIn::getImproduct( const uno::Reference< beans::XPro { ComplexList z_list; - z_list.Append( aNum1, AH_IgnoreEmpty ); - z_list.Append( aNL, AH_IgnoreEmpty ); + z_list.Append( aNum1 ); + z_list.Append( aNL ); if( z_list.empty() ) return Complex( 0 ).GetString(); @@ -972,8 +972,8 @@ OUString SAL_CALL AnalysisAddIn::getImsum( const uno::Reference< beans::XPropert { ComplexList z_list; - z_list.Append( aNum1, AH_IgnoreEmpty ); - z_list.Append( aFollowingPars, AH_IgnoreEmpty ); + z_list.Append( aNum1 ); + z_list.Append( aFollowingPars ); if( z_list.empty() ) return Complex( 0 ).GetString(); diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index 3d05ac068921..3baf6d70cb46 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -2034,13 +2034,11 @@ ComplexList::~ComplexList() } -void ComplexList::Append( const uno::Sequence< uno::Sequence< OUString > >& r, ComplListAppendHandl eAH ) +void ComplexList::Append( const uno::Sequence< uno::Sequence< OUString > >& r ) { sal_Int32 n1, n2; sal_Int32 nE1 = r.getLength(); sal_Int32 nE2; - bool bEmpty0 = eAH == AH_EmpyAs0; - bool bErrOnEmpty = eAH == AH_EmptyAsErr; for( n1 = 0 ; n1 < nE1 ; n1++ ) { @@ -2053,20 +2051,14 @@ void ComplexList::Append( const uno::Sequence< uno::Sequence< OUString > >& r, C if( !rStr.isEmpty() ) Append( Complex( rStr ) ); - else if( bEmpty0 ) - Append( Complex( 0.0 ) ); - else if( bErrOnEmpty ) - throw lang::IllegalArgumentException(); } } } -void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListAppendHandl eAH ) +void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars ) { sal_Int32 nEle = aMultPars.getLength(); - bool bEmpty0 = eAH == AH_EmpyAs0; - bool bErrOnEmpty = eAH == AH_EmptyAsErr; for( sal_Int32 i = 0 ; i < nEle ; i++ ) { @@ -2080,10 +2072,6 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA if( !pStr->isEmpty() ) Append( Complex( *pStr ) ); - else if( bEmpty0 ) - Append( Complex( 0.0 ) ); - else if( bErrOnEmpty ) - throw lang::IllegalArgumentException(); } break; case uno::TypeClass_DOUBLE: @@ -2098,7 +2086,7 @@ void ComplexList::Append( const uno::Sequence< uno::Any >& aMultPars, ComplListA sal_Int32 nE = aValArr.getLength(); const uno::Sequence< uno::Any >* pArr = aValArr.getConstArray(); for( sal_Int32 n = 0 ; n < nE ; n++ ) - Append( pArr[ n ], eAH ); + Append( pArr[ n ] ); } break; default: diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index 05f3e7afdd8a..fa189f67da09 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -473,14 +473,6 @@ public: }; -enum ComplListAppendHandl -{ - AH_EmptyAsErr, - AH_EmpyAs0, - AH_IgnoreEmpty -}; - - class ComplexList final { private: @@ -498,10 +490,10 @@ public: inline void Append( Complex&& pNew ); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException - void Append( const css::uno::Sequence< css::uno::Sequence< OUString > >& rComplexNumList, ComplListAppendHandl eAH ); + void Append( const css::uno::Sequence< css::uno::Sequence< OUString > >& rComplexNumList ); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException - void Append( const css::uno::Sequence< css::uno::Any >& aMultPars,ComplListAppendHandl eAH ); + void Append( const css::uno::Sequence< css::uno::Any >& aMultPars ); }; |