/src/libreoffice/sw/source/uibase/web/wdocsh.cxx
Line | Count | Source |
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 <svx/svxids.hrc> |
21 | | |
22 | | #include <comphelper/fileformat.h> |
23 | | #include <comphelper/classids.hxx> |
24 | | #include <sfx2/objface.hxx> |
25 | | #include <sot/formats.hxx> |
26 | | #include <tools/globname.hxx> |
27 | | #include <osl/diagnose.h> |
28 | | |
29 | | #include <sfx2/msg.hxx> |
30 | | #include <swtypes.hxx> |
31 | | |
32 | | #include <wdocsh.hxx> |
33 | | #include <strings.hrc> |
34 | | |
35 | | // needed for -fsanitize=function visibility of typeinfo for functions of |
36 | | // type void(SfxShell*,SfxRequest&) defined in swslots.hxx |
37 | | #define ShellClass_SwWebDocShell |
38 | | #include <swslots.hxx> |
39 | | |
40 | | SFX_IMPL_SUPERCLASS_INTERFACE(SwWebDocShell, SfxObjectShell) |
41 | | |
42 | | void SwWebDocShell::InitInterface_Impl() |
43 | 9 | { |
44 | 9 | } |
45 | | |
46 | | |
47 | | SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), u"swriter/web"_ustr ) |
48 | | |
49 | | SwWebDocShell::SwWebDocShell() |
50 | 0 | : SwDocShell(SfxObjectCreateMode::STANDARD) |
51 | 0 | , m_nSourcePara(0) |
52 | 0 | { |
53 | 0 | } |
54 | | |
55 | | SwWebDocShell::~SwWebDocShell() |
56 | 0 | { |
57 | 0 | } |
58 | | |
59 | | void SwWebDocShell::FillClass( SvGlobalName * pClassName, |
60 | | SotClipboardFormatId * pClipFormat, |
61 | | OUString * pLongUserName, |
62 | | sal_Int32 nVersion, |
63 | | bool bTemplate /* = false */) const |
64 | 0 | { |
65 | 0 | OSL_ENSURE( !bTemplate, "No template for Writer Web" ); |
66 | |
|
67 | 0 | if (nVersion == SOFFICE_FILEFORMAT_60) |
68 | 0 | { |
69 | 0 | *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); |
70 | 0 | *pClipFormat = SotClipboardFormatId::STARWRITERWEB_60; |
71 | 0 | *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE); |
72 | 0 | } |
73 | 0 | else if (nVersion == SOFFICE_FILEFORMAT_8) |
74 | 0 | { |
75 | 0 | *pClassName = SvGlobalName( SO3_SWWEB_CLASSID_60 ); |
76 | 0 | *pClipFormat = SotClipboardFormatId::STARWRITERWEB_8; |
77 | 0 | *pLongUserName = SwResId(STR_WRITER_WEBDOC_FULLTYPE); |
78 | 0 | } |
79 | 0 | } |
80 | | |
81 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |