LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/draw - sdpropls.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
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             : #ifndef _SDPROPLS_HXX
      21             : #define _SDPROPLS_HXX
      22             : 
      23             : #include <com/sun/star/frame/XModel.hpp>
      24             : #include <xmloff/xmlnume.hxx>
      25             : #include <xmloff/maptype.hxx>
      26             : #include <xmloff/xmltypes.hxx>
      27             : #include <xmloff/xmlement.hxx>
      28             : #include <xmloff/prhdlfac.hxx>
      29             : #include <xmloff/xmlprmap.hxx>
      30             : #include <xmloff/xmlexppr.hxx>
      31             : 
      32             : //////////////////////////////////////////////////////////////////////////////
      33             : // entry list for graphic properties
      34             : 
      35             : extern const XMLPropertyMapEntry aXMLSDProperties[];
      36             : 
      37             : //////////////////////////////////////////////////////////////////////////////
      38             : // entry list for presentation page properties
      39             : 
      40             : extern const XMLPropertyMapEntry aXMLSDPresPageProps[];
      41             : extern const XMLPropertyMapEntry aXMLSDPresPageProps_onlyHeadersFooter[];
      42             : 
      43             : //////////////////////////////////////////////////////////////////////////////
      44             : // types of own properties
      45             : 
      46             : #define XML_SD_TYPE_STROKE                          (XML_SD_TYPES_START +  0)
      47             : #define XML_SD_TYPE_PRESPAGE_TYPE                   (XML_SD_TYPES_START +  1)
      48             : #define XML_SD_TYPE_PRESPAGE_STYLE                  (XML_SD_TYPES_START +  2)
      49             : #define XML_SD_TYPE_PRESPAGE_SPEED                  (XML_SD_TYPES_START +  3)
      50             : #define XML_SD_TYPE_PRESPAGE_DURATION               (XML_SD_TYPES_START +  4)
      51             : #define XML_SD_TYPE_PRESPAGE_VISIBILITY             (XML_SD_TYPES_START +  5)
      52             : #define XML_SD_TYPE_MARKER                          (XML_SD_TYPES_START +  6 )
      53             : #define XML_SD_TYPE_OPACITY                         (XML_SD_TYPES_START +  7 )
      54             : #define XML_SD_TYPE_LINEJOIN                        (XML_SD_TYPES_START +  8 )
      55             : #define XML_SD_TYPE_FILLSTYLE                       (XML_SD_TYPES_START +  9 )
      56             : #define XML_SD_TYPE_GRADIENT                        (XML_SD_TYPES_START + 10 )
      57             : #define XML_SD_TYPE_GRADIENT_STEPCOUNT              (XML_SD_TYPES_START + 11 )
      58             : #define XML_SD_TYPE_SHADOW                          (XML_SD_TYPES_START + 12 )
      59             : #define XML_SD_TYPE_TEXT_CROSSEDOUT                 (XML_SD_TYPES_START + 13 )
      60             : #define XML_SD_TYPE_NUMBULLET                       (XML_SD_TYPES_START + 14 )
      61             : #define XML_SD_TYPE_WRITINGMODE                     (XML_SD_TYPES_START + 15 )
      62             : #define XML_SD_TYPE_BITMAP_MODE                     (XML_SD_TYPES_START + 16 )
      63             : #define XML_SD_TYPE_BITMAPREPOFFSETX                (XML_SD_TYPES_START + 17 )
      64             : #define XML_SD_TYPE_BITMAPREPOFFSETY                (XML_SD_TYPES_START + 18 )
      65             : #define XML_SD_TYPE_FILLBITMAPSIZE                  (XML_SD_TYPES_START + 19 )
      66             : #define XML_SD_TYPE_LOGICAL_SIZE                    (XML_SD_TYPES_START + 20 )
      67             : #define XML_SD_TYPE_BITMAP_REFPOINT                 (XML_SD_TYPES_START + 21 )
      68             : #define XML_SD_TYPE_PRESPAGE_BACKSIZE               (XML_SD_TYPES_START + 22 )
      69             : #define XML_TYPE_TEXT_ANIMATION_BLINKING            (XML_SD_TYPES_START + 23 )
      70             : #define XML_TYPE_TEXT_ANIMATION_STEPS               (XML_SD_TYPES_START + 24 )
      71             : #define XML_SD_TYPE_TEXT_ALIGN                      (XML_SD_TYPES_START + 25 )
      72             : #define XML_SD_TYPE_VERTICAL_ALIGN                  (XML_SD_TYPES_START + 26 )
      73             : #define XML_SD_TYPE_FITTOSIZE                       (XML_SD_TYPES_START + 27 )
      74             : #define XML_SD_TYPE_MEASURE_HALIGN                  (XML_SD_TYPES_START + 28 )
      75             : #define XML_SD_TYPE_MEASURE_VALIGN                  (XML_SD_TYPES_START + 29 )
      76             : #define XML_SD_TYPE_MEASURE_UNIT                    (XML_SD_TYPES_START + 30 )
      77             : #define XML_SD_TYPE_MEASURE_PLACING                 (XML_SD_TYPES_START + 31 )
      78             : #define XML_SD_TYPE_CONTROL_BORDER                  (XML_SD_TYPES_START + 32 )
      79             : #define XML_SD_TYPE_CONTROL_BORDER_COLOR            (XML_SD_TYPES_START + 33 )
      80             : #define XML_SD_TYPE_IMAGE_SCALE_MODE                (XML_SD_TYPES_START + 34 )
      81             : #define XML_SD_TYPE_LINECAP                         (XML_SD_TYPES_START + 35 )
      82             : 
      83             : // 3D property types
      84             : #define XML_SD_TYPE_BACKFACE_CULLING                (XML_SD_TYPES_START + 40 )
      85             : #define XML_SD_TYPE_NORMALS_KIND                    (XML_SD_TYPES_START + 41 )
      86             : #define XML_SD_TYPE_NORMALS_DIRECTION               (XML_SD_TYPES_START + 42 )
      87             : #define XML_SD_TYPE_TEX_GENERATION_MODE_X           (XML_SD_TYPES_START + 43 )
      88             : #define XML_SD_TYPE_TEX_GENERATION_MODE_Y           (XML_SD_TYPES_START + 44 )
      89             : #define XML_SD_TYPE_TEX_KIND                        (XML_SD_TYPES_START + 45 )
      90             : #define XML_SD_TYPE_TEX_MODE                        (XML_SD_TYPES_START + 46 )
      91             : 
      92             : //////////////////////////////////////////////////////////////////////////////
      93             : // #FontWork# types
      94             : #define XML_SD_TYPE_FONTWORK_STYLE                  (XML_SD_TYPES_START + 47 )
      95             : #define XML_SD_TYPE_FONTWORK_ADJUST                 (XML_SD_TYPES_START + 48 )
      96             : #define XML_SD_TYPE_FONTWORK_SHADOW                 (XML_SD_TYPES_START + 49 )
      97             : #define XML_SD_TYPE_FONTWORK_FORM                   (XML_SD_TYPES_START + 50 )
      98             : 
      99             : //////////////////////////////////////////////////////////////////////////////
     100             : // Caption types
     101             : #define XML_SD_TYPE_CAPTION_ANGLE_TYPE              (XML_SD_TYPES_START + 60 )
     102             : #define XML_SD_TYPE_CAPTION_IS_ESC_REL              (XML_SD_TYPES_START + 61 )
     103             : #define XML_SD_TYPE_CAPTION_ESC_REL                 (XML_SD_TYPES_START + 62 )
     104             : #define XML_SD_TYPE_CAPTION_ESC_ABS                 (XML_SD_TYPES_START + 63 )
     105             : #define XML_SD_TYPE_CAPTION_ESC_DIR                 (XML_SD_TYPES_START + 64 )
     106             : #define XML_SD_TYPE_CAPTION_TYPE                    (XML_SD_TYPES_START + 65 )
     107             : 
     108             : //////////////////////////////////////////////////////////////////////////////
     109             : // header & footer types
     110             : #define XML_SD_TYPE_DATETIMEUPDATE                  (XML_SD_TYPES_START + 70 )
     111             : #define XML_SD_TYPE_DATETIME_FORMAT                 (XML_SD_TYPES_START + 71 )
     112             : 
     113             : //////////////////////////////////////////////////////////////////////////////
     114             : 
     115             : // new types for merged style:protect attribute
     116             : #define XML_SD_TYPE_MOVE_PROTECT                    (XML_SD_TYPES_START + 72 )
     117             : #define XML_SD_TYPE_SIZE_PROTECT                    (XML_SD_TYPES_START + 73 )
     118             : 
     119             : // new type for style:mirror attribute
     120             : #define XML_TYPE_SD_MIRROR                          (XML_SD_TYPES_START + 74 )
     121             : 
     122             : //////////////////////////////////////////////////////////////////////////////
     123             : 
     124             : // new smil transition types for pages
     125             : #define XML_SD_TYPE_TRANSITION_TYPE                 (XML_SD_TYPES_START + 75 )
     126             : #define XML_SD_TYPE_TRANSTIION_SUBTYPE              (XML_SD_TYPES_START + 76 )
     127             : #define XML_SD_TYPE_TRANSTIION_DIRECTION            (XML_SD_TYPES_START + 77 )
     128             : 
     129             : #define XML_SD_TYPE_HEADER_FOOTER_VISIBILITY_TYPE   (XML_SD_TYPES_START + 78 )
     130             : 
     131             : //////////////////////////////////////////////////////////////////////////////
     132             : 
     133             : #define CTF_NUMBERINGRULES          1000
     134             : #define CTF_CONTROLWRITINGMODE      1001
     135             : #define CTF_WRITINGMODE             1002
     136             : #define CTF_REPEAT_OFFSET_X         1003
     137             : #define CTF_REPEAT_OFFSET_Y         1004
     138             : #define CTF_PAGE_SOUND_URL          1005
     139             : #define CTF_PAGE_VISIBLE            1006
     140             : #define CTF_PAGE_TRANS_TYPE         1007
     141             : #define CTF_PAGE_TRANS_STYLE        1008
     142             : #define CTF_PAGE_TRANS_SPEED        1009
     143             : #define CTF_PAGE_TRANS_DURATION     1010
     144             : #define CTF_PAGE_BACKSIZE           1011
     145             : #define CTF_DASHNAME                1012
     146             : #define CTF_LINESTARTNAME           1013
     147             : #define CTF_LINEENDNAME             1014
     148             : #define CTF_FILLGRADIENTNAME        1015
     149             : #define CTF_FILLHATCHNAME           1016
     150             : #define CTF_FILLBITMAPNAME          1017
     151             : #define CTF_FILLTRANSNAME           1018
     152             : #define CTF_TEXTANIMATION_BLINKING  1019
     153             : #define CTF_TEXTANIMATION_KIND      1020
     154             : 
     155             : #define CTF_PAGE_TRANSITION_TYPE        1021
     156             : #define CTF_PAGE_TRANSITION_SUBTYPE     1022
     157             : #define CTF_PAGE_TRANSITION_DIRECTION   1023
     158             : #define CTF_PAGE_TRANSITION_FADECOLOR   1024
     159             : 
     160             : //////////////////////////////////////////////////////////////////////////////
     161             : // #FontWork#
     162             : #define CTF_FONTWORK_STYLE              1021
     163             : #define CTF_FONTWORK_ADJUST             1022
     164             : #define CTF_FONTWORK_DISTANCE           1023
     165             : #define CTF_FONTWORK_START              1024
     166             : #define CTF_FONTWORK_MIRROR             1025
     167             : #define CTF_FONTWORK_OUTLINE            1026
     168             : #define CTF_FONTWORK_SHADOW             1027
     169             : #define CTF_FONTWORK_SHADOWCOLOR        1028
     170             : #define CTF_FONTWORK_SHADOWOFFSETX      1029
     171             : #define CTF_FONTWORK_SHADOWOFFSETY      1030
     172             : #define CTF_FONTWORK_FORM               1031
     173             : #define CTF_FONTWORK_HIDEFORM           1032
     174             : #define CTF_FONTWORK_SHADOWTRANSPARENCE 1033
     175             : 
     176             : //////////////////////////////////////////////////////////////////////////////
     177             : // OLE part 1
     178             : #define CTF_SD_OLE_VIS_AREA_IMPORT_LEFT     1040
     179             : #define CTF_SD_OLE_VIS_AREA_IMPORT_TOP      1041
     180             : #define CTF_SD_OLE_VIS_AREA_IMPORT_WIDTH    1042
     181             : #define CTF_SD_OLE_VIS_AREA_IMPORT_HEIGHT   1043
     182             : #define CTF_SD_OLE_ISINTERNAL               1044
     183             : 
     184             : #define CTF_SD_MOVE_PROTECT             1045
     185             : #define CTF_SD_SIZE_PROTECT             1046
     186             : 
     187             : //////////////////////////////////////////////////////////////////////////////
     188             : // caption
     189             : #define CTF_CAPTION_ISESCREL            1047
     190             : #define CTF_CAPTION_ESCREL              1048
     191             : #define CTF_CAPTION_ESCABS              1049
     192             : 
     193             : //////////////////////////////////////////////////////////////////////////////
     194             : // header&footer
     195             : #define CTF_HEADER_VISIBLE              1050
     196             : #define CTF_FOOTER_VISIBLE              1051
     197             : #define CTF_PAGE_NUMBER_VISIBLE         1052
     198             : #define CTF_DATE_TIME_VISIBLE           1053
     199             : #define CTF_HEADER_TEXT                 1054
     200             : #define CTF_FOOTER_TEXT                 1055
     201             : #define CTF_DATE_TIME_TEXT              1056
     202             : #define CTF_DATE_TIME_FORMAT            1057
     203             : #define CTF_DATE_TIME_UPDATE            1058
     204             : 
     205             : //////////////////////////////////////////////////////////////////////////////
     206             : // OLE part 2
     207             : #define CTF_SD_OLE_ASPECT                   1059
     208             : #define CTF_SD_OLE_VIS_AREA_EXPORT_LEFT     1060
     209             : #define CTF_SD_OLE_VIS_AREA_EXPORT_TOP      1061
     210             : #define CTF_SD_OLE_VIS_AREA_EXPORT_WIDTH    1062
     211             : #define CTF_SD_OLE_VIS_AREA_EXPORT_HEIGHT   1063
     212             : 
     213             : //////////////////////////////////////////////////////////////////////////////
     214             : // enum maps for attributes
     215             : 
     216             : extern SvXMLEnumMapEntry aXML_ConnectionKind_EnumMap[];
     217             : extern SvXMLEnumMapEntry aXML_CircleKind_EnumMap[];
     218             : 
     219             : //////////////////////////////////////////////////////////////////////////////
     220             : 
     221             : /** contains the attribute to property mapping for a drawing layer table */
     222             : extern const XMLPropertyMapEntry aXMLTableShapeAttributes[];
     223             : 
     224             : //////////////////////////////////////////////////////////////////////////////
     225             : // factory for own graphic properties
     226             : 
     227             : class SvXMLExport;
     228             : class SvXMLImport;
     229             : 
     230             : class XMLSdPropHdlFactory : public XMLPropertyHandlerFactory
     231             : {
     232             : private:
     233             :     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
     234             :     SvXMLExport* mpExport;
     235             :     SvXMLImport* mpImport;
     236             : 
     237             : public:
     238             :     XMLSdPropHdlFactory( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >, SvXMLExport& rExport );
     239             :     XMLSdPropHdlFactory( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >, SvXMLImport& rImport );
     240             :     virtual ~XMLSdPropHdlFactory();
     241             :     virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
     242             : };
     243             : 
     244             : class XMLShapePropertySetMapper : public XMLPropertySetMapper
     245             : {
     246             : public:
     247             :     XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
     248             :     ~XMLShapePropertySetMapper();
     249             : };
     250             : 
     251             : class XMLShapeExportPropertyMapper : public SvXMLExportPropertyMapper
     252             : {
     253             : private:
     254             :     SvxXMLNumRuleExport maNumRuleExp;
     255             :     sal_Bool mbIsInAutoStyles;
     256             : 
     257             :     const rtl::OUString msCDATA;
     258             :     const rtl::OUString msTrue;
     259             :     const rtl::OUString msFalse;
     260             : 
     261             : protected:
     262             :     virtual void ContextFilter(
     263             :         ::std::vector< XMLPropertyState >& rProperties,
     264             :         ::com::sun::star::uno::Reference<
     265             :             ::com::sun::star::beans::XPropertySet > rPropSet ) const;
     266             : public:
     267             :     XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport );
     268             :     virtual ~XMLShapeExportPropertyMapper();
     269             : 
     270             :     virtual void        handleElementItem(
     271             :                             SvXMLExport& rExport,
     272             :                             const XMLPropertyState& rProperty,
     273             :                             sal_uInt16 nFlags,
     274             :                             const ::std::vector< XMLPropertyState >* pProperties = 0,
     275             :                             sal_uInt32 nIdx = 0
     276             :                             ) const;
     277             : 
     278           2 :     void SetAutoStyles( sal_Bool bIsInAutoStyles ) { mbIsInAutoStyles = bIsInAutoStyles; }
     279             : 
     280             :     virtual void handleSpecialItem(
     281             :             SvXMLAttributeList& rAttrList,
     282             :             const XMLPropertyState& rProperty,
     283             :             const SvXMLUnitConverter& rUnitConverter,
     284             :             const SvXMLNamespaceMap& rNamespaceMap,
     285             :             const ::std::vector< XMLPropertyState > *pProperties = 0,
     286             :             sal_uInt32 nIdx = 0 ) const;
     287             : };
     288             : 
     289             : class XMLPageExportPropertyMapper : public SvXMLExportPropertyMapper
     290             : {
     291             : private:
     292             :     SvXMLExport& mrExport;
     293             : 
     294             :     const rtl::OUString msCDATA;
     295             :     const rtl::OUString msTrue;
     296             :     const rtl::OUString msFalse;
     297             : 
     298             : protected:
     299             :     virtual void ContextFilter(
     300             :         ::std::vector< XMLPropertyState >& rProperties,
     301             :         ::com::sun::star::uno::Reference<
     302             :             ::com::sun::star::beans::XPropertySet > rPropSet ) const;
     303             : public:
     304             :     XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport );
     305             :     virtual ~XMLPageExportPropertyMapper();
     306             : 
     307             :     virtual void        handleElementItem(
     308             :                             SvXMLExport& rExport,
     309             :                             const XMLPropertyState& rProperty,
     310             :                             sal_uInt16 nFlags,
     311             :                             const ::std::vector< XMLPropertyState >* pProperties = 0,
     312             :                             sal_uInt32 nIdx = 0
     313             :                             ) const;
     314             : };
     315             : 
     316             : #endif  //  _SDPROPLS_HXX
     317             : 
     318             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10