1*dde7d3faSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*dde7d3faSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*dde7d3faSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*dde7d3faSAndrew Rist  * distributed with this work for additional information
6*dde7d3faSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*dde7d3faSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*dde7d3faSAndrew Rist  * "License"); you may not use this file except in compliance
9*dde7d3faSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*dde7d3faSAndrew Rist  *
11*dde7d3faSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*dde7d3faSAndrew Rist  *
13*dde7d3faSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*dde7d3faSAndrew Rist  * software distributed under the License is distributed on an
15*dde7d3faSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*dde7d3faSAndrew Rist  * KIND, either express or implied.  See the License for the
17*dde7d3faSAndrew Rist  * specific language governing permissions and limitations
18*dde7d3faSAndrew Rist  * under the License.
19*dde7d3faSAndrew Rist  *
20*dde7d3faSAndrew Rist  *************************************************************/
21*dde7d3faSAndrew Rist 
22*dde7d3faSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_comphelper.hxx"
26cdf0e10cSrcweir #ifndef _COMPHELPER_TYPEGENERATION_HXX
27cdf0e10cSrcweir #include <comphelper/TypeGeneration.hxx>
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir #include <com/sun/star/script/XLibraryContainer.hpp>
30cdf0e10cSrcweir #include <com/sun/star/style/LineSpacingMode.hpp>
31cdf0e10cSrcweir #include <com/sun/star/style/ParagraphAdjust.hpp>
32cdf0e10cSrcweir #include <com/sun/star/style/DropCapFormat.hpp>
33cdf0e10cSrcweir #include <com/sun/star/style/LineSpacing.hpp>
34cdf0e10cSrcweir #include <com/sun/star/style/TabStop.hpp>
35cdf0e10cSrcweir #include <com/sun/star/style/TabAlign.hpp>
36cdf0e10cSrcweir #include <com/sun/star/style/PageStyleLayout.hpp>
37cdf0e10cSrcweir #include <com/sun/star/style/BreakType.hpp>
38cdf0e10cSrcweir #include <com/sun/star/text/XModule.hpp>
39cdf0e10cSrcweir #include <com/sun/star/text/XTextRangeMover.hpp>
40cdf0e10cSrcweir #include <com/sun/star/text/XFootnotesSettingsSupplier.hpp>
41cdf0e10cSrcweir #include <com/sun/star/text/XFootnote.hpp>
42cdf0e10cSrcweir #include <com/sun/star/text/XFootnotesSupplier.hpp>
43cdf0e10cSrcweir #include <com/sun/star/text/XEndnotesSupplier.hpp>
44cdf0e10cSrcweir #include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
45cdf0e10cSrcweir #include <com/sun/star/text/FootnoteNumbering.hpp>
46cdf0e10cSrcweir #include <com/sun/star/text/XTextSectionsSupplier.hpp>
47cdf0e10cSrcweir #include <com/sun/star/text/XTextSection.hpp>
48cdf0e10cSrcweir #include <com/sun/star/text/SectionFileLink.hpp>
49cdf0e10cSrcweir #include <com/sun/star/text/RelOrientation.hpp>
50cdf0e10cSrcweir #include <com/sun/star/text/VertOrientation.hpp>
51cdf0e10cSrcweir #include <com/sun/star/text/HorizontalAdjust.hpp>
52cdf0e10cSrcweir #include <com/sun/star/text/DocumentStatistic.hpp>
53cdf0e10cSrcweir #include <com/sun/star/text/HoriOrientation.hpp>
54cdf0e10cSrcweir #include <com/sun/star/text/HoriOrientationFormat.hpp>
55cdf0e10cSrcweir #include <com/sun/star/text/NotePrintMode.hpp>
56cdf0e10cSrcweir #include <com/sun/star/text/SizeType.hpp>
57cdf0e10cSrcweir #include <com/sun/star/text/VertOrientationFormat.hpp>
58cdf0e10cSrcweir #include <com/sun/star/text/WrapTextMode.hpp>
59cdf0e10cSrcweir //undef to prevent error (from sfx2/docfile.cxx)
60cdf0e10cSrcweir #undef SEQUENCE
61cdf0e10cSrcweir #include <com/sun/star/text/SetVariableType.hpp>
62cdf0e10cSrcweir #include <com/sun/star/text/XTextFieldsSupplier.hpp>
63cdf0e10cSrcweir #include <com/sun/star/text/UserDataPart.hpp>
64cdf0e10cSrcweir #include <com/sun/star/text/ChapterFormat.hpp>
65cdf0e10cSrcweir #include <com/sun/star/text/XTextField.hpp>
66cdf0e10cSrcweir #include <com/sun/star/text/PlaceholderType.hpp>
67cdf0e10cSrcweir #include <com/sun/star/text/TemplateDisplayFormat.hpp>
68cdf0e10cSrcweir #include <com/sun/star/text/UserFieldFormat.hpp>
69cdf0e10cSrcweir #include <com/sun/star/text/PageNumberType.hpp>
70cdf0e10cSrcweir #include <com/sun/star/text/ReferenceFieldPart.hpp>
71cdf0e10cSrcweir #include <com/sun/star/text/FilenameDisplayFormat.hpp>
72cdf0e10cSrcweir #include <com/sun/star/text/XDependentTextField.hpp>
73cdf0e10cSrcweir #include <com/sun/star/text/GraphicCrop.hpp>
74cdf0e10cSrcweir #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
75cdf0e10cSrcweir #include <com/sun/star/text/XTextTableCursor.hpp>
76cdf0e10cSrcweir #include <com/sun/star/text/XTextTablesSupplier.hpp>
77cdf0e10cSrcweir #include <com/sun/star/text/TableColumnSeparator.hpp>
78cdf0e10cSrcweir #include <com/sun/star/text/XTextTable.hpp>
79cdf0e10cSrcweir #include <com/sun/star/text/XDocumentIndexMark.hpp>
80cdf0e10cSrcweir #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
81cdf0e10cSrcweir #include <com/sun/star/text/XDocumentIndex.hpp>
82cdf0e10cSrcweir #include <com/sun/star/text/XTextColumns.hpp>
83cdf0e10cSrcweir #include <com/sun/star/text/TextColumnSequence.hpp>
84cdf0e10cSrcweir #include <com/sun/star/text/XTextFramesSupplier.hpp>
85cdf0e10cSrcweir #include <com/sun/star/text/XTextFrame.hpp>
86cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValues.hpp>
87cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
88cdf0e10cSrcweir #include <com/sun/star/beans/PropertyValue.hpp>
89cdf0e10cSrcweir #include <com/sun/star/beans/PropertyState.hpp>
90cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySetInfo.hpp>
91cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp>
92cdf0e10cSrcweir #include <com/sun/star/beans/XFastPropertySet.hpp>
93cdf0e10cSrcweir #include <com/sun/star/beans/XVetoableChangeListener.hpp>
94cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
95cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
96cdf0e10cSrcweir #ifndef _COM_SUN_STAR_BEANS_PropertyAttribute_HPP_
97cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
98cdf0e10cSrcweir #endif
99cdf0e10cSrcweir #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
100cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyChangeListener.hpp>
101cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyAccess.hpp>
102cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyContainer.hpp>
103cdf0e10cSrcweir #include <com/sun/star/beans/NamedValue.hpp>
104cdf0e10cSrcweir #include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
105cdf0e10cSrcweir #include <com/sun/star/beans/PropertyChangeEvent.hpp>
106cdf0e10cSrcweir #include <com/sun/star/text/TextContentAnchorType.hpp>
107cdf0e10cSrcweir #include <com/sun/star/awt/FontSlant.hpp>
108cdf0e10cSrcweir #include <com/sun/star/awt/Size.hpp>
109cdf0e10cSrcweir #include <com/sun/star/awt/XBitmap.hpp>
110cdf0e10cSrcweir #include <com/sun/star/style/GraphicLocation.hpp>
111cdf0e10cSrcweir #include <com/sun/star/style/VerticalAlignment.hpp>
112cdf0e10cSrcweir #include <com/sun/star/container/XIndexReplace.hpp>
113cdf0e10cSrcweir #include <com/sun/star/container/XIndexContainer.hpp>
114cdf0e10cSrcweir #include <com/sun/star/table/ShadowFormat.hpp>
115cdf0e10cSrcweir #include <com/sun/star/table/BorderLine.hpp>
116cdf0e10cSrcweir #include <com/sun/star/table/TableBorder.hpp>
117cdf0e10cSrcweir #include <com/sun/star/table/TableBorderDistances.hpp>
118cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp>
119cdf0e10cSrcweir #include <com/sun/star/lang/Locale.hpp>
120cdf0e10cSrcweir #include <com/sun/star/drawing/PointSequenceSequence.hpp>
121cdf0e10cSrcweir #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
122cdf0e10cSrcweir #include <com/sun/star/drawing/ColorMode.hpp>
123cdf0e10cSrcweir #include <com/sun/star/util/DateTime.hpp>
124cdf0e10cSrcweir #include <com/sun/star/util/Date.hpp>
125cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSet.hpp>
126cdf0e10cSrcweir #include <com/sun/star/sdbc/XConnection.hpp>
127cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
128cdf0e10cSrcweir // --> OD 2004-08-09 #i28749#
129cdf0e10cSrcweir #include <com/sun/star/drawing/HomogenMatrix3.hpp>
130cdf0e10cSrcweir // <--
131cdf0e10cSrcweir #include <com/sun/star/graphic/XGraphic.hpp>
132cdf0e10cSrcweir #include <com/sun/star/embed/XEmbeddedObject.hpp>
133cdf0e10cSrcweir 
134cdf0e10cSrcweir using ::rtl::OUString;
135cdf0e10cSrcweir using namespace ::com::sun::star;
136cdf0e10cSrcweir using namespace ::com::sun::star::container;
137cdf0e10cSrcweir using namespace ::com::sun::star::lang;
138cdf0e10cSrcweir using namespace ::com::sun::star::awt;
139cdf0e10cSrcweir using namespace ::com::sun::star::text;
140cdf0e10cSrcweir using namespace ::com::sun::star::uno;
141cdf0e10cSrcweir using namespace ::com::sun::star::beans;
142cdf0e10cSrcweir using namespace ::com::sun::star::drawing;
143cdf0e10cSrcweir using namespace ::com::sun::star::i18n;
144cdf0e10cSrcweir using namespace ::comphelper;
145cdf0e10cSrcweir 
146cdf0e10cSrcweir namespace comphelper
147cdf0e10cSrcweir {
GenerateCppuType(CppuTypes eType,const com::sun::star::uno::Type * & pType)148cdf0e10cSrcweir 	void GenerateCppuType (
149cdf0e10cSrcweir         CppuTypes eType, const com::sun::star::uno::Type*& pType )
150cdf0e10cSrcweir 	{
151cdf0e10cSrcweir 		switch( eType )
152cdf0e10cSrcweir 		{
153cdf0e10cSrcweir 			case CPPUTYPE_BOOLEAN:		pType = &::getBooleanCppuType();	break;
154cdf0e10cSrcweir 			case CPPUTYPE_INT8:			pType = &::getCppuType( (sal_Int8*)0 );	break;
155cdf0e10cSrcweir 			case CPPUTYPE_INT16:		pType = &::getCppuType( (sal_Int16*)0 );	break;
156cdf0e10cSrcweir 			case CPPUTYPE_INT32:		pType = &::getCppuType( (sal_Int32*)0 );	break;
157cdf0e10cSrcweir 
158cdf0e10cSrcweir 			case CPPUTYPE_DOUBLE:		pType = &::getCppuType( (double*)0 ); break;
159cdf0e10cSrcweir 			case CPPUTYPE_FLOAT:		pType = &::getCppuType( (float*)0 );	break;
160cdf0e10cSrcweir 			case CPPUTYPE_OUSTRING:		pType = &::getCppuType( (OUString*)0 );	break;
161cdf0e10cSrcweir 			case CPPUTYPE_FONTSLANT:	pType = &::getCppuType( (FontSlant*)0 );	break;
162cdf0e10cSrcweir 			case CPPUTYPE_LOCALE:		pType = &::getCppuType( (Locale*)0 );	break;
163cdf0e10cSrcweir 			case CPPUTYPE_PROPERTYVALUE:pType = &::getCppuType( (Sequence<PropertyValue>*)0 );	break;
164cdf0e10cSrcweir 			case CPPUTYPE_PROPERTYVALUES:	pType = &::getCppuType( (Sequence<PropertyValues>*)0 );	break;
165cdf0e10cSrcweir 			case CPPUTYPE_BORDERLINE:	pType = &::getCppuType( (table::BorderLine*)0 );	break;
166cdf0e10cSrcweir 			case CPPUTYPE_BREAK:		pType = &::getCppuType( (style::BreakType*)0 );	break;
167cdf0e10cSrcweir 			case CPPUTYPE_GRAPHICLOC:	pType = &::getCppuType( (style::GraphicLocation*)0 );	break;
168cdf0e10cSrcweir 			case CPPUTYPE_DROPCAPFMT:	pType = &::getCppuType( (style::DropCapFormat*)0 );	break;
169cdf0e10cSrcweir 			case CPPUTYPE_LINESPACE:	pType = &::getCppuType( (style::LineSpacing*)0 );	break;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir 			case CPPUTYPE_AWTSIZE:		pType = &::getCppuType( (awt::Size*)0 );	break;
172cdf0e10cSrcweir 			case CPPUTYPE_SHADOWFMT:	pType = &::getCppuType( (table::ShadowFormat*)0 );	break;
173cdf0e10cSrcweir 			case CPPUTYPE_TBLCOLSEP:	pType = &::getCppuType( (Sequence<text::TableColumnSeparator>*)0 );	break;
174cdf0e10cSrcweir 			case CPPUTYPE_PNTSEQSEQ:	pType = &::getCppuType( (PointSequenceSequence*)0 );	break;
175cdf0e10cSrcweir 			case CPPUTYPE_DOCIDXMRK:	pType = &::getCppuType( (Sequence< Reference< XDocumentIndexMark > >*)0 );	break;
176cdf0e10cSrcweir 			case CPPUTYPE_SEQINT8:		pType = &::getCppuType( (Sequence<sal_Int8>*)0 );	break;
177cdf0e10cSrcweir 			case CPPUTYPE_SEQTABSTOP:	pType = &::getCppuType( (Sequence<style::TabStop>*)0 ); break;
178cdf0e10cSrcweir 			case CPPUTYPE_SEQANCHORTYPE:pType = &::getCppuType( (Sequence<text::TextContentAnchorType>*)0 ); break;
179cdf0e10cSrcweir 			case CPPUTYPE_SEQDEPTXTFLD:	pType = &::getCppuType( (Sequence<Reference<XDependentTextField> >*)0); break;
180cdf0e10cSrcweir 			case CPPUTYPE_TXTCNTANCHOR:	pType = &::getCppuType( (text::TextContentAnchorType*)0 );	break;
181cdf0e10cSrcweir 			case CPPUTYPE_WRAPTXTMODE:	pType = &::getCppuType( (text::WrapTextMode*)0 );	break;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir 			case CPPUTYPE_COLORMODE:	pType = &::getCppuType( (drawing::ColorMode*)0 ); break;
184cdf0e10cSrcweir 			case CPPUTYPE_PAGESTYLELAY:	pType = &::getCppuType( (style::PageStyleLayout*)0 ); break;
185cdf0e10cSrcweir 			case CPPUTYPE_VERTALIGN:	pType = &::getCppuType( (style::VerticalAlignment*)0 ); break;
186cdf0e10cSrcweir 			case CPPUTYPE_TABLEBORDER:	pType = &::getCppuType( (table::TableBorder*)0 ); break;
187cdf0e10cSrcweir 			case CPPUTYPE_GRFCROP:		pType = &::getCppuType( (text::GraphicCrop*)0 ); break;
188cdf0e10cSrcweir 			case CPPUTYPE_SECTFILELNK:	pType = &::getCppuType( (text::SectionFileLink*)0 ); break;
189cdf0e10cSrcweir 			case CPPUTYPE_PAGENUMTYPE: 	pType = &::getCppuType( (text::PageNumberType*)0); break;
190cdf0e10cSrcweir 			case CPPUTYPE_DATETIME:		pType = &::getCppuType( (util::DateTime*)0 ); break;
191cdf0e10cSrcweir 			case CPPUTYPE_DATE:			pType = &::getCppuType( (util::Date*)0 ); break;
192cdf0e10cSrcweir 
193cdf0e10cSrcweir 			case CPPUTYPE_REFINTERFACE:	pType = &::getCppuType( (Reference<XInterface>*)0 );	break;
194cdf0e10cSrcweir 			case CPPUTYPE_REFIDXREPL:	pType = &::getCppuType( (Reference<container::XIndexReplace>*)0 );	break;
195cdf0e10cSrcweir 			case CPPUTYPE_REFNAMECNT:	pType = &::getCppuType( (Reference<container::XNameContainer>*)0 );	break;
196cdf0e10cSrcweir 			case CPPUTYPE_REFTEXTFRAME:	pType = &::getCppuType( (Reference<text::XTextFrame>*)0 );	break;
197cdf0e10cSrcweir 			case CPPUTYPE_REFTEXTSECTION:	pType = &::getCppuType( (Reference<text::XTextSection>*)0 );	break;
198cdf0e10cSrcweir 			case CPPUTYPE_REFFOOTNOTE:	pType = &::getCppuType( (Reference<text::XFootnote>*)0 );	break;
199cdf0e10cSrcweir 			case CPPUTYPE_REFTEXT:		pType = &::getCppuType( (Reference<text::XText>*)0 );	break;
200cdf0e10cSrcweir 			case CPPUTYPE_REFTEXTCOL:	pType = &::getCppuType( (Reference<text::XTextColumns>*)0 );	break;
201cdf0e10cSrcweir 			case CPPUTYPE_REFFORBCHARS:	pType = &::getCppuType( (Reference<XForbiddenCharacters>*)0 ); break;
202cdf0e10cSrcweir 			case CPPUTYPE_REFIDXCNTNR:	pType = &::getCppuType( (Reference<XIndexContainer>*)0 ); break;
203cdf0e10cSrcweir 			case CPPUTYPE_REFTEXTCNTNT:	pType = &::getCppuType( (Reference<XTextContent>*)0 ); break;
204cdf0e10cSrcweir 			case CPPUTYPE_REFBITMAP:	pType = &::getCppuType( (Reference<awt::XBitmap>*)0 ); break;
205cdf0e10cSrcweir 			case CPPUTYPE_REFNMREPLACE:	pType = &::getCppuType( (Reference<container::XNameReplace>*)0 ); break;
206cdf0e10cSrcweir 			case CPPUTYPE_REFCELL:		pType = &::getCppuType( (Reference<table::XCell>*)0 ); break;
207cdf0e10cSrcweir 			case CPPUTYPE_REFDOCINDEX:	pType = &::getCppuType( (Reference<text::XDocumentIndex>*)0 ); break;
208cdf0e10cSrcweir 			case CPPUTYPE_REFDOCIDXMRK:	pType = &::getCppuType( (Reference<text::XDocumentIndexMark>*)0 ); break;
209cdf0e10cSrcweir 			case CPPUTYPE_REFTXTFIELD:	pType = &::getCppuType( (Reference<text::XTextField>*)0 ); break;
210cdf0e10cSrcweir 			case CPPUTYPE_REFTXTRANGE:	pType = &::getCppuType( (Reference<text::XTextRange>*)0 ); break;
211cdf0e10cSrcweir 			case CPPUTYPE_REFTXTTABLE:	pType = &::getCppuType( (Reference<text::XTextTable>*)0 ); break;
212cdf0e10cSrcweir             case CPPUTYPE_AWTPOINT:     pType = &::getCppuType( (awt::Point*)0 );    break;
213cdf0e10cSrcweir             case CPPUTYPE_REFLIBCONTAINER:  pType = &::getCppuType( (Reference< script::XLibraryContainer >*)0);    break;
214cdf0e10cSrcweir             case CPPUTYPE_OUSTRINGS:    pType = &::getCppuType( (Sequence< ::rtl::OUString >*)0);    break;
215cdf0e10cSrcweir             case CPPUTYPE_SEQANY:           pType = &::getCppuType( (Sequence< uno::Any >*)0);    break;
216cdf0e10cSrcweir             case CPPUTYPE_REFRESULTSET:     pType = &::getCppuType( (Reference< sdbc::XResultSet >*)0);    break;
217cdf0e10cSrcweir             case CPPUTYPE_REFCONNECTION:    pType = &::getCppuType( (Reference< sdbc::XConnection >*)0);    break;
218cdf0e10cSrcweir             case CPPUTYPE_REFMODEL:         pType = &::getCppuType( (Reference< frame::XModel >*)0);    break;
219cdf0e10cSrcweir             case CPPUTYPE_REFCOMPONENT:     pType = &::getCppuType( (Reference< lang::XComponent >*)0 ); break;
220cdf0e10cSrcweir             // --> OD 2004-08-09 #i28749#
221cdf0e10cSrcweir             case CPPUTYPE_TRANSFORMATIONINHORIL2R:
222cdf0e10cSrcweir             {
223cdf0e10cSrcweir                 pType = &::getCppuType( (drawing::HomogenMatrix3*)0 );
224cdf0e10cSrcweir             }
225cdf0e10cSrcweir             break;
226cdf0e10cSrcweir             // <--
227cdf0e10cSrcweir             case CPPUTYPE_SEQNAMEDVALUE:    pType = &::getCppuType( (Sequence<beans::NamedValue>*)0 ); break;
228cdf0e10cSrcweir             case CPPUTYPE_REFXGRAPHIC:      pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
229cdf0e10cSrcweir             case CPPUTYPE_TABLEBORDERDISTANCES:     pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
230cdf0e10cSrcweir             case CPPUTPYE_REFEMBEDDEDOBJECT:        pType = &embed::XEmbeddedObject::static_type(); break;
231cdf0e10cSrcweir 			default:
232cdf0e10cSrcweir 				OSL_ASSERT( "Unknown CPPU type" );
233cdf0e10cSrcweir 		}
234cdf0e10cSrcweir 	}
235cdf0e10cSrcweir }
236