LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/parser_i/idoc - tk_xml.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 37 71 52.1 %
Date: 2012-12-27 Functions: 11 15 73.3 %
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             : #include <precomp.h>
      21             : #include <s2_dsapi/tk_xml.hxx>
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <s2_dsapi/tokintpr.hxx>
      26             : 
      27             : using csi::dsapi::Tok_XmlConst;
      28             : using csi::dsapi::Tok_XmlLink_Tag;
      29             : using csi::dsapi::Tok_XmlFormat_Tag;
      30             : 
      31             : 
      32           1 : lux::EnumValueMap           G_aTok_XmlConst_EV_TokenId_Values;
      33           1 : Tok_XmlConst::EV_TokenId    ev_consts_none(Tok_XmlConst::e_none,"");
      34           1 : Tok_XmlConst::EV_TokenId    ev_e_true(Tok_XmlConst::e_true,"true");
      35           1 : Tok_XmlConst::EV_TokenId    ev_e_false(Tok_XmlConst::e_false,"false");
      36           1 : Tok_XmlConst::EV_TokenId    ev_e_null(Tok_XmlConst::e_null,"NULL");
      37           1 : Tok_XmlConst::EV_TokenId    ev_e_void(Tok_XmlConst::e_void,"void");
      38             : 
      39           1 : lux::EnumValueMap           G_aTok_XmlLink_Tag_EV_TokenId_Values;
      40           1 : Tok_XmlLink_Tag::EV_TokenId ev_linktags_none(Tok_XmlLink_Tag::e_none,"");
      41           1 : Tok_XmlLink_Tag::EV_TokenId ev_e_const(Tok_XmlLink_Tag::e_const,"const");
      42           1 : Tok_XmlLink_Tag::EV_TokenId ev_member(Tok_XmlLink_Tag::member,"member");
      43           1 : Tok_XmlLink_Tag::EV_TokenId ev_type(Tok_XmlLink_Tag::type,"type");
      44             : 
      45           1 : lux::EnumValueMap               G_aTok_XmlFormat_Tag_EV_TokenId_Values;
      46           1 : Tok_XmlFormat_Tag::EV_TokenId   ev_formattags_none(Tok_XmlFormat_Tag::e_none,"");
      47           1 : Tok_XmlFormat_Tag::EV_TokenId   ev_code(Tok_XmlFormat_Tag::code,"code");
      48           1 : Tok_XmlFormat_Tag::EV_TokenId   ev_listing(Tok_XmlFormat_Tag::listing,"listing");
      49           1 : Tok_XmlFormat_Tag::EV_TokenId   ev_atom(Tok_XmlFormat_Tag::atom,"code");
      50             : 
      51             : 
      52             : namespace lux
      53             : {
      54             : 
      55             : template<> EnumValueMap &
      56        5576 : Enum<Tok_XmlConst::E_TokenId>::Values_()         { return G_aTok_XmlConst_EV_TokenId_Values; }
      57             : template<> EnumValueMap &
      58       38272 : Enum<Tok_XmlLink_Tag::E_TokenId>::Values_()      { return G_aTok_XmlLink_Tag_EV_TokenId_Values; }
      59             : template<> EnumValueMap &
      60        6590 : Enum<Tok_XmlFormat_Tag::E_TokenId>::Values_()    { return G_aTok_XmlFormat_Tag_EV_TokenId_Values; }
      61             : 
      62             : }   // namespace lux
      63             : 
      64             : 
      65             : 
      66             : namespace csi
      67             : {
      68             : namespace dsapi
      69             : {
      70             : 
      71             : void
      72        1855 : Tok_XmlConst::Trigger( TokenInterpreter &   io_rInterpreter ) const
      73             : {
      74        1855 :     io_rInterpreter.Process_XmlConst(*this);
      75        1855 : }
      76             : 
      77             : const char *
      78        1855 : Tok_XmlConst::Text() const
      79             : {
      80        1855 :     return eTag.Text();
      81             : }
      82             : 
      83             : void
      84        9570 : Tok_XmlLink_BeginTag::Trigger( TokenInterpreter &   io_rInterpreter ) const
      85             : {
      86        9570 :     io_rInterpreter.Process_XmlLink_BeginTag(*this);
      87        9570 : }
      88             : 
      89             : const char *
      90           0 : Tok_XmlLink_BeginTag::Text() const
      91             : {
      92           0 :     static StreamStr ret(120);
      93           0 :     ret.seekp(0);
      94           0 :     if (sScope.length() > 0)
      95             :     {
      96           0 :         ret << "<"
      97           0 :             << eTag.Text()
      98           0 :             << " scope=\""
      99           0 :             << sScope
     100           0 :             << "\">";
     101             :     }
     102             :     else
     103             :     {
     104           0 :         ret << "<"
     105           0 :             << eTag.Text()
     106           0 :             << ">";
     107             :     }
     108           0 :     return ret.c_str();
     109             : }
     110             : 
     111             : void
     112        9561 : Tok_XmlLink_EndTag::Trigger( TokenInterpreter & io_rInterpreter ) const
     113             : {
     114        9561 :     io_rInterpreter.Process_XmlLink_EndTag(*this);
     115        9561 : }
     116             : 
     117             : const char *
     118           0 : Tok_XmlLink_EndTag::Text() const
     119             : {
     120           0 :     static StreamStr ret(120);
     121           0 :     ret.seekp(0);
     122           0 :     ret << "</"
     123           0 :         << eTag.Text()
     124           0 :         << ">";
     125           0 :     return ret.c_str();
     126             : }
     127             : 
     128             : void
     129        1648 : Tok_XmlFormat_BeginTag::Trigger( TokenInterpreter & io_rInterpreter ) const
     130             : {
     131        1648 :     io_rInterpreter.Process_XmlFormat_BeginTag(*this);
     132        1648 : }
     133             : 
     134             : const char *
     135           0 : Tok_XmlFormat_BeginTag::Text() const
     136             : {
     137           0 :     static StreamStr ret(120);
     138           0 :     ret.seekp(0);
     139           0 :     ret << "<"
     140           0 :         << eTag.Text()
     141           0 :         << ">";
     142           0 :     return ret.c_str();
     143             : }
     144             : 
     145             : void
     146        1639 : Tok_XmlFormat_EndTag::Trigger( TokenInterpreter &   io_rInterpreter ) const
     147             : {
     148        1639 :     io_rInterpreter.Process_XmlFormat_EndTag(*this);
     149        1639 : }
     150             : 
     151             : const char *
     152           0 : Tok_XmlFormat_EndTag::Text() const
     153             : {
     154           0 :     static StreamStr ret(120);
     155           0 :     ret.seekp(0);
     156           0 :     ret << "</"
     157           0 :         << eTag.Text()
     158           0 :         << ">";
     159           0 :     return ret.c_str();
     160             : }
     161             : 
     162             : 
     163             : }   // namespace dsapi
     164           3 : }   // namespace csi
     165             : 
     166             : 
     167             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10