1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_LINKAREA_HXX 29 #define SC_LINKAREA_HXX 30 31 #include <com/sun/star/embed/XEmbeddedObject.hpp> 32 #include <vcl/dialog.hxx> 33 34 #ifndef _SV_BUTTON_HXX 35 #include <vcl/button.hxx> 36 #endif 37 #include <vcl/field.hxx> 38 #include <vcl/fixed.hxx> 39 #include <vcl/lstbox.hxx> 40 #include <svtools/stdctrl.hxx> 41 #include <svtools/inettbc.hxx> 42 43 //REMOVE #ifndef SO2_DECL_SVEMBEDDEDOBJECT_DEFINED 44 //REMOVE #define SO2_DECL_SVEMBEDDEDOBJECT_DEFINED 45 //REMOVE SO2_DECL_REF(SvEmbeddedObject) 46 //REMOVE #endif 47 48 namespace sfx2 { class DocumentInserter; } 49 namespace sfx2 { class FileDialogHelper; } 50 51 class ScDocShell; 52 53 //------------------------------------------------------------------------ 54 55 class ScLinkedAreaDlg : public ModalDialog 56 { 57 private: 58 FixedLine aFlLocation; 59 SvtURLBox aCbUrl; 60 PushButton aBtnBrowse; 61 FixedInfo aTxtHint; 62 FixedText aFtRanges; 63 MultiListBox aLbRanges; 64 CheckBox aBtnReload; 65 NumericField aNfDelay; 66 FixedText aFtSeconds; 67 OKButton aBtnOk; 68 CancelButton aBtnCancel; 69 HelpButton aBtnHelp; 70 71 ScDocShell* pSourceShell; 72 sfx2::DocumentInserter* pDocInserter; 73 74 SfxObjectShellRef aSourceRef; 75 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xSourceObject; 76 77 DECL_LINK( FileHdl, ComboBox* ); 78 DECL_LINK( BrowseHdl, PushButton* ); 79 DECL_LINK( RangeHdl, MultiListBox* ); 80 DECL_LINK( ReloadHdl, CheckBox* ); 81 DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); 82 83 void UpdateSourceRanges(); 84 void UpdateEnable(); 85 void LoadDocument( const String& rFile, const String& rFilter, 86 const String& rOptions ); 87 88 public: 89 ScLinkedAreaDlg( Window* pParent ); 90 ~ScLinkedAreaDlg(); 91 92 void InitFromOldLink( const String& rFile, const String& rFilter, 93 const String& rOptions, const String& rSource, 94 sal_uLong nRefresh ); 95 96 virtual short Execute(); // overwritten to set dialog parent 97 98 String GetURL(); 99 String GetFilter(); // may be empty 100 String GetOptions(); // filter options 101 String GetSource(); // separated by ";" 102 sal_uLong GetRefresh(); // 0 if disabled 103 }; 104 105 #endif 106 107