bump product version to 4.1.6.2
[LibreOffice.git] / sc / inc / arealink.hxx
blob60670b478f94a3be75243351e5a4c2a798be0be7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 SC_AREALINK_HXX
21 #define SC_AREALINK_HXX
23 #include "global.hxx"
24 #include "refreshtimer.hxx"
25 #include "address.hxx"
26 #include <sfx2/lnkbase.hxx>
27 #include "scdllapi.h"
29 class SfxObjectShell;
30 struct AreaLink_Impl;
32 class SC_DLLPUBLIC ScAreaLink : public ::sfx2::SvBaseLink, public ScRefreshTimer
34 private:
35 AreaLink_Impl* pImpl;
36 String aFileName;
37 String aFilterName;
38 String aOptions;
39 String aSourceArea;
40 ScRange aDestArea;
41 bool bAddUndo;
42 bool bInCreate;
43 bool bDoInsert; // is set to FALSE for first update
44 bool FindExtRange( ScRange& rRange, ScDocument* pSrcDoc, const OUString& rAreaName );
46 public:
47 TYPEINFO();
48 ScAreaLink( SfxObjectShell* pShell, const String& rFile,
49 const String& rFilter, const String& rOpt,
50 const String& rArea, const ScRange& rDest, sal_uLong nRefresh );
51 virtual ~ScAreaLink();
53 virtual void Closed();
54 virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
55 const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
57 virtual void Edit( Window*, const Link& rEndEditHdl );
59 sal_Bool Refresh( const String& rNewFile, const String& rNewFilter,
60 const String& rNewArea, sal_uLong nNewRefresh );
62 void SetInCreate(bool bSet) { bInCreate = bSet; }
63 void SetDoInsert(bool bSet) { bDoInsert = bSet; }
64 void SetDestArea(const ScRange& rNew);
65 void SetSource(const String& rDoc, const String& rFlt, const String& rOpt,
66 const String& rArea);
68 bool IsEqual( const String& rFile, const String& rFilter, const String& rOpt,
69 const String& rSource, const ScRange& rDest ) const;
71 const String& GetFile() const { return aFileName; }
72 const String& GetFilter() const { return aFilterName; }
73 const String& GetOptions() const { return aOptions; }
74 const String& GetSource() const { return aSourceArea; }
75 const ScRange& GetDestArea() const { return aDestArea; }
77 DECL_LINK( RefreshHdl, void* );
78 DECL_LINK( AreaEndEditHdl, void* );
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */