android: Update app-specific/MIME type icons
[LibreOffice.git] / filter / source / config / cache / filtercache.hxx
bloba48e3df627679720e0bf32d779f1f1793116039e
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 .
20 #pragma once
22 #include <memory>
23 #include <mutex>
25 #include "cacheitem.hxx"
26 #include <com/sun/star/beans/NamedValue.hpp>
27 #include <com/sun/star/util/URL.hpp>
28 #include <com/sun/star/uno/XInterface.hpp>
29 #include <com/sun/star/container/XNameAccess.hpp>
30 #include <com/sun/star/container/XNameReplace.hpp>
31 #include <com/sun/star/uno/Reference.h>
32 #include <com/sun/star/uno/Any.h>
33 #include <comphelper/documentconstants.hxx>
34 #include <cppuhelper/basemutex.hxx>
35 #include <rtl/ref.hxx>
36 #include <rtl/ustring.hxx>
39 namespace filter::config {
41 class CacheUpdateListener;
44 /** @short implements a cache, which contains all
45 elements of our filter and type detection
46 configuration.
48 @descr The cache itself is threadsafe implemented.
49 Because it should be used as a singleton only.
50 To do so please use reference mechanism as wrapper
51 around this FilterCache class.
53 @attention Because we use a trick to get a full initialized
54 mutex lock during initialization time (means during
55 the constructor runs), the base class FilterCacheLock
56 must be the first of all declared one!
57 Further we make it public. So any user of this class
58 can lock us from outside too.
60 class FilterCache
63 // public types
65 public:
68 /** @short identify the type of a container item.
70 @descr Because the cache interface is a generic one
71 every group of container items must be specified.
73 enum EItemType
75 E_TYPE ,
76 E_FILTER ,
77 E_FRAMELOADER ,
78 E_CONTENTHANDLER
82 /** @short indicates, which items already exists inside this cache
83 and which not.
85 @descr This cache supports a 2-step load mechanism.
86 First only types (and only some special properties of every type!)
87 but no filters/frame loaders/content handlers will be read.
88 That should be enough to work with this cache e.g. for loading
89 the first document. After this first document was loaded successfully,
90 a special "load-on-demand-thread" will be started to fill this cache
91 with ALL other information, which was not read before.
92 That's the second step. All operations on top of this cache will be
93 blocked then.
95 enum EFillState
97 E_CONTAINS_NOTHING = 0,
98 E_CONTAINS_STANDARD = 1,
99 E_CONTAINS_TYPES = 2,
100 E_CONTAINS_FILTERS = 4,
101 E_CONTAINS_FRAMELOADERS = 8,
102 E_CONTAINS_CONTENTHANDLERS = 16
106 // private types
108 private:
111 /** @short regulate, which properties of a configured item
112 will be read.
114 @descr To perform reading of all configuration items,
115 only standard properties will be handled. At a second
116 step all optional properties will be read and added to
117 our internal structures. Of course the combination of
118 both options can be used too, to get all properties
119 at the same time.
121 enum EReadOption
123 E_READ_STANDARD = 1,
124 E_READ_UPDATE = 2,
125 E_READ_ALL = 3
129 /** @short indicates the state of a configuration set item.
131 @descr Inside method flush we check:
132 <ul>
133 <li>if the item exists inside config layer but not inside our cache => REMOVED</li>
134 <li>if the item exists inside config layer and inside our cache => CHANGED</li>
135 <li>if the item does not exists inside config layer but inside our cache => ADDED.</li>
136 </ul>
138 enum EItemFlushState
140 /// indicates an unchanged item (can occur e.g. if an item was added and(!) removed before it was flushed ...
141 E_ITEM_UNCHANGED = 0,
142 /// indicates an item, which exists inside config layer but not inside our own cache
143 E_ITEM_REMOVED = 1,
144 /// indicates an item, which exists inside config layer and inside our own cache
145 E_ITEM_CHANGED = 2,
146 /// indicates an item, which does not exists inside config layer but inside our own cache
147 E_ITEM_ADDED = 3
151 /** TODO document me */
152 enum EConfigProvider
154 E_PROVIDER_TYPES = 0,
155 E_PROVIDER_FILTERS = 1,
156 E_PROVIDER_OTHERS = 2,
157 E_PROVIDER_OLD = 3
161 // member
163 private:
165 mutable std::mutex m_aMutex;
167 /** @short holds the used configuration provider alive, which
168 provides access to the list of types. */
169 mutable css::uno::Reference< css::uno::XInterface > m_xConfigTypes;
172 /** @short holds the used configuration provider alive, which
173 provides access to the list of filters. */
174 mutable css::uno::Reference< css::uno::XInterface > m_xConfigFilters;
177 /** @short holds the used configuration provider alive, which
178 provides access to the list of other values needed
179 by our type detection framework. */
180 mutable css::uno::Reference< css::uno::XInterface > m_xConfigOthers;
183 /** @short contains all loaded types with its properties. */
184 mutable CacheItemList m_lTypes;
187 /** @short contains all loaded filters with its properties. */
188 mutable CacheItemList m_lFilters;
191 /** @short contains all loaded frame loader with its properties. */
192 mutable CacheItemList m_lFrameLoaders;
195 /** @short contains all loaded content handler with its properties. */
196 mutable CacheItemList m_lContentHandlers;
199 /** @short optimize mapping of URL extensions to a type representation,
200 by using extensions as key and a list of internal
201 type names as value. */
202 mutable CacheItemRegistration m_lExtensions2Types;
205 /** @short optimize mapping of URL pattern to a type representation,
206 by using patterns as key and a list of internal
207 type names as value. */
208 mutable CacheItemRegistration m_lURLPattern2Types;
211 /** @short contains the current locale of the office and will be
212 used to work with localized configuration values. */
213 OUString m_sActLocale;
216 /** @short contains status, which cache items/properties
217 was already loaded from the underlying configuration.
219 @descr This information can be used to detect missing
220 information and load it on demand.
222 @see EFillState
223 @see load()
225 EFillState m_eFillState;
228 /** TODO document me ... */
229 std::vector<OUString> m_lChangedTypes;
230 std::vector<OUString> m_lChangedFilters;
231 std::vector<OUString> m_lChangedFrameLoaders;
232 std::vector<OUString> m_lChangedContentHandlers;
234 /// standard property names for filter config keyed by EReadOption
235 css::uno::Sequence< OUString > m_aStandardProps[4];
237 /// type property names for filter config keyed by EReadOption
238 css::uno::Sequence< OUString > m_aTypeProps[4];
240 /// readonly access to the module configuration of OOo
241 css::uno::Reference< css::container::XNameAccess > m_xModuleCfg;
243 rtl::Reference< CacheUpdateListener > m_xTypesChglisteners;
244 rtl::Reference< CacheUpdateListener > m_xFiltersChgListener;
247 // interface
249 public:
252 // ctor/dtor
254 /** @short standard ctor
256 @descr It's not allowed to do anything here...
257 especially is forbidden to start operations,
258 which needs a FilterCache instance too!
259 Why? Because this FilterCache instance will be
260 used as a singleton! And if during this ctor any
261 action related to this FilterCache singleton is
262 started... a race will be the result.
264 The first method after construction of a new
265 singleton reference should be "load()". There
266 a special fill state of this cache can be forced.
268 FilterCache();
271 /** @short standard dtor.
273 ~FilterCache();
276 /** @short creates a copy of this container.
278 @descr Such copy can be used then to modify items (add/change/remove)
279 without the risk to damage the original container.
280 After its changed data was flushed to the configuration it can be
281 removed.
283 The original container will get these new data automatically
284 because it listen for changes on the internal used configuration layer.
285 If the new data are needed immediately inside the original container,
286 the method takeOver() can be used to copy all changes back.
287 The may be following notifications of the configuration will be superfluous then.
288 But they can't be stopped...
290 All internal structures will be copied here. But the internal used
291 configuration (update) access won't be copied. The cloned instance contains
292 a different one.
294 std::unique_ptr<FilterCache> clone() const;
297 /** @short copy the cache content or rClone back to this instance.
299 void takeOver(const FilterCache& rClone);
302 /** @short force special fill state of this cache.
304 @descr This method checks, if all requested items/properties already
305 exist. Only missing information will be read.
306 Otherwise this method does nothing!
308 This method must be called from every user of this cache
309 every time it needs a filled cache. Normally we load
310 only standard information into this cache on startup.
312 @throw An exception if the cache could not be filled really
313 or seems to be invalid afterwards. But there is no reaction
314 at all if this method does nothing inside, because the cache
315 is already fully filled!
317 void load(EFillState eRequired);
320 /** @short return the current fill state of this cache.
322 @descr This information can be used e.g. to start
323 a search on top of this cache with a minimum on
324 information ... and do it again, if some other
325 cache items seems to be available after calling of "loadAll()"
326 on this cache and first search does not had any valid results.
328 @return sal_True if the required fill state exists for this cache; FALSE
329 otherwise.
331 @throws css::uno::Exception
333 bool isFillState(EFillState eRequired) const;
336 /** @short return a list of key names for items, which match
337 the specified criteria.
339 @descr The returned key names can be used at another method "getItem()"
340 of this cache to get further information about this item.
342 @attention Please note: because this cache can be used inside multithreaded
343 environments, such returned key name can point to an already removed
344 item! Please be aware of some "NoSuchElementExceptions" if you try to
345 call any other method of this cache in relation to this key name.
347 @param eType
348 specify the sub container of this cache, which should be used for
349 searching. see also EItemType.
351 @param lIProps
352 specify the property set, which must exist at the searched items
353 as minimum.
355 @param lEProps
356 specify the property set, which must not(!) exist at the searched items
357 as minimum.
359 @return [std::vector<OUString>]
360 a list of key names, which identify items of the queried sub container.
361 May be an empty list.
363 @throw [css::uno::Exception]
364 if some input parameter are wrong or the cache itself is not valid
365 any longer, because any operation before damage it.
367 std::vector<OUString> getMatchingItemsByProps( EItemType eType,
368 o3tl::span< const css::beans::NamedValue > lIProps,
369 o3tl::span< const css::beans::NamedValue > lEProps = {}) const;
372 /** @short indicates if the requested sub container
373 contains some items.
375 @descr We don't provide any information about the count
376 of such items. Because we don't implement any index
377 based interface! The information "we have items or not"
378 must be enough for the outside code ... till somewhere
379 give us a good reason. :-)
381 @param eType
382 specify the sub container of this cache, which should be used.
383 see also EItemType.
385 @return [sal_Bool]
386 True, if the requested sub container contains some items;
387 False otherwise.
389 @throw [css::uno::Exception]
390 if some input parameter are wrong or the cache itself is not valid
391 any longer, because any operation before damage it.
393 bool hasItems(EItemType eType) const;
396 /** @short return a list of all key names, which represent
397 an item inside the specified sub container.
399 @attention Please note: because this cache can be used inside multithreaded
400 environments, such returned key names can point to some already removed
401 items! Please be aware of some "NoSuchElementExceptions" if you try to
402 call any other method of this cache in relation to this key names.
404 @param eType
405 specify the sub container of this cache, which should be used for
406 searching. see also EItemType.
408 @return [std::vector<OUString>]
409 a list of key names, which can be used to access the item properties
410 using some other methods of this cache.
412 @throw [css::uno::Exception]
413 if some input parameter are wrong or the cache itself is not valid
414 any longer, because any operation before damage it.
416 std::vector<OUString> getItemNames(EItemType eType) const;
419 /** @short check if the required item exist inside this container.
421 @attention This method exists to supports some UNO container interfaces
422 only. (e.g. XNameAccess.hasByName()). But inside multithreaded
423 environments there is no guarantee, that this item still exists, if
424 it's really requested e.g. by calling getItem()!
425 Be aware of some NoSuchElementExistExceptions ...
427 @param eType
428 specify the sub container of this cache, which should be used.
429 see also EItemType.
431 @param sItem
432 the key name of the requested item inside the specified sub container.
434 @throw [css::uno::Exception]
435 if some input parameter are wrong or the cache itself is not valid
436 any longer, because any operation before damage it.
438 bool hasItem( EItemType eType,
439 const OUString& sItem);
442 /** @short return an item, which match the specified type and name.
444 @descr Because this cache can be used inside multithreaded environments
445 the caller must be aware of some exceptions - especially a "NoSuchElementExcepotion".
446 May another thread already removed the required item before ...
448 @param eType
449 specify the sub container of this cache, which should be used for
450 searching. see also EItemType.
452 @param sItem
453 specify the requested item by its key name.
455 @return [CacheItem]
456 the required item if it could be located ...
457 But we throw an exception if the required item does not exist!
459 @throw [css::container::NoSuchElementException]
460 if the required item does not still exist.
462 @throw [css::uno::Exception]
463 if some input parameter are wrong or the cache itself is not valid
464 any longer, because any operation before damage it.
466 CacheItem getItem( EItemType eType,
467 const OUString& sItem);
470 /** TODO document me ...
472 @throws css::uno::Exception
474 void removeItem( EItemType eType,
475 const OUString& sItem);
478 /** TODO document me ...
480 @throws css::uno::Exception
482 void setItem( EItemType eType ,
483 const OUString& sItem ,
484 const CacheItem& aValue);
487 /** TODO document me ...
489 @throws css::uno::Exception
491 void refreshItem( EItemType eType,
492 const OUString& sItem);
495 /** @short add some implicit properties to the given
496 cache item reference.
498 @descr Such properties can e.g. finalized or mandatory.
499 They are not persistent and not really part of e.g. a
500 filter not. But they are attributes of a configuration
501 entry and can influence our container interface.
503 @attention These properties are not part of the normal CacheItem
504 returned by the method getItem(). Because getItem() is
505 used internally too but these specialized properties
506 are needed at our container services only. So these
507 function sets are different to allow different handling.
509 @param eType
510 specify the sub container of this cache, which should be used for
511 searching. see also EItemType.
513 @param sItem
514 specify the requested item by its key name.
516 @param rItem
517 contains already the normal properties of this item,
518 and will be used as out parameter to add the implicit
519 attributes there.
521 @throw [css::uno::Exception]
522 if an internal error occurred.
523 Note: if the item is missing inside the underlying configuration
524 no exception will be thrown. In such case the item is marked as
525 finalized/mandatory automatically
526 Reason: maybe the item comes from the old configuration package and
527 was not migrated to the new one. So we can't provide write access
528 to such items...
530 css::uno::Any getItemWithStateProps( EItemType eType,
531 const OUString& sItem);
533 /** TODO document me
535 @throws css::uno::Exception
537 static void removeStatePropsFromItem(CacheItem& aValue);
540 /** @short force writing of all changes (which was made after
541 last flush was called) back to the configuration.
543 @descr TODO
545 @throw [css::uno::Exception]
546 if the cache itself is not valid
547 any longer, because any operation before damage it.
549 void flush();
552 /** @short supports a flat type detection for given URL.
554 @descr Because such detection works on our optimized internal
555 structures (e.g. mapping from extensions/pattern to type names),
556 it should be made inside this cache.
558 @param aURL
559 URL of the content, which type should be detected.
560 It's already parsed and split into its different parts,
561 like e.g.: main, jump marks etcpp.
563 @param rFlatTypes
564 used as [out] parameter to add all types, which match to the given
565 URL. Further an information is added for every type. It indicates, how
566 this type is related to the specified URL (means e.g. if it matches
567 by extension or URLPattern...).
569 @attention Please note: because this cache can be used inside multithreaded
570 environments, such returned key names can point to some already removed
571 items! Please be aware of some "NoSuchElementExceptions" if you try to
572 call any other method of this cache in relation to this key names.
574 @throw [css::uno::Exception]
575 if the cache itself is not valid
576 any longer, because any operation before damage it.
578 void detectFlatForURL(const css::util::URL& aURL ,
579 FlatDetection& rFlatTypes) const;
582 // private helper
584 private:
586 std::vector<OUString> getItemNames(std::unique_lock<std::mutex>& rGuard, EItemType eType) const;
588 /** @short return a reference to one of our internal
589 sub container, which contains items of the
590 requested type.
592 @param eType
593 specify, which sub container is needed outside.
595 @return [CacheItemList&]
596 a reference(!) to the right sub container member.
598 @throw [css::uno::Exception]
599 if the required list does not exist.
601 const CacheItemList& impl_getItemList(std::unique_lock<std::mutex>& rGuard, EItemType eType) const;
603 CacheItemList& impl_getItemList(std::unique_lock<std::mutex>& rGuard, EItemType eType);
605 CacheItem& impl_getItem( std::unique_lock<std::mutex>& rGuard, EItemType eType, const OUString& sItem);
607 /** @short return a valid configuration update access
608 to the underlying configuration package, which
609 is fix for this cache.
611 @descr It checks first, if the internal member m_xConfig already
612 points to an open update access. If not - it opens a new one.
613 Doing so this method can be called every time a configuration
614 access is needed.
616 @param eProvider
617 specify the needed configuration provider.
618 see EConfigProvider for further information ...
620 @throws css::uno::Exception
622 @attention If a configuration access was opened successfully
623 all necessary listener connections will be established
624 too. So this cache will be informed about outside updates.
626 css::uno::Reference< css::uno::XInterface > impl_openConfig(std::unique_lock<std::mutex>& rGuard, EConfigProvider eProvide);
629 /** @short tries to open the requested configuration root
630 using the specified modi.
632 @param sRoot
633 specify the configuration root, which should be opened.
635 @param bReadOnly
636 enable/disable write access on the returned configuration
637 object.
639 @param bLocalesMode
640 enable/disable special handling of localized configuration
641 items by the returned configuration object.
643 @return A valid reference, if the configuration access could be opened
644 and initialized within the requested modes successfully;
645 a NULL reference otherwise.
647 static css::uno::Reference< css::uno::XInterface > impl_createConfigAccess(std::unique_lock<std::mutex>& rGuard,
648 const OUString& sRoot ,
649 bool bReadOnly ,
650 bool bLocalesMode);
653 /** @short reads the specified configuration key
654 and return its value.
656 @descr The specified key must be an absolute configuration path,
657 which can be split into its package and relative path tokens.
659 @attention Because this function might opens a new configuration
660 read access for reading one key value only, it should
661 be used in rare cases only. It's an easy way... but an
662 expensive one.
664 @param sDirectKey
665 the absolute configuration path, which should be read.
667 @return [css::uno::Any]
668 the value of the requested key.
669 Can be empty if an internal error occurred or if the requested
670 key does not exists!
672 static css::uno::Any impl_getDirectCFGValue(std::unique_lock<std::mutex>& rGuard, std::u16string_view sDirectKey);
675 /** @short load the underlying configuration into this cache.
677 @descr Which items should be read can be regulate by the
678 parameter eRequiredState. That provides the possibility
679 to load standard values on startup only and update this
680 cache later on demand with all available information.
682 @param eRequiredState
683 indicates, which fill state this cache should have afterwards.
685 @throws css::uno::Exception
687 void impl_load(std::unique_lock<std::mutex>& rGuard, EFillState eRequiredState);
690 /** @short validate the whole cache and create
691 structures for optimized items access.
693 @descr Wrong cache items will be removed automatically.
694 Wrong dependencies will be corrected automatically.
695 If something could not be repaired - an exception
696 is thrown.
697 Further some optimized structures will be created.
698 E.g.: a hash to map extensions to her types.
700 @attention There is no exception, if the cache could be repaired
701 but contained wrong elements before!
703 @throw [css::uno::Exception]
704 if cache is invalid and could not be repaired.
706 void impl_validateAndOptimize(std::unique_lock<std::mutex>& rGuard);
708 private:
711 /** @short read the specified config set into the cache.
713 @descr This method provides the following mechanism for reading:
714 a) read only standard properties of set items
715 b) read anything
716 c) read only optional properties and update already existing
717 items of the specified cache
719 @param xConfig
720 API which provides access to the required configuration set.
722 @param eType
723 specify the type of config item, which must be interpreted.
724 Of course this information can be used to locate the right set
725 at the given xConfig API object.
727 @param eOption
728 regulate reading of standard/optional or all properties.
730 @param pCache
731 points to the cache member, which should be filled or updated.
733 @throw [css::uno::Exception]
734 if an unrecoverable error occurs inside this operation.
736 void impl_loadSet(std::unique_lock<std::mutex>& rGuard,
737 const css::uno::Reference< css::container::XNameAccess >& xConfig,
738 EItemType eType ,
739 EReadOption eOption,
740 CacheItemList* pCache );
743 /** @short read the specified container item from the given configuration set.
745 @descr It's not added to any internal structures here. That must be done
746 outside this method.
748 @param xSet
749 provides access to the configuration set, which includes all items.
751 @param eType
752 specify, which container item type must be read.
754 @param sItem
755 means the internal name, which can be used to address the item
756 properties relative to the given configuration set.
758 @param eOption
759 regulate, which properties of the requested item should be read.
760 See definition of EReadOption for further information.
762 @throw [css::uno::Exception]
763 if an unrecoverable error occurs inside this operation.
765 CacheItem impl_loadItem(std::unique_lock<std::mutex>& rGuard,
766 const css::uno::Reference< css::container::XNameAccess >& xSet ,
767 EItemType eType ,
768 const OUString& sItem ,
769 EReadOption eOption);
772 /** @short try to load the requested item on demand from the underlying configuration
773 layer.
775 @descr The outside code has to be sure, that the item does not already exists
776 inside this cache. Otherwise it will be loaded twice. This method
777 doesn't check such constellations!
779 @param eType
780 specify the type of config item, which must be interpreted.
781 Of course this information can be used to locate the right set
782 at the given xConfig API object.
784 @param sItem
785 the set node name of the requested item.
787 @return An iterator, which points directly to the new cached item.
788 Is a valid iterator if no exception occurred here!
789 But to improve robustness - it should be checked :-)
791 @throw [css::container::NoSuchElementException]
792 if the item does not exists inside the configuration layer too!
794 @throw [css::uno::Exception]
795 if an unrecoverable error occurs inside this operation.
797 CacheItemList::iterator impl_loadItemOnDemand( std::unique_lock<std::mutex>& rGuard,
798 EItemType eType,
799 const OUString& sItem);
802 /** TODO
804 @throws css::uno::Exception
806 static void impl_saveItem(const css::uno::Reference< css::container::XNameReplace >& xSet ,
807 EItemType eType ,
808 const CacheItem & aValue);
811 /** TODO
813 @throws css::uno::Exception
815 void impl_addItem2FlushList( EItemType eType,
816 const OUString& sItem);
819 /** TODO
821 @throws css::uno::Exception
823 static void impl_flushByList(const css::uno::Reference< css::container::XNameAccess >& xSet ,
824 EItemType eType ,
825 const CacheItemList& rCache,
826 const std::vector<OUString>& lItems);
829 /** @short specify, which save operation is necessary for the specified item.
831 @desrc If an item of this cache will be added/removed or modified it will
832 be changed inside memory only first. But we save its name inside a special
833 list of changed items. If at least the method flush() is called, we use
834 this list to check if the item was changed/added or removed. This method
835 checks the exist state of the requested item inside our own cache
836 and inside the underlying configuration layer to find out, if the item
837 must be removed/added or modified inside the configuration layer.
839 @param xSet
840 points directly to the configuration set, where the item should resist
841 (if it exists!).
843 @param rList
844 points to our internal cache list, where the item should resist
845 (if it exists!).
847 @param sItem
848 the internal name of the item, which should be checked.
850 @return An enum value of type EItemFlushState, which indicates the needed
851 API operation for updating the underlying configuration layer.
853 @throws An exception if anything failed inside this operation.
854 e.g. the given configuration set was not open.
856 static EItemFlushState impl_specifyFlushOperation(const css::uno::Reference< css::container::XNameAccess >& xSet ,
857 const CacheItemList& rList,
858 const OUString& sItem);
861 /** TODO
863 @throws css::uno::Exception
865 void impl_readPatchUINames(std::unique_lock<std::mutex>& rGuard,
866 const css::uno::Reference< css::container::XNameAccess >& xNode,
867 CacheItem& rItem);
870 /** TODO
872 @throws css::uno::Exception
874 static void impl_savePatchUINames(const css::uno::Reference< css::container::XNameReplace >& xNode,
875 const CacheItem& rItem);
877 /** TODO */
878 void impl_readOldFormat(std::unique_lock<std::mutex>& rGuard);
880 /** TODO
882 @throws css::uno::Exception
884 CacheItem impl_readOldItem(std::unique_lock<std::mutex>& rGuard,
885 const css::uno::Reference< css::container::XNameAccess >& xSet ,
886 EItemType eType,
887 const OUString& sItem);
890 /** TODO */
891 static void impl_interpretDataVal4Type(const OUString& sValue,
892 sal_Int32 nProp ,
893 CacheItem& rItem );
896 /** TODO */
897 static void impl_interpretDataVal4Filter(const OUString& sValue,
898 sal_Int32 nProp ,
899 CacheItem& rItem );
902 /** TODO */
903 static std::vector<OUString> impl_tokenizeString(std::u16string_view sData ,
904 sal_Unicode cSeparator);
907 #if OSL_DEBUG_LEVEL > 0
908 /** TODO */
909 OUString impl_searchFrameLoaderForType(const OUString& sType) const;
910 OUString impl_searchContentHandlerForType(const OUString& sType) const;
911 #endif
914 /** @short check if the specified OOo module is installed.
916 @param sModule
917 the long name of the module (e.g. "com.sun.star.text.TextDocument").
919 @return sal_True if the requested module is installed; sal_False otherwise.
921 bool impl_isModuleInstalled(std::unique_lock<std::mutex>& rGuard, const OUString& sModule);
924 /** @short convert a list of flag names to its int representation.
926 @param lNames
927 the list of flag names.
929 @return the converted flag field.
931 static SfxFilterFlags impl_convertFlagNames2FlagField(const css::uno::Sequence< OUString >& lNames);
934 /** @short convert a flag field value to its list representation of flag names.
936 @param nFlags
937 the flag field value
939 @return [seq< string >]
940 the converted flag name list.
942 static css::uno::Sequence< OUString > impl_convertFlagField2FlagNames(SfxFilterFlags nFlags);
945 FilterCache& GetTheFilterCache();
947 } // namespace filter::config
949 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */