1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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
;
29 class GlobalEventListenerImpl
;
31 class XMLFilterTestDialog
: public weld::GenericDialogController
34 XMLFilterTestDialog(weld::Window
* pParent
,
35 const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
);
36 virtual ~XMLFilterTestDialog() override
;
38 void test( const filter_info_impl
& rFilterInfo
);
40 void updateCurrentDocumentButtonState( css::uno::Reference
< css::lang::XComponent
> const * pRef
= nullptr );
43 DECL_LINK(ClickHdl_Impl
, weld::Button
&, void);
45 void onExportBrowse();
46 void onExportCurrentDocument();
47 void onImportBrowse();
50 css::uno::Reference
< css::lang::XComponent
> getFrontMostDocument( const OUString
& rServiceName
);
51 void import( const OUString
& rURL
);
52 static void displayXMLFile( const OUString
& rURL
);
53 void doExport( const css::uno::Reference
< css::lang::XComponent
>& xComp
);
56 css::uno::Reference
< css::uno::XComponentContext
> mxContext
;
57 css::uno::Reference
< css::document::XDocumentEventBroadcaster
> mxGlobalBroadcaster
;
58 rtl::Reference
< GlobalEventListenerImpl
> mxGlobalEventListener
;
59 css::uno::WeakReference
< css::lang::XComponent
> mxLastFocusModel
;
61 OUString m_sImportRecentFile
;
62 OUString m_sExportRecentFile
;
63 std::unique_ptr
<filter_info_impl
> m_xFilterInfo
;
64 OUString m_sDialogTitle
;
66 std::unique_ptr
<weld::Widget
> m_xExport
;
67 std::unique_ptr
<weld::Label
> m_xFTExportXSLTFile
;
68 std::unique_ptr
<weld::Button
> m_xPBExportBrowse
;
69 std::unique_ptr
<weld::Button
> m_xPBCurrentDocument
;
70 std::unique_ptr
<weld::Label
> m_xFTNameOfCurrentFile
;
71 std::unique_ptr
<weld::Widget
> m_xImport
;
72 std::unique_ptr
<weld::Label
> m_xFTImportXSLTFile
;
73 std::unique_ptr
<weld::Label
> m_xFTImportTemplate
;
74 std::unique_ptr
<weld::Label
> m_xFTImportTemplateFile
;
75 std::unique_ptr
<weld::CheckButton
> m_xCBXDisplaySource
;
76 std::unique_ptr
<weld::Button
> m_xPBImportBrowse
;
77 std::unique_ptr
<weld::Button
> m_xPBRecentFile
;
78 std::unique_ptr
<weld::Label
> m_xFTNameOfRecentFile
;
79 std::unique_ptr
<weld::Button
> m_xPBClose
;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */