1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlfiltertestdialog.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _XMLFILTERTESTDIALOG_HXX_
31 #define _XMLFILTERTESTDIALOG_HXX_
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <com/sun/star/lang/XComponent.hpp>
35 #include <com/sun/star/document/XEventBroadcaster.hpp>
36 #include <vcl/dialog.hxx>
38 #ifndef _SV_BUTTON_HXX
39 #include <vcl/button.hxx>
41 #include <vcl/fixed.hxx>
42 #include <svtools/poolitem.hxx>
44 class filter_info_impl
;
45 class XMLSourceFileDialog
;
47 class XMLFilterTestDialog
: public ModalDialog
50 XMLFilterTestDialog( Window
* pParent
, ResMgr
& rResMgr
, const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
>& rxMSF
);
51 virtual ~XMLFilterTestDialog();
53 void test( const filter_info_impl
& rFilterInfo
);
55 void updateCurrentDocumentButtonState( com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> * pRef
= NULL
);
58 DECL_LINK(ClickHdl_Impl
, PushButton
* );
60 void onExportBrowse();
61 void onExportCurrentDocument();
62 void onImportBrowse();
63 void onImportRecentDocument();
66 com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> getFrontMostDocument( const rtl::OUString
& rServiceName
);
67 void import( const rtl::OUString
& rURL
);
68 void displayXMLFile( const rtl::OUString
& rURL
);
69 void doExport( com::sun::star::uno::Reference
< com::sun::star::lang::XComponent
> xComp
);
72 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> mxMSF
;
73 com::sun::star::uno::Reference
< com::sun::star::document::XEventBroadcaster
> mxGlobalBroadcaster
;
74 com::sun::star::uno::Reference
< com::sun::star::document::XEventListener
> mxGlobalEventListener
;
75 com::sun::star::uno::WeakReference
< com::sun::star::lang::XComponent
> mxLastFocusModel
;
79 rtl::OUString maImportRecentFile
;
80 rtl::OUString maExportRecentFile
;
83 FixedText maFTExportXSLT
;
84 FixedText maFTExportXSLTFile
;
85 FixedText maFTTransformDocument
;
86 PushButton maPBExportBrowse
;
87 PushButton maPBCurrentDocument
;
88 FixedText maFTNameOfCurentFile
;
90 FixedText maFTImportXSLT
;
91 FixedText maFTImportXSLTFile
;
92 FixedText maFTImportTemplate
;
93 FixedText maFTImportTemplateFile
;
94 FixedText maFTTransformFile
;
95 CheckBox maCBXDisplaySource
;
96 PushButton maPBImportBrowse
;
97 PushButton maPBRecentDocument
;
98 FixedText maFTNameOfRecentFile
;
102 XMLSourceFileDialog
* mpSourceDLG
;
103 filter_info_impl
* mpFilterInfo
;
105 String maDialogTitle
;
107 ::rtl::OUString sDTDPath
;