nss: upgrade to release 3.73
[LibreOffice.git] / filter / source / xsltdialog / xmlfiltersettingsdialog.hxx
blobbfef03b29e2857811ddb1e8470fe26c33d3fa278
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 .
19 #ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
20 #define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERSETTINGSDIALOG_HXX
22 #include <com/sun/star/container/XNameContainer.hpp>
23 #include <com/sun/star/uno/XComponentContext.hpp>
24 #include <vcl/weld.hxx>
25 #include <vcl/waitobj.hxx>
26 #include <unotools/moduleoptions.hxx>
28 #include "xmlfiltercommon.hxx"
30 class XMLFilterSettingsDialog : public weld::GenericDialogController
32 public:
33 XMLFilterSettingsDialog(weld::Window* pParent,
34 const css::uno::Reference< css::uno::XComponentContext >& rxContext);
35 virtual ~XMLFilterSettingsDialog() override;
37 DECL_LINK(ClickHdl_Impl, weld::Button&, void );
38 DECL_LINK(SelectionChangedHdl_Impl, weld::TreeView&, void);
39 DECL_LINK(DoubleClickHdl_Impl, weld::TreeView&, bool);
41 void UpdateWindow();
43 void present() { m_xDialog->present(); }
45 void onNew();
46 void onEdit();
47 void onTest();
48 void onDelete();
49 void onSave();
50 void onOpen();
52 void updateStates();
53 private:
54 void initFilterList();
55 void disposeFilterList();
57 void incBusy() { maBusy.incBusy(m_xDialog.get()); }
58 void decBusy() { maBusy.decBusy(); }
60 bool insertOrEdit( filter_info_impl* pNewInfo, const filter_info_impl* pOldInfo = nullptr );
62 OUString createUniqueFilterName( const OUString& rUIName );
63 OUString createUniqueTypeName( const OUString& rTypeName );
64 OUString createUniqueInterfaceName( const OUString& rInterfaceName );
66 /** adds a new filter info entry to the ui filter list */
67 void addFilterEntry( const filter_info_impl* pInfo );
69 void changeEntry( const filter_info_impl* pInfo );
71 static OUString getEntryString( const filter_info_impl* pInfo );
73 private:
74 css::uno::Reference< css::uno::XComponentContext > mxContext;
75 css::uno::Reference< css::container::XNameContainer > mxFilterContainer;
76 css::uno::Reference< css::container::XNameContainer > mxTypeDetection;
77 css::uno::Reference< css::container::XNameContainer > mxExtendedTypeDetection;
79 std::vector< std::unique_ptr<filter_info_impl> > maFilterVector;
81 TopLevelWindowLocker maBusy;
83 OUString m_sTemplatePath;
84 OUString m_sDocTypePrefix;
86 SvtModuleOptions maModuleOpt;
88 std::unique_ptr<weld::Button> m_xPBNew;
89 std::unique_ptr<weld::Button> m_xPBEdit;
90 std::unique_ptr<weld::Button> m_xPBTest;
91 std::unique_ptr<weld::Button> m_xPBDelete;
92 std::unique_ptr<weld::Button> m_xPBSave;
93 std::unique_ptr<weld::Button> m_xPBOpen;
94 std::unique_ptr<weld::Button> m_xPBClose;
95 std::unique_ptr<weld::TreeView> m_xFilterListBox;
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */