xref: /trunk/main/scaddins/source/analysis/analysisdefs.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*f6a6b25fSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f6a6b25fSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f6a6b25fSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f6a6b25fSAndrew Rist  * distributed with this work for additional information
6*f6a6b25fSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f6a6b25fSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f6a6b25fSAndrew Rist  * "License"); you may not use this file except in compliance
9*f6a6b25fSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*f6a6b25fSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*f6a6b25fSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f6a6b25fSAndrew Rist  * software distributed under the License is distributed on an
15*f6a6b25fSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f6a6b25fSAndrew Rist  * KIND, either express or implied.  See the License for the
17*f6a6b25fSAndrew Rist  * specific language governing permissions and limitations
18*f6a6b25fSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*f6a6b25fSAndrew Rist  *************************************************************/
21*f6a6b25fSAndrew Rist 
22*f6a6b25fSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef ANALYSISDEFS_HXX
25cdf0e10cSrcweir #define ANALYSISDEFS_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #define CSS                 ::com::sun::star
28cdf0e10cSrcweir #define XPROPSET            CSS::beans::XPropertySet
29cdf0e10cSrcweir #define REF(c)              CSS::uno::Reference< c >
30cdf0e10cSrcweir #define constREFXPS         const REF(XPROPSET)
31cdf0e10cSrcweir #define SEQ(c)              CSS::uno::Sequence< c >
32cdf0e10cSrcweir #define SEQSEQ(c)           CSS::uno::Sequence< CSS::uno::Sequence< c > >
33cdf0e10cSrcweir #define SEQofLocName        SEQ( CSS::sheet::LocalizedName )
34cdf0e10cSrcweir #define ANY                 CSS::uno::Any
35cdf0e10cSrcweir #define SEQ_ANY             SEQ(ANY)
36cdf0e10cSrcweir #define STRING              ::rtl::OUString
37cdf0e10cSrcweir #define STRFROMASCII(s)     STRING::createFromAscii( s )
38cdf0e10cSrcweir #define STRFROMANSI(s)      STRING( s, strlen( s ), RTL_TEXTENCODING_MS_1252 )
39cdf0e10cSrcweir #define THROWDEF_RTE        throw(CSS::uno::RuntimeException)
40cdf0e10cSrcweir #define THROW_RTE           throw CSS::uno::RuntimeException()
41cdf0e10cSrcweir #define THROWDEF_RTE_IAE    throw(CSS::uno::RuntimeException,CSS::lang::IllegalArgumentException)
42cdf0e10cSrcweir #define THROW_IAE           throw CSS::lang::IllegalArgumentException()
43cdf0e10cSrcweir #define THROWDEF_RTE_IAE_NCE    throw(CSS::uno::RuntimeException,CSS::lang::IllegalArgumentException,CSS::sheet::NoConvergenceException)
44cdf0e10cSrcweir #define THROW_NCE           throw CSS::sheet::NoConvergenceException()
45cdf0e10cSrcweir 
46cdf0e10cSrcweir #define CHK_Freq            ( nFreq != 1 && nFreq != 2 && nFreq != 4 )
47cdf0e10cSrcweir #define CHK_FINITE(d)       if( !::rtl::math::isFinite( d ) ) THROW_IAE
48cdf0e10cSrcweir #define RETURN_FINITE(d)    if( ::rtl::math::isFinite( d ) ) return d; else THROW_IAE
49cdf0e10cSrcweir 
50cdf0e10cSrcweir #endif
51