1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef ANALYSISDEFS_HXX
30 #define ANALYSISDEFS_HXX
32 #define XPROPSET ::com::sun::star::beans::XPropertySet
33 #define REF(c) ::com::sun::star::uno::Reference< c >
34 #define constREFXPS const REF(XPROPSET)
35 #define SEQ(c) ::com::sun::star::uno::Sequence< c >
36 #define SEQSEQ(c) ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< c > >
37 #define SEQofLocName SEQ( ::com::sun::star::sheet::LocalizedName )
38 #define ANY ::com::sun::star::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(::com::sun::star::uno::RuntimeException)
44 #define THROW_RTE throw ::com::sun::star::uno::RuntimeException()
45 #define THROWDEF_RTE_IAE throw(::com::sun::star::uno::RuntimeException,::com::sun::star::lang::IllegalArgumentException)
46 #define THROW_IAE throw ::com::sun::star::lang::IllegalArgumentException()
47 #define THROWDEF_RTE_IAE_NCE throw(::com::sun::star::uno::RuntimeException,::com::sun::star::lang::IllegalArgumentException,::com::sun::star::sheet::NoConvergenceException)
48 #define THROW_NCE throw ::com::sun::star::sheet::NoConvergenceException()
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
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */