1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ANALYSISDEFS_HXX
29 #define ANALYSISDEFS_HXX
30 
31 #define CSS					::com::sun::star
32 #define XPROPSET			CSS::beans::XPropertySet
33 #define REF(c)				CSS::uno::Reference< c >
34 #define constREFXPS			const REF(XPROPSET)
35 #define SEQ(c)				CSS::uno::Sequence< c >
36 #define SEQSEQ(c)			CSS::uno::Sequence< CSS::uno::Sequence< c > >
37 #define SEQofLocName		SEQ( CSS::sheet::LocalizedName )
38 #define ANY					CSS::uno::Any
39 #define	SEQ_ANY				SEQ(ANY)
40 #define STRING				::rtl::OUString
41 #define STRFROMASCII(s)		STRING::createFromAscii( s )
42 #define STRFROMANSI(s)		STRING( s, strlen( s ), RTL_TEXTENCODING_MS_1252 )
43 #define THROWDEF_RTE		throw(CSS::uno::RuntimeException)
44 #define THROW_RTE			throw CSS::uno::RuntimeException()
45 #define THROWDEF_RTE_IAE	throw(CSS::uno::RuntimeException,CSS::lang::IllegalArgumentException)
46 #define	THROW_IAE			throw CSS::lang::IllegalArgumentException()
47 #define THROWDEF_RTE_IAE_NCE    throw(CSS::uno::RuntimeException,CSS::lang::IllegalArgumentException,CSS::sheet::NoConvergenceException)
48 #define THROW_NCE           throw CSS::sheet::NoConvergenceException()
49 
50 #define CHK_Freq            ( nFreq != 1 && nFreq != 2 && nFreq != 4 )
51 #define CHK_FINITE(d)       if( !::rtl::math::isFinite( d ) ) THROW_IAE
52 #define RETURN_FINITE(d)    if( ::rtl::math::isFinite( d ) ) return d; else THROW_IAE
53 
54 #endif
55 
56