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 <vcl/weld.hxx>
24
25namespace sfx2 { class DocumentInserter; }
26namespace sfx2 { class FileDialogHelper; }
27
28class ScDocShell;
29class SvtURLBox;
30
32{
33private:
35 std::unique_ptr<sfx2::DocumentInserter> m_xDocInserter;
37
38 std::unique_ptr<SvtURLBox> m_xCbUrl;
39 std::unique_ptr<weld::Button> m_xBtnBrowse;
40 std::unique_ptr<weld::TreeView> m_xLbRanges;
41 std::unique_ptr<weld::CheckButton> m_xBtnReload;
42 std::unique_ptr<weld::SpinButton> m_xNfDelay;
43 std::unique_ptr<weld::Label> m_xFtSeconds;
44 std::unique_ptr<weld::Button> m_xBtnOk;
45
46 DECL_LINK(FileHdl, weld::ComboBox&, bool);
47 DECL_LINK(BrowseHdl, weld::Button&, void);
48 DECL_LINK(RangeHdl, weld::TreeView&, void);
49 DECL_LINK(ReloadHdl, weld::Toggleable&, void);
50 DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper*, void);
51
52 void UpdateSourceRanges();
53 void UpdateEnable();
54 void LoadDocument( const OUString& rFile, const OUString& rFilter,
55 const OUString& rOptions );
56
57public:
59 virtual ~ScLinkedAreaDlg() override;
60
61 void InitFromOldLink( const OUString& rFile, const OUString& rFilter,
62 const OUString& rOptions, std::u16string_view rSource,
63 sal_Int32 nRefreshDelaySeconds );
64
65 OUString GetURL() const;
66 OUString GetFilter() const; // may be empty
67 OUString GetOptions() const; // filter options
68 OUString GetSource() const; // separated by ";"
69 sal_Int32 GetRefreshDelaySeconds() const; // 0 if disabled
70};
71
72/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(ReloadHdl, weld::Toggleable &, void)
DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper *, void)
OUString GetURL() const
Definition: linkarea.cxx:293
sal_Int32 GetRefreshDelaySeconds() const
Definition: linkarea.cxx:336
ScLinkedAreaDlg(weld::Widget *pParent)
Definition: linkarea.cxx:39
std::unique_ptr< weld::TreeView > m_xLbRanges
Definition: linkarea.hxx:40
DECL_LINK(FileHdl, weld::ComboBox &, bool)
std::unique_ptr< weld::Label > m_xFtSeconds
Definition: linkarea.hxx:43
void LoadDocument(const OUString &rFile, const OUString &rFilter, const OUString &rOptions)
Definition: linkarea.cxx:106
std::unique_ptr< SvtURLBox > m_xCbUrl
Definition: linkarea.hxx:38
DECL_LINK(RangeHdl, weld::TreeView &, void)
void UpdateEnable()
Definition: linkarea.cxx:283
std::unique_ptr< weld::CheckButton > m_xBtnReload
Definition: linkarea.hxx:41
OUString GetSource() const
Definition: linkarea.cxx:323
SfxObjectShellRef aSourceRef
Definition: linkarea.hxx:36
ScDocShell * m_pSourceShell
Definition: linkarea.hxx:34
std::unique_ptr< weld::Button > m_xBtnOk
Definition: linkarea.hxx:44
void UpdateSourceRanges()
Definition: linkarea.cxx:240
void InitFromOldLink(const OUString &rFile, const OUString &rFilter, const OUString &rOptions, std::u16string_view rSource, sal_Int32 nRefreshDelaySeconds)
Definition: linkarea.cxx:139
virtual ~ScLinkedAreaDlg() override
Definition: linkarea.cxx:61
std::unique_ptr< sfx2::DocumentInserter > m_xDocInserter
Definition: linkarea.hxx:35
DECL_LINK(BrowseHdl, weld::Button &, void)
OUString GetFilter() const
Definition: linkarea.cxx:303
std::unique_ptr< weld::SpinButton > m_xNfDelay
Definition: linkarea.hxx:42
std::unique_ptr< weld::Button > m_xBtnBrowse
Definition: linkarea.hxx:39
OUString GetOptions() const
Definition: linkarea.cxx:313