xref: /aoo4110/main/sw/source/ui/web/wdocsh.cxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 
29 
30 #include <svl/srchitem.hxx>
31 #include <sfx2/app.hxx>
32 #ifndef _SVX_SVXIDS_HRC //autogen
33 #include <svx/svxids.hrc>
34 #endif
35 
36 #include <sot/clsids.hxx>
37 #include <sfx2/objface.hxx>
38 
39 #include <sfx2/msg.hxx>
40 #include "cfgid.h"
41 #include "cmdid.h"
42 #include "swtypes.hxx"
43 
44 #include "shellio.hxx"
45 // nur wegen des Itemtypes
46 #include "wdocsh.hxx"
47 #include "web.hrc"
48 
49 #define SwWebDocShell
50 #include "swslots.hxx"
51 
52 #include <unomid.h>
53 
54 
55 SFX_IMPL_INTERFACE( SwWebDocShell, SfxObjectShell, SW_RES(0) )
56 {
57 }
58 
59 TYPEINIT1(SwWebDocShell, SwDocShell);
60 
61 SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/web" )
62 
63 /*-----------------22.01.97 09.29-------------------
64 
65 --------------------------------------------------*/
66 
SwWebDocShell(SfxObjectCreateMode eMode)67 SwWebDocShell::SwWebDocShell(SfxObjectCreateMode eMode ) :
68 		SwDocShell(eMode),
69 		nSourcePara(0)
70 {
71 }
72 
73 /*-----------------22.01.97 09.29-------------------
74 
75 --------------------------------------------------*/
76 
~SwWebDocShell()77 SwWebDocShell::~SwWebDocShell()
78 {
79 }
80 
81 
82 
FillClass(SvGlobalName * pClassName,sal_uInt32 * pClipFormat,String *,String * pLongUserName,String * pUserName,sal_Int32 nVersion,sal_Bool bTemplate) const83 void SwWebDocShell::FillClass( SvGlobalName * pClassName,
84 								   sal_uInt32 * pClipFormat,
85                                    String * /*pAppName*/,
86 								   String * pLongUserName,
87                                    String * pUserName,
88                                    sal_Int32 nVersion,
89                                    sal_Bool bTemplate /* = sal_False */) const
90 {
91     (void)bTemplate;
92     DBG_ASSERT( bTemplate == sal_False, "No template for Writer Web" );
93 
94 	if (nVersion == SOFFICE_FILEFORMAT_60)
95 	{
96 		*pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
97 		*pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_60;
98 		*pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
99 	}
100 	else if (nVersion == SOFFICE_FILEFORMAT_8)
101 	{
102 		*pClassName		= SvGlobalName( SO3_SWWEB_CLASSID_60 );
103 		*pClipFormat	= SOT_FORMATSTR_ID_STARWRITERWEB_8;
104 		*pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE);
105 	}
106 	*pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME);
107 }
108 
109 
110 
111