1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SC_SOURCE_UI_INC_LINKAREA_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_LINKAREA_HXX
23 #include <vcl/dialog.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/fixed.hxx>
28 #include <vcl/lstbox.hxx>
29 #include <svtools/stdctrl.hxx>
30 #include <svtools/inettbc.hxx>
32 namespace sfx2
{ class DocumentInserter
; }
33 namespace sfx2
{ class FileDialogHelper
; }
37 class ScLinkedAreaDlg
: public ModalDialog
40 VclPtr
<SvtURLBox
> m_pCbUrl
;
41 VclPtr
<PushButton
> m_pBtnBrowse
;
42 VclPtr
<ListBox
> m_pLbRanges
;
43 VclPtr
<CheckBox
> m_pBtnReload
;
44 VclPtr
<NumericField
> m_pNfDelay
;
45 VclPtr
<FixedText
> m_pFtSeconds
;
46 VclPtr
<OKButton
> m_pBtnOk
;
48 ScDocShell
* pSourceShell
;
49 sfx2::DocumentInserter
* pDocInserter
;
51 SfxObjectShellRef aSourceRef
;
53 DECL_LINK(FileHdl
, void *);
54 DECL_LINK(BrowseHdl
, void *);
55 DECL_LINK(RangeHdl
, void *);
56 DECL_LINK(ReloadHdl
, void *);
57 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
* );
59 void UpdateSourceRanges();
61 void LoadDocument( const OUString
& rFile
, const OUString
& rFilter
,
62 const OUString
& rOptions
);
65 ScLinkedAreaDlg( vcl::Window
* pParent
);
66 virtual ~ScLinkedAreaDlg();
67 virtual void dispose() SAL_OVERRIDE
;
69 void InitFromOldLink( const OUString
& rFile
, const OUString
& rFilter
,
70 const OUString
& rOptions
, const OUString
& rSource
,
73 virtual short Execute() SAL_OVERRIDE
; // overwritten to set dialog parent
76 OUString
GetFilter(); // may be empty
77 OUString
GetOptions(); // filter options
78 OUString
GetSource(); // separated by ";"
79 sal_uLong
GetRefresh(); // 0 if disabled
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */