1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: linkarea.hxx,v $
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>
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)
51 namespace sfx2
{ class DocumentInserter
; }
52 namespace sfx2
{ class FileDialogHelper
; }
56 //------------------------------------------------------------------------
58 class ScLinkedAreaDlg
: public ModalDialog
61 FixedLine aFlLocation
;
63 PushButton aBtnBrowse
;
66 MultiListBox aLbRanges
;
68 NumericField aNfDelay
;
71 CancelButton aBtnCancel
;
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();
88 void LoadDocument( const String
& rFile
, const String
& rFilter
,
89 const String
& rOptions
);
92 ScLinkedAreaDlg( Window
* pParent
);
95 void InitFromOldLink( const String
& rFile
, const String
& rFilter
,
96 const String
& rOptions
, const String
& rSource
,
99 virtual short Execute(); // overwritten to set dialog parent
102 String
GetFilter(); // may be empty
103 String
GetOptions(); // filter options
104 String
GetSource(); // separated by ";"
105 ULONG
GetRefresh(); // 0 if disabled