1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _MEDIADESCRIPTORHELPER_HXX
29 #define _MEDIADESCRIPTORHELPER_HXX
31 #include <com/sun/star/uno/Sequence.hxx>
32 #include <com/sun/star/beans/PropertyValue.hpp>
33 #include <com/sun/star/util/URL.hpp>
34 #include <com/sun/star/awt/Rectangle.hpp>
35 #include <com/sun/star/io/XStream.hpp>
36 #include <com/sun/star/io/XInputStream.hpp>
37 #include <com/sun/star/io/XOutputStream.hpp>
38 #include <com/sun/star/embed/XStorage.hpp>
39 #include "charttoolsdllapi.hxx"
42 * This class helps to read and write the properties mentioned in the service description
43 * com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues.
44 * Properties that are not mentioned in the service description
45 * are stored in the member AdditionalProperties.
47 * As an additional feature this helper class can generate a reduced sequence of PropertyValues
48 * that does not contain properties which are known to be only view relevant. This
49 * reduced sequence than might be attached to a model directly.
55 class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper
58 //MediaDescriptorHelper(){};
60 MediaDescriptorHelper( const ::com::sun::star::uno::Sequence
<
61 ::com::sun::star::beans::PropertyValue
> & rMediaDescriptor
);
62 virtual ~MediaDescriptorHelper();
64 ::com::sun::star::uno::Sequence
<
65 ::com::sun::star::beans::PropertyValue
> getReducedForModel();
68 //---------------------
69 //all properties given in the constructor are stored in the following three sequences
71 ::com::sun::star::uno::Sequence
<
72 ::com::sun::star::beans::PropertyValue
>
73 m_aRegularProperties
; //these are the properties which are described in service com.sun.star.document.MediaDescriptor and not marked as deprecated
75 ::com::sun::star::uno::Sequence
<
76 ::com::sun::star::beans::PropertyValue
>
77 m_aDeprecatedProperties
; //these are properties which are described in service com.sun.star.document.MediaDescriptor but are marked as deprecated
79 ::com::sun::star::uno::Sequence
<
80 ::com::sun::star::beans::PropertyValue
>
81 m_aAdditionalProperties
; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
83 //----------------------
84 //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
85 ::com::sun::star::uno::Sequence
<
86 ::com::sun::star::beans::PropertyValue
>
87 m_aModelProperties
; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
90 //@todo define this for debug only, except URL
91 sal_Bool AsTemplate
; //document is a template.
92 sal_Bool ISSET_AsTemplate
;
93 ::rtl::OUString Author
;
94 sal_Bool ISSET_Author
;
95 ::rtl::OUString CharacterSet
; //identifier of used character set.
96 sal_Bool ISSET_CharacterSet
;
97 ::rtl::OUString Comment
;
98 sal_Bool ISSET_Comment
;
100 ::com::sun::star::uno::Any
102 sal_Bool ISSET_ComponentData
;
103 ::rtl::OUString FileName
; //deprecated, same as url
104 sal_Bool ISSET_FileName
;
105 ::com::sun::star::uno::Any
107 sal_Bool ISSET_FilterData
;
108 ::rtl::OUString FilterName
; //internal filter name.
109 sal_Bool ISSET_FilterName
;
110 ::rtl::OUString FilterFlags
;//deprecated,
111 sal_Bool ISSET_FilterFlags
;
112 ::rtl::OUString FilterOptions
;
113 sal_Bool ISSET_FilterOptions
;
114 //not documented ... @todo remove?
115 ::rtl::OUString FrameName
; //name of target frame.
116 sal_Bool ISSET_FrameName
;
117 sal_Bool Hidden
; //load document, invisible.
118 sal_Bool ISSET_Hidden
;
120 ::rtl::OUString HierarchicalDocumentName
;
121 sal_Bool ISSET_HierarchicalDocumentName
;
124 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XOutputStream
>
125 OutputStream
; //a stream to receive the document data for saving
126 sal_Bool ISSET_OutputStream
;
127 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStream
>
128 InputStream
; //content of document.
129 sal_Bool ISSET_InputStream
;
130 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
131 InteractionHandler
; //::com::sun::star::task::XInteractionHandler
132 sal_Bool ISSET_InteractionHandler
;
134 ::rtl::OUString JumpMark
; //specifies the name of a mark within the document where the first view is to position itself.
135 sal_Bool ISSET_JumpMark
;
136 ::rtl::OUString MediaType
; //mime type.
137 sal_Bool ISSET_MediaType
;
138 ::rtl::OUString OpenFlags
; //deprecated
139 sal_Bool ISSET_OpenFlags
;
140 sal_Bool OpenNewView
; //opens a new view for an already loaded document.
141 sal_Bool ISSET_OpenNewView
;
142 sal_Bool Overwrite
; //opens a new view for an already loaded document.
143 sal_Bool ISSET_Overwrite
;
144 ::rtl::OUString Password
;
145 sal_Bool ISSET_Password
;
147 //not documented ... @todo remove?
148 ::com::sun::star::awt::Rectangle
149 PosSize
; //position and size of document window.
150 sal_Bool ISSET_PosSize
;
152 ::com::sun::star::uno::Sequence
< sal_Int8
>
153 PostData
; //contains the data for HTTP post method as a sequence of bytes.
154 sal_Bool ISSET_PostData
;
155 ::rtl::OUString PostString
; //deprecated, contains the data for HTTP post method as a sequence of bytes.
156 sal_Bool ISSET_PostString
;
157 sal_Bool Preview
; //show preview.
158 sal_Bool ISSET_Preview
;
159 sal_Bool ReadOnly
; //open document readonly.
160 sal_Bool ISSET_ReadOnly
;
161 ::rtl::OUString Referer
; //name of document referrer.
162 sal_Bool ISSET_Referer
;
164 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
165 StatusIndicator
; //::com::sun::star::task::XStatusIndicator
166 sal_Bool ISSET_StatusIndicator
;
167 //not documented ... @todo remove?
168 sal_Bool Silent
; //prevents dialogs to query for more information.
169 sal_Bool ISSET_Silent
;
170 ::rtl::OUString TemplateName
; //deprecated, name of the template instead of the URL.
171 sal_Bool ISSET_TemplateName
;
172 ::rtl::OUString TemplateRegionName
; //deprecated, name of the region of the template.
173 sal_Bool ISSET_TemplateRegionName
;
175 sal_Bool ISSET_Unpacked
;
176 ::rtl::OUString URL
;// FileName, URL of the document.
178 sal_Int16 Version
; //storage version.
179 sal_Bool ISSET_Version
;
181 ::com::sun::star::uno::Any
183 sal_Bool ISSET_ViewData
;
184 sal_Int16 ViewId
; //id of the initial view.
185 sal_Bool ISSET_ViewId
;
187 // new framework objects
188 ::com::sun::star::uno::Reference
< ::com::sun::star::embed::XStorage
>
190 sal_Bool ISSET_Storage
;
191 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XStream
>
193 sal_Bool ISSET_Stream
;
195 // undocumented SFX Properties
196 ::com::sun::star::uno::Sequence
< sal_Int32
>
198 sal_Bool ISSET_WinExtent
;
199 sal_Bool SetEmbedded
;
200 sal_Bool ISSET_SetEmbedded
;
203 SAL_DLLPRIVATE
void impl_init();
210 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */