LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/CustomTarget/writerfilter/source - OOXMLFactory_dml-graphicalObject.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 45 63 71.4 %
Date: 2012-12-17 Functions: 10 13 76.9 %
Legend: Lines: hit not hit

          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-graphicalObject.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_graphicalObject > OOXMLFactory_dml_graphicalObject_Mutex;
      19             : 
      20           4 : OOXMLFactory_dml_graphicalObject::OOXMLFactory_dml_graphicalObject()
      21             : {
      22             :     // multi-thread-safe mutex for all platforms
      23             :     
      24           4 :     osl::MutexGuard aGuard(OOXMLFactory_dml_graphicalObject_Mutex::get());
      25           4 : }
      26             : 
      27           8 : OOXMLFactory_dml_graphicalObject::~OOXMLFactory_dml_graphicalObject()
      28             : {
      29           8 : }
      30             : 
      31          10 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_graphicalObject::m_pInstance;
      32             :     
      33        1110 : OOXMLFactory_ns::Pointer_t OOXMLFactory_dml_graphicalObject::getInstance()
      34             : {
      35        1110 :     if (m_pInstance.get() == NULL)
      36           4 :         m_pInstance.reset(new OOXMLFactory_dml_graphicalObject());
      37             :     
      38        1110 :     return m_pInstance;
      39             : }
      40             : 
      41           8 : AttributeToResourceMapPointer OOXMLFactory_dml_graphicalObject::createAttributeToResourceMap(Id nId)
      42             : {
      43           8 :     AttributeToResourceMapPointer pMap(new AttributeToResourceMap());
      44             :     
      45           8 :     switch (nId)
      46             :     {
      47             :     case NN_dml_graphicalObject|DEFINE_CT_GraphicalObjectData:
      48             :       // CT_GraphicalObjectData
      49             :       // empty resource: OOXML_uri
      50           4 :         break;
      51             :     default:
      52           4 :         break;
      53             :     }
      54             :     
      55           8 :     return pMap;
      56             : }
      57             : 
      58           0 : ListValueMapPointer OOXMLFactory_dml_graphicalObject::createListValueMap(Id nId)
      59             : {
      60           0 :     ListValueMapPointer pMap(new ListValueMap());
      61             :     
      62             :     switch (nId)
      63             :     {
      64             :     default:
      65           0 :         break;
      66             :     }
      67             :     
      68           0 :     return pMap;
      69             : }
      70          20 : CreateElementMapPointer OOXMLFactory_dml_graphicalObject::createCreateElementMap(Id nId)
      71             : {
      72          20 :     CreateElementMapPointer pMap(new CreateElementMap());
      73             :     
      74          20 :     switch (nId)
      75             :     {
      76             :     case NN_dml_graphicalObject|DEFINE_CT_GraphicalObjectData:
      77             :          /* ref: pic*/
      78           4 :         (*pMap)[NS_picture|OOXML_pic] = CreateElement(RT_Shape, NN_dml_chartDrawing|DEFINE_CT_Picture);
      79             :          /* ref: relIds*/
      80           4 :         (*pMap)[NS_diagram|OOXML_relIds] = CreateElement(RT_Shape, NN_dml_chartDrawing|DEFINE_CT_RelIds);
      81           4 :         (*pMap)[NS_drawingml|OOXML_FAST_TOKENS_END] = CreateElement(RT_Any, 0);
      82           4 :         break;
      83             :     case NN_dml_graphicalObject|DEFINE_CT_GraphicalObject:
      84           4 :         (*pMap)[NS_drawingml|OOXML_graphicData] = CreateElement(RT_Properties, NN_dml_graphicalObject|DEFINE_CT_GraphicalObjectData);
      85           4 :         break;
      86             :     case NN_dml_graphicalObject|DEFINE_graphic:
      87           0 :         (*pMap)[NS_drawingml|OOXML_graphic] = CreateElement(RT_Properties, NN_dml_graphicalObject|DEFINE_CT_GraphicalObject);
      88           0 :         break;
      89             :     default:
      90             :         /* start: graphic*/
      91          12 :         (*pMap)[NS_drawingml|OOXML_graphic] = CreateElement(RT_Properties, NN_dml_graphicalObject|DEFINE_CT_GraphicalObject);
      92          12 :         break;
      93             :     }
      94             :     
      95          20 :     return pMap;
      96             : }
      97             : 
      98          32 : void OOXMLFactory_dml_graphicalObject::charactersAction(OOXMLFastContextHandler*, const OUString &)
      99             : {
     100          32 : }
     101             : 
     102           0 : string OOXMLFactory_dml_graphicalObject::getDefineName(Id nId) const
     103             : {
     104           0 :     static IdToStringMapPointer pMap;
     105             :     
     106           0 :     if (pMap.get() == NULL)
     107             :     {
     108           0 :         pMap = IdToStringMapPointer(new IdToStringMap());
     109             :         
     110             : 
     111           0 :         (*pMap)[NN_dml_graphicalObject|DEFINE_CT_GraphicalObjectData] = "CT_GraphicalObjectData";
     112           0 :         (*pMap)[NN_dml_graphicalObject|DEFINE_CT_GraphicalObject] = "CT_GraphicalObject";
     113           0 :         (*pMap)[NN_dml_graphicalObject|DEFINE_graphic] = "graphic";
     114             :     }
     115             :     
     116           0 :     return (*pMap)[nId];
     117             : }
     118             :     
     119             : 
     120          20 : TokenToIdMapPointer OOXMLFactory_dml_graphicalObject::createTokenToIdMap(Id nId)
     121             : {
     122          20 :     TokenToIdMapPointer pMap(new TokenToIdMap());
     123             :     
     124          20 :     switch (nId)
     125             :     {
     126             :     case NN_dml_graphicalObject|DEFINE_CT_GraphicalObjectData:
     127             :         // pic
     128           4 :         (*pMap)[NS_picture|OOXML_pic] = NS_ooxml::LN_pic_pic;
     129             :         // relIds
     130           4 :         (*pMap)[NS_diagram|OOXML_relIds] = NS_ooxml::LN_dgm_relIds;
     131             :         // CT_GraphicalObjectData
     132           4 :         (*pMap)[NS_drawingml|OOXML_pic] = NS_ooxml::LN_CT_GraphicalObjectData_pic;
     133           4 :         (*pMap)[NS_drawingml|OOXML_relIds] = NS_ooxml::LN_CT_GraphicalObjectData_relIds;
     134           4 :         (*pMap)[OOXML_uri] = NS_ooxml::LN_CT_GraphicalObjectData_uri;
     135           4 :         break;
     136             :     case NN_dml_graphicalObject|DEFINE_CT_GraphicalObject:
     137             :         // CT_GraphicalObject
     138           4 :         (*pMap)[NS_drawingml|OOXML_graphicData] = NS_ooxml::LN_CT_GraphicalObject_graphicData;
     139           4 :         break;
     140             :     case NN_dml_graphicalObject|DEFINE_graphic:
     141             :         // graphic
     142           0 :         (*pMap)[NS_drawingml|OOXML_graphic] = NS_ooxml::LN_graphic_graphic;
     143           0 :         break;
     144             :     default:
     145             :         // graphic
     146             :         // graphic
     147          12 :         (*pMap)[NS_drawingml|OOXML_graphic] = NS_ooxml::LN_graphic_graphic;
     148          12 :         break;
     149             :     }
     150             :     
     151          20 :     return pMap;
     152             : }
     153             : 
     154           0 : void OOXMLFactory_dml_graphicalObject::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t)
     155             : {
     156           0 : }
     157             : 
     158             : #ifdef DEBUG_FACTORY
     159             : string OOXMLFactory_dml_graphicalObject::getName() const
     160             : {
     161             :     return "dml-graphicalObject";
     162             : }
     163             : #endif
     164             : 
     165             : /// @endcond
     166          30 : }}

Generated by: LCOV version 1.10