LCOV - code coverage report
Current view: top level - extensions/source/bibliography - bibmod.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 38 0.0 %
Date: 2014-04-14 Functions: 0 9 0.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 <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           0 : HdlBibModul OpenBibModul()
      42             : {
      43           0 :     if(pBibModul==NULL)
      44             :     {
      45           0 :         pBibModul=new BibModul();
      46             :     }
      47           0 :     nBibModulCount++;
      48           0 :     return &pBibModul;
      49             : }
      50             : 
      51           0 : void CloseBibModul(HdlBibModul ppBibModul)
      52             : {
      53           0 :     nBibModulCount--;
      54           0 :     if(nBibModulCount==0 && ppBibModul!=NULL)
      55             :     {
      56           0 :         delete pBibModul;
      57           0 :         pBibModul=NULL;
      58             :     }
      59           0 : }
      60             : 
      61           0 : BibResId::BibResId( sal_uInt16 nId ) :
      62           0 :     ResId( nId, *pBibModul->GetResMgr() )
      63             : {
      64           0 : }
      65             : BibConfig* BibModul::pBibConfig = 0;
      66           0 : BibModul::BibModul()
      67             : {
      68           0 :     pResMgr = ResMgr::CreateResMgr( "bib" );
      69           0 : }
      70             : 
      71           0 : BibModul::~BibModul()
      72             : {
      73           0 :     delete pResMgr;
      74           0 :     delete pBibConfig;
      75           0 :     pBibConfig = 0;
      76           0 : }
      77             : 
      78           0 : BibDataManager*  BibModul::createDataManager()
      79             : {
      80           0 :     return new BibDataManager();
      81             : }
      82             : 
      83           0 : BibConfig*  BibModul::GetConfig()
      84             : {
      85           0 :     if(! pBibConfig)
      86           0 :         pBibConfig = new BibConfig;
      87           0 :     return pBibConfig;
      88             : }
      89             : 
      90             : 
      91             : // PropertyNames
      92             : #define STATIC_USTRING(a,b) OUString a(b)
      93           0 : STATIC_USTRING(FM_PROP_LABEL,"Label");
      94           0 : STATIC_USTRING(FM_PROP_CONTROLSOURCE,"DataField");
      95           0 : STATIC_USTRING(FM_PROP_NAME,"Name");
      96           0 : STATIC_USTRING(FM_PROP_FORMATKEY,"FormatKey");
      97           0 : STATIC_USTRING(FM_PROP_EDITMODE,"RecordMode");
      98           0 : STATIC_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType");
      99           0 : STATIC_USTRING(FM_PROP_CURSORSOURCE,"DataSelection");
     100           0 : STATIC_USTRING(FM_PROP_DATASOURCE, "DataSource");
     101           0 : STATIC_USTRING(FM_PROP_VALUE,"Value");
     102           0 : STATIC_USTRING(FM_PROP_TEXT,"Text");
     103             : 
     104             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10