1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: TypeGeneration.cxx,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 // MARKER(update_precomp.py): autogen include statement, do not remove
33 #include "precompiled_comphelper.hxx"
34 #ifndef _COMPHELPER_TYPEGENERATION_HXX
35 #include <comphelper/TypeGeneration.hxx>
37 #include <com/sun/star/script/XLibraryContainer.hpp>
38 #include <com/sun/star/style/LineSpacingMode.hpp>
39 #include <com/sun/star/style/ParagraphAdjust.hpp>
40 #include <com/sun/star/style/DropCapFormat.hpp>
41 #include <com/sun/star/style/LineSpacing.hpp>
42 #include <com/sun/star/style/TabStop.hpp>
43 #include <com/sun/star/style/TabAlign.hpp>
44 #include <com/sun/star/style/PageStyleLayout.hpp>
45 #include <com/sun/star/style/BreakType.hpp>
46 #include <com/sun/star/text/XModule.hpp>
47 #include <com/sun/star/text/XTextRangeMover.hpp>
48 #include <com/sun/star/text/XFootnotesSettingsSupplier.hpp>
49 #include <com/sun/star/text/XFootnote.hpp>
50 #include <com/sun/star/text/XFootnotesSupplier.hpp>
51 #include <com/sun/star/text/XEndnotesSupplier.hpp>
52 #include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
53 #include <com/sun/star/text/FootnoteNumbering.hpp>
54 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
55 #include <com/sun/star/text/XTextSection.hpp>
56 #include <com/sun/star/text/SectionFileLink.hpp>
57 #include <com/sun/star/text/RelOrientation.hpp>
58 #include <com/sun/star/text/VertOrientation.hpp>
59 #include <com/sun/star/text/HorizontalAdjust.hpp>
60 #include <com/sun/star/text/DocumentStatistic.hpp>
61 #include <com/sun/star/text/HoriOrientation.hpp>
62 #include <com/sun/star/text/HoriOrientationFormat.hpp>
63 #include <com/sun/star/text/NotePrintMode.hpp>
64 #include <com/sun/star/text/SizeType.hpp>
65 #include <com/sun/star/text/VertOrientationFormat.hpp>
66 #include <com/sun/star/text/WrapTextMode.hpp>
67 //undef to prevent error (from sfx2/docfile.cxx)
69 #include <com/sun/star/text/SetVariableType.hpp>
70 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
71 #include <com/sun/star/text/UserDataPart.hpp>
72 #include <com/sun/star/text/ChapterFormat.hpp>
73 #include <com/sun/star/text/XTextField.hpp>
74 #include <com/sun/star/text/PlaceholderType.hpp>
75 #include <com/sun/star/text/TemplateDisplayFormat.hpp>
76 #include <com/sun/star/text/UserFieldFormat.hpp>
77 #include <com/sun/star/text/PageNumberType.hpp>
78 #include <com/sun/star/text/ReferenceFieldPart.hpp>
79 #include <com/sun/star/text/FilenameDisplayFormat.hpp>
80 #include <com/sun/star/text/XDependentTextField.hpp>
81 #include <com/sun/star/text/GraphicCrop.hpp>
82 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
83 #include <com/sun/star/text/XTextTableCursor.hpp>
84 #include <com/sun/star/text/XTextTablesSupplier.hpp>
85 #include <com/sun/star/text/TableColumnSeparator.hpp>
86 #include <com/sun/star/text/XTextTable.hpp>
87 #include <com/sun/star/text/XDocumentIndexMark.hpp>
88 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
89 #include <com/sun/star/text/XDocumentIndex.hpp>
90 #include <com/sun/star/text/XTextColumns.hpp>
91 #include <com/sun/star/text/TextColumnSequence.hpp>
92 #include <com/sun/star/text/XTextFramesSupplier.hpp>
93 #include <com/sun/star/text/XTextFrame.hpp>
94 #include <com/sun/star/beans/PropertyValues.hpp>
95 #include <com/sun/star/beans/XPropertySet.hpp>
96 #include <com/sun/star/beans/PropertyValue.hpp>
97 #include <com/sun/star/beans/PropertyState.hpp>
98 #include <com/sun/star/beans/XPropertySetInfo.hpp>
99 #include <com/sun/star/beans/XMultiPropertySet.hpp>
100 #include <com/sun/star/beans/XFastPropertySet.hpp>
101 #include <com/sun/star/beans/XVetoableChangeListener.hpp>
102 #include <com/sun/star/beans/XPropertyState.hpp>
103 #include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
104 #ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_
105 #include <com/sun/star/beans/PropertyAttribute.hpp>
107 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
108 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
109 #include <com/sun/star/beans/XPropertyAccess.hpp>
110 #include <com/sun/star/beans/XPropertyContainer.hpp>
111 #include <com/sun/star/beans/NamedValue.hpp>
112 #include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
113 #include <com/sun/star/beans/PropertyChangeEvent.hpp>
114 #include <com/sun/star/text/TextContentAnchorType.hpp>
115 #include <com/sun/star/awt/FontSlant.hpp>
116 #include <com/sun/star/awt/Size.hpp>
117 #include <com/sun/star/awt/XBitmap.hpp>
118 #include <com/sun/star/style/GraphicLocation.hpp>
119 #include <com/sun/star/style/VerticalAlignment.hpp>
120 #include <com/sun/star/container/XIndexReplace.hpp>
121 #include <com/sun/star/container/XIndexContainer.hpp>
122 #include <com/sun/star/table/ShadowFormat.hpp>
123 #include <com/sun/star/table/BorderLine.hpp>
124 #include <com/sun/star/table/TableBorder.hpp>
125 #include <com/sun/star/table/TableBorderDistances.hpp>
126 #include <com/sun/star/container/XNameContainer.hpp>
127 #include <com/sun/star/lang/Locale.hpp>
128 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
129 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
130 #include <com/sun/star/drawing/ColorMode.hpp>
131 #include <com/sun/star/util/DateTime.hpp>
132 #include <com/sun/star/util/Date.hpp>
133 #include <com/sun/star/sdbc/XResultSet.hpp>
134 #include <com/sun/star/sdbc/XConnection.hpp>
135 #include <com/sun/star/frame/XModel.hpp>
136 // --> OD 2004-08-09 #i28749#
137 #include <com/sun/star/drawing/HomogenMatrix3.hpp>
139 #include <com/sun/star/graphic/XGraphicProvider.hpp>
141 using ::rtl::OUString
;
142 using namespace ::com::sun::star
;
143 using namespace ::com::sun::star::container
;
144 using namespace ::com::sun::star::lang
;
145 using namespace ::com::sun::star::awt
;
146 using namespace ::com::sun::star::text
;
147 using namespace ::com::sun::star::uno
;
148 using namespace ::com::sun::star::beans
;
149 using namespace ::com::sun::star::drawing
;
150 using namespace ::com::sun::star::i18n
;
151 using namespace ::comphelper
;
155 void GenerateCppuType (
156 CppuTypes eType
, const com::sun::star::uno::Type
*& pType
)
160 case CPPUTYPE_BOOLEAN
: pType
= &::getBooleanCppuType(); break;
161 case CPPUTYPE_INT8
: pType
= &::getCppuType( (sal_Int8
*)0 ); break;
162 case CPPUTYPE_INT16
: pType
= &::getCppuType( (sal_Int16
*)0 ); break;
163 case CPPUTYPE_INT32
: pType
= &::getCppuType( (sal_Int32
*)0 ); break;
165 case CPPUTYPE_DOUBLE
: pType
= &::getCppuType( (double*)0 ); break;
166 case CPPUTYPE_FLOAT
: pType
= &::getCppuType( (float*)0 ); break;
167 case CPPUTYPE_OUSTRING
: pType
= &::getCppuType( (OUString
*)0 ); break;
168 case CPPUTYPE_FONTSLANT
: pType
= &::getCppuType( (FontSlant
*)0 ); break;
169 case CPPUTYPE_LOCALE
: pType
= &::getCppuType( (Locale
*)0 ); break;
170 case CPPUTYPE_PROPERTYVALUE
:pType
= &::getCppuType( (Sequence
<PropertyValue
>*)0 ); break;
171 case CPPUTYPE_PROPERTYVALUES
: pType
= &::getCppuType( (Sequence
<PropertyValues
>*)0 ); break;
172 case CPPUTYPE_BORDERLINE
: pType
= &::getCppuType( (table::BorderLine
*)0 ); break;
173 case CPPUTYPE_BREAK
: pType
= &::getCppuType( (style::BreakType
*)0 ); break;
174 case CPPUTYPE_GRAPHICLOC
: pType
= &::getCppuType( (style::GraphicLocation
*)0 ); break;
175 case CPPUTYPE_DROPCAPFMT
: pType
= &::getCppuType( (style::DropCapFormat
*)0 ); break;
176 case CPPUTYPE_LINESPACE
: pType
= &::getCppuType( (style::LineSpacing
*)0 ); break;
178 case CPPUTYPE_AWTSIZE
: pType
= &::getCppuType( (awt::Size
*)0 ); break;
179 case CPPUTYPE_SHADOWFMT
: pType
= &::getCppuType( (table::ShadowFormat
*)0 ); break;
180 case CPPUTYPE_TBLCOLSEP
: pType
= &::getCppuType( (Sequence
<text::TableColumnSeparator
>*)0 ); break;
181 case CPPUTYPE_PNTSEQSEQ
: pType
= &::getCppuType( (PointSequenceSequence
*)0 ); break;
182 case CPPUTYPE_DOCIDXMRK
: pType
= &::getCppuType( (Sequence
< Reference
< XDocumentIndexMark
> >*)0 ); break;
183 case CPPUTYPE_SEQINT8
: pType
= &::getCppuType( (Sequence
<sal_Int8
>*)0 ); break;
184 case CPPUTYPE_SEQTABSTOP
: pType
= &::getCppuType( (Sequence
<style::TabStop
>*)0 ); break;
185 case CPPUTYPE_SEQANCHORTYPE
:pType
= &::getCppuType( (Sequence
<text::TextContentAnchorType
>*)0 ); break;
186 case CPPUTYPE_SEQDEPTXTFLD
: pType
= &::getCppuType( (Sequence
<Reference
<XDependentTextField
> >*)0); break;
187 case CPPUTYPE_TXTCNTANCHOR
: pType
= &::getCppuType( (text::TextContentAnchorType
*)0 ); break;
188 case CPPUTYPE_WRAPTXTMODE
: pType
= &::getCppuType( (text::WrapTextMode
*)0 ); break;
190 case CPPUTYPE_COLORMODE
: pType
= &::getCppuType( (drawing::ColorMode
*)0 ); break;
191 case CPPUTYPE_PAGESTYLELAY
: pType
= &::getCppuType( (style::PageStyleLayout
*)0 ); break;
192 case CPPUTYPE_VERTALIGN
: pType
= &::getCppuType( (style::VerticalAlignment
*)0 ); break;
193 case CPPUTYPE_TABLEBORDER
: pType
= &::getCppuType( (table::TableBorder
*)0 ); break;
194 case CPPUTYPE_GRFCROP
: pType
= &::getCppuType( (text::GraphicCrop
*)0 ); break;
195 case CPPUTYPE_SECTFILELNK
: pType
= &::getCppuType( (text::SectionFileLink
*)0 ); break;
196 case CPPUTYPE_PAGENUMTYPE
: pType
= &::getCppuType( (text::PageNumberType
*)0); break;
197 case CPPUTYPE_DATETIME
: pType
= &::getCppuType( (util::DateTime
*)0 ); break;
198 case CPPUTYPE_DATE
: pType
= &::getCppuType( (util::Date
*)0 ); break;
200 case CPPUTYPE_REFINTERFACE
: pType
= &::getCppuType( (Reference
<XInterface
>*)0 ); break;
201 case CPPUTYPE_REFIDXREPL
: pType
= &::getCppuType( (Reference
<container::XIndexReplace
>*)0 ); break;
202 case CPPUTYPE_REFNAMECNT
: pType
= &::getCppuType( (Reference
<container::XNameContainer
>*)0 ); break;
203 case CPPUTYPE_REFTEXTFRAME
: pType
= &::getCppuType( (Reference
<text::XTextFrame
>*)0 ); break;
204 case CPPUTYPE_REFTEXTSECTION
: pType
= &::getCppuType( (Reference
<text::XTextSection
>*)0 ); break;
205 case CPPUTYPE_REFFOOTNOTE
: pType
= &::getCppuType( (Reference
<text::XFootnote
>*)0 ); break;
206 case CPPUTYPE_REFTEXT
: pType
= &::getCppuType( (Reference
<text::XText
>*)0 ); break;
207 case CPPUTYPE_REFTEXTCOL
: pType
= &::getCppuType( (Reference
<text::XTextColumns
>*)0 ); break;
208 case CPPUTYPE_REFFORBCHARS
: pType
= &::getCppuType( (Reference
<XForbiddenCharacters
>*)0 ); break;
209 case CPPUTYPE_REFIDXCNTNR
: pType
= &::getCppuType( (Reference
<XIndexContainer
>*)0 ); break;
210 case CPPUTYPE_REFTEXTCNTNT
: pType
= &::getCppuType( (Reference
<XTextContent
>*)0 ); break;
211 case CPPUTYPE_REFBITMAP
: pType
= &::getCppuType( (Reference
<awt::XBitmap
>*)0 ); break;
212 case CPPUTYPE_REFNMREPLACE
: pType
= &::getCppuType( (Reference
<container::XNameReplace
>*)0 ); break;
213 case CPPUTYPE_REFCELL
: pType
= &::getCppuType( (Reference
<table::XCell
>*)0 ); break;
214 case CPPUTYPE_REFDOCINDEX
: pType
= &::getCppuType( (Reference
<text::XDocumentIndex
>*)0 ); break;
215 case CPPUTYPE_REFDOCIDXMRK
: pType
= &::getCppuType( (Reference
<text::XDocumentIndexMark
>*)0 ); break;
216 case CPPUTYPE_REFTXTFIELD
: pType
= &::getCppuType( (Reference
<text::XTextField
>*)0 ); break;
217 case CPPUTYPE_REFTXTRANGE
: pType
= &::getCppuType( (Reference
<text::XTextRange
>*)0 ); break;
218 case CPPUTYPE_REFTXTTABLE
: pType
= &::getCppuType( (Reference
<text::XTextTable
>*)0 ); break;
219 case CPPUTYPE_AWTPOINT
: pType
= &::getCppuType( (awt::Point
*)0 ); break;
220 case CPPUTYPE_REFLIBCONTAINER
: pType
= &::getCppuType( (Reference
< script::XLibraryContainer
>*)0); break;
221 case CPPUTYPE_OUSTRINGS
: pType
= &::getCppuType( (Sequence
< ::rtl::OUString
>*)0); break;
222 case CPPUTYPE_SEQANY
: pType
= &::getCppuType( (Sequence
< uno::Any
>*)0); break;
223 case CPPUTYPE_REFRESULTSET
: pType
= &::getCppuType( (Reference
< sdbc::XResultSet
>*)0); break;
224 case CPPUTYPE_REFCONNECTION
: pType
= &::getCppuType( (Reference
< sdbc::XConnection
>*)0); break;
225 case CPPUTYPE_REFMODEL
: pType
= &::getCppuType( (Reference
< frame::XModel
>*)0); break;
226 case CPPUTYPE_REFCOMPONENT
: pType
= &::getCppuType( (Reference
< lang::XComponent
>*)0 ); break;
227 // --> OD 2004-08-09 #i28749#
228 case CPPUTYPE_TRANSFORMATIONINHORIL2R
:
230 pType
= &::getCppuType( (drawing::HomogenMatrix3
*)0 );
234 case CPPUTYPE_SEQNAMEDVALUE
: pType
= &::getCppuType( (Sequence
<beans::NamedValue
>*)0 ); break;
235 case CPPUTYPE_REFXGRAPHIC
: pType
= &::getCppuType( (Reference
< graphic::XGraphic
>*)0); break;
236 case CPPUTYPE_TABLEBORDERDISTANCES
: pType
= &::getCppuType( (table::TableBorderDistances
*)0 ); break;
238 OSL_ASSERT( "Unknown CPPU type" );