LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/display/idl - hfi_constgroup.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 39 39 100.0 %
Date: 2012-12-27 Functions: 7 8 87.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 "hfi_constgroup.hxx"
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <ary/idl/i_ce.hxx>
      26             : #include <ary/idl/ik_constgroup.hxx>
      27             : #include <toolkit/hf_linachain.hxx>
      28             : #include <toolkit/hf_navi_sub.hxx>
      29             : #include <toolkit/hf_title.hxx>
      30             : #include "hfi_navibar.hxx"
      31             : #include "hfi_property.hxx"
      32             : #include "hi_linkhelper.hxx"
      33             : 
      34             : 
      35             : extern const String
      36           1 :     C_sCePrefix_Constants("constants group");
      37             : 
      38             : 
      39             : namespace
      40             : {
      41             : 
      42             : const String
      43           1 :     C_sList_Constants("Constants");
      44             : const String
      45           1 :     C_sList_Constants_Label("Constants");
      46             : const String
      47           1 :     C_sList_ConstantDetails("Constants' Details");
      48             : const String
      49           1 :     C_sList_ConstantDetails_Label("ConstantDetails");
      50             : 
      51             : enum E_SubListIndices
      52             : {
      53             :     sli_ConstantsSummary = 0,
      54             :     sli_ConstantDetails = 1
      55             : };
      56             : 
      57             : 
      58             : }   // anonymous namespace
      59             : 
      60             : 
      61             : 
      62         347 : HF_IdlConstGroup::HF_IdlConstGroup( Environment &   io_rEnv,
      63             :                                     Xml::Element &  o_rOut )
      64         347 :     :   HtmlFactory_Idl(io_rEnv, &o_rOut)
      65             : {
      66         347 : }
      67             : 
      68         347 : HF_IdlConstGroup::~HF_IdlConstGroup()
      69             : {
      70         347 : }
      71             : 
      72             : void
      73         347 : HF_IdlConstGroup::Produce_byData( const client & i_ce ) const
      74             : {
      75             :     Dyn<HF_NaviSubRow>
      76         347 :         pNaviSubRow( &make_Navibar(i_ce) );
      77             : 
      78             :     HF_TitleTable
      79         347 :         aTitle(CurOut());
      80             :     HF_LinkedNameChain
      81         347 :         aNameChain(aTitle.Add_Row());
      82             : 
      83         347 :     aNameChain.Produce_CompleteChain(Env().CurPosition(), nameChainLinker);
      84         347 :     produce_Title(aTitle, C_sCePrefix_Constants, i_ce);
      85             : 
      86         347 :     write_Docu(aTitle.Add_Row(), i_ce);
      87         347 :     CurOut() << new Html::HorizontalLine();
      88             : 
      89             :     dyn_ce_list
      90         347 :         dpConstants;
      91         347 :     ary::idl::ifc_constgroup::attr::Get_Constants(dpConstants, i_ce);
      92             : 
      93         347 :     if ( (*dpConstants).operator bool() )
      94             :     {
      95         347 :         produce_Members( *dpConstants,
      96             :                          C_sList_Constants,
      97             :                          C_sList_Constants_Label,
      98             :                          C_sList_ConstantDetails,
      99         347 :                          C_sList_ConstantDetails_Label );
     100         347 :         pNaviSubRow->SwitchOn(sli_ConstantsSummary);
     101         347 :         pNaviSubRow->SwitchOn(sli_ConstantDetails);
     102             :     }
     103         347 :     pNaviSubRow->Produce_Row();
     104         347 : }
     105             : 
     106             : HF_NaviSubRow &
     107         347 : HF_IdlConstGroup::make_Navibar( const client & i_ce ) const
     108             : {
     109             :     HF_IdlNavigationBar
     110         347 :         aNaviBar(Env(), CurOut());
     111         347 :     aNaviBar.Produce_CeMainRow(i_ce,true);  // true := avoid link to Use-page.
     112             : 
     113             :     DYN HF_NaviSubRow &
     114         347 :         ret = aNaviBar.Add_SubRow();
     115         347 :     ret.AddItem(C_sList_Constants, C_sList_Constants_Label, false);
     116         347 :     ret.AddItem(C_sList_ConstantDetails, C_sList_ConstantDetails_Label, false);
     117             : 
     118         347 :     CurOut() << new Html::HorizontalLine();
     119         347 :     return ret;
     120             : }
     121             : 
     122             : void
     123        3220 : HF_IdlConstGroup::produce_MemberDetails( HF_SubTitleTable &  o_table,
     124             :                                          const client &      i_ce ) const
     125             : {
     126             :     HF_IdlConstant
     127        3220 :         aElement( Env(), o_table );
     128        3220 :     aElement.Produce_byData(i_ce);
     129        3223 : }
     130             : 
     131             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10