Line data Source code
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 :
20 : #ifndef INCLUDED_SDEXT_SOURCE_MINIMIZER_INFORMATIONDIALOG_HXX
21 : #define INCLUDED_SDEXT_SOURCE_MINIMIZER_INFORMATIONDIALOG_HXX
22 : #include "unodialog.hxx"
23 : #include "configurationaccess.hxx"
24 : #include "pppoptimizertoken.hxx"
25 : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : #include <com/sun/star/awt/XItemListener.hpp>
27 : #include <com/sun/star/beans/XPropertySet.hpp>
28 : #include <com/sun/star/uno/Sequence.h>
29 : #include <com/sun/star/text/XTextRange.hpp>
30 : #include <com/sun/star/drawing/XShapes.hpp>
31 : #include <com/sun/star/container/XIndexAccess.hpp>
32 : #include <com/sun/star/frame/XController.hpp>
33 : #include <com/sun/star/view/XSelectionSupplier.hpp>
34 : #include <com/sun/star/uno/XComponentContext.hpp>
35 : #include <com/sun/star/awt/XItemEventBroadcaster.hpp>
36 : #include <com/sun/star/frame/XStorable.hpp>
37 : #include <com/sun/star/frame/XDispatch.hpp>
38 : #include <com/sun/star/awt/PushButtonType.hpp>
39 : #include <com/sun/star/io/XStream.hpp>
40 :
41 :
42 : // - InformationDialog -
43 :
44 : class InformationDialog : public UnoDialog, public ConfigurationAccess
45 : {
46 : public :
47 :
48 : InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
49 : com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const OUString& rSaveAsURL,
50 : sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
51 : ~InformationDialog();
52 :
53 : sal_Bool execute();
54 :
55 : private :
56 :
57 : com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext;
58 : com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
59 : com::sun::star::uno::Reference< com::sun::star::io::XStream > mxTempFile;
60 :
61 : com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
62 :
63 : void InitDialog();
64 :
65 : sal_Int64 mnSourceSize;
66 : sal_Int64 mnDestSize;
67 : sal_Int64 mnApproxSize;
68 : sal_Bool& mrbOpenNewDocument;
69 : const OUString& maSaveAsURL;
70 :
71 : public :
72 :
73 : com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
74 : const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxContext; };
75 : };
76 :
77 0 : class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
78 : {
79 : public:
80 0 : OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
81 :
82 : virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
83 : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 : private:
85 :
86 : InformationDialog& mrInformationDialog;
87 : };
88 :
89 : #endif
90 :
91 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|