LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/ary_i/kernel - ci_text2.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 29 40 72.5 %
Date: 2012-12-27 Functions: 8 13 61.5 %
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 <ary_i/ci_text2.hxx>
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <ary_i/disdocum.hxx>
      26             : #include <ary_i/d_token.hxx>
      27             : 
      28             : 
      29             : namespace ary
      30             : {
      31             : namespace inf
      32             : {
      33             : 
      34       81763 : DocuTex2::DocuTex2()
      35             : {
      36       81763 : }
      37             : 
      38      138838 : DocuTex2::~DocuTex2()
      39             : {
      40     2993148 :     for ( TokenList::iterator iter = aTokens.begin();
      41     1995432 :           iter != aTokens.end();
      42             :           ++iter )
      43             :     {
      44      928297 :         delete (*iter);
      45             :     }
      46       69419 : }
      47             : 
      48             : void
      49       46653 : DocuTex2::DisplayAt( DocumentationDisplay & o_rDisplay ) const
      50             : {
      51     3866700 :     for ( ary::inf::DocuTex2::TokenList::const_iterator
      52       46653 :                 iter = aTokens.begin();
      53     2577800 :           iter != aTokens.end();
      54             :           ++iter )
      55             :     {
      56     1242247 :         (*iter)->DisplayAt(o_rDisplay);
      57             :     }
      58       46653 : }
      59             : 
      60             : void
      61     1190004 : DocuTex2::AddToken( DYN DocuToken & let_drToken )
      62             : {
      63     1190004 :     if (aTokens.empty())
      64             :     {
      65       73654 :         if (let_drToken.IsWhiteOnly())
      66     1230600 :             return;
      67             :     }
      68     1149408 :     aTokens.push_back(&let_drToken);
      69             : }
      70             : 
      71             : 
      72             : using csi::dsapi::DT_TextToken;
      73             : 
      74             : const String &
      75         413 : DocuTex2::TextOfFirstToken() const
      76             : {
      77         413 :     if (NOT aTokens.empty())
      78             :     {
      79             :         const DT_TextToken *
      80         413 :             pTok = dynamic_cast< const DT_TextToken* >(*aTokens.begin());
      81             : 
      82         413 :         if (pTok != 0)
      83         413 :             return pTok->GetTextStr();
      84             :     }
      85           0 :     return String::Null_();
      86             : }
      87             : 
      88             : String &
      89        5428 : DocuTex2::Access_TextOfFirstToken()
      90             : {
      91        5428 :     if (NOT aTokens.empty())
      92             :     {
      93             :         DT_TextToken *
      94        5428 :             pTok = dynamic_cast< DT_TextToken* >(*aTokens.begin());
      95             : 
      96        5428 :         if (pTok != 0)
      97        5428 :             return pTok->Access_Text();
      98             :     }
      99             : 
     100           0 :     static String sDummy_;
     101           0 :     return sDummy_;
     102             : }
     103             : 
     104             : 
     105             : 
     106           0 : void    DocuText_Display::Display_StdAtTag(
     107           0 :                             const csi::dsapi::DT_StdAtTag & ) {}
     108           0 : void    DocuText_Display::Display_SeeAlsoAtTag(
     109           0 :                             const csi::dsapi::DT_SeeAlsoAtTag & ) {}
     110           0 : void    DocuText_Display::Display_ParameterAtTag(
     111           0 :                             const csi::dsapi::DT_ParameterAtTag & ) {}
     112           0 : void    DocuText_Display::Display_SinceAtTag(
     113           0 :                             const csi::dsapi::DT_SinceAtTag & ) {}
     114             : 
     115             : 
     116             : 
     117             : }   // namespace inf
     118           3 : }   // namespace ary
     119             : 
     120             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10