1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SWDBTOOLSCLIENT_HXX
20 #define _SWDBTOOLSCLIENT_HXX
22 #include <connectivity/virtualdbtools.hxx>
23 #include <osl/mutex.hxx>
24 #include <osl/module.h>
28 Client to use the dbtools library as load-on-call
30 class SW_DLLPUBLIC SwDbtoolsClient
33 ::rtl::Reference
< ::connectivity::simple::IDataAccessTools
> m_xDataAccessTools
;
34 ::rtl::Reference
< ::connectivity::simple::IDataAccessTypeConversion
> m_xAccessTypeConversion
;
35 ::rtl::Reference
< ::connectivity::simple::IDataAccessToolsFactory
> m_xDataAccessFactory
;
37 SW_DLLPRIVATE
static void registerClient();
38 SW_DLLPRIVATE
static void revokeClient();
39 SW_DLLPRIVATE
void getFactory();
41 SW_DLLPRIVATE ::rtl::Reference
< ::connectivity::simple::IDataAccessTools
> getDataAccessTools();
42 SW_DLLPRIVATE ::rtl::Reference
< ::connectivity::simple::IDataAccessTypeConversion
> getAccessTypeConversion();
48 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDataSource
> getDataSource(
49 const OUString
& _rsRegisteredName
,
50 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxContext
53 sal_Int32
getDefaultNumberFormat(
54 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxColumn
,
55 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatTypes
>& _rxTypes
,
56 const ::com::sun::star::lang::Locale
& _rLocale
59 OUString
getFormattedValue(
60 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxColumn
,
61 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XNumberFormatter
>& _rxFormatter
,
62 const ::com::sun::star::lang::Locale
& _rLocale
,
63 const ::com::sun::star::util::Date
& _rNullDate
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */