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 .
21 #include <com/sun/star/uno/Sequence.hxx>
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/beans/PropertyValue.hpp>
24 #include "charttoolsdllapi.hxx"
26 namespace com::sun::star::beans
{ struct PropertyValue
; }
27 namespace com::sun::star::embed
{ class XStorage
; }
28 namespace com::sun::star::io
{ class XInputStream
; }
29 namespace com::sun::star::io
{ class XOutputStream
; }
30 namespace com::sun::star::io
{ class XStream
; }
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 final
49 MediaDescriptorHelper( const css::uno::Sequence
< css::beans::PropertyValue
> & rMediaDescriptor
);
51 const css::uno::Sequence
< css::beans::PropertyValue
>& getReducedForModel() const { return m_aModelProperties
;}
53 //all properties given in the constructor are stored in the following three sequences
55 //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
56 css::uno::Sequence
< css::beans::PropertyValue
>
57 m_aModelProperties
; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
59 OUString FilterName
; //internal filter name.
60 bool ISSET_FilterName
;
62 OUString HierarchicalDocumentName
;
64 css::uno::Reference
< css::io::XOutputStream
>
65 OutputStream
; //a stream to receive the document data for saving
66 bool ISSET_OutputStream
;
67 css::uno::Reference
< css::io::XInputStream
>
68 InputStream
; //content of document.
69 bool ISSET_InputStream
;
71 bool ReadOnly
; //open document readonly.
73 OUString URL
;// FileName, URL of the document.
76 // new framework objects
77 css::uno::Reference
< css::embed::XStorage
>
80 css::uno::Reference
< css::io::XStream
>
85 SAL_DLLPRIVATE
void impl_init();
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */