xref: /trunk/main/connectivity/inc/connectivity/DateConversion.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _CONNECTIVITY_DATECONVERSION_HXX_
25 #define _CONNECTIVITY_DATECONVERSION_HXX_
26 
27 #include <com/sun/star/util/Date.hpp>
28 #include <com/sun/star/util/Time.hpp>
29 #include <com/sun/star/util/DateTime.hpp>
30 #include "connectivity/dbtoolsdllapi.hxx"
31 
32 namespace connectivity
33 {
34     class OOO_DLLPUBLIC_DBTOOLS DateConversion
35     {
36     public:
toINT32(const::com::sun::star::util::Date &)37         static sal_Int32 toINT32(const ::com::sun::star::util::Date&)
38         {
39             OSL_ENSURE(0,"Please use DBConversion instead!");
40             return 0;
41         }
toINT32(const::com::sun::star::util::Time &)42         static sal_Int32 toINT32(const ::com::sun::star::util::Time&)
43         {
44             OSL_ENSURE(0,"Please use DBConversion instead!");
45             return 0;
46         }
toINT64(const::com::sun::star::util::DateTime &)47         static sal_Int64 toINT64(const ::com::sun::star::util::DateTime&)
48         {
49             OSL_ENSURE(0,"Please use DBConversion instead!");
50             return 0;
51         }
getMsFromTime(const::com::sun::star::util::Time &)52         static sal_Int32 getMsFromTime(const ::com::sun::star::util::Time&)
53         {
54             OSL_ENSURE(0,"Please use DBConversion instead!");
55             return 0;
56         }
toDouble(const::com::sun::star::util::Date &)57         static double    toDouble(const ::com::sun::star::util::Date&)
58         {
59             OSL_ENSURE(0,"Please use DBConversion instead!");
60             return 0;
61         }
toDouble(const::com::sun::star::util::Time &)62         static double    toDouble(const ::com::sun::star::util::Time&)
63         {
64             OSL_ENSURE(0,"Please use DBConversion instead!");
65             return 0;
66         }
toDouble(const::com::sun::star::util::DateTime &)67         static double    toDouble(const ::com::sun::star::util::DateTime&)
68         {
69             OSL_ENSURE(0,"Please use DBConversion instead!");
70             return 0;
71         }
toDate(double,const::com::sun::star::util::Date &=::com::sun::star::util::Date (01,01,1900))72         static ::com::sun::star::util::Date          toDate(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
73         {
74             OSL_ENSURE(0,"Please use DBConversion instead!");
75             return ::com::sun::star::util::Date();
76         }
toTime(double)77         static ::com::sun::star::util::Time          toTime(double)
78         {
79             OSL_ENSURE(0,"Please use DBConversion instead!");
80             return ::com::sun::star::util::Time();
81         }
toDateTime(double,const::com::sun::star::util::Date &=::com::sun::star::util::Date (01,01,1900))82         static ::com::sun::star::util::DateTime      toDateTime(double,const ::com::sun::star::util::Date& =::com::sun::star::util::Date(01,01,1900))
83         {
84             OSL_ENSURE(0,"Please use DBConversion instead!");
85             return ::com::sun::star::util::DateTime();
86         }
87     };
88 }
89 #endif // _CONNECTIVITY_DATECONVERSION_HXX_
90