LCOV - code coverage report
Current view: top level - extensions/source/bibliography - bibmod.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 38 26.3 %
Date: 2012-08-25 Functions: 2 9 22.2 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 26 7.7 %

           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 <tools/resmgr.hxx>
      21                 :            : #include <svl/urihelper.hxx>
      22                 :            : #include <com/sun/star/container/XNameAccess.hpp>
      23                 :            : #include <com/sun/star/util/XLocalizedAliases.hpp>
      24                 :            : #include <com/sun/star/lang/XLocalizable.hpp>
      25                 :            : 
      26                 :            : #include "bibmod.hxx"
      27                 :            : #include "bibresid.hxx"
      28                 :            : #include "datman.hxx"
      29                 :            : #include "bibconfig.hxx"
      30                 :            : static PtrBibModul pBibModul=NULL;
      31                 :            : static sal_uInt32 nBibModulCount=0;
      32                 :            : #include <ucbhelper/content.hxx>
      33                 :            : 
      34                 :            : using namespace ::rtl;
      35                 :            : using namespace ::com::sun::star;
      36                 :            : using namespace ::com::sun::star::uno;
      37                 :            : using namespace ::com::sun::star::util;
      38                 :            : using namespace ::com::sun::star::lang;
      39                 :            : using namespace ::com::sun::star::ucb;
      40                 :            : 
      41                 :            : #define C2U(cChar) OUString::createFromAscii(cChar)
      42                 :            : #define C2S(cChar) String::CreateFromAscii(cChar)
      43                 :            : 
      44                 :          0 : HdlBibModul OpenBibModul()
      45                 :            : {
      46         [ #  # ]:          0 :     if(pBibModul==NULL)
      47                 :            :     {
      48         [ #  # ]:          0 :         pBibModul=new BibModul();
      49                 :            :     }
      50                 :          0 :     nBibModulCount++;
      51                 :          0 :     return &pBibModul;
      52                 :            : }
      53                 :            : 
      54                 :          0 : void CloseBibModul(HdlBibModul ppBibModul)
      55                 :            : {
      56                 :          0 :     nBibModulCount--;
      57 [ #  # ][ #  # ]:          0 :     if(nBibModulCount==0 && ppBibModul!=NULL)
      58                 :            :     {
      59         [ #  # ]:          0 :         delete pBibModul;
      60                 :          0 :         pBibModul=NULL;
      61                 :            :     }
      62                 :          0 : }
      63                 :            : 
      64                 :          0 : BibResId::BibResId( sal_uInt16 nId ) :
      65                 :          0 :     ResId( nId, *pBibModul->GetResMgr() )
      66                 :            : {
      67                 :          0 : }
      68                 :            : BibConfig* BibModul::pBibConfig = 0;
      69                 :          0 : BibModul::BibModul()
      70                 :            : {
      71         [ #  # ]:          0 :     pResMgr = ResMgr::CreateResMgr( "bib" );
      72                 :          0 : }
      73                 :            : 
      74                 :          0 : BibModul::~BibModul()
      75                 :            : {
      76         [ #  # ]:          0 :     delete pResMgr;
      77         [ #  # ]:          0 :     delete pBibConfig;
      78                 :          0 :     pBibConfig = 0;
      79                 :          0 : }
      80                 :            : 
      81                 :          0 : BibDataManager*  BibModul::createDataManager()
      82                 :            : {
      83         [ #  # ]:          0 :     return new BibDataManager();
      84                 :            : }
      85                 :            : //-----------------------------------------------------------------------------
      86                 :          0 : BibConfig*  BibModul::GetConfig()
      87                 :            : {
      88         [ #  # ]:          0 :     if(! pBibConfig)
      89         [ #  # ]:          0 :         pBibConfig = new BibConfig;
      90                 :          0 :     return pBibConfig;
      91                 :            : }
      92                 :            : 
      93                 :            : 
      94                 :            : // PropertyNames
      95                 :            : #define STATIC_USTRING(a,b) rtl::OUString a(b)
      96                 :          2 : STATIC_USTRING(FM_PROP_LABEL,C2U("Label"));
      97                 :          2 : STATIC_USTRING(FM_PROP_CONTROLSOURCE,C2U("DataField"));
      98                 :          2 : STATIC_USTRING(FM_PROP_NAME,C2U("Name"));
      99                 :          2 : STATIC_USTRING(FM_PROP_FORMATKEY,C2U("FormatKey"));
     100                 :          2 : STATIC_USTRING(FM_PROP_EDITMODE,C2U("RecordMode"));
     101                 :          2 : STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,C2U("DataSelectionType"));
     102                 :          2 : STATIC_USTRING(FM_PROP_CURSORSOURCE,C2U("DataSelection"));
     103                 :          2 : STATIC_USTRING(FM_PROP_DATASOURCE, C2U("DataSource"));
     104                 :          2 : STATIC_USTRING(FM_PROP_VALUE,C2U("Value"));
     105 [ +  - ][ +  - ]:          6 : STATIC_USTRING(FM_PROP_TEXT,C2U("Text"));
     106                 :            : 
     107                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10