Updated core
[LibreOffice.git] / sdext / source / minimizer / informationdialog.hxx
blob5de67e1aafd77932afe57f08671e2ba3468b0e55
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INFORMATIONDIALOG_HXX
21 #define INFORMATIONDIALOG_HXX
22 #include <vector>
23 #include "unodialog.hxx"
24 #include "configurationaccess.hxx"
25 #include "pppoptimizertoken.hxx"
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/awt/XItemListener.hpp>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/uno/Sequence.h>
30 #include <com/sun/star/text/XTextRange.hpp>
31 #include <com/sun/star/drawing/XShapes.hpp>
32 #include <com/sun/star/container/XIndexAccess.hpp>
33 #include <com/sun/star/frame/XController.hpp>
34 #include <com/sun/star/view/XSelectionSupplier.hpp>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/awt/XItemEventBroadcaster.hpp>
37 #include <com/sun/star/frame/XStorable.hpp>
38 #include <com/sun/star/frame/XDispatch.hpp>
39 #include <com/sun/star/awt/PushButtonType.hpp>
40 #include <com/sun/star/io/XStream.hpp>
42 // ---------------------
43 // - InformationDialog -
44 // ---------------------
45 class InformationDialog : public UnoDialog, public ConfigurationAccess
47 public :
49 InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF,
50 com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame, const OUString& rSaveAsURL,
51 sal_Bool& bOpenNewDocument, const sal_Int64& nSourceSize, const sal_Int64& nDestSize, const sal_Int64& nApproxDest );
52 ~InformationDialog();
54 sal_Bool execute();
56 private :
58 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
59 com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
60 com::sun::star::uno::Reference< com::sun::star::io::XStream > mxTempFile;
62 com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
64 void InitDialog();
66 sal_Int64 mnSourceSize;
67 sal_Int64 mnDestSize;
68 sal_Int64 mnApproxSize;
69 sal_Bool& mrbOpenNewDocument;
70 const OUString& maSaveAsURL;
72 public :
74 com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
75 const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
78 class OKActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
80 public:
81 OKActionListener( InformationDialog& rInformationDialog ) : mrInformationDialog( rInformationDialog ){};
83 virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
84 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
85 private:
87 InformationDialog& mrInformationDialog;
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */