update dev300-m58
[ooovba.git] / framework / inc / classes / converter.hxx
blob6a068ac4dd46af62ac26c034aaa9e815c6192cbd
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: converter.hxx,v $
10 * $Revision: 1.8 $
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 ************************************************************************/
31 #ifndef __FRAMEWORK_CLASSES_CONVERTER_HXX_
32 #define __FRAMEWORK_CLASSES_CONVERTER_HXX_
34 //_________________________________________________________________________________________________________________
35 // my own includes
36 //_________________________________________________________________________________________________________________
38 #include <general.h>
39 #include <stdtypes.h>
41 //_________________________________________________________________________________________________________________
42 // interface includes
43 //_________________________________________________________________________________________________________________
45 //_________________________________________________________________________________________________________________
46 // other includes
47 //_________________________________________________________________________________________________________________
48 #include <com/sun/star/uno/Sequence.hxx>
49 #include <com/sun/star/uno/Any.hxx>
50 #include <com/sun/star/beans/PropertyValue.hpp>
51 #include <com/sun/star/beans/NamedValue.hpp>
52 #include <tools/datetime.hxx>
54 //_________________________________________________________________________________________________________________
55 // namespace
56 //_________________________________________________________________________________________________________________
58 namespace framework{
60 //_________________________________________________________________________________________________________________
61 // exported const
62 //_________________________________________________________________________________________________________________
64 //_________________________________________________________________________________________________________________
65 // exported definitions
66 //_________________________________________________________________________________________________________________
68 class Converter
70 public:
71 // Seq<Any> <=> Seq<beans.PropertyValue>
72 static css::uno::Sequence< css::uno::Any > convert_seqProp2seqAny ( const css::uno::Sequence< css::beans::PropertyValue >& lSource );
73 static css::uno::Sequence< css::beans::PropertyValue > convert_seqAny2seqProp ( const css::uno::Sequence< css::uno::Any >& lSource );
75 // Seq<beans.NamedValue> <=> Seq<beans.PropertyValue>
76 static css::uno::Sequence< css::beans::PropertyValue > convert_seqNamedVal2seqPropVal ( const css::uno::Sequence< css::beans::NamedValue >& lSource );
77 static css::uno::Sequence< css::beans::NamedValue > convert_seqPropVal2seqNamedVal ( const css::uno::Sequence< css::beans::PropertyValue >& lSource );
79 // Seq<String> => Vector<String>
80 static OUStringList convert_seqOUString2OUStringList( const css::uno::Sequence< ::rtl::OUString >& lSource );
81 static css::uno::Sequence< ::rtl::OUString > convert_OUStringList2seqOUString( const OUStringList& lSource );
83 static css::uno::Sequence< css::beans::PropertyValue > convert_OUStringHash2seqProp ( const OUStringHash& lSource );
84 static OUStringHash convert_seqProp2OUStringHash ( const css::uno::Sequence< css::beans::PropertyValue >& lSource );
86 // String <=> tools.DateTime
87 static DateTime convert_String2DateTime ( const ::rtl::OUString& sSource );
88 static ::rtl::OUString convert_DateTime2String ( const DateTime& aSource );
89 static ::rtl::OUString convert_DateTime2ISO8601 ( const DateTime& aSource );
92 } // namespace framework
94 #endif // #ifndef __FRAMEWORK_CLASSES_CONVERTER_HXX_