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 __FRAMEWORK_CLASSES_CONVERTER_HXX_ 25 #define __FRAMEWORK_CLASSES_CONVERTER_HXX_ 26 27 //_________________________________________________________________________________________________________________ 28 // my own includes 29 //_________________________________________________________________________________________________________________ 30 31 #include <general.h> 32 #include <stdtypes.h> 33 34 //_________________________________________________________________________________________________________________ 35 // interface includes 36 //_________________________________________________________________________________________________________________ 37 38 //_________________________________________________________________________________________________________________ 39 // other includes 40 //_________________________________________________________________________________________________________________ 41 #include <com/sun/star/uno/Sequence.hxx> 42 #include <com/sun/star/uno/Any.hxx> 43 #include <com/sun/star/beans/PropertyValue.hpp> 44 #include <com/sun/star/beans/NamedValue.hpp> 45 #include <tools/datetime.hxx> 46 #include <fwidllapi.h> 47 48 //_________________________________________________________________________________________________________________ 49 // namespace 50 //_________________________________________________________________________________________________________________ 51 52 namespace framework{ 53 54 //_________________________________________________________________________________________________________________ 55 // exported const 56 //_________________________________________________________________________________________________________________ 57 58 //_________________________________________________________________________________________________________________ 59 // exported definitions 60 //_________________________________________________________________________________________________________________ 61 62 class FWI_DLLPUBLIC Converter 63 { 64 public: 65 // Seq<Any> <=> Seq<beans.PropertyValue> 66 static css::uno::Sequence< css::uno::Any > convert_seqProp2seqAny ( const css::uno::Sequence< css::beans::PropertyValue >& lSource ); 67 static css::uno::Sequence< css::beans::PropertyValue > convert_seqAny2seqProp ( const css::uno::Sequence< css::uno::Any >& lSource ); 68 69 // Seq<beans.NamedValue> <=> Seq<beans.PropertyValue> 70 static css::uno::Sequence< css::beans::PropertyValue > convert_seqNamedVal2seqPropVal ( const css::uno::Sequence< css::beans::NamedValue >& lSource ); 71 static css::uno::Sequence< css::beans::NamedValue > convert_seqPropVal2seqNamedVal ( const css::uno::Sequence< css::beans::PropertyValue >& lSource ); 72 73 // Seq<String> => Vector<String> 74 static OUStringList convert_seqOUString2OUStringList( const css::uno::Sequence< ::rtl::OUString >& lSource ); 75 static css::uno::Sequence< ::rtl::OUString > convert_OUStringList2seqOUString( const OUStringList& lSource ); 76 77 static css::uno::Sequence< css::beans::PropertyValue > convert_OUStringHash2seqProp ( const OUStringHashMap& lSource ); 78 static OUStringHashMap convert_seqProp2OUStringHash ( const css::uno::Sequence< css::beans::PropertyValue >& lSource ); 79 80 // String <=> tools.DateTime 81 static DateTime convert_String2DateTime ( const ::rtl::OUString& sSource ); 82 static ::rtl::OUString convert_DateTime2String ( const DateTime& aSource ); 83 static ::rtl::OUString convert_DateTime2ISO8601 ( const DateTime& aSource ); 84 }; 85 86 } // namespace framework 87 88 #endif // #ifndef __FRAMEWORK_CLASSES_CONVERTER_HXX_ 89