1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: arealink.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_AREALINK_HXX
32 #define SC_AREALINK_HXX
35 #include "refreshtimer.hxx"
36 #include "address.hxx"
37 #include <sfx2/lnkbase.hxx>
42 class AbstractScLinkedAreaDlg
;
45 class SC_DLLPUBLIC ScAreaLink
: public ::sfx2::SvBaseLink
, public ScRefreshTimer
56 BOOL bDoInsert
; // wird fuer das erste Update auf FALSE gesetzt
58 BOOL
FindExtRange( ScRange
& rRange
, ScDocument
* pSrcDoc
, const String
& rAreaName
);
62 ScAreaLink( SfxObjectShell
* pShell
, const String
& rFile
,
63 const String
& rFilter
, const String
& rOpt
,
64 const String
& rArea
, const ScRange
& rDest
, ULONG nRefresh
);
65 virtual ~ScAreaLink();
67 virtual void Closed();
68 virtual void DataChanged( const String
& rMimeType
,
69 const ::com::sun::star::uno::Any
& rValue
);
71 virtual void Edit( Window
*, const Link
& rEndEditHdl
);
73 BOOL
Refresh( const String
& rNewFile
, const String
& rNewFilter
,
74 const String
& rNewArea
, ULONG nNewRefresh
);
76 void SetInCreate(BOOL bSet
) { bInCreate
= bSet
; }
77 void SetDoInsert(BOOL bSet
) { bDoInsert
= bSet
; }
78 void SetDestArea(const ScRange
& rNew
);
79 void SetSource(const String
& rDoc
, const String
& rFlt
, const String
& rOpt
,
82 BOOL
IsEqual( const String
& rFile
, const String
& rFilter
, const String
& rOpt
,
83 const String
& rSource
, const ScRange
& rDest
) const;
85 const String
& GetFile() const { return aFileName
; }
86 const String
& GetFilter() const { return aFilterName
; }
87 const String
& GetOptions() const { return aOptions
; }
88 const String
& GetSource() const { return aSourceArea
; }
89 const ScRange
& GetDestArea() const { return aDestArea
; }
91 DECL_LINK( RefreshHdl
, ScAreaLink
* );
92 DECL_LINK( AreaEndEditHdl
, void* );