cid#1606940 Check of thread-shared field evades lock acquisition
[LibreOffice.git] / chart2 / source / inc / MediaDescriptorHelper.hxx
blob46edb26575983f4efe23a54927a3a10575fd5e67
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
21 #include <config_options.h>
22 #include <com/sun/star/uno/Sequence.hxx>
23 #include <com/sun/star/uno/Reference.hxx>
24 #include <com/sun/star/beans/PropertyValue.hpp>
25 #include "charttoolsdllapi.hxx"
27 namespace com::sun::star::beans { struct PropertyValue; }
28 namespace com::sun::star::embed { class XStorage; }
29 namespace com::sun::star::io { class XInputStream; }
30 namespace com::sun::star::io { class XOutputStream; }
31 namespace com::sun::star::io { class XStream; }
34 * This class helps to read and write the properties mentioned in the service description
35 * com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues.
36 * Properties that are not mentioned in the service description
37 * are stored in the member AdditionalProperties.
39 * As an additional feature this helper class can generate a reduced sequence of PropertyValues
40 * that does not contain properties which are known to be only view relevant. This
41 * reduced sequence than might be attached to a model directly.
44 namespace apphelper
47 class UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) MediaDescriptorHelper final
49 public:
50 MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
52 const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() const { return m_aModelProperties;}
54 //all properties given in the constructor are stored in the following three sequences
56 //properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
57 css::uno::Sequence< css::beans::PropertyValue >
58 m_aModelProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
60 OUString FilterName; //internal filter name.
61 bool ISSET_FilterName;
63 OUString HierarchicalDocumentName;
65 css::uno::Reference< css::io::XOutputStream >
66 OutputStream; //a stream to receive the document data for saving
67 bool ISSET_OutputStream;
68 css::uno::Reference< css::io::XInputStream >
69 InputStream; //content of document.
70 bool ISSET_InputStream;
72 bool ReadOnly; //open document readonly.
74 OUString URL;// FileName, URL of the document.
75 bool ISSET_URL;
77 // new framework objects
78 css::uno::Reference< css::embed::XStorage >
79 Storage;
80 bool ISSET_Storage;
81 css::uno::Reference< css::io::XStream >
82 Stream;
83 bool ISSET_Stream;
85 private:
86 SAL_DLLPRIVATE void impl_init();
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */