LCOV - code coverage report
Current view: top level - xmloff/source/draw - sdpropls.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

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

Generated by: LCOV version 1.10