diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /chart2/source/inc/MediaDescriptorHelper.hxx | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'chart2/source/inc/MediaDescriptorHelper.hxx')
-rw-r--r-- | chart2/source/inc/MediaDescriptorHelper.hxx | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/chart2/source/inc/MediaDescriptorHelper.hxx b/chart2/source/inc/MediaDescriptorHelper.hxx new file mode 100644 index 000000000..cfef8fc14 --- /dev/null +++ b/chart2/source/inc/MediaDescriptorHelper.hxx @@ -0,0 +1,90 @@ +/* -*- 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 . + */ +#pragma once + +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> +#include "charttoolsdllapi.hxx" + +namespace com::sun::star::beans { struct PropertyValue; } +namespace com::sun::star::embed { class XStorage; } +namespace com::sun::star::io { class XInputStream; } +namespace com::sun::star::io { class XOutputStream; } +namespace com::sun::star::io { class XStream; } + +/* +* 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 final +{ +public: + MediaDescriptorHelper( const css::uno::Sequence< css::beans::PropertyValue > & rMediaDescriptor ); + + const css::uno::Sequence< css::beans::PropertyValue >& getReducedForModel() const { return m_aModelProperties;} + + //all properties given in the constructor are stored in the following three sequences + + //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 + + OUString FilterName; //internal filter name. + bool ISSET_FilterName; + + 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 ReadOnly; //open document readonly. + + OUString URL;// FileName, URL of the document. + bool ISSET_URL; + + // new framework objects + css::uno::Reference< css::embed::XStorage > + Storage; + bool ISSET_Storage; + css::uno::Reference< css::io::XStream > + Stream; + bool ISSET_Stream; + +private: + SAL_DLLPRIVATE void impl_init(); +}; + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |