1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INFORMATIONDIALOG_HXX 25 #define INFORMATIONDIALOG_HXX 26 #include <vector> 27 #include "unodialog.hxx" 28 #include "configurationaccess.hxx" 29 #include "pppoptimizertoken.hxx" 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <com/sun/star/awt/XItemListener.hpp> 32 #include <com/sun/star/beans/XPropertySet.hpp> 33 #include <com/sun/star/uno/Sequence.h> 34 #include <com/sun/star/text/XTextRange.hpp> 35 #include <com/sun/star/drawing/XShapes.hpp> 36 #include <com/sun/star/container/XIndexAccess.hpp> 37 #include <com/sun/star/frame/XController.hpp> 38 #include <com/sun/star/view/XSelectionSupplier.hpp> 39 #include <com/sun/star/uno/XComponentContext.hpp> 40 #include <com/sun/star/awt/XItemEventBroadcaster.hpp> 41 #include <com/sun/star/frame/XStorable.hpp> 42 #include <com/sun/star/frame/XDispatch.hpp> 43 #include <com/sun/star/awt/PushButtonType.hpp> 44 #include <com/sun/star/io/XStream.hpp> 45 46 // --------------------- 47 // - InformationDialog - 48 // --------------------- 49 50 class InformationDialog : public UnoDialog 51 , public ConfigurationAccess 52 { 53 public : 54 55 InformationDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext, 56 const com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rxParent, 57 const rtl::OUString& rSaveAsURL, 58 sal_Bool& bOpenNewDocument, 59 const sal_Int64& nSourceSize, 60 const sal_Int64& nDestSize, 61 const sal_Int64& nApproxDest ); 62 ~InformationDialog(); 63 64 sal_Bool execute(); 65 private : 66 67 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext; 68 sal_Int64 mnSourceSize; 69 sal_Int64 mnDestSize; 70 sal_Int64 mnApproxSize; 71 sal_Bool& mrbOpenNewDocument; 72 const rtl::OUString& maSaveAsURL; 73 com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > mxCheckBox; 74 75 void InitDialog(); 76 com::sun::star::uno::Reference< com::sun::star::awt::XFixedText > InsertFixedText( 77 const rtl::OUString& rControlName, 78 const rtl::OUString& rLabel, 79 sal_Int32 nXPos, 80 sal_Int32 nYPos, 81 sal_Int32 nWidth, 82 sal_Int32 nHeight, 83 sal_Bool bMultiLine, 84 sal_Int16 nTabIndex ); 85 com::sun::star::uno::Reference< com::sun::star::awt::XControl > InsertImage( 86 const rtl::OUString& rControlName, 87 const rtl::OUString& rURL, 88 sal_Int32 nPosX, 89 sal_Int32 nPosY, 90 sal_Int32 nWidth, 91 sal_Int32 nHeight, 92 sal_Bool bScale ); 93 com::sun::star::uno::Reference< com::sun::star::awt::XCheckBox > InsertCheckBox( 94 const rtl::OUString& rControlName, 95 const rtl::OUString& rLabel, 96 const rtl::OUString& rHelpURL, 97 sal_Int32 nXPos, 98 sal_Int32 nYPos, 99 sal_Int32 nWidth, 100 sal_Int32 nHeight, 101 sal_Int16 nTabIndex ); 102 com::sun::star::uno::Reference< com::sun::star::awt::XButton > InsertButton( 103 const rtl::OUString& rControlName, 104 sal_Int32 nXPos, 105 sal_Int32 nYPos, 106 sal_Int32 nWidth, 107 sal_Int32 nHeight, 108 sal_Int16 nTabIndex, 109 sal_Int32 nResID ); 110 111 }; 112 113 #endif 114