LibreOffice Module sfx2 (master) 1
filtergrouping.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#ifndef INCLUDED_SFX2_SOURCE_DIALOG_FILTERGROUPING_HXX
21#define INCLUDED_SFX2_SOURCE_DIALOG_FILTERGROUPING_HXX
22
23#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
24#include <com/sun/star/container/XEnumeration.hpp>
25#include "filedlgimpl.hxx"
26
27#include <memory>
28
29namespace sfx2
30{
31
32
34 {
35 private:
36 ::std::vector< OUString > m_lFilters;
37 sal_Int32 m_nIterator;
38
39 public:
40 explicit TSortedFilterList(const css::uno::Reference< css::container::XEnumeration >& xFilterList);
41 std::shared_ptr<const SfxFilter> First();
42 std::shared_ptr<const SfxFilter> Next();
43
44 private:
45 std::shared_ptr<const SfxFilter> impl_getFilter(sal_Int32 nIndex);
46 };
47
48
53 TSortedFilterList& _rFilterMatcher,
54 const css::uno::Reference< css::ui::dialogs::XFilterManager >& _rFilterManager,
55 OUString& /* [out] */ _rFirstNonEmpty,
56 FileDialogHelper_Impl& _rFileDlgImpl,
57 std::u16string_view _rFactory
58 );
59
61 TSortedFilterList& _rFilterMatcher,
62 const css::uno::Reference< css::ui::dialogs::XFilterManager >& _rFilterManager,
63 OUString& /* [out] */ _rFirstNonEmpty,
64 FileDialogHelper_Impl& _rFileDlgImpl
65 );
66
67
72 TSortedFilterList& _rFilterMatcher,
73 const css::uno::Reference< css::ui::dialogs::XFilterManager >& _rFilterManager,
74 OUString& /* [out] */ _rFirstNonEmpty,
75 FileDialogHelper_Impl& _rFileDlgImpl
76 );
77
78
82 OUString addExtension(
83 const OUString& _rDisplayText,
84 const OUString& _rExtension,
85 bool _bForOpen,
86 FileDialogHelper_Impl& _rFileDlgImpl
87 );
88
89
90} // namespace sfx2
91
92
93#endif // INCLUDED_SFX2_SOURCE_DIALOG_FILTERGROUPING_HXX
94
95
96/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< const SfxFilter > impl_getFilter(sal_Int32 nIndex)
::std::vector< OUString > m_lFilters
std::shared_ptr< const SfxFilter > First()
std::shared_ptr< const SfxFilter > Next()
TSortedFilterList(const css::uno::Reference< css::container::XEnumeration > &xFilterList)
OUString addExtension(const OUString &_rDisplayText, const OUString &_rExtension, bool _bForOpen, FileDialogHelper_Impl &_rFileDlgImpl)
adds the given extension to the display text.
void appendFiltersForOpen(TSortedFilterList &_rFilterMatcher, const Reference< XFilterManager > &_rxFilterManager, OUString &_rFirstNonEmpty, FileDialogHelper_Impl &_rFileDlgImpl)
void appendExportFilters(TSortedFilterList &_rFilterMatcher, const Reference< XFilterManager > &_rxFilterManager, OUString &_rFirstNonEmpty, FileDialogHelper_Impl &_rFileDlgImpl)
void appendFiltersForSave(TSortedFilterList &_rFilterMatcher, const Reference< XFilterManager > &_rxFilterManager, OUString &_rFirstNonEmpty, FileDialogHelper_Impl &_rFileDlgImpl, std::u16string_view _rFactory)