LCOV - code coverage report
Current view: top level - sw/source/uibase/globdoc - globdoc.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 8 18 44.4 %
Date: 2015-06-13 12:38:46 Functions: 9 14 64.3 %
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             : // Description: Register all filters
      32             : 
      33       17227 : TYPEINIT1(SwGlobalDocShell, SwDocShell);
      34             : 
      35         177 : SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter/GlobalDocument" )
      36             : 
      37           1 : SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
      38           1 :         SwDocShell(eMode)
      39             : {
      40           1 : }
      41             : 
      42           3 : SwGlobalDocShell::~SwGlobalDocShell()
      43             : {
      44           3 : }
      45             : 
      46           0 : void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
      47             :                                    SotClipboardFormatId * pClipFormat,
      48             :                                    OUString * /*pAppName*/,
      49             :                                    OUString * pLongUserName,
      50             :                                    OUString * pUserName,
      51             :                                    sal_Int32 nVersion,
      52             :                                    bool bTemplate /* = false */) const
      53             : {
      54           0 :     if (nVersion == SOFFICE_FILEFORMAT_60)
      55             :     {
      56           0 :         *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 );
      57           0 :         *pClipFormat = SotClipboardFormatId::STARWRITERGLOB_60;
      58           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE);
      59             :         OSL_ENSURE( !bTemplate, "No template for Writer Global" );
      60             :     }
      61           0 :     else if (nVersion == SOFFICE_FILEFORMAT_8)
      62             :     {
      63           0 :         *pClassName     = SvGlobalName( SO3_SWGLOB_CLASSID_60 );
      64           0 :         *pClipFormat    = bTemplate ? SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE : SotClipboardFormatId::STARWRITERGLOB_8;
      65           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE);
      66             :     }
      67             : 
      68           0 :     *pUserName = SW_RESSTR(STR_HUMAN_SWGLOBDOC_NAME);
      69         177 : }
      70             : 
      71             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11