LCOV - code coverage report
Current view: top level - sw/source/uibase/web - wdocsh.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 18 21 85.7 %
Date: 2015-06-13 12:38:46 Functions: 14 18 77.8 %
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 <svl/srchitem.hxx>
      21             : #include <sfx2/app.hxx>
      22             : #include <svx/svxids.hrc>
      23             : 
      24             : #include <comphelper/classids.hxx>
      25             : #include <sfx2/objface.hxx>
      26             : 
      27             : #include <sfx2/msg.hxx>
      28             : #include "cfgid.h"
      29             : #include "cmdid.h"
      30             : #include "swtypes.hxx"
      31             : 
      32             : #include "shellio.hxx"
      33             : #include "wdocsh.hxx"
      34             : #include "web.hrc"
      35             : 
      36             : #include <sfx2/request.hxx>
      37             :     // needed for -fsanitize=function visibility of typeinfo for functions of
      38             :     // type void(SfxShell*,SfxRequest&) defined in swslots.hxx
      39             : #define SwWebDocShell
      40             : #include "swslots.hxx"
      41             : 
      42             : #include <unomid.h>
      43             : 
      44         267 : SFX_IMPL_SUPERCLASS_INTERFACE(SwWebDocShell, SfxObjectShell)
      45             : 
      46          59 : void SwWebDocShell::InitInterface_Impl()
      47             : {
      48          59 : }
      49             : 
      50       36613 : TYPEINIT1(SwWebDocShell, SwDocShell);
      51             : 
      52        1174 : SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter/web" )
      53             : 
      54           3 : SwWebDocShell::SwWebDocShell(SfxObjectCreateMode const eMode)
      55             :     : SwDocShell(eMode)
      56           3 :     , m_nSourcePara(0)
      57             : {
      58           3 : }
      59             : 
      60           9 : SwWebDocShell::~SwWebDocShell()
      61             : {
      62           9 : }
      63             : 
      64           2 : void SwWebDocShell::FillClass( SvGlobalName * pClassName,
      65             :                                    SotClipboardFormatId * pClipFormat,
      66             :                                    OUString * /*pAppName*/,
      67             :                                    OUString * pLongUserName,
      68             :                                    OUString * pUserName,
      69             :                                    sal_Int32 nVersion,
      70             :                                    bool bTemplate /* = false */) const
      71             : {
      72             :     (void)bTemplate;
      73             :     OSL_ENSURE( !bTemplate, "No template for Writer Web" );
      74             : 
      75           2 :     if (nVersion == SOFFICE_FILEFORMAT_60)
      76             :     {
      77           0 :         *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
      78           0 :         *pClipFormat = SotClipboardFormatId::STARWRITERWEB_60;
      79           0 :         *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
      80             :     }
      81           2 :     else if (nVersion == SOFFICE_FILEFORMAT_8)
      82             :     {
      83           2 :         *pClassName     = SvGlobalName( SO3_SWWEB_CLASSID_60 );
      84           2 :         *pClipFormat    = SotClipboardFormatId::STARWRITERWEB_8;
      85           2 :         *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
      86             :     }
      87           2 :     *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME);
      88         179 : }
      89             : 
      90             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11