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