Bump version to 4.3-4
[LibreOffice.git] / sc / inc / arealink.hxx
blobb3bab58b0348a859293d35be1d8e68948bd3c86c
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 INCLUDED_SC_INC_AREALINK_HXX
21 #define INCLUDED_SC_INC_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 OUString aFileName;
37 OUString aFilterName;
38 OUString aOptions;
39 OUString 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_OVERRIDE();
48 ScAreaLink( SfxObjectShell* pShell, const OUString& rFile,
49 const OUString& rFilter, const OUString& rOpt,
50 const OUString& rArea, const ScRange& rDest, sal_uLong nRefresh );
51 virtual ~ScAreaLink();
53 virtual void Closed() SAL_OVERRIDE;
54 virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
55 const OUString& rMimeType, const ::com::sun::star::uno::Any & rValue ) SAL_OVERRIDE;
57 virtual void Edit( Window*, const Link& rEndEditHdl ) SAL_OVERRIDE;
59 bool Refresh( const OUString& rNewFile, const OUString& rNewFilter,
60 const OUString& 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 OUString& rDoc, const OUString& rFlt, const OUString& rOpt,
66 const OUString& rArea);
68 bool IsEqual( const OUString& rFile, const OUString& rFilter, const OUString& rOpt,
69 const OUString& rSource, const ScRange& rDest ) const;
71 const OUString& GetFile() const { return aFileName; }
72 const OUString& GetFilter() const { return aFilterName; }
73 const OUString& GetOptions() const { return aOptions; }
74 const OUString& 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: */