Update ooo320-m1
[ooovba.git] / chart2 / source / inc / MediaDescriptorHelper.hxx
blob0746e9266ca9dd30f438cae37944811a884773ca
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: MediaDescriptorHelper.hxx,v $
10 * $Revision: 1.4.44.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _MEDIADESCRIPTORHELPER_HXX
31 #define _MEDIADESCRIPTORHELPER_HXX
33 #include <com/sun/star/uno/Sequence.hxx>
34 #include <com/sun/star/beans/PropertyValue.hpp>
35 #include <com/sun/star/util/URL.hpp>
36 #include <com/sun/star/awt/Rectangle.hpp>
37 #include <com/sun/star/io/XStream.hpp>
38 #include <com/sun/star/io/XInputStream.hpp>
39 #include <com/sun/star/io/XOutputStream.hpp>
40 #include <com/sun/star/embed/XStorage.hpp>
41 #include "charttoolsdllapi.hxx"
44 * This class helps to read and write the properties mentioned in the service description
45 * com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues.
46 * Properties that are not mentioned in the service description
47 * are stored in the member AdditionalProperties.
49 * As an additional feature this helper class can generate a reduced sequence of PropertyValues
50 * that does not contain properties which are known to be only view relevant. This
51 * reduced sequence than might be attached to a model directly.
54 namespace apphelper
57 class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper
59 private:
60 //MediaDescriptorHelper(){};
61 public:
62 MediaDescriptorHelper( const ::com::sun::star::uno::Sequence<
63 ::com::sun::star::beans::PropertyValue > & rMediaDescriptor );
64 virtual ~MediaDescriptorHelper();
66 ::com::sun::star::uno::Sequence<
67 ::com::sun::star::beans::PropertyValue > getReducedForModel();
69 public:
70 //---------------------
71 //all properties given in the constructor are stored in the following three sequences
73 ::com::sun::star::uno::Sequence<
74 ::com::sun::star::beans::PropertyValue >
75 m_aRegularProperties; //these are the properties which are described in service com.sun.star.document.MediaDescriptor and not marked as deprecated
77 ::com::sun::star::uno::Sequence<
78 ::com::sun::star::beans::PropertyValue >
79 m_aDeprecatedProperties; //these are properties which are described in service com.sun.star.document.MediaDescriptor but are marked as deprecated
81 ::com::sun::star::uno::Sequence<
82 ::com::sun::star::beans::PropertyValue >
83 m_aAdditionalProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
85 //----------------------
86 //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
87 ::com::sun::star::uno::Sequence<
88 ::com::sun::star::beans::PropertyValue >
89 m_aModelProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
92 //@todo define this for debug only, except URL
93 sal_Bool AsTemplate; //document is a template.
94 sal_Bool ISSET_AsTemplate;
95 ::rtl::OUString Author; //
96 sal_Bool ISSET_Author;
97 ::rtl::OUString CharacterSet; //identifier of used character set.
98 sal_Bool ISSET_CharacterSet;
99 ::rtl::OUString Comment;//
100 sal_Bool ISSET_Comment;
102 ::com::sun::star::uno::Any
103 ComponentData;//
104 sal_Bool ISSET_ComponentData;
105 ::rtl::OUString FileName; //deprecated, same as url
106 sal_Bool ISSET_FileName;
107 ::com::sun::star::uno::Any
108 FilterData;//
109 sal_Bool ISSET_FilterData;
110 ::rtl::OUString FilterName; //internal filter name.
111 sal_Bool ISSET_FilterName;
112 ::rtl::OUString FilterFlags;//deprecated,
113 sal_Bool ISSET_FilterFlags;
114 ::rtl::OUString FilterOptions;//
115 sal_Bool ISSET_FilterOptions;
116 //not documented ... @todo remove?
117 ::rtl::OUString FrameName; //name of target frame.
118 sal_Bool ISSET_FrameName;
119 sal_Bool Hidden; //load document, invisible.
120 sal_Bool ISSET_Hidden;
122 ::rtl::OUString HierarchicalDocumentName;
123 sal_Bool ISSET_HierarchicalDocumentName;
126 ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
127 OutputStream; //a stream to receive the document data for saving
128 sal_Bool ISSET_OutputStream;
129 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
130 InputStream; //content of document.
131 sal_Bool ISSET_InputStream;
132 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
133 InteractionHandler; // //::com::sun::star::task::XInteractionHandler
134 sal_Bool ISSET_InteractionHandler;
136 ::rtl::OUString JumpMark; //specifies the name of a mark within the document where the first view is to position itself.
137 sal_Bool ISSET_JumpMark;
138 ::rtl::OUString MediaType; //mime type.
139 sal_Bool ISSET_MediaType;
140 ::rtl::OUString OpenFlags; //deprecated
141 sal_Bool ISSET_OpenFlags;
142 sal_Bool OpenNewView; //opens a new view for an already loaded document.
143 sal_Bool ISSET_OpenNewView;
144 sal_Bool Overwrite; //opens a new view for an already loaded document.
145 sal_Bool ISSET_Overwrite;
146 ::rtl::OUString Password; //
147 sal_Bool ISSET_Password;
149 //not documented ... @todo remove?
150 ::com::sun::star::awt::Rectangle
151 PosSize; //position and size of document window.
152 sal_Bool ISSET_PosSize;
154 ::com::sun::star::uno::Sequence< sal_Int8 >
155 PostData; //contains the data for HTTP post method as a sequence of bytes.
156 sal_Bool ISSET_PostData;
157 ::rtl::OUString PostString; //deprecated, contains the data for HTTP post method as a sequence of bytes.
158 sal_Bool ISSET_PostString;
159 sal_Bool Preview; //show preview.
160 sal_Bool ISSET_Preview;
161 sal_Bool ReadOnly; //open document readonly.
162 sal_Bool ISSET_ReadOnly;
163 ::rtl::OUString Referer; //name of document referrer.
164 sal_Bool ISSET_Referer;
166 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
167 StatusIndicator; // //::com::sun::star::task::XStatusIndicator
168 sal_Bool ISSET_StatusIndicator;
169 //not documented ... @todo remove?
170 sal_Bool Silent; //prevents dialogs to query for more information.
171 sal_Bool ISSET_Silent;
172 ::rtl::OUString TemplateName; //deprecated, name of the template instead of the URL.
173 sal_Bool ISSET_TemplateName;
174 ::rtl::OUString TemplateRegionName; //deprecated, name of the region of the template.
175 sal_Bool ISSET_TemplateRegionName;
176 sal_Bool Unpacked;
177 sal_Bool ISSET_Unpacked;
178 ::rtl::OUString URL;// FileName, URL of the document.
179 sal_Bool ISSET_URL;
180 sal_Int16 Version; //storage version.
181 sal_Bool ISSET_Version;
183 ::com::sun::star::uno::Any
184 ViewData;//
185 sal_Bool ISSET_ViewData;
186 sal_Int16 ViewId; //id of the initial view.
187 sal_Bool ISSET_ViewId;
189 // new framework objects
190 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
191 Storage;
192 sal_Bool ISSET_Storage;
193 ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >
194 Stream;
195 sal_Bool ISSET_Stream;
197 // undocumented SFX Properties
198 ::com::sun::star::uno::Sequence< sal_Int32 >
199 WinExtent;
200 sal_Bool ISSET_WinExtent;
201 sal_Bool SetEmbedded;
202 sal_Bool ISSET_SetEmbedded;
204 protected:
205 SAL_DLLPRIVATE void impl_init();
210 #endif