Kaydet (Commit) ad74c032 authored tarafından Noel Grandin's avatar Noel Grandin

drop ComplListAppendHandl enum

we only use one value all the time, so it is unnecessary

Change-Id: I37b596f9c9330ad5f35d6b112dcca14851626995
Reviewed-on: https://gerrit.libreoffice.org/63936
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8a629c1f
......@@ -1202,10 +1202,6 @@ sc/source/ui/vba/vbasheetobject.hxx:142
enum ScVbaControlObjectBase::ListenerType LISTENER_VALUE
sc/source/ui/vba/vbasheetobject.hxx:143
enum ScVbaControlObjectBase::ListenerType LISTENER_CHANGE
scaddins/source/analysis/analysishelper.hxx:478
enum sca::analysis::ComplListAppendHandl AH_EmptyAsErr
scaddins/source/analysis/analysishelper.hxx:479
enum sca::analysis::ComplListAppendHandl AH_EmpyAs0
scaddins/source/datefunc/datefunc.hxx:41
enum ScaCategory Finance
scaddins/source/datefunc/datefunc.hxx:42
......
......@@ -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();
......
......@@ -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:
......
......@@ -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 );
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment