LibreOffice Module sc (master)  1
arealink.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 #ifndef INCLUDED_SC_INC_AREALINK_HXX
21 #define INCLUDED_SC_INC_AREALINK_HXX
22 
23 #include "refreshtimer.hxx"
24 #include "address.hxx"
25 #include <sfx2/lnkbase.hxx>
26 #include "scdllapi.h"
27 
28 class SfxObjectShell;
29 class ScDocShell;
30 
32 {
33 private:
35  OUString aFileName;
36  OUString aFilterName;
37  OUString aOptions;
38  OUString aSourceArea;
40  bool bAddUndo;
41  bool bInCreate;
42  bool bDoInsert; // is set to FALSE for first update
43  static bool FindExtRange( ScRange& rRange, const ScDocument& rSrcDoc, const OUString& rAreaName );
44 
45 public:
46  ScAreaLink( SfxObjectShell* pShell, const OUString& rFile,
47  const OUString& rFilter, const OUString& rOpt,
48  const OUString& rArea, const ScRange& rDest, sal_uLong nRefresh );
49  virtual ~ScAreaLink() override;
50 
51  virtual void Closed() override;
52  virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
53  const OUString& rMimeType, const css::uno::Any & rValue ) override;
54 
55  virtual void Edit(weld::Window*, const Link<SvBaseLink&,void>& rEndEditHdl) override;
56 
57  bool Refresh( const OUString& rNewFile, const OUString& rNewFilter,
58  const OUString& rNewArea, sal_uLong nNewRefresh );
59 
60  void SetInCreate(bool bSet) { bInCreate = bSet; }
61  void SetDoInsert(bool bSet) { bDoInsert = bSet; }
62  void SetDestArea(const ScRange& rNew);
63  void SetSource(const OUString& rDoc, const OUString& rFlt, const OUString& rOpt,
64  const OUString& rArea);
65 
66  bool IsEqual( const OUString& rFile, const OUString& rFilter, const OUString& rOpt,
67  const OUString& rSource, const ScRange& rDest ) const;
68 
69  const OUString& GetFile() const { return aFileName; }
70  const OUString& GetFilter() const { return aFilterName; }
71  const OUString& GetOptions() const { return aOptions; }
72  const OUString& GetSource() const { return aSourceArea; }
73  const ScRange& GetDestArea() const { return aDestArea; }
74 
75  DECL_LINK( RefreshHdl, Timer*, void );
76 };
77 
78 #endif
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uIntPtr sal_uLong
#define SC_DLLPUBLIC
Definition: scdllapi.h:28