LCOV - code coverage report
Current view: top level - sw/source/uibase/globdoc - globdoc.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 3 19 15.8 %
Date: 2014-11-03 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             : // Description: Register all filters
      32             : 
      33       29214 : TYPEINIT1(SwGlobalDocShell, SwDocShell);
      34             : 
      35         270 : SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/GlobalDocument" )
      36             : 
      37           0 : SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
      38           0 :         SwDocShell(eMode)
      39             : {
      40           0 : }
      41             : 
      42           0 : SwGlobalDocShell::~SwGlobalDocShell()
      43             : {
      44           0 : }
      45             : 
      46           0 : void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
      47             :                                    sal_uInt32 * 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 = SOT_FORMATSTR_ID_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    = SOT_FORMATSTR_ID_STARWRITERGLOB_8;
      65           0 :         *pClipFormat    = bTemplate ? SOT_FORMATSTR_ID_STARWRITERGLOB_8_TEMPLATE : SOT_FORMATSTR_ID_STARWRITERGLOB_8;
      66           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_GLOBALDOC_FULLTYPE);
      67             :     }
      68             : 
      69           0 :     *pUserName = SW_RESSTR(STR_HUMAN_SWGLOBDOC_NAME);
      70         270 : }
      71             : 
      72             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10