LibreOffice Module chart2 (master) 1
MediaDescriptorHelper.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#pragma once
20
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"
25
26namespace com::sun::star::beans { struct PropertyValue; }
27namespace com::sun::star::embed { class XStorage; }
28namespace com::sun::star::io { class XInputStream; }
29namespace com::sun::star::io { class XOutputStream; }
30namespace com::sun::star::io { class XStream; }
31
32/*
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.
37*
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.
41*/
42
43namespace apphelper
44{
45
47{
48public:
49 MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
50
51 const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() const { return m_aModelProperties;}
52
53 //all properties given in the constructor are stored in the following three sequences
54
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
58
59 OUString FilterName; //internal filter name.
61
63
64 css::uno::Reference< css::io::XOutputStream >
65 OutputStream; //a stream to receive the document data for saving
67 css::uno::Reference< css::io::XInputStream >
68 InputStream; //content of document.
70
71 bool ReadOnly; //open document readonly.
72
73 OUString URL;// FileName, URL of the document.
75
76 // new framework objects
77 css::uno::Reference< css::embed::XStorage >
80 css::uno::Reference< css::io::XStream >
83
84private:
85 SAL_DLLPRIVATE void impl_init();
86};
87
88}
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
css::uno::Reference< css::embed::XStorage > Storage
const css::uno::Sequence< css::beans::PropertyValue > & getReducedForModel() const
css::uno::Reference< css::io::XStream > Stream
css::uno::Sequence< css::beans::PropertyValue > m_aModelProperties
css::uno::Reference< css::io::XOutputStream > OutputStream
css::uno::Reference< css::io::XInputStream > InputStream