LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/display/idl - hi_linkhelper.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 27 28 96.4 %
Date: 2012-12-27 Functions: 7 7 100.0 %
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 "hi_linkhelper.hxx"
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <ary/idl/i_module.hxx>
      26             : 
      27             : 
      28             : 
      29             : 
      30             : const ary::idl::Module *
      31         998 : LinkHelper::Search_CurModule() const
      32             : {
      33         998 :     return Search_Module( rEnv.CurPosition().RelatedNode() );
      34             : }
      35             : 
      36             : const ary::idl::Module *
      37         998 : LinkHelper::Search_Module( output::Node & i_node ) const
      38             : {
      39         998 :     static StringVector aNames_;
      40             : 
      41             :     output::Node::relative_id
      42         998 :         nId = i_node.RelatedNameRoom();
      43         998 :     if (nId == 0)
      44             :     {
      45          55 :         csv::erase_container(aNames_);
      46          55 :         i_node.Get_Chain(aNames_);
      47             :         const ary::idl::Module *  pModule =
      48          55 :             rEnv.Data().Search_Module(aNames_);
      49          55 :         if ( pModule == 0 )
      50           0 :             return 0;
      51          55 :         nId = static_cast<output::Node::relative_id>(pModule->Id());
      52          55 :         rEnv.CurPosition().RelatedNode().Set_RelatedNameRoom(nId);
      53             :     }
      54             : 
      55         998 :     return & rEnv.Data().Find_Module( ary::idl::Ce_id(nId) );
      56             : }
      57             : 
      58             : namespace
      59             : {
      60           1 :     const String C_sXrefsSuffix("-xref");
      61             : }
      62             : 
      63             : 
      64             : LinkHelper::OutPosition
      65        3551 : LinkHelper::PositionOf_CurXRefs( const String & i_ceName ) const
      66             : {
      67        3551 :     StreamLock sl(100);
      68        3551 :     return OutPosition( rEnv.CurPosition(),
      69        3551 :                         sl()    << i_ceName
      70        3551 :                                 << C_sXrefsSuffix
      71        3551 :                                 << ".html"
      72        7102 :                                 << c_str );
      73             : }
      74             : 
      75             : const String &
      76        3551 : LinkHelper::XrefsSuffix() const
      77             : {
      78        3551 :     return C_sXrefsSuffix;
      79             : }
      80             : 
      81             : 
      82             : String
      83       21906 : nameChainLinker( SAL_UNUSED_PARAMETER const char * )
      84             : {
      85             :     static const String
      86       21906 :         sModuleFileName_( output::ModuleFileName() );
      87       21906 :     return sModuleFileName_;
      88           3 : }
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10