LibreOffice Module filter (master) 1
cacheitem.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
20#pragma once
21
22#include <unordered_map>
23#include <com/sun/star/uno/Sequence.h>
24#include <com/sun/star/beans/PropertyValue.hpp>
25#include <vector>
27#include <o3tl/span.hxx>
28
29namespace filter::config {
30
31
40{
41
42 public:
43
44
47 CacheItem();
48
49
61 void update(const CacheItem& rUpdateItem);
62
63
78
79
94
95
106 void validateUINames(const OUString& sActLocale);
107
108
121 css::uno::Sequence< css::beans::PropertyValue > getAsPackedPropertyValueList(bool bFinalized, bool bMandatory) const;
122};
123
124
128typedef std::unordered_map< OUString,
130
131
144typedef std::unordered_map< OUString,
145 std::vector<OUString> > CacheItemRegistration;
146
147
157{
158 // the internal type name
159 OUString sType;
160
161 // this type was found by a matching the URL extension
163
164 // this type was found by a matching URL Pattern
166
167 // the user selected this type implicit by selecting a corresponding office module
169
171};
172
173typedef ::std::vector< FlatDetectionInfo > FlatDetection;
174
175} // namespace filter::config
176
177/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
represent an item of a FilterCache instance.
Definition: cacheitem.hxx:40
void update(const CacheItem &rUpdateItem)
update only properties, which are given by the specified rItem.
Definition: cacheitem.cxx:40
bool haveProps(o3tl::span< const css::beans::NamedValue > lProps) const
check, if the given properties exist at this item.
Definition: cacheitem.cxx:266
css::uno::Sequence< css::beans::PropertyValue > getAsPackedPropertyValueList(bool bFinalized, bool bMandatory) const
convert this structure to a seq< PropertyValue > and ignore all empty properties!
Definition: cacheitem.cxx:80
CacheItem()
creates an empty item.
Definition: cacheitem.cxx:35
void validateUINames(const OUString &sActLocale)
because we know two UIName properties (a list with all locales and the value for the current locale o...
Definition: cacheitem.cxx:47
bool dontHaveProps(o3tl::span< const css::beans::NamedValue > lProps) const
check, if the given properties don't exist at this item.
Definition: cacheitem.cxx:291
::std::vector< FlatDetectionInfo > FlatDetection
Definition: cacheitem.hxx:173
std::unordered_map< OUString, std::vector< OUString > > CacheItemRegistration
supports registration of multiple key to another string information.
Definition: cacheitem.hxx:145
std::unordered_map< OUString, CacheItem > CacheItemList
represent an item list of a FilterCache instance.
Definition: cacheitem.hxx:129
is used to collect all matching types of a URL during type detection.
Definition: cacheitem.hxx:157