LibreOffice Module sw (master)  1
wdocsh.cxx
Go to the documentation of this file.
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/fileformat.h>
25 #include <comphelper/classids.hxx>
26 #include <sfx2/objface.hxx>
27 #include <osl/diagnose.h>
28 
29 #include <sfx2/msg.hxx>
30 #include <cmdid.h>
31 #include <swtypes.hxx>
32 
33 #include <shellio.hxx>
34 #include <wdocsh.hxx>
35 #include <strings.hrc>
36 
37 #include <sfx2/request.hxx>
38  // needed for -fsanitize=function visibility of typeinfo for functions of
39  // type void(SfxShell*,SfxRequest&) defined in swslots.hxx
40 #define ShellClass_SwWebDocShell
41 #include <swslots.hxx>
42 
43 #include <unomid.h>
44 
46 
47 void SwWebDocShell::InitInterface_Impl()
48 {
49 }
50 
51 
52 SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), "swriter/web" )
53 
55  : SwDocShell(SfxObjectCreateMode::STANDARD)
56  , m_nSourcePara(0)
57 {
58 }
59 
61 {
62 }
63 
65  SotClipboardFormatId * pClipFormat,
66  OUString * pLongUserName,
67  sal_Int32 nVersion,
68  bool bTemplate /* = false */) const
69 {
70  OSL_ENSURE( !bTemplate, "No template for Writer Web" );
71 
72  if (nVersion == SOFFICE_FILEFORMAT_60)
73  {
74  *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
75  *pClipFormat = SotClipboardFormatId::STARWRITERWEB_60;
76  *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE);
77  }
78  else if (nVersion == SOFFICE_FILEFORMAT_8)
79  {
80  *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 );
81  *pClipFormat = SotClipboardFormatId::STARWRITERWEB_8;
82  *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE);
83  }
84 }
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SFX_IMPL_SUPERCLASS_INTERFACE(DrawDocShell, SfxObjectShell)
virtual ~SwWebDocShell() override
Definition: wdocsh.cxx:60
#define SO3_SWWEB_CLASSID_60
SotClipboardFormatId
#define SOFFICE_FILEFORMAT_60
SfxObjectCreateMode
OUString SwResId(const char *pId)
Definition: swmodule.cxx:190
virtual void FillClass(SvGlobalName *pClassName, SotClipboardFormatId *pClipFormat, OUString *pLongUserName, sal_Int32 nFileFormat, bool bTemplate=false) const override
Definition: wdocsh.cxx:64
SFX_IMPL_OBJECTFACTORY(DrawDocShell, SvGlobalName(SO3_SIMPRESS_CLASSID),"simpress") void DrawDocShell
#define SOFFICE_FILEFORMAT_8