LCOV - code coverage report
Current view: top level - workdir/unxlngi6.pro/CustomTarget/writerfilter/source - OOXMLFactory_dml-shapeProperties.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 21 64 32.8 %
Date: 2012-08-25 Functions: 8 13 61.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 17 132 12.9 %

           Branch data     Line data    Source code
       1                 :            : 
       2                 :            : #include "doctok/sprmids.hxx"
       3                 :            : #include "doctok/resourceids.hxx"
       4                 :            : #include "ooxml/resourceids.hxx"
       5                 :            : #include "OOXMLFactory_values.hxx"
       6                 :            : #include "OOXMLFactory_dml-shapeProperties.hxx"
       7                 :            : #include "ooxml/OOXMLFastHelper.hxx"
       8                 :            :     
       9                 :            : #ifdef _MSC_VER
      10                 :            : #pragma warning(disable:4065) // switch statement contains 'default' but no 'case' labels
      11                 :            : #endif
      12                 :            : 
      13                 :            : namespace writerfilter {
      14                 :            : namespace ooxml {
      15                 :            : 
      16                 :            : /// @cond GENERATED
      17                 :            :     
      18                 :            : typedef rtl::Static < osl::Mutex, OOXMLFactory_dml_shapeProperties > OOXMLFactory_dml_shapeProperties_Mutex;
      19                 :            : 
      20                 :          8 : OOXMLFactory_dml_shapeProperties::OOXMLFactory_dml_shapeProperties()
      21                 :            : {
      22                 :            :     // multi-thread-safe mutex for all platforms
      23                 :            :     
      24 [ +  - ][ +  - ]:          8 :     osl::MutexGuard aGuard(OOXMLFactory_dml_shapeProperties_Mutex::get());
                 [ +  - ]
      25                 :          8 : }
      26                 :            : 
      27                 :          8 : OOXMLFactory_dml_shapeProperties::~OOXMLFactory_dml_shapeProperties()
      28                 :            : {
      29         [ -  + ]:         16 : }
      30                 :            : 
      31                 :         20 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_shapeProperties::m_pInstance;
      32                 :            :     
      33                 :        827 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_shapeProperties::getInstance()
      34                 :            : {
      35         [ +  + ]:        827 :     if (m_pInstance.get() == NULL)
      36         [ +  - ]:          8 :         m_pInstance.reset(new OOXMLFactory_dml_shapeProperties());
      37                 :            :     
      38                 :        827 :     return m_pInstance;
      39                 :            : }
      40                 :            : 
      41                 :          0 : AttributeToResourceMapPointer OOXMLFactory_dml_shapeProperties::createAttributeToResourceMap(Id nId)
      42                 :            : {
      43 [ #  # ][ #  # ]:          0 :     AttributeToResourceMapPointer pMap(new AttributeToResourceMap());
                 [ #  # ]
      44                 :            :     
      45      [ #  #  # ]:          0 :     switch (nId)
      46                 :            :     {
      47                 :            :     case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
      48                 :            :       // CT_ShapeProperties
      49                 :            :       // empty resource: OOXML_bwMode
      50                 :          0 :         break;
      51                 :            :     case NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties:
      52                 :            :       // CT_GroupShapeProperties
      53                 :            :       // empty resource: OOXML_bwMode
      54                 :          0 :         break;
      55                 :            :     default:
      56                 :          0 :         break;
      57                 :            :     }
      58                 :            :     
      59                 :          0 :     return pMap;
      60                 :            : }
      61                 :            : 
      62                 :          0 : ListValueMapPointer OOXMLFactory_dml_shapeProperties::createListValueMap(Id nId)
      63                 :            : {
      64 [ #  # ][ #  # ]:          0 :     ListValueMapPointer pMap(new ListValueMap());
                 [ #  # ]
      65                 :            :     
      66                 :            :     switch (nId)
      67                 :            :     {
      68                 :            :     default:
      69                 :          0 :         break;
      70                 :            :     }
      71                 :            :     
      72                 :          0 :     return pMap;
      73                 :            : }
      74                 :         14 : CreateElementMapPointer OOXMLFactory_dml_shapeProperties::createCreateElementMap(Id nId)
      75                 :            : {
      76 [ +  - ][ +  - ]:         14 :     CreateElementMapPointer pMap(new CreateElementMap());
                 [ +  - ]
      77                 :            :     
      78      [ -  -  + ]:         14 :     switch (nId)
      79                 :            :     {
      80                 :            :     case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
      81                 :            :          /* ref: EG_Geometry*/
      82 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_custGeom] = CreateElement(RT_Properties, NN_dml_shapeGeometry|DEFINE_CT_CustomGeometry2D);
      83 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_prstGeom] = CreateElement(RT_Properties, NN_dml_shapeGeometry|DEFINE_CT_PresetGeometry2D);
      84                 :            :          /* ref: EG_FillProperties*/
      85 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_solidFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_SolidColorFillProperties);
      86 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_blipFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_BlipFillProperties);
      87                 :            :          /* ref: EG_EffectProperties*/
      88 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_effectDag] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_EffectContainer);
      89 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_xfrm] = CreateElement(RT_Properties, NN_dml_baseTypes|DEFINE_CT_Transform2D);
      90 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_ln] = CreateElement(RT_Properties, NN_dml_shapeLineProperties|DEFINE_CT_LineProperties);
      91                 :          0 :         break;
      92                 :            :     case NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties:
      93                 :            :          /* ref: EG_FillProperties*/
      94 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_solidFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_SolidColorFillProperties);
      95 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_blipFill] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_BlipFillProperties);
      96                 :            :          /* ref: EG_EffectProperties*/
      97 [ #  # ][ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_effectDag] = CreateElement(RT_Properties, NN_dml_shapeEffects|DEFINE_CT_EffectContainer);
      98                 :          0 :         break;
      99                 :            :     default:
     100                 :         14 :         break;
     101                 :            :     }
     102                 :            :     
     103                 :         14 :     return pMap;
     104                 :            : }
     105                 :            : 
     106                 :          0 : void OOXMLFactory_dml_shapeProperties::charactersAction(OOXMLFastContextHandler*, const OUString &)
     107                 :            : {
     108                 :          0 : }
     109                 :            : 
     110                 :          0 : string OOXMLFactory_dml_shapeProperties::getDefineName(Id nId) const
     111                 :            : {
     112 [ #  # ][ #  # ]:          0 :     static IdToStringMapPointer pMap;
         [ #  # ][ #  # ]
     113                 :            :     
     114         [ #  # ]:          0 :     if (pMap.get() == NULL)
     115                 :            :     {
     116 [ #  # ][ #  # ]:          0 :         pMap = IdToStringMapPointer(new IdToStringMap());
         [ #  # ][ #  # ]
                 [ #  # ]
     117                 :            :         
     118                 :            : 
     119 [ #  # ][ #  # ]:          0 :         (*pMap)[NN_dml_shapeProperties|DEFINE_CT_ShapeProperties] = "CT_ShapeProperties";
     120 [ #  # ][ #  # ]:          0 :         (*pMap)[NN_dml_shapeProperties|DEFINE_CT_GroupShapeProperties] = "CT_GroupShapeProperties";
     121                 :            :     }
     122                 :            :     
     123                 :          0 :     return (*pMap)[nId];
     124                 :            : }
     125                 :            :     
     126                 :            : 
     127                 :         14 : TokenToIdMapPointer OOXMLFactory_dml_shapeProperties::createTokenToIdMap(Id nId)
     128                 :            : {
     129 [ +  - ][ +  - ]:         14 :     TokenToIdMapPointer pMap(new TokenToIdMap());
                 [ +  - ]
     130                 :            :     
     131         [ -  + ]:         14 :     switch (nId)
     132                 :            :     {
     133                 :            :     case NN_dml_shapeProperties|DEFINE_CT_ShapeProperties:
     134                 :            :         // EG_Geometry
     135         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_custGeom] = NS_ooxml::LN_EG_Geometry_custGeom;
     136         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_prstGeom] = NS_ooxml::LN_EG_Geometry_prstGeom;
     137                 :            :         // CT_ShapeProperties
     138         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_xfrm] = NS_ooxml::LN_CT_ShapeProperties_xfrm;
     139         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_ln] = NS_ooxml::LN_CT_ShapeProperties_ln;
     140         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_scene3d] = NS_ooxml::LN_CT_ShapeProperties_scene3d;
     141         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_sp3d] = NS_ooxml::LN_CT_ShapeProperties_sp3d;
     142         [ #  # ]:          0 :         (*pMap)[NS_drawingml|OOXML_extLst] = NS_ooxml::LN_CT_ShapeProperties_extLst;
     143         [ #  # ]:          0 :         (*pMap)[OOXML_bwMode] = NS_ooxml::LN_CT_ShapeProperties_bwMode;
     144                 :          0 :         break;
     145                 :            :     default:
     146                 :         14 :         break;
     147                 :            :     }
     148                 :            :     
     149                 :         14 :     return pMap;
     150                 :            : }
     151                 :            : 
     152                 :          0 : void OOXMLFactory_dml_shapeProperties::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
     153                 :            : {
     154                 :          0 : }
     155                 :            : 
     156                 :            : #ifdef DEBUG_FACTORY
     157                 :            : string OOXMLFactory_dml_shapeProperties::getName() const
     158                 :            : {
     159                 :            :     return "dml-shapeProperties";
     160                 :            : }
     161                 :            : #endif
     162                 :            : 
     163                 :            : /// @endcond
     164 [ +  - ][ +  - ]:         60 : }}

Generated by: LCOV version 1.10