LibreOffice Module unotools (master) 1
mediadescriptor.hxx
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#ifndef INCLUDED_UNOTOOLS_MEDIADESCRIPTOR_HXX
21#define INCLUDED_UNOTOOLS_MEDIADESCRIPTOR_HXX
22
23#include <sal/config.h>
24
25#include <vector>
26
29#include <rtl/ustring.hxx>
31
32namespace com::sun::star::io {
33 class XInputStream;
34}
35namespace comphelper { class IDocPasswordVerifier; }
36
37namespace utl {
38
50{
51 public:
52
60 static constexpr OUStringLiteral PROP_ABORTED = u"Aborted";
61 static constexpr OUStringLiteral PROP_ASTEMPLATE = u"AsTemplate";
62 static constexpr OUStringLiteral PROP_COMPONENTDATA = u"ComponentData";
63 static constexpr OUStringLiteral PROP_DOCUMENTSERVICE = u"DocumentService";
64 static constexpr OUStringLiteral PROP_ENCRYPTIONDATA = u"EncryptionData";
65 static constexpr OUStringLiteral PROP_FILENAME = u"FileName";
66 static constexpr OUStringLiteral PROP_FILTERNAME = u"FilterName";
67 static constexpr OUStringLiteral PROP_FILTERPROVIDER = u"FilterProvider";
68 static constexpr OUStringLiteral PROP_FILTEROPTIONS = u"FilterOptions";
69 static constexpr OUStringLiteral PROP_FRAME = u"Frame";
70 static constexpr OUStringLiteral PROP_FRAMENAME = u"FrameName";
71 static constexpr OUStringLiteral PROP_HIDDEN = u"Hidden";
72 static constexpr OUStringLiteral PROP_INPUTSTREAM = u"InputStream";
73 static constexpr OUStringLiteral PROP_INTERACTIONHANDLER = u"InteractionHandler";
74 static constexpr OUStringLiteral PROP_AUTHENTICATIONHANDLER = u"AuthenticationHandler";
75 static constexpr OUStringLiteral PROP_JUMPMARK = u"JumpMark";
76 static constexpr OUStringLiteral PROP_MACROEXECUTIONMODE = u"MacroExecutionMode";
77 static constexpr OUStringLiteral PROP_MEDIATYPE = u"MediaType";
78 static constexpr OUStringLiteral PROP_MINIMIZED = u"Minimized";
79 static constexpr OUStringLiteral PROP_NOAUTOSAVE = u"NoAutoSave";
80 static constexpr OUStringLiteral PROP_OPENNEWVIEW = u"OpenNewView";
81 static constexpr OUStringLiteral PROP_OUTPUTSTREAM = u"OutputStream";
82 static constexpr OUStringLiteral PROP_PASSWORD = u"Password";
83 static constexpr OUStringLiteral PROP_POSTDATA = u"PostData";
84 static constexpr OUStringLiteral PROP_PREVIEW = u"Preview";
85 static constexpr OUStringLiteral PROP_READONLY = u"ReadOnly";
86 static constexpr OUStringLiteral PROP_REFERRER = u"Referer";
87 static constexpr OUStringLiteral PROP_REPLACEABLE = u"Replaceable";
88 static constexpr OUStringLiteral PROP_SALVAGEDFILE = u"SalvagedFile";
89 static constexpr OUStringLiteral PROP_SILENT = u"Silent";
90 static constexpr OUStringLiteral PROP_STATUSINDICATOR = u"StatusIndicator";
91 static constexpr OUStringLiteral PROP_STREAM = u"Stream";
92 static constexpr OUStringLiteral PROP_STREAMFOROUTPUT = u"StreamForOutput";
93 static constexpr OUStringLiteral PROP_TEMPLATENAME = u"TemplateName";
94 static constexpr OUStringLiteral PROP_TITLE = u"Title";
95 static constexpr OUStringLiteral PROP_TYPENAME = u"TypeName";
96 static constexpr OUStringLiteral PROP_UCBCONTENT = u"UCBContent";
97 static constexpr OUStringLiteral PROP_UPDATEDOCMODE = u"UpdateDocMode";
98 static constexpr OUStringLiteral PROP_URL = u"URL";
99 static constexpr OUStringLiteral PROP_VERSION = u"Version";
100 static constexpr OUStringLiteral PROP_DOCUMENTTITLE = u"DocumentTitle";
101 static constexpr OUStringLiteral PROP_MODEL = u"Model";
102 static constexpr OUStringLiteral PROP_VIEWONLY = u"ViewOnly";
103 static constexpr OUStringLiteral PROP_DOCUMENTBASEURL = u"DocumentBaseURL";
104 static constexpr OUStringLiteral PROP_SUGGESTEDSAVEASNAME = u"SuggestedSaveAsName";
105 static constexpr OUStringLiteral PROP_AUTOSAVEEVENT = u"AutoSaveEvent";
106
107 // interface
108 public:
109
117 MediaDescriptor(const css::uno::Sequence< css::beans::PropertyValue >& lSource);
118
134 bool addInputStream();
135
152 bool addInputStreamOwnLock();
153
171 bool isStreamReadOnly() const;
172
184 css::uno::Any getComponentDataEntry(
185 const OUString& rName ) const;
186
202 void setComponentDataEntry(
203 const OUString& rName,
204 const css::uno::Any& rValue );
205
217 void clearComponentDataEntry(
218 const OUString& rName );
219
260 css::uno::Sequence< css::beans::NamedValue > requestAndVerifyDocPassword(
263 const ::std::vector< OUString >* pDefaultPasswords );
264
265 // helper
266 private:
267
287 SAL_DLLPRIVATE bool impl_openStreamWithPostData(
288 const css::uno::Reference< css::io::XInputStream >& _rxPostData
289 );
290
312 SAL_DLLPRIVATE bool impl_openStreamWithURL(
313 const OUString& sURL,
314 bool bLockFile
315 );
316
333 SAL_DLLPRIVATE bool impl_addInputStream( bool bLockFile );
334};
335
336}
337
338#endif
339
340/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
can be used to work with a css::document::MediaDescriptor struct.
constexpr OUStringLiteral PROP_STATUSINDICATOR
float u
constexpr OUStringLiteral PROP_FILENAME(u"filename")
PROP_TITLE
#define UNOTOOLS_DLLPUBLIC