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 : #define SwWebDocShell
37 : #include "swslots.hxx"
38 :
39 : #include <unomid.h>
40 :
41 434 : SFX_IMPL_INTERFACE(SwWebDocShell, SfxObjectShell, SW_RES(0) )
42 :
43 90 : void SwWebDocShell::InitInterface_Impl()
44 : {
45 90 : }
46 :
47 55962 : TYPEINIT1(SwWebDocShell, SwDocShell);
48 :
49 2136 : 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 8 : SwWebDocShell::~SwWebDocShell()
58 : {
59 8 : }
60 :
61 4 : void SwWebDocShell::FillClass( SvGlobalName * pClassName,
62 : sal_uInt32 * pClipFormat,
63 : OUString * /*pAppName*/,
64 : OUString * pLongUserName,
65 : OUString * pUserName,
66 : sal_Int32 nVersion,
67 : bool bTemplate /* = false */) const
68 : {
69 : (void)bTemplate;
70 : OSL_ENSURE( !bTemplate, "No template for Writer Web" );
71 :
72 4 : if (nVersion == SOFFICE_FILEFORMAT_60)
73 : {
74 0 : *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
75 0 : *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_60;
76 0 : *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
77 : }
78 4 : else if (nVersion == SOFFICE_FILEFORMAT_8)
79 : {
80 4 : *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
81 4 : *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_8;
82 4 : *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
83 : }
84 4 : *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME);
85 274 : }
86 :
87 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|