1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <comphelper/TypeGeneration.hxx>
21 #include <com/sun/star/script/XLibraryContainer.hpp>
22 #include <com/sun/star/style/LineSpacingMode.hpp>
23 #include <com/sun/star/style/ParagraphAdjust.hpp>
24 #include <com/sun/star/style/DropCapFormat.hpp>
25 #include <com/sun/star/style/LineSpacing.hpp>
26 #include <com/sun/star/style/TabStop.hpp>
27 #include <com/sun/star/style/TabAlign.hpp>
28 #include <com/sun/star/style/PageStyleLayout.hpp>
29 #include <com/sun/star/style/BreakType.hpp>
30 #include <com/sun/star/text/XTextRangeMover.hpp>
31 #include <com/sun/star/text/XFootnotesSettingsSupplier.hpp>
32 #include <com/sun/star/text/XFootnote.hpp>
33 #include <com/sun/star/text/XFootnotesSupplier.hpp>
34 #include <com/sun/star/text/XEndnotesSupplier.hpp>
35 #include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
36 #include <com/sun/star/text/FootnoteNumbering.hpp>
37 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
38 #include <com/sun/star/text/XTextSection.hpp>
39 #include <com/sun/star/text/SectionFileLink.hpp>
40 #include <com/sun/star/text/RelOrientation.hpp>
41 #include <com/sun/star/text/VertOrientation.hpp>
42 #include <com/sun/star/text/HorizontalAdjust.hpp>
43 #include <com/sun/star/text/DocumentStatistic.hpp>
44 #include <com/sun/star/text/HoriOrientation.hpp>
45 #include <com/sun/star/text/HoriOrientationFormat.hpp>
46 #include <com/sun/star/text/NotePrintMode.hpp>
47 #include <com/sun/star/text/SizeType.hpp>
48 #include <com/sun/star/text/VertOrientationFormat.hpp>
49 #include <com/sun/star/text/WrapTextMode.hpp>
50 //undef to prevent error (from sfx2/docfile.cxx)
52 #include <com/sun/star/text/SetVariableType.hpp>
53 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
54 #include <com/sun/star/text/UserDataPart.hpp>
55 #include <com/sun/star/text/ChapterFormat.hpp>
56 #include <com/sun/star/text/XTextField.hpp>
57 #include <com/sun/star/text/PlaceholderType.hpp>
58 #include <com/sun/star/text/TemplateDisplayFormat.hpp>
59 #include <com/sun/star/text/UserFieldFormat.hpp>
60 #include <com/sun/star/text/PageNumberType.hpp>
61 #include <com/sun/star/text/ReferenceFieldPart.hpp>
62 #include <com/sun/star/text/FilenameDisplayFormat.hpp>
63 #include <com/sun/star/text/XDependentTextField.hpp>
64 #include <com/sun/star/text/GraphicCrop.hpp>
65 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
66 #include <com/sun/star/text/XTextTableCursor.hpp>
67 #include <com/sun/star/text/XTextTablesSupplier.hpp>
68 #include <com/sun/star/text/TableColumnSeparator.hpp>
69 #include <com/sun/star/text/XTextTable.hpp>
70 #include <com/sun/star/text/XDocumentIndexMark.hpp>
71 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
72 #include <com/sun/star/text/XDocumentIndex.hpp>
73 #include <com/sun/star/text/XTextColumns.hpp>
74 #include <com/sun/star/text/TextColumnSequence.hpp>
75 #include <com/sun/star/text/XTextFramesSupplier.hpp>
76 #include <com/sun/star/text/XTextFrame.hpp>
77 #include <com/sun/star/beans/PropertyValues.hpp>
78 #include <com/sun/star/beans/XPropertySet.hpp>
79 #include <com/sun/star/beans/PropertyValue.hpp>
80 #include <com/sun/star/beans/PropertyState.hpp>
81 #include <com/sun/star/beans/XPropertySetInfo.hpp>
82 #include <com/sun/star/beans/XMultiPropertySet.hpp>
83 #include <com/sun/star/beans/XFastPropertySet.hpp>
84 #include <com/sun/star/beans/XVetoableChangeListener.hpp>
85 #include <com/sun/star/beans/XPropertyState.hpp>
86 #include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
87 #include <com/sun/star/beans/PropertyAttribute.hpp>
88 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
89 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
90 #include <com/sun/star/beans/XPropertyAccess.hpp>
91 #include <com/sun/star/beans/XPropertyContainer.hpp>
92 #include <com/sun/star/beans/NamedValue.hpp>
93 #include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
94 #include <com/sun/star/beans/PropertyChangeEvent.hpp>
95 #include <com/sun/star/text/TextContentAnchorType.hpp>
96 #include <com/sun/star/awt/FontSlant.hpp>
97 #include <com/sun/star/awt/Size.hpp>
98 #include <com/sun/star/awt/XBitmap.hpp>
99 #include <com/sun/star/style/GraphicLocation.hpp>
100 #include <com/sun/star/style/VerticalAlignment.hpp>
101 #include <com/sun/star/container/XIndexReplace.hpp>
102 #include <com/sun/star/container/XIndexContainer.hpp>
103 #include <com/sun/star/table/ShadowFormat.hpp>
104 #include <com/sun/star/table/BorderLine.hpp>
105 #include <com/sun/star/table/TableBorder.hpp>
106 #include <com/sun/star/table/TableBorder2.hpp>
107 #include <com/sun/star/table/TableBorderDistances.hpp>
108 #include <com/sun/star/container/XNameContainer.hpp>
109 #include <com/sun/star/lang/Locale.hpp>
110 #include <com/sun/star/drawing/PointSequenceSequence.hpp>
111 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
112 #include <com/sun/star/drawing/ColorMode.hpp>
113 #include <com/sun/star/util/DateTime.hpp>
114 #include <com/sun/star/util/Date.hpp>
115 #include <com/sun/star/sdbc/XResultSet.hpp>
116 #include <com/sun/star/sdbc/XConnection.hpp>
117 #include <com/sun/star/frame/XModel.hpp>
119 #include <com/sun/star/drawing/HomogenMatrix3.hpp>
120 #include <com/sun/star/graphic/XGraphic.hpp>
121 #include <com/sun/star/embed/XEmbeddedObject.hpp>
122 #include <com/sun/star/drawing/LineStyle.hpp>
124 using ::rtl::OUString
;
125 using namespace ::com::sun::star
;
126 using namespace ::com::sun::star::container
;
127 using namespace ::com::sun::star::lang
;
128 using namespace ::com::sun::star::awt
;
129 using namespace ::com::sun::star::text
;
130 using namespace ::com::sun::star::uno
;
131 using namespace ::com::sun::star::beans
;
132 using namespace ::com::sun::star::drawing
;
133 using namespace ::com::sun::star::i18n
;
134 using namespace ::comphelper
;
138 void GenerateCppuType (
139 CppuTypes eType
, const com::sun::star::uno::Type
*& pType
)
143 case CPPUTYPE_BOOLEAN
: pType
= &::getBooleanCppuType(); break;
144 case CPPUTYPE_INT8
: pType
= &::getCppuType( (sal_Int8
*)0 ); break;
145 case CPPUTYPE_INT16
: pType
= &::getCppuType( (sal_Int16
*)0 ); break;
146 case CPPUTYPE_INT32
: pType
= &::getCppuType( (sal_Int32
*)0 ); break;
148 case CPPUTYPE_DOUBLE
: pType
= &::getCppuType( (double*)0 ); break;
149 case CPPUTYPE_FLOAT
: pType
= &::getCppuType( (float*)0 ); break;
150 case CPPUTYPE_OUSTRING
: pType
= &::getCppuType( (OUString
*)0 ); break;
151 case CPPUTYPE_FONTSLANT
: pType
= &::getCppuType( (FontSlant
*)0 ); break;
152 case CPPUTYPE_LOCALE
: pType
= &::getCppuType( (Locale
*)0 ); break;
153 case CPPUTYPE_PROPERTYVALUE
:pType
= &::getCppuType( (Sequence
<PropertyValue
>*)0 ); break;
154 case CPPUTYPE_PROPERTYVALUES
: pType
= &::getCppuType( (Sequence
<PropertyValues
>*)0 ); break;
155 case CPPUTYPE_BORDERLINE
: pType
= &::getCppuType( (table::BorderLine
*)0 ); break;
156 case CPPUTYPE_BREAK
: pType
= &::getCppuType( (style::BreakType
*)0 ); break;
157 case CPPUTYPE_GRAPHICLOC
: pType
= &::getCppuType( (style::GraphicLocation
*)0 ); break;
158 case CPPUTYPE_DROPCAPFMT
: pType
= &::getCppuType( (style::DropCapFormat
*)0 ); break;
159 case CPPUTYPE_LINESPACE
: pType
= &::getCppuType( (style::LineSpacing
*)0 ); break;
161 case CPPUTYPE_AWTSIZE
: pType
= &::getCppuType( (awt::Size
*)0 ); break;
162 case CPPUTYPE_SHADOWFMT
: pType
= &::getCppuType( (table::ShadowFormat
*)0 ); break;
163 case CPPUTYPE_TBLCOLSEP
: pType
= &::getCppuType( (Sequence
<text::TableColumnSeparator
>*)0 ); break;
164 case CPPUTYPE_PNTSEQSEQ
: pType
= &::getCppuType( (PointSequenceSequence
*)0 ); break;
165 case CPPUTYPE_DOCIDXMRK
: pType
= &::getCppuType( (Sequence
< Reference
< XDocumentIndexMark
> >*)0 ); break;
166 case CPPUTYPE_SEQINT8
: pType
= &::getCppuType( (Sequence
<sal_Int8
>*)0 ); break;
167 case CPPUTYPE_SEQTABSTOP
: pType
= &::getCppuType( (Sequence
<style::TabStop
>*)0 ); break;
168 case CPPUTYPE_SEQANCHORTYPE
:pType
= &::getCppuType( (Sequence
<text::TextContentAnchorType
>*)0 ); break;
169 case CPPUTYPE_SEQDEPTXTFLD
: pType
= &::getCppuType( (Sequence
<Reference
<XDependentTextField
> >*)0); break;
170 case CPPUTYPE_TXTCNTANCHOR
: pType
= &::getCppuType( (text::TextContentAnchorType
*)0 ); break;
171 case CPPUTYPE_WRAPTXTMODE
: pType
= &::getCppuType( (text::WrapTextMode
*)0 ); break;
173 case CPPUTYPE_COLORMODE
: pType
= &::getCppuType( (drawing::ColorMode
*)0 ); break;
174 case CPPUTYPE_PAGESTYLELAY
: pType
= &::getCppuType( (style::PageStyleLayout
*)0 ); break;
175 case CPPUTYPE_VERTALIGN
: pType
= &::getCppuType( (style::VerticalAlignment
*)0 ); break;
176 case CPPUTYPE_TABLEBORDER
: pType
= &::getCppuType( (table::TableBorder
*)0 ); break;
177 case CPPUTYPE_TABLEBORDER2
: pType
= &::getCppuType( (table::TableBorder2
*)0 ); break;
178 case CPPUTYPE_GRFCROP
: pType
= &::getCppuType( (text::GraphicCrop
*)0 ); break;
179 case CPPUTYPE_SECTFILELNK
: pType
= &::getCppuType( (text::SectionFileLink
*)0 ); break;
180 case CPPUTYPE_PAGENUMTYPE
: pType
= &::getCppuType( (text::PageNumberType
*)0); break;
181 case CPPUTYPE_DATETIME
: pType
= &::getCppuType( (util::DateTime
*)0 ); break;
182 case CPPUTYPE_DATE
: pType
= &::getCppuType( (util::Date
*)0 ); break;
184 case CPPUTYPE_REFINTERFACE
: pType
= &::getCppuType( (Reference
<XInterface
>*)0 ); break;
185 case CPPUTYPE_REFIDXREPL
: pType
= &::getCppuType( (Reference
<container::XIndexReplace
>*)0 ); break;
186 case CPPUTYPE_REFNAMECNT
: pType
= &::getCppuType( (Reference
<container::XNameContainer
>*)0 ); break;
187 case CPPUTYPE_REFTEXTFRAME
: pType
= &::getCppuType( (Reference
<text::XTextFrame
>*)0 ); break;
188 case CPPUTYPE_REFTEXTSECTION
: pType
= &::getCppuType( (Reference
<text::XTextSection
>*)0 ); break;
189 case CPPUTYPE_REFFOOTNOTE
: pType
= &::getCppuType( (Reference
<text::XFootnote
>*)0 ); break;
190 case CPPUTYPE_REFTEXT
: pType
= &::getCppuType( (Reference
<text::XText
>*)0 ); break;
191 case CPPUTYPE_REFTEXTCOL
: pType
= &::getCppuType( (Reference
<text::XTextColumns
>*)0 ); break;
192 case CPPUTYPE_REFFORBCHARS
: pType
= &::getCppuType( (Reference
<XForbiddenCharacters
>*)0 ); break;
193 case CPPUTYPE_REFIDXCNTNR
: pType
= &::getCppuType( (Reference
<XIndexContainer
>*)0 ); break;
194 case CPPUTYPE_REFTEXTCNTNT
: pType
= &::getCppuType( (Reference
<XTextContent
>*)0 ); break;
195 case CPPUTYPE_REFBITMAP
: pType
= &::getCppuType( (Reference
<awt::XBitmap
>*)0 ); break;
196 case CPPUTYPE_REFNMREPLACE
: pType
= &::getCppuType( (Reference
<container::XNameReplace
>*)0 ); break;
197 case CPPUTYPE_REFCELL
: pType
= &::getCppuType( (Reference
<table::XCell
>*)0 ); break;
198 case CPPUTYPE_REFDOCINDEX
: pType
= &::getCppuType( (Reference
<text::XDocumentIndex
>*)0 ); break;
199 case CPPUTYPE_REFDOCIDXMRK
: pType
= &::getCppuType( (Reference
<text::XDocumentIndexMark
>*)0 ); break;
200 case CPPUTYPE_REFTXTFIELD
: pType
= &::getCppuType( (Reference
<text::XTextField
>*)0 ); break;
201 case CPPUTYPE_REFTXTRANGE
: pType
= &::getCppuType( (Reference
<text::XTextRange
>*)0 ); break;
202 case CPPUTYPE_REFTXTTABLE
: pType
= &::getCppuType( (Reference
<text::XTextTable
>*)0 ); break;
203 case CPPUTYPE_AWTPOINT
: pType
= &::getCppuType( (awt::Point
*)0 ); break;
204 case CPPUTYPE_REFLIBCONTAINER
: pType
= &::getCppuType( (Reference
< script::XLibraryContainer
>*)0); break;
205 case CPPUTYPE_OUSTRINGS
: pType
= &::getCppuType( (Sequence
< ::rtl::OUString
>*)0); break;
206 case CPPUTYPE_SEQANY
: pType
= &::getCppuType( (Sequence
< uno::Any
>*)0); break;
207 case CPPUTYPE_REFRESULTSET
: pType
= &::getCppuType( (Reference
< sdbc::XResultSet
>*)0); break;
208 case CPPUTYPE_REFCONNECTION
: pType
= &::getCppuType( (Reference
< sdbc::XConnection
>*)0); break;
209 case CPPUTYPE_REFMODEL
: pType
= &::getCppuType( (Reference
< frame::XModel
>*)0); break;
210 case CPPUTYPE_REFCOMPONENT
: pType
= &::getCppuType( (Reference
< lang::XComponent
>*)0 ); break;
212 case CPPUTYPE_TRANSFORMATIONINHORIL2R
:
214 pType
= &::getCppuType( (drawing::HomogenMatrix3
*)0 );
217 case CPPUTYPE_SEQNAMEDVALUE
: pType
= &::getCppuType( (Sequence
<beans::NamedValue
>*)0 ); break;
218 case CPPUTYPE_REFXGRAPHIC
: pType
= &::getCppuType( (Reference
< graphic::XGraphic
>*)0); break;
219 case CPPUTYPE_TABLEBORDERDISTANCES
: pType
= &::getCppuType( (table::TableBorderDistances
*)0 ); break;
220 case CPPUTPYE_REFEMBEDDEDOBJECT
: pType
= &embed::XEmbeddedObject::static_type(); break;
221 case CPPUTYPE_LINESTYLE
: pType
= &::getCppuType( (drawing::LineStyle
*)0 ); break;
223 OSL_FAIL( "Unknown CPPU type" );
228 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */