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
37 #ifndef SC_REFRESHTIMER_HXX
38 #include "refreshtimer.hxx"
41 #ifndef _LNKBASE_HXX //autogen
42 #include <bf_so3/lnkbase.hxx>
49 class ScAreaLink
: public ::binfilter::SvBaseLink
, public ScRefreshTimer
52 ScDocShell
* pDocShell
; // Container
60 BOOL bDoInsert
; // wird fuer das erste Update auf FALSE gesetzt
62 BOOL
FindExtRange( ScRange
& rRange
, ScDocument
* pSrcDoc
, const String
& rAreaName
);
66 ScAreaLink( SfxObjectShell
* pShell
, const String
& rFile
,
67 const String
& rFilter
, const String
& rOpt
,
68 const String
& rArea
, const ScRange
& rDest
, ULONG nRefresh
);
69 virtual ~ScAreaLink();
71 virtual void DataChanged( const String
& rMimeType
,
72 const ::com::sun::star::uno::Any
& rValue
);
75 BOOL
Refresh( const String
& rNewFile
, const String
& rNewFilter
,
76 const String
& rNewArea
, ULONG nNewRefresh
);
78 void SetInCreate(BOOL bSet
) { bInCreate
= bSet
; }
79 void SetDoInsert(BOOL bSet
) { bDoInsert
= bSet
; }
80 void SetDestArea(const ScRange
& rNew
);
83 const String
& GetFile() const { return aFileName
; }
84 const String
& GetFilter() const { return aFilterName
; }
85 const String
& GetOptions() const { return aOptions
; }
86 const String
& GetSource() const { return aSourceArea
; }
87 const ScRange
& GetDestArea() const { return aDestArea
; }
89 DECL_LINK( RefreshHdl
, ScAreaLink
* );
94 } //namespace binfilter