android: Update app-specific/MIME type icons
[LibreOffice.git] / filter / source / xsltdialog / xmlfiltertestdialog.hxx
blobbce1e19e1d3ef7a3019720ddc9130f0cc14ad706
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/lang/XComponent.hpp>
22 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
23 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <cppuhelper/weakref.hxx>
26 #include <vcl/weld.hxx>
28 class filter_info_impl;
30 class XMLFilterTestDialog : public weld::GenericDialogController
32 public:
33 XMLFilterTestDialog(weld::Window* pParent,
34 const css::uno::Reference< css::uno::XComponentContext >& rxContext);
35 virtual ~XMLFilterTestDialog() override;
37 void test( const filter_info_impl& rFilterInfo );
39 void updateCurrentDocumentButtonState( css::uno::Reference< css::lang::XComponent > const * pRef = nullptr );
41 private:
42 DECL_LINK(ClickHdl_Impl, weld::Button&, void);
44 void onExportBrowse();
45 void onExportCurrentDocument();
46 void onImportBrowse();
47 void initDialog();
49 css::uno::Reference< css::lang::XComponent > getFrontMostDocument( const OUString& rServiceName );
50 void import( const OUString& rURL );
51 static void displayXMLFile( const OUString& rURL );
52 void doExport( const css::uno::Reference< css::lang::XComponent >& xComp );
54 private:
55 css::uno::Reference< css::uno::XComponentContext > mxContext;
56 css::uno::Reference< css::document::XDocumentEventBroadcaster > mxGlobalBroadcaster;
57 css::uno::Reference< css::document::XDocumentEventListener > mxGlobalEventListener;
58 css::uno::WeakReference< css::lang::XComponent > mxLastFocusModel;
60 OUString m_sImportRecentFile;
61 OUString m_sExportRecentFile;
62 std::unique_ptr<filter_info_impl> m_xFilterInfo;
63 OUString m_sDialogTitle;
65 std::unique_ptr<weld::Widget> m_xExport;
66 std::unique_ptr<weld::Label> m_xFTExportXSLTFile;
67 std::unique_ptr<weld::Button> m_xPBExportBrowse;
68 std::unique_ptr<weld::Button> m_xPBCurrentDocument;
69 std::unique_ptr<weld::Label> m_xFTNameOfCurrentFile;
70 std::unique_ptr<weld::Widget> m_xImport;
71 std::unique_ptr<weld::Label> m_xFTImportXSLTFile;
72 std::unique_ptr<weld::Label> m_xFTImportTemplate;
73 std::unique_ptr<weld::Label> m_xFTImportTemplateFile;
74 std::unique_ptr<weld::CheckButton> m_xCBXDisplaySource;
75 std::unique_ptr<weld::Button> m_xPBImportBrowse;
76 std::unique_ptr<weld::Button> m_xPBRecentFile;
77 std::unique_ptr<weld::Label> m_xFTNameOfRecentFile;
78 std::unique_ptr<weld::Button> m_xPBClose;
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */