xref: /aoo4110/main/sc/source/ui/inc/linkarea.hxx (revision b1cdbd2c)
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 SC_LINKAREA_HXX
25 #define SC_LINKAREA_HXX
26 
27 #include <com/sun/star/embed/XEmbeddedObject.hpp>
28 #include <vcl/dialog.hxx>
29 
30 #ifndef _SV_BUTTON_HXX
31 #include <vcl/button.hxx>
32 #endif
33 #include <vcl/field.hxx>
34 #include <vcl/fixed.hxx>
35 #include <vcl/lstbox.hxx>
36 #include <svtools/stdctrl.hxx>
37 #include <svtools/inettbc.hxx>
38 
39 //REMOVE	#ifndef SO2_DECL_SVEMBEDDEDOBJECT_DEFINED
40 //REMOVE	#define SO2_DECL_SVEMBEDDEDOBJECT_DEFINED
41 //REMOVE	SO2_DECL_REF(SvEmbeddedObject)
42 //REMOVE	#endif
43 
44 namespace sfx2 { class DocumentInserter; }
45 namespace sfx2 { class FileDialogHelper; }
46 
47 class ScDocShell;
48 
49 //------------------------------------------------------------------------
50 
51 class ScLinkedAreaDlg : public ModalDialog
52 {
53 private:
54 	FixedLine			aFlLocation;
55 	SvtURLBox			aCbUrl;
56 	PushButton			aBtnBrowse;
57 	FixedInfo			aTxtHint;
58 	FixedText			aFtRanges;
59 	MultiListBox		aLbRanges;
60 	CheckBox			aBtnReload;
61 	NumericField		aNfDelay;
62 	FixedText			aFtSeconds;
63 	OKButton			aBtnOk;
64 	CancelButton		aBtnCancel;
65 	HelpButton			aBtnHelp;
66 
67     ScDocShell*             pSourceShell;
68     sfx2::DocumentInserter* pDocInserter;
69 
70     SfxObjectShellRef   aSourceRef;
71 	::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xSourceObject;
72 
73 	DECL_LINK( FileHdl, ComboBox* );
74 	DECL_LINK( BrowseHdl, PushButton* );
75 	DECL_LINK( RangeHdl, MultiListBox* );
76 	DECL_LINK( ReloadHdl, CheckBox* );
77     DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
78 
79 	void				UpdateSourceRanges();
80 	void				UpdateEnable();
81 	void				LoadDocument( const String& rFile, const String& rFilter,
82 										const String& rOptions );
83 
84 public:
85 			ScLinkedAreaDlg( Window* pParent );
86 			~ScLinkedAreaDlg();
87 
88 	void			InitFromOldLink( const String& rFile, const String& rFilter,
89 										const String& rOptions, const String& rSource,
90 										sal_uLong nRefresh );
91 
92 	virtual short	Execute();			// overwritten to set dialog parent
93 
94 	String			GetURL();
95 	String			GetFilter();		// may be empty
96 	String			GetOptions();		// filter options
97 	String			GetSource();		// separated by ";"
98 	sal_uLong			GetRefresh();		// 0 if disabled
99 };
100 
101 #endif
102 
103