update credits
[LibreOffice.git] / sc / inc / hints.hxx
blob17367fb510972a90acccf029c5c19e3ffaf4cddf
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_HINTS_HXX
21 #define SC_HINTS_HXX
23 #include "global.hxx"
24 #include "address.hxx"
25 #include <svl/hint.hxx>
27 // ---------------------------------------------------------------------------
29 class ScPaintHint : public SfxHint
31 ScRange aRange;
32 sal_uInt16 nParts;
33 sal_Bool bPrint; // flag indicating whether print/preview if affected
35 ScPaintHint(); // disabled
37 public:
38 TYPEINFO();
39 ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
40 ~ScPaintHint();
42 void SetPrintFlag(sal_Bool bSet) { bPrint = bSet; }
44 const ScRange& GetRange() const { return aRange; }
45 SCCOL GetStartCol() const { return aRange.aStart.Col(); }
46 SCROW GetStartRow() const { return aRange.aStart.Row(); }
47 SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
48 SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
49 SCROW GetEndRow() const { return aRange.aEnd.Row(); }
50 SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
51 sal_uInt16 GetParts() const { return nParts; }
52 sal_Bool GetPrintFlag() const { return bPrint; }
56 class ScUpdateRefHint : public SfxHint
58 UpdateRefMode eUpdateRefMode;
59 ScRange aRange;
60 SCsCOL nDx;
61 SCsROW nDy;
62 SCsTAB nDz;
64 public:
65 TYPEINFO();
67 ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
68 SCsCOL nX, SCsROW nY, SCsTAB nZ );
69 ~ScUpdateRefHint();
71 UpdateRefMode GetMode() const { return eUpdateRefMode; }
72 const ScRange& GetRange() const { return aRange; }
73 SCsCOL GetDx() const { return nDx; }
74 SCsROW GetDy() const { return nDy; }
75 SCsTAB GetDz() const { return nDz; }
79 #define SC_POINTERCHANGED_NUMFMT 1
81 class ScPointerChangedHint : public SfxHint
83 sal_uInt16 nFlags;
85 public:
86 TYPEINFO();
88 ~ScPointerChangedHint();
90 sal_uInt16 GetFlags() const { return nFlags; }
94 //! move ScLinkRefreshedHint to a different file?
96 #define SC_LINKREFTYPE_NONE 0
97 #define SC_LINKREFTYPE_SHEET 1
98 #define SC_LINKREFTYPE_AREA 2
99 #define SC_LINKREFTYPE_DDE 3
101 class ScLinkRefreshedHint : public SfxHint
103 sal_uInt16 nLinkType; // SC_LINKREFTYPE_...
104 String aUrl; // used for sheet links
105 String aDdeAppl; // used for dde links:
106 String aDdeTopic;
107 String aDdeItem;
108 sal_uInt8 nDdeMode;
109 ScAddress aDestPos; // used to identify area links
110 //! also use source data for area links?
112 public:
113 TYPEINFO();
114 ScLinkRefreshedHint();
115 ~ScLinkRefreshedHint();
117 void SetSheetLink( const String& rSourceUrl );
118 void SetDdeLink( const String& rA, const String& rT, const String& rI, sal_uInt8 nM );
119 void SetAreaLink( const ScAddress& rPos );
121 sal_uInt16 GetLinkType() const { return nLinkType; }
122 const String& GetUrl() const { return aUrl; }
123 const String& GetDdeAppl() const { return aDdeAppl; }
124 const String& GetDdeTopic() const { return aDdeTopic; }
125 const String& GetDdeItem() const { return aDdeItem; }
126 sal_uInt8 GetDdeMode() const { return nDdeMode; }
127 const ScAddress& GetDestPos() const { return aDestPos; }
131 //! move ScAutoStyleHint to a different file?
133 class ScAutoStyleHint : public SfxHint
135 ScRange aRange;
136 String aStyle1;
137 String aStyle2;
138 sal_uLong nTimeout;
140 public:
141 TYPEINFO();
142 ScAutoStyleHint( const ScRange& rR, const String& rSt1,
143 sal_uLong nT, const String& rSt2 );
144 ~ScAutoStyleHint();
146 const ScRange& GetRange() const { return aRange; }
147 const String& GetStyle1() const { return aStyle1; }
148 sal_uInt32 GetTimeout() const { return nTimeout; }
149 const String& GetStyle2() const { return aStyle2; }
152 class ScDBRangeRefreshedHint : public SfxHint
154 ScImportParam aParam;
156 public:
157 TYPEINFO();
158 ScDBRangeRefreshedHint( const ScImportParam& rP );
159 ~ScDBRangeRefreshedHint();
161 const ScImportParam& GetImportParam() const { return aParam; }
164 class ScDataPilotModifiedHint : public SfxHint
166 String maName;
168 public:
169 TYPEINFO();
170 ScDataPilotModifiedHint( const String& rName );
171 ~ScDataPilotModifiedHint();
173 const String& GetName() const { return maName; }
176 #endif
178 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */