/src/libreoffice/sw/source/uibase/globdoc/globdoc.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 <comphelper/fileformat.h> |
21 | | #include <comphelper/classids.hxx> |
22 | | #include <osl/diagnose.h> |
23 | | #include <sot/formats.hxx> |
24 | | #include <tools/globname.hxx> |
25 | | |
26 | | #include <swtypes.hxx> |
27 | | #include <globdoc.hxx> |
28 | | #include <strings.hrc> |
29 | | |
30 | | // Description: Register all filters |
31 | | |
32 | | |
33 | | SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), u"swriter/GlobalDocument"_ustr ) |
34 | | |
35 | | SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) : |
36 | 0 | SwDocShell(eMode) |
37 | 0 | { |
38 | 0 | } |
39 | | |
40 | | SwGlobalDocShell::~SwGlobalDocShell() |
41 | 0 | { |
42 | 0 | } |
43 | | |
44 | | void SwGlobalDocShell::FillClass( SvGlobalName * pClassName, |
45 | | SotClipboardFormatId * pClipFormat, |
46 | | OUString * pLongUserName, |
47 | | sal_Int32 nVersion, |
48 | | bool bTemplate /* = false */) const |
49 | 0 | { |
50 | 0 | if (nVersion == SOFFICE_FILEFORMAT_60) |
51 | 0 | { |
52 | 0 | *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); |
53 | 0 | *pClipFormat = SotClipboardFormatId::STARWRITERGLOB_60; |
54 | 0 | *pLongUserName = SwResId(STR_WRITER_GLOBALDOC_FULLTYPE); |
55 | 0 | OSL_ENSURE( !bTemplate, "No template for Writer Global" ); |
56 | 0 | } |
57 | 0 | else if (nVersion == SOFFICE_FILEFORMAT_8) |
58 | 0 | { |
59 | 0 | *pClassName = SvGlobalName( SO3_SWGLOB_CLASSID_60 ); |
60 | 0 | *pClipFormat = bTemplate ? SotClipboardFormatId::STARWRITERGLOB_8_TEMPLATE : SotClipboardFormatId::STARWRITERGLOB_8; |
61 | 0 | *pLongUserName = SwResId(STR_WRITER_GLOBALDOC_FULLTYPE); |
62 | 0 | } |
63 | 0 | } |
64 | | |
65 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |