merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / swdbtoolsclient.hxx
blobbe6ef96200d54436a72901e56ce159f62d764700
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: swdbtoolsclient.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SWDBTOOLSCLIENT_HXX
31 #define _SWDBTOOLSCLIENT_HXX
33 #include <connectivity/virtualdbtools.hxx>
34 #include <osl/mutex.hxx>
35 #include <osl/module.h>
36 #include "swdllapi.h"
38 /* -----------------------------30.08.2001 11:01------------------------------
39 Client to use the dbtools library as load-on-call
40 ---------------------------------------------------------------------------*/
41 class SW_DLLPUBLIC SwDbtoolsClient
43 private:
44 ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools;
45 ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > m_xAccessTypeConversion;
46 ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory;
48 SW_DLLPRIVATE static void registerClient();
49 SW_DLLPRIVATE static void revokeClient();
50 SW_DLLPRIVATE void getFactory();
52 SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTools > getDataAccessTools();
53 SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > getAccessTypeConversion();
55 public:
56 SwDbtoolsClient();
57 ~SwDbtoolsClient();
59 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
60 const ::rtl::OUString& _rsRegisteredName,
61 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
64 sal_Int32 getDefaultNumberFormat(
65 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn,
66 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes,
67 const ::com::sun::star::lang::Locale& _rLocale
70 ::rtl::OUString getValue(
71 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
72 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
73 const ::com::sun::star::lang::Locale& _rLocale,
74 const ::com::sun::star::util::Date& _rNullDate
78 #endif