1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_sw.hxx" 30 31 32 33 34 #include <svl/srchitem.hxx> 35 #include <sfx2/app.hxx> 36 #ifndef _SVX_SVXIDS_HRC //autogen 37 #include <svx/svxids.hrc> 38 #endif 39 40 #include <sot/clsids.hxx> 41 #include <sfx2/objface.hxx> 42 43 #include <sfx2/msg.hxx> 44 #include "cfgid.h" 45 #include "cmdid.h" 46 #include "swtypes.hxx" 47 48 #include "shellio.hxx" 49 // nur wegen des Itemtypes 50 #include "wdocsh.hxx" 51 #include "web.hrc" 52 53 #define SwWebDocShell 54 #include "swslots.hxx" 55 56 #include <unomid.h> 57 58 59 SFX_IMPL_INTERFACE( SwWebDocShell, SfxObjectShell, SW_RES(0) ) 60 { 61 } 62 63 TYPEINIT1(SwWebDocShell, SwDocShell); 64 65 SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/web" ) 66 67 /*-----------------22.01.97 09.29------------------- 68 69 --------------------------------------------------*/ 70 71 SwWebDocShell::SwWebDocShell(SfxObjectCreateMode eMode ) : 72 SwDocShell(eMode), 73 nSourcePara(0) 74 { 75 } 76 77 /*-----------------22.01.97 09.29------------------- 78 79 --------------------------------------------------*/ 80 81 SwWebDocShell::~SwWebDocShell() 82 { 83 } 84 85 86 87 void SwWebDocShell::FillClass( SvGlobalName * pClassName, 88 sal_uInt32 * pClipFormat, 89 String * /*pAppName*/, 90 String * pLongUserName, 91 String * pUserName, 92 sal_Int32 nVersion, 93 sal_Bool bTemplate /* = sal_False */) const 94 { 95 (void)bTemplate; 96 DBG_ASSERT( bTemplate == sal_False, "No template for Writer Web" ); 97 98 if (nVersion == SOFFICE_FILEFORMAT_60) 99 { 100 *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); 101 *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_60; 102 *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); 103 } 104 else if (nVersion == SOFFICE_FILEFORMAT_8) 105 { 106 *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); 107 *pClipFormat = SOT_FORMATSTR_ID_STARWRITERWEB_8; 108 *pLongUserName = SW_RESSTR(STR_WRITER_WEBDOC_FULLTYPE); 109 } 110 *pUserName = SW_RESSTR(STR_HUMAN_SWWEBDOC_NAME); 111 } 112 113 114 115