LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/source/ui/globdoc - globdoc.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 18 16.7 %
Date: 2013-07-09 Functions: 4 14 28.6 %
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 <comphelper/classids.hxx>
      21             : #include <unotools/moduleoptions.hxx>
      22             : 
      23             : #include <unomid.h>
      24             : 
      25             : #include "swtypes.hxx"
      26             : #include "shellio.hxx"
      27             : #include "globdoc.hxx"
      28             : #include "globdoc.hrc"
      29             : #include "cfgid.h"
      30             : 
      31             : 
      32             : 
      33             : // Description: Register all filters
      34             : 
      35        3912 : TYPEINIT1(SwGlobalDocShell, SwDocShell);
      36             : 
      37          96 : SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/GlobalDocument" )
      38             : 
      39           0 : SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
      40           0 :         SwDocShell(eMode)
      41             : {
      42           0 : }
      43             : 
      44           0 : SwGlobalDocShell::~SwGlobalDocShell()
      45             : {
      46           0 : }
      47             : 
      48           0 : void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
      49             :                                    sal_uInt32 * pClipFormat,
      50             :                                    OUString * /*pAppName*/,
      51             :                                    OUString * pLongUserName,
      52             :                                    OUString * pUserName,
      53             :                                    sal_Int32 nVersion,
      54             :                                    sal_Bool bTemplate /* = sal_False */) const
      55             : {
      56             :     (void)bTemplate;
      57             :     OSL_ENSURE( bTemplate == sal_False, "No template for Writer Global" );
      58             : 
      59           0 :     if (nVersion == SOFFICE_FILEFORMAT_60)
      60             :     {
      61           0 :         *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 );
      62           0 :         *pClipFormat = SOT_FORMATSTR_ID_STARWRITERGLOB_60;
      63           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE);
      64             :     }
      65           0 :     else if (nVersion == SOFFICE_FILEFORMAT_8)
      66             :     {
      67           0 :         *pClassName     = SvGlobalName( SO3_SWGLOB_CLASSID_60 );
      68           0 :         *pClipFormat    = SOT_FORMATSTR_ID_STARWRITERGLOB_8;
      69           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE);
      70             :     }
      71             : 
      72           0 :     *pUserName = SW_RESSTR(STR_HUMAN_SWGLOBDOC_NAME);
      73          99 : }
      74             : 
      75             : 
      76             : 
      77             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10