1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_MEDIADESCRIPTORHELPER_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_MEDIADESCRIPTORHELPER_HXX
22 #include <com/sun/star/uno/Sequence.hxx>
23 #include <com/sun/star/beans/PropertyValue.hpp>
24 #include <com/sun/star/util/URL.hpp>
25 #include <com/sun/star/awt/Rectangle.hpp>
26 #include <com/sun/star/io/XStream.hpp>
27 #include <com/sun/star/io/XInputStream.hpp>
28 #include <com/sun/star/io/XOutputStream.hpp>
29 #include <com/sun/star/embed/XStorage.hpp>
30 #include "charttoolsdllapi.hxx"
33 * This class helps to read and write the properties mentioned in the service description
34 * com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues.
35 * Properties that are not mentioned in the service description
36 * are stored in the member AdditionalProperties.
38 * As an additional feature this helper class can generate a reduced sequence of PropertyValues
39 * that does not contain properties which are known to be only view relevant. This
40 * reduced sequence than might be attached to a model directly.
46 class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper
49 //MediaDescriptorHelper(){};
51 MediaDescriptorHelper( const ::com::sun::star::uno::Sequence
<
52 ::com::sun::star::beans::PropertyValue
> & rMediaDescriptor
);
54 ::com::sun::star::uno::Sequence
<
55 ::com::sun::star::beans::PropertyValue
> getReducedForModel() { return m_aModelProperties
;}
58 //all properties given in the constructor are stored in the following three sequences
60 ::com::sun::star::uno::Sequence
<
61 ::com::sun::star::beans::PropertyValue
>
62 m_aRegularProperties
; //these are the properties which are described in service com.sun.star.document.MediaDescriptor and not marked as deprecated
64 ::com::sun::star::uno::Sequence
<
65 ::com::sun::star::beans::PropertyValue
>
66 m_aDeprecatedProperties
; //these are properties which are described in service com.sun.star.document.MediaDescriptor but are marked as deprecated
68 ::com::sun::star::uno::Sequence
<
69 ::com::sun::star::beans::PropertyValue
>
70 m_aAdditionalProperties
; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
72 //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
73 ::com::sun::star::uno::Sequence
<
74 ::com::sun::star::beans::PropertyValue
>
75 m_aModelProperties
; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
77 //@todo define this for debug only, except URL
78 bool AsTemplate
; //document is a template.
79 bool ISSET_AsTemplate
;
82 OUString CharacterSet
; //identifier of used character set.
83 bool ISSET_CharacterSet
;
87 ::com::sun::star::uno::Any
89 bool ISSET_ComponentData
;
90 OUString FileName
; //deprecated, same as url
92 ::com::sun::star::uno::Any
94 bool ISSET_FilterData
;
95 OUString FilterName
; //internal filter name.
96 bool ISSET_FilterName
;
97 OUString FilterFlags
;//deprecated,
98 bool ISSET_FilterFlags
;
99 OUString FilterOptions
;
100 bool ISSET_FilterOptions
;
101 //not documented ... @todo remove?
102 OUString FrameName
; //name of target frame.
103 bool ISSET_FrameName
;
104 bool Hidden
; //load document, invisible.
107 OUString HierarchicalDocumentName
;
108 bool ISSET_HierarchicalDocumentName
;
110 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
>
111 OutputStream
; //a stream to receive the document data for saving
112 bool ISSET_OutputStream
;
113 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
>
114 InputStream
; //content of document.
115 bool ISSET_InputStream
;
116 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
117 InteractionHandler
; //::com::sun::star::task::XInteractionHandler
118 bool ISSET_InteractionHandler
;
120 OUString JumpMark
; //specifies the name of a mark within the document where the first view is to position itself.
122 OUString MediaType
; //mime type.
123 bool ISSET_MediaType
;
124 OUString OpenFlags
; //deprecated
125 bool ISSET_OpenFlags
;
126 bool OpenNewView
; //opens a new view for an already loaded document.
127 bool ISSET_OpenNewView
;
128 bool Overwrite
; //opens a new view for an already loaded document.
129 bool ISSET_Overwrite
;
133 //not documented ... @todo remove?
134 ::com::sun::star::awt::Rectangle
135 PosSize
; //position and size of document window.
138 ::com::sun::star::uno::Sequence
< sal_Int8
>
139 PostData
; //contains the data for HTTP post method as a sequence of bytes.
141 OUString PostString
; //deprecated, contains the data for HTTP post method as a sequence of bytes.
142 bool ISSET_PostString
;
143 bool Preview
; //show preview.
145 bool ReadOnly
; //open document readonly.
147 OUString Referer
; //name of document referrer.
150 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
151 StatusIndicator
; //::com::sun::star::task::XStatusIndicator
152 bool ISSET_StatusIndicator
;
153 //not documented ... @todo remove?
154 bool Silent
; //prevents dialogs to query for more information.
156 OUString TemplateName
; //deprecated, name of the template instead of the URL.
157 bool ISSET_TemplateName
;
158 OUString TemplateRegionName
; //deprecated, name of the region of the template.
159 bool ISSET_TemplateRegionName
;
162 OUString URL
;// FileName, URL of the document.
164 sal_Int16 Version
; //storage version.
167 ::com::sun::star::uno::Any
170 sal_Int16 ViewId
; //id of the initial view.
173 // new framework objects
174 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
>
177 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XStream
>
181 // undocumented SFX Properties
182 ::com::sun::star::uno::Sequence
< sal_Int32
>
184 bool ISSET_WinExtent
;
186 bool ISSET_SetEmbedded
;
189 SAL_DLLPRIVATE
void impl_init();
196 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */