Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / sfx2 / source / dialog / filtergrouping.hxx
blob5702362298fd82e7657953f9d788a18b832e4f8e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef SFX2_FILTERGROUPING_HXX
30 #define SFX2_FILTERGROUPING_HXX
32 #include <com/sun/star/ui/dialogs/XFilterManager.hpp>
33 #include <com/sun/star/container/XEnumeration.hpp>
34 #include "filedlgimpl.hxx"
36 class SfxFilterMatcherIter;
38 //........................................................................
39 namespace sfx2
41 //........................................................................
43 class TSortedFilterList
45 private:
47 ::std::vector< ::rtl::OUString > m_lFilters;
48 sal_Int32 m_nIterator;
50 public:
52 TSortedFilterList(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >& xFilterList);
53 const SfxFilter* First();
54 const SfxFilter* Next();
56 private:
57 const SfxFilter* impl_getFilter(sal_Int32 nIndex);
60 //--------------------------------------------------------------------
61 /** adds the given filters to the filter manager.
62 <p>To be used when saving generic files.</p>
64 void appendFiltersForSave(
65 TSortedFilterList& _rFilterMatcher,
66 const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilterManager >& _rFilterManager,
67 ::rtl::OUString& /* [out] */ _rFirstNonEmpty,
68 FileDialogHelper_Impl& _rFileDlgImpl,
69 const ::rtl::OUString& _rFactory
72 void appendExportFilters(
73 TSortedFilterList& _rFilterMatcher,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilterManager >& _rFilterManager,
75 ::rtl::OUString& /* [out] */ _rFirstNonEmpty,
76 FileDialogHelper_Impl& _rFileDlgImpl
79 //--------------------------------------------------------------------
80 /** adds the given filters to the filter manager.
81 <p>To be used when opening generic files.</p>
83 void appendFiltersForOpen(
84 TSortedFilterList& _rFilterMatcher,
85 const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilterManager >& _rFilterManager,
86 ::rtl::OUString& /* [out] */ _rFirstNonEmpty,
87 FileDialogHelper_Impl& _rFileDlgImpl
90 //--------------------------------------------------------------------
91 /** adds the given extension to the display text.
92 <p>To be used when opening or save generic files.</p>
94 ::rtl::OUString addExtension(
95 const ::rtl::OUString& _rDisplayText,
96 const ::rtl::OUString& _rExtension,
97 sal_Bool _bForOpen,
98 FileDialogHelper_Impl& _rFileDlgImpl
101 //........................................................................
102 } // namespace sfx2
103 //........................................................................
105 #endif // SFX2_FILTERGROUPING_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */