Branch data 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 <sot/clsids.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 : : // nur wegen des Itemtypes
34 : : #include "wdocsh.hxx"
35 : : #include "web.hrc"
36 : :
37 : : #define SwWebDocShell
38 : : #include "swslots.hxx"
39 : :
40 : : #include <unomid.h>
41 : :
42 : :
43 [ + + ][ + - ]: 571 : SFX_IMPL_INTERFACE( SwWebDocShell, SfxObjectShell, SW_RES(0) )
[ + - ][ + - ]
44 : : {
45 : 73 : }
46 : :
47 [ + + ][ + + ]: 23605 : TYPEINIT1(SwWebDocShell, SwDocShell);
48 : :
49 [ + + ][ + - ]: 2324 : SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/web" )
[ + - ][ + - ]
[ + - ][ # # ]
50 : :
51 : 4 : SwWebDocShell::SwWebDocShell(SfxObjectCreateMode eMode ) :
52 : : SwDocShell(eMode),
53 [ + - ][ + - ]: 4 : nSourcePara(0)
[ # # ]
54 : : {
55 : 4 : }
56 : :
57 [ + - ][ + - ]: 12 : SwWebDocShell::~SwWebDocShell()
[ # # ][ # # ]
58 : : {
59 [ + - ][ + - ]: 16 : }
[ - + ]
[ # # # # ]
[ # # ][ # # ]
[ # # ]
[ # # # # ]
60 : :
61 : :
62 : :
63 : 4 : void SwWebDocShell::FillClass( SvGlobalName * pClassName,
64 : : sal_uInt32 * pClipFormat,
65 : : String * /*pAppName*/,
66 : : String * pLongUserName,
67 : : String * pUserName,
68 : : sal_Int32 nVersion,
69 : : sal_Bool bTemplate /* = sal_False */) const
70 : : {
71 : : (void)bTemplate;
72 : : OSL_ENSURE( bTemplate == sal_False, "No template for Writer Web" );
73 : :
74 [ - + ]: 4 : if (nVersion == SOFFICE_FILEFORMAT_60)
75 : : {
76 [ # # ]: 0 : *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
77 : 0 : *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_60;
78 [ # # ][ # # ]: 0 : *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
79 : : }
80 [ + - ]: 4 : else if (nVersion == SOFFICE_FILEFORMAT_8)
81 : : {
82 [ + - ]: 4 : *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
83 : 4 : *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_8;
84 [ + - ][ + - ]: 4 : *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
85 : : }
86 [ + - ][ + - ]: 4 : *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME);
87 : 4 : }
88 : :
89 : :
90 : :
91 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|