tdf#164627 docx export: consolidate getWordCompatibilityMode()
[LibreOffice.git] / filter / source / xsltdialog / xmlfiltersettingsdialog.hxx
blobc555e8b16e15a349ab8dfa4a69b870e783968833
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 #pragma once
21 #include <com/sun/star/container/XNameContainer.hpp>
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <vcl/weld.hxx>
24 #include <vcl/locktoplevels.hxx>
25 #include <unotools/moduleoptions.hxx>
27 #include "xmlfiltercommon.hxx"
29 class XMLFilterSettingsDialog : public weld::GenericDialogController
31 public:
32 XMLFilterSettingsDialog(weld::Window* pParent,
33 const css::uno::Reference< css::uno::XComponentContext >& rxContext);
34 virtual ~XMLFilterSettingsDialog() override;
36 DECL_LINK(ClickHdl_Impl, weld::Button&, void );
37 DECL_LINK(SelectionChangedHdl_Impl, weld::TreeView&, void);
38 DECL_LINK(DoubleClickHdl_Impl, weld::TreeView&, bool);
40 void UpdateWindow();
42 void present() { m_xDialog->present(); }
44 void onNew();
45 void onEdit();
46 void onTest();
47 void onDelete();
48 void onSave();
49 void onOpen();
51 void updateStates();
52 private:
53 void initFilterList();
54 void disposeFilterList();
56 void incBusy() { maBusy.incBusy(m_xDialog.get()); }
57 void decBusy() { maBusy.decBusy(); }
59 bool insertOrEdit( filter_info_impl* pNewInfo, const filter_info_impl* pOldInfo = nullptr );
61 OUString createUniqueFilterName( const OUString& rUIName );
62 OUString createUniqueTypeName( const OUString& rTypeName );
63 OUString createUniqueInterfaceName( const OUString& rInterfaceName );
65 /** adds a new filter info entry to the ui filter list */
66 void addFilterEntry( const filter_info_impl* pInfo );
68 void changeEntry( const filter_info_impl* pInfo );
70 static OUString getEntryString( const filter_info_impl* pInfo );
72 private:
73 css::uno::Reference< css::uno::XComponentContext > mxContext;
74 css::uno::Reference< css::container::XNameContainer > mxFilterContainer;
75 css::uno::Reference< css::container::XNameContainer > mxTypeDetection;
76 css::uno::Reference< css::container::XNameContainer > mxExtendedTypeDetection;
78 std::vector< std::unique_ptr<filter_info_impl> > maFilterVector;
80 TopLevelWindowLocker maBusy;
82 OUString m_sTemplatePath;
83 OUString m_sDocTypePrefix;
85 SvtModuleOptions maModuleOpt;
87 std::unique_ptr<weld::Button> m_xPBNew;
88 std::unique_ptr<weld::Button> m_xPBEdit;
89 std::unique_ptr<weld::Button> m_xPBTest;
90 std::unique_ptr<weld::Button> m_xPBDelete;
91 std::unique_ptr<weld::Button> m_xPBSave;
92 std::unique_ptr<weld::Button> m_xPBOpen;
93 std::unique_ptr<weld::Button> m_xPBClose;
94 std::unique_ptr<weld::TreeView> m_xFilterListBox;
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */