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 .
19 #ifndef INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTESTDIALOG_HXX
20 #define INCLUDED_FILTER_SOURCE_XSLTDIALOG_XMLFILTERTESTDIALOG_HXX
22 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
23 #include <com/sun/star/lang/XComponent.hpp>
24 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
26 #include <vcl/button.hxx>
27 #include <vcl/dialog.hxx>
28 #include <vcl/fixed.hxx>
29 #include <vcl/layout.hxx>
30 #include <svl/poolitem.hxx>
32 class filter_info_impl
;
34 class XMLFilterTestDialog
: public ModalDialog
37 XMLFilterTestDialog(vcl::Window
* pParent
,
38 const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& rxContext
);
39 virtual ~XMLFilterTestDialog();
40 virtual void dispose() SAL_OVERRIDE
;
42 void test( const filter_info_impl
& rFilterInfo
);
44 void updateCurrentDocumentButtonState( com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> * pRef
= NULL
);
47 DECL_LINK(ClickHdl_Impl
, PushButton
* );
49 void onExportBrowse();
50 void onExportCurrentDocument();
51 void onImportBrowse();
52 void onImportRecentDocument();
55 com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> getFrontMostDocument( const OUString
& rServiceName
);
56 void import( const OUString
& rURL
);
57 static void displayXMLFile( const OUString
& rURL
);
58 void doExport( com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> xComp
);
61 com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
> mxContext
;
62 com::sun::star::uno::Reference
< com::sun::star::document::XDocumentEventBroadcaster
> mxGlobalBroadcaster
;
63 com::sun::star::uno::Reference
< com::sun::star::document::XDocumentEventListener
> mxGlobalEventListener
;
64 com::sun::star::uno::WeakReference
< com::sun::star::lang::XComponent
> mxLastFocusModel
;
66 OUString m_sImportRecentFile
;
67 OUString m_sExportRecentFile
;
69 VclPtr
<VclContainer
> m_pExport
;
70 VclPtr
<FixedText
> m_pFTExportXSLTFile
;
71 VclPtr
<PushButton
> m_pPBExportBrowse
;
72 VclPtr
<PushButton
> m_pPBCurrentDocument
;
73 VclPtr
<FixedText
> m_pFTNameOfCurrentFile
;
75 VclPtr
<VclContainer
> m_pImport
;
76 VclPtr
<FixedText
> m_pFTImportXSLTFile
;
77 VclPtr
<FixedText
> m_pFTImportTemplate
;
78 VclPtr
<FixedText
> m_pFTImportTemplateFile
;
79 VclPtr
<CheckBox
> m_pCBXDisplaySource
;
80 VclPtr
<PushButton
> m_pPBImportBrowse
;
81 VclPtr
<PushButton
> m_pPBRecentFile
;
82 VclPtr
<FixedText
> m_pFTNameOfRecentFile
;
83 VclPtr
<CloseButton
> m_pPBClose
;
85 filter_info_impl
* m_pFilterInfo
;
87 OUString m_sDialogTitle
;
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */