LibreOffice Module sc (master)  1
linkarea.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <sfx2/objsh.hxx>
23 #include <tools/solar.h>
24 #include <vcl/weld.hxx>
25 
26 namespace sfx2 { class DocumentInserter; }
27 namespace sfx2 { class FileDialogHelper; }
28 
29 class ScDocShell;
30 class SvtURLBox;
31 
33 {
34 private:
36  std::unique_ptr<sfx2::DocumentInserter> m_xDocInserter;
38 
39  std::unique_ptr<SvtURLBox> m_xCbUrl;
40  std::unique_ptr<weld::Button> m_xBtnBrowse;
41  std::unique_ptr<weld::TreeView> m_xLbRanges;
42  std::unique_ptr<weld::CheckButton> m_xBtnReload;
43  std::unique_ptr<weld::SpinButton> m_xNfDelay;
44  std::unique_ptr<weld::Label> m_xFtSeconds;
45  std::unique_ptr<weld::Button> m_xBtnOk;
46 
47  DECL_LINK(FileHdl, weld::ComboBox&, bool);
48  DECL_LINK(BrowseHdl, weld::Button&, void);
49  DECL_LINK(RangeHdl, weld::TreeView&, void);
50  DECL_LINK(ReloadHdl, weld::Toggleable&, void);
51  DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper*, void);
52 
53  void UpdateSourceRanges();
54  void UpdateEnable();
55  void LoadDocument( const OUString& rFile, const OUString& rFilter,
56  const OUString& rOptions );
57 
58 public:
59  ScLinkedAreaDlg(weld::Widget* pParent);
60  virtual ~ScLinkedAreaDlg() override;
61 
62  void InitFromOldLink( const OUString& rFile, const OUString& rFilter,
63  const OUString& rOptions, const OUString& rSource,
64  sal_uLong nRefresh );
65 
66  OUString GetURL() const;
67  OUString GetFilter() const; // may be empty
68  OUString GetOptions() const; // filter options
69  OUString GetSource() const; // separated by ";"
70  sal_uLong GetRefresh() const; // 0 if disabled
71 };
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString GetFilter() const
Definition: linkarea.cxx:295
sal_uLong GetRefresh() const
Definition: linkarea.cxx:328
virtual ~ScLinkedAreaDlg() override
Definition: linkarea.cxx:60
std::unique_ptr< weld::TreeView > m_xLbRanges
Definition: linkarea.hxx:41
sal_uIntPtr sal_uLong
std::unique_ptr< sfx2::DocumentInserter > m_xDocInserter
Definition: linkarea.hxx:36
std::unique_ptr< weld::SpinButton > m_xNfDelay
Definition: linkarea.hxx:43
std::unique_ptr< weld::Button > m_xBtnBrowse
Definition: linkarea.hxx:40
void UpdateSourceRanges()
Definition: linkarea.cxx:239
std::unique_ptr< weld::Label > m_xFtSeconds
Definition: linkarea.hxx:44
void LoadDocument(const OUString &rFile, const OUString &rFilter, const OUString &rOptions)
Definition: linkarea.cxx:105
void InitFromOldLink(const OUString &rFile, const OUString &rFilter, const OUString &rOptions, const OUString &rSource, sal_uLong nRefresh)
Definition: linkarea.cxx:138
ScDocShell * m_pSourceShell
Definition: linkarea.hxx:35
ScLinkedAreaDlg(weld::Widget *pParent)
Definition: linkarea.cxx:38
OUString GetOptions() const
Definition: linkarea.cxx:305
std::unique_ptr< weld::Button > m_xBtnOk
Definition: linkarea.hxx:45
SfxObjectShellRef aSourceRef
Definition: linkarea.hxx:37
DECL_LINK(FileHdl, weld::ComboBox &, bool)
OUString GetSource() const
Definition: linkarea.cxx:315
std::unique_ptr< weld::CheckButton > m_xBtnReload
Definition: linkarea.hxx:42
OUString GetURL() const
Definition: linkarea.cxx:285
void UpdateEnable()
Definition: linkarea.cxx:275
std::unique_ptr< SvtURLBox > m_xCbUrl
Definition: linkarea.hxx:39