LCOV - code coverage report
Current view: top level - dbaccess/source/filter/xml - xmlAutoStyle.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 25 20.0 %
Date: 2012-08-25 Functions: 3 4 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 36 2.8 %

           Branch data     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 "xmlAutoStyle.hxx"
      21                 :            : #include "xmlHelper.hxx"
      22                 :            : #include "xmlExport.hxx"
      23                 :            : #include <xmloff/families.hxx>
      24                 :            : #include <tools/debug.hxx>
      25                 :            : namespace dbaxml
      26                 :            : {
      27                 :            :     using namespace ::com::sun::star::uno;
      28                 :            :     using namespace ::com::sun::star::xml::sax;
      29                 :            : 
      30                 :          0 : void OXMLAutoStylePoolP::exportStyleAttributes(
      31                 :            :             SvXMLAttributeList& rAttrList,
      32                 :            :             sal_Int32 nFamily,
      33                 :            :             const ::std::vector< XMLPropertyState >& rProperties,
      34                 :            :             const SvXMLExportPropertyMapper& rPropExp
      35                 :            :             , const SvXMLUnitConverter& rUnitConverter,
      36                 :            :             const SvXMLNamespaceMap& rNamespaceMap
      37                 :            :             ) const
      38                 :            : {
      39                 :          0 :     SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap );
      40         [ #  # ]:          0 :     if ( nFamily == XML_STYLE_FAMILY_TABLE_COLUMN )
      41                 :            :     {
      42         [ #  # ]:          0 :         UniReference< XMLPropertySetMapper > aPropMapper = rODBExport.GetColumnStylesPropertySetMapper();
      43                 :          0 :         ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin();
      44                 :          0 :         ::std::vector< XMLPropertyState >::const_iterator aEnd = rProperties.end();
      45 [ #  # ][ #  # ]:          0 :         for ( ; i != aEnd ; ++i )
      46                 :            :         {
      47 [ #  # ][ #  # ]:          0 :             sal_Int16 nContextID = aPropMapper->GetEntryContextId(i->mnIndex);
      48         [ #  # ]:          0 :             switch (nContextID)
      49                 :            :             {
      50                 :            :                 case CTF_DB_NUMBERFORMAT :
      51                 :            :                 {
      52                 :          0 :                     sal_Int32 nNumberFormat = 0;
      53         [ #  # ]:          0 :                     if ( i->maValue >>= nNumberFormat )
      54                 :            :                     {
      55         [ #  # ]:          0 :                         rtl::OUString sAttrValue = rODBExport.getDataStyleName(nNumberFormat);
      56         [ #  # ]:          0 :                         if ( !sAttrValue.isEmpty() )
      57                 :            :                         {
      58         [ #  # ]:          0 :                             GetExport().AddAttribute(
      59 [ #  # ][ #  # ]:          0 :                                 aPropMapper->GetEntryNameSpace(i->mnIndex),
      60 [ #  # ][ #  # ]:          0 :                                 aPropMapper->GetEntryXMLName(i->mnIndex),
      61         [ #  # ]:          0 :                                 sAttrValue );
      62                 :          0 :                         }
      63                 :            :                     }
      64                 :            :                     break;
      65                 :            :                 }
      66                 :            :             }
      67         [ #  # ]:          0 :         }
      68                 :            :     }
      69                 :          0 : }
      70                 :            : DBG_NAME(OXMLAutoStylePoolP)
      71                 :            : // -----------------------------------------------------------------------------
      72                 :        348 : OXMLAutoStylePoolP::OXMLAutoStylePoolP(ODBExport& rTempODBExport):
      73                 :            :     SvXMLAutoStylePoolP(rTempODBExport),
      74                 :        348 :     rODBExport(rTempODBExport)
      75                 :            : {
      76                 :            :     DBG_CTOR(OXMLAutoStylePoolP,NULL);
      77                 :            : 
      78                 :        348 : }
      79                 :            : // -----------------------------------------------------------------------------
      80                 :        348 : OXMLAutoStylePoolP::~OXMLAutoStylePoolP()
      81                 :            : {
      82                 :            : 
      83                 :            :     DBG_DTOR(OXMLAutoStylePoolP,NULL);
      84         [ -  + ]:        696 : }
      85                 :            : // -----------------------------------------------------------------------------
      86                 :            : 
      87                 :            : //----------------------------------------------------------------------------
      88                 :            : } // namespace dbaxml
      89                 :            : // -----------------------------------------------------------------------------
      90                 :            : 
      91                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10