LibreOffice Module filter (master) 1
xmlfiltertestdialog.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <com/sun/star/lang/XComponent.hpp>
22#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
23#include <com/sun/star/uno/XComponentContext.hpp>
24
26#include <vcl/weld.hxx>
27
29
31{
32public:
34 const css::uno::Reference< css::uno::XComponentContext >& rxContext);
35 virtual ~XMLFilterTestDialog() override;
36
37 void test( const filter_info_impl& rFilterInfo );
38
39 void updateCurrentDocumentButtonState( css::uno::Reference< css::lang::XComponent > const * pRef = nullptr );
40
41private:
42 DECL_LINK(ClickHdl_Impl, weld::Button&, void);
43
44 void onExportBrowse();
46 void onImportBrowse();
47 void initDialog();
48
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 );
53
54private:
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;
59
62 std::unique_ptr<filter_info_impl> m_xFilterInfo;
64
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;
79};
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Widget > m_xExport
std::unique_ptr< weld::Label > m_xFTImportTemplateFile
std::unique_ptr< weld::Widget > m_xImport
std::unique_ptr< weld::Button > m_xPBRecentFile
void test(const filter_info_impl &rFilterInfo)
void updateCurrentDocumentButtonState(css::uno::Reference< css::lang::XComponent > const *pRef=nullptr)
static void displayXMLFile(const OUString &rURL)
std::unique_ptr< weld::Button > m_xPBImportBrowse
std::unique_ptr< weld::Button > m_xPBExportBrowse
css::uno::Reference< css::document::XDocumentEventListener > mxGlobalEventListener
std::unique_ptr< weld::Label > m_xFTImportXSLTFile
XMLFilterTestDialog(weld::Window *pParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext)
css::uno::Reference< css::lang::XComponent > getFrontMostDocument(const OUString &rServiceName)
returns the front most open component that supports the given service
DECL_LINK(ClickHdl_Impl, weld::Button &, void)
virtual ~XMLFilterTestDialog() override
std::unique_ptr< weld::Label > m_xFTExportXSLTFile
css::uno::WeakReference< css::lang::XComponent > mxLastFocusModel
std::unique_ptr< filter_info_impl > m_xFilterInfo
css::uno::Reference< css::document::XDocumentEventBroadcaster > mxGlobalBroadcaster
void doExport(const css::uno::Reference< css::lang::XComponent > &xComp)
std::unique_ptr< weld::Label > m_xFTNameOfRecentFile
std::unique_ptr< weld::CheckButton > m_xCBXDisplaySource
std::unique_ptr< weld::Button > m_xPBCurrentDocument
std::unique_ptr< weld::Label > m_xFTNameOfCurrentFile
css::uno::Reference< css::uno::XComponentContext > mxContext
std::unique_ptr< weld::Button > m_xPBClose
std::unique_ptr< weld::Label > m_xFTImportTemplate