LCOV - code coverage report
Current view: top level - libreoffice/comphelper/source/property - TypeGeneration.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 68 74 91.9 %
Date: 2012-12-27 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      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)
      51             : #undef SEQUENCE
      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>
     118             : // #i28749#
     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>
     123             : 
     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;
     135             : 
     136             : namespace comphelper
     137             : {
     138        9122 :     void GenerateCppuType (
     139             :         CppuTypes eType, const com::sun::star::uno::Type*& pType )
     140             :     {
     141        9122 :         switch( eType )
     142             :         {
     143        2146 :             case CPPUTYPE_BOOLEAN:      pType = &::getBooleanCppuType();    break;
     144         221 :             case CPPUTYPE_INT8:         pType = &::getCppuType( (sal_Int8*)0 ); break;
     145        1851 :             case CPPUTYPE_INT16:        pType = &::getCppuType( (sal_Int16*)0 );    break;
     146        1410 :             case CPPUTYPE_INT32:        pType = &::getCppuType( (sal_Int32*)0 );    break;
     147             : 
     148           6 :             case CPPUTYPE_DOUBLE:       pType = &::getCppuType( (double*)0 ); break;
     149         343 :             case CPPUTYPE_FLOAT:        pType = &::getCppuType( (float*)0 );    break;
     150        1358 :             case CPPUTYPE_OUSTRING:     pType = &::getCppuType( (OUString*)0 ); break;
     151         144 :             case CPPUTYPE_FONTSLANT:    pType = &::getCppuType( (FontSlant*)0 );    break;
     152         153 :             case CPPUTYPE_LOCALE:       pType = &::getCppuType( (Locale*)0 );   break;
     153          61 :             case CPPUTYPE_PROPERTYVALUE:pType = &::getCppuType( (Sequence<PropertyValue>*)0 );  break;
     154           0 :             case CPPUTYPE_PROPERTYVALUES:   pType = &::getCppuType( (Sequence<PropertyValues>*)0 ); break;
     155         304 :             case CPPUTYPE_BORDERLINE:   pType = &::getCppuType( (table::BorderLine*)0 );    break;
     156          45 :             case CPPUTYPE_BREAK:        pType = &::getCppuType( (style::BreakType*)0 ); break;
     157          87 :             case CPPUTYPE_GRAPHICLOC:   pType = &::getCppuType( (style::GraphicLocation*)0 );   break;
     158          40 :             case CPPUTYPE_DROPCAPFMT:   pType = &::getCppuType( (style::DropCapFormat*)0 ); break;
     159          40 :             case CPPUTYPE_LINESPACE:    pType = &::getCppuType( (style::LineSpacing*)0 );   break;
     160             : 
     161          31 :             case CPPUTYPE_AWTSIZE:      pType = &::getCppuType( (awt::Size*)0 );    break;
     162          76 :             case CPPUTYPE_SHADOWFMT:    pType = &::getCppuType( (table::ShadowFormat*)0 );  break;
     163           8 :             case CPPUTYPE_TBLCOLSEP:    pType = &::getCppuType( (Sequence<text::TableColumnSeparator>*)0 ); break;
     164           6 :             case CPPUTYPE_PNTSEQSEQ:    pType = &::getCppuType( (PointSequenceSequence*)0 );    break;
     165           0 :             case CPPUTYPE_DOCIDXMRK:    pType = &::getCppuType( (Sequence< Reference< XDocumentIndexMark > >*)0 );  break;
     166          16 :             case CPPUTYPE_SEQINT8:      pType = &::getCppuType( (Sequence<sal_Int8>*)0 );   break;
     167          34 :             case CPPUTYPE_SEQTABSTOP:   pType = &::getCppuType( (Sequence<style::TabStop>*)0 ); break;
     168          31 :             case CPPUTYPE_SEQANCHORTYPE:pType = &::getCppuType( (Sequence<text::TextContentAnchorType>*)0 ); break;
     169           6 :             case CPPUTYPE_SEQDEPTXTFLD: pType = &::getCppuType( (Sequence<Reference<XDependentTextField> >*)0); break;
     170          41 :             case CPPUTYPE_TXTCNTANCHOR: pType = &::getCppuType( (text::TextContentAnchorType*)0 );  break;
     171          60 :             case CPPUTYPE_WRAPTXTMODE:  pType = &::getCppuType( (text::WrapTextMode*)0 );   break;
     172             : 
     173           3 :             case CPPUTYPE_COLORMODE:    pType = &::getCppuType( (drawing::ColorMode*)0 ); break;
     174           6 :             case CPPUTYPE_PAGESTYLELAY: pType = &::getCppuType( (style::PageStyleLayout*)0 ); break;
     175           2 :             case CPPUTYPE_VERTALIGN:    pType = &::getCppuType( (style::VerticalAlignment*)0 ); break;
     176           5 :             case CPPUTYPE_TABLEBORDER:  pType = &::getCppuType( (table::TableBorder*)0 ); break;
     177           5 :             case CPPUTYPE_TABLEBORDER2: pType = &::getCppuType( (table::TableBorder2*)0 ); break;
     178           3 :             case CPPUTYPE_GRFCROP:      pType = &::getCppuType( (text::GraphicCrop*)0 ); break;
     179           3 :             case CPPUTYPE_SECTFILELNK:  pType = &::getCppuType( (text::SectionFileLink*)0 ); break;
     180           2 :             case CPPUTYPE_PAGENUMTYPE:  pType = &::getCppuType( (text::PageNumberType*)0); break;
     181           5 :             case CPPUTYPE_DATETIME:     pType = &::getCppuType( (util::DateTime*)0 ); break;
     182           2 :             case CPPUTYPE_DATE:         pType = &::getCppuType( (util::Date*)0 ); break;
     183             : 
     184           2 :             case CPPUTYPE_REFINTERFACE: pType = &::getCppuType( (Reference<XInterface>*)0 );    break;
     185          23 :             case CPPUTYPE_REFIDXREPL:   pType = &::getCppuType( (Reference<container::XIndexReplace>*)0 );  break;
     186         112 :             case CPPUTYPE_REFNAMECNT:   pType = &::getCppuType( (Reference<container::XNameContainer>*)0 ); break;
     187          38 :             case CPPUTYPE_REFTEXTFRAME: pType = &::getCppuType( (Reference<text::XTextFrame>*)0 );  break;
     188          33 :             case CPPUTYPE_REFTEXTSECTION:   pType = &::getCppuType( (Reference<text::XTextSection>*)0 );    break;
     189          26 :             case CPPUTYPE_REFFOOTNOTE:  pType = &::getCppuType( (Reference<text::XFootnote>*)0 );   break;
     190          50 :             case CPPUTYPE_REFTEXT:      pType = &::getCppuType( (Reference<text::XText>*)0 );   break;
     191          16 :             case CPPUTYPE_REFTEXTCOL:   pType = &::getCppuType( (Reference<text::XTextColumns>*)0 );    break;
     192          11 :             case CPPUTYPE_REFFORBCHARS: pType = &::getCppuType( (Reference<XForbiddenCharacters>*)0 ); break;
     193           9 :             case CPPUTYPE_REFIDXCNTNR:  pType = &::getCppuType( (Reference<XIndexContainer>*)0 ); break;
     194          36 :             case CPPUTYPE_REFTEXTCNTNT: pType = &::getCppuType( (Reference<XTextContent>*)0 ); break;
     195           0 :             case CPPUTYPE_REFBITMAP:    pType = &::getCppuType( (Reference<awt::XBitmap>*)0 ); break;
     196          13 :             case CPPUTYPE_REFNMREPLACE: pType = &::getCppuType( (Reference<container::XNameReplace>*)0 ); break;
     197          23 :             case CPPUTYPE_REFCELL:      pType = &::getCppuType( (Reference<table::XCell>*)0 ); break;
     198          26 :             case CPPUTYPE_REFDOCINDEX:  pType = &::getCppuType( (Reference<text::XDocumentIndex>*)0 ); break;
     199          13 :             case CPPUTYPE_REFDOCIDXMRK: pType = &::getCppuType( (Reference<text::XDocumentIndexMark>*)0 ); break;
     200          13 :             case CPPUTYPE_REFTXTFIELD:  pType = &::getCppuType( (Reference<text::XTextField>*)0 ); break;
     201           6 :             case CPPUTYPE_REFTXTRANGE:  pType = &::getCppuType( (Reference<text::XTextRange>*)0 ); break;
     202          23 :             case CPPUTYPE_REFTXTTABLE:  pType = &::getCppuType( (Reference<text::XTextTable>*)0 ); break;
     203          18 :             case CPPUTYPE_AWTPOINT:     pType = &::getCppuType( (awt::Point*)0 );    break;
     204          18 :             case CPPUTYPE_REFLIBCONTAINER:  pType = &::getCppuType( (Reference< script::XLibraryContainer >*)0);    break;
     205          19 :             case CPPUTYPE_OUSTRINGS:    pType = &::getCppuType( (Sequence< ::rtl::OUString >*)0);    break;
     206           0 :             case CPPUTYPE_SEQANY:           pType = &::getCppuType( (Sequence< uno::Any >*)0);    break;
     207           0 :             case CPPUTYPE_REFRESULTSET:     pType = &::getCppuType( (Reference< sdbc::XResultSet >*)0);    break;
     208           0 :             case CPPUTYPE_REFCONNECTION:    pType = &::getCppuType( (Reference< sdbc::XConnection >*)0);    break;
     209           3 :             case CPPUTYPE_REFMODEL:         pType = &::getCppuType( (Reference< frame::XModel >*)0);    break;
     210           3 :             case CPPUTYPE_REFCOMPONENT:     pType = &::getCppuType( (Reference< lang::XComponent >*)0 ); break;
     211             :             // #i28749#
     212             :             case CPPUTYPE_TRANSFORMATIONINHORIL2R:
     213             :             {
     214           6 :                 pType = &::getCppuType( (drawing::HomogenMatrix3*)0 );
     215             :             }
     216           6 :             break;
     217           5 :             case CPPUTYPE_SEQNAMEDVALUE:    pType = &::getCppuType( (Sequence<beans::NamedValue>*)0 ); break;
     218           6 :             case CPPUTYPE_REFXGRAPHIC:      pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break;
     219           5 :             case CPPUTYPE_TABLEBORDERDISTANCES:     pType = &::getCppuType( (table::TableBorderDistances*)0 ); break;
     220           3 :             case CPPUTPYE_REFEMBEDDEDOBJECT:        pType = &embed::XEmbeddedObject::static_type(); break;
     221           9 :             case CPPUTYPE_LINESTYLE:        pType = &::getCppuType( (drawing::LineStyle*)0 ); break;
     222             :             default:
     223             :                 OSL_FAIL( "Unknown CPPU type" );
     224             :         }
     225        9122 :     }
     226             : }
     227             : 
     228             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10