Line data Source code
1 : #ifndef INCLUDED_COM_SUN_STAR_SHEET_LOCALIZEDNAME_HPP
2 : #define INCLUDED_COM_SUN_STAR_SHEET_LOCALIZEDNAME_HPP
3 :
4 : #include "sal/config.h"
5 :
6 : #include "com/sun/star/sheet/LocalizedName.hdl"
7 :
8 : #include "com/sun/star/lang/Locale.hpp"
9 : #include "com/sun/star/uno/Type.hxx"
10 : #include "cppu/unotype.hxx"
11 : #include "osl/mutex.hxx"
12 : #include "rtl/ustring.h"
13 : #include "rtl/ustring.hxx"
14 : #include "rtl/instance.hxx"
15 : #include "sal/types.h"
16 : #include "typelib/typeclass.h"
17 : #include "typelib/typedescription.h"
18 :
19 : namespace com { namespace sun { namespace star { namespace sheet {
20 :
21 : inline LocalizedName::LocalizedName() SAL_THROW(())
22 : : Locale()
23 : , Name()
24 : {
25 : }
26 :
27 218 : inline LocalizedName::LocalizedName(const css::lang::Locale& Locale_, const ::rtl::OUString& Name_) SAL_THROW(())
28 : : Locale(Locale_)
29 218 : , Name(Name_)
30 : {
31 218 : }
32 :
33 : } } } }
34 :
35 : namespace com { namespace sun { namespace star { namespace sheet { namespace detail {
36 :
37 : struct theLocalizedNameType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theLocalizedNameType >
38 : {
39 6 : ::com::sun::star::uno::Type * operator()() const
40 : {
41 6 : ::rtl::OUString the_name( "com.sun.star.sheet.LocalizedName" );
42 6 : ::cppu::UnoType< css::lang::Locale >::get();
43 6 : ::rtl::OUString the_tname0( "com.sun.star.lang.Locale" );
44 6 : ::rtl::OUString the_name0( "Locale" );
45 6 : ::rtl::OUString the_tname1( "string" );
46 6 : ::rtl::OUString the_name1( "Name" );
47 : ::typelib_StructMember_Init the_members[] = {
48 : { { typelib_TypeClass_STRUCT, the_tname0.pData, the_name0.pData }, false },
49 6 : { { typelib_TypeClass_STRING, the_tname1.pData, the_name1.pData }, false } };
50 6 : ::typelib_TypeDescription * the_newType = 0;
51 6 : ::typelib_typedescription_newStruct(&the_newType, the_name.pData, 0, 2, the_members);
52 6 : ::typelib_typedescription_register(&the_newType);
53 6 : ::typelib_typedescription_release(the_newType);
54 6 : return new ::com::sun::star::uno::Type(::com::sun::star::uno::TypeClass_STRUCT, the_name); // leaked
55 : }
56 : };
57 : } } } } }
58 :
59 : namespace com { namespace sun { namespace star { namespace sheet {
60 :
61 8 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::sheet::LocalizedName const *) {
62 8 : return *detail::theLocalizedNameType::get();
63 : }
64 :
65 : } } } }
66 :
67 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER css::sheet::LocalizedName const *) SAL_THROW(()) {
68 : return ::cppu::UnoType< css::sheet::LocalizedName >::get();
69 : }
70 :
71 : #endif // INCLUDED_COM_SUN_STAR_SHEET_LOCALIZEDNAME_HPP
|