blob: fd20e1f441a754043e44a97ad7eef80dc63348a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_CHART2_SOURCE_INC_MEDIADESCRIPTORHELPER_HXX
#define INCLUDED_CHART2_SOURCE_INC_MEDIADESCRIPTORHELPER_HXX
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include "charttoolsdllapi.hxx"
/*
* This class helps to read and write the properties mentioned in the service description
* com.sun.star.document.MediaDescriptor from and to a sequence of PropertyValues.
* Properties that are not mentioned in the service description
* are stored in the member AdditionalProperties.
*
* As an additional feature this helper class can generate a reduced sequence of PropertyValues
* that does not contain properties which are known to be only view relevant. This
* reduced sequence than might be attached to a model directly.
*/
namespace apphelper
{
class OOO_DLLPUBLIC_CHARTTOOLS MediaDescriptorHelper
{
private:
//MediaDescriptorHelper(){};
public:
MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor );
const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() { return m_aModelProperties;}
public:
//all properties given in the constructor are stored in the following three sequences
css::uno::Sequence< css::beans::PropertyValue >
m_aRegularProperties; //these are the properties which are described in service com.sun.star.document.MediaDescriptor and not marked as deprecated
css::uno::Sequence< css::beans::PropertyValue >
m_aDeprecatedProperties; //these are properties which are described in service com.sun.star.document.MediaDescriptor but are marked as deprecated
css::uno::Sequence< css::beans::PropertyValue >
m_aAdditionalProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
//properties which should be given to a model are additionally stored in this sequence (not documented properties and deprecated properties are not included!)
css::uno::Sequence< css::beans::PropertyValue >
m_aModelProperties; //these are properties which are not described in service com.sun.star.document.MediaDescriptor
//@todo define this for debug only, except URL
bool AsTemplate; //document is a template.
css::uno::Any
ComponentData;
css::uno::Any
FilterData;
OUString FilterName; //internal filter name.
bool ISSET_FilterName;
bool Hidden; //load document, invisible.
OUString HierarchicalDocumentName;
css::uno::Reference< css::io::XOutputStream >
OutputStream; //a stream to receive the document data for saving
bool ISSET_OutputStream;
css::uno::Reference< css::io::XInputStream >
InputStream; //content of document.
bool ISSET_InputStream;
bool OpenNewView; //opens a new view for an already loaded document.
bool Overwrite; //opens a new view for an already loaded document.
bool Preview; //show preview.
bool ReadOnly; //open document readonly.
//not documented ... @todo remove?
bool Silent; //prevents dialogs to query for more information.
bool Unpacked;
OUString URL;// FileName, URL of the document.
bool ISSET_URL;
sal_Int16 Version; //storage version.
css::uno::Any
ViewData;
sal_Int16 ViewId; //id of the initial view.
// new framework objects
css::uno::Reference< css::embed::XStorage >
Storage;
bool ISSET_Storage;
css::uno::Reference< css::io::XStream >
Stream;
bool ISSET_Stream;
bool SetEmbedded;
protected:
SAL_DLLPRIVATE void impl_init();
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|