Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_INC_HINTS_HXX
21 : #define INCLUDED_SC_INC_HINTS_HXX
22 :
23 : #include "global.hxx"
24 : #include "address.hxx"
25 : #include <svl/hint.hxx>
26 :
27 : class ScPaintHint : public SfxHint
28 : {
29 : ScRange aRange;
30 : sal_uInt16 nParts;
31 : bool bPrint; // flag indicating whether print/preview if affected
32 :
33 : ScPaintHint(); // disabled
34 :
35 : public:
36 : ScPaintHint( const ScRange& rRng, sal_uInt16 nPaint = PAINT_ALL );
37 : virtual ~ScPaintHint();
38 :
39 5 : void SetPrintFlag(bool bSet) { bPrint = bSet; }
40 :
41 : const ScRange& GetRange() const { return aRange; }
42 7166 : SCCOL GetStartCol() const { return aRange.aStart.Col(); }
43 7259 : SCROW GetStartRow() const { return aRange.aStart.Row(); }
44 9811 : SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
45 7166 : SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
46 7259 : SCROW GetEndRow() const { return aRange.aEnd.Row(); }
47 9790 : SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
48 9815 : sal_uInt16 GetParts() const { return nParts; }
49 4 : bool GetPrintFlag() const { return bPrint; }
50 : };
51 :
52 : class ScUpdateRefHint : public SfxHint
53 : {
54 : UpdateRefMode eUpdateRefMode;
55 : ScRange aRange;
56 : SCsCOL nDx;
57 : SCsROW nDy;
58 : SCsTAB nDz;
59 :
60 : public:
61 : ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
62 : SCsCOL nX, SCsROW nY, SCsTAB nZ );
63 : virtual ~ScUpdateRefHint();
64 :
65 3490 : UpdateRefMode GetMode() const { return eUpdateRefMode; }
66 1857 : const ScRange& GetRange() const { return aRange; }
67 1857 : SCsCOL GetDx() const { return nDx; }
68 1857 : SCsROW GetDy() const { return nDy; }
69 1857 : SCsTAB GetDz() const { return nDz; }
70 : };
71 :
72 : #define SC_POINTERCHANGED_NUMFMT 1
73 :
74 : class ScPointerChangedHint : public SfxHint
75 : {
76 : sal_uInt16 nFlags;
77 :
78 : public:
79 :
80 : virtual ~ScPointerChangedHint();
81 :
82 0 : sal_uInt16 GetFlags() const { return nFlags; }
83 : };
84 :
85 : //! move ScLinkRefreshedHint to a different file?
86 :
87 : #define SC_LINKREFTYPE_NONE 0
88 : #define SC_LINKREFTYPE_SHEET 1
89 : #define SC_LINKREFTYPE_AREA 2
90 : #define SC_LINKREFTYPE_DDE 3
91 :
92 : class ScLinkRefreshedHint : public SfxHint
93 : {
94 : sal_uInt16 nLinkType; // SC_LINKREFTYPE_...
95 : OUString aUrl; // used for sheet links
96 : OUString aDdeAppl; // used for dde links:
97 : OUString aDdeTopic;
98 : OUString aDdeItem;
99 : sal_uInt8 nDdeMode;
100 : ScAddress aDestPos; // used to identify area links
101 : //! also use source data for area links?
102 :
103 : public:
104 : ScLinkRefreshedHint();
105 : virtual ~ScLinkRefreshedHint();
106 :
107 : void SetSheetLink( const OUString& rSourceUrl );
108 : void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM );
109 : void SetAreaLink( const ScAddress& rPos );
110 :
111 3 : sal_uInt16 GetLinkType() const { return nLinkType; }
112 0 : const OUString& GetUrl() const { return aUrl; }
113 2 : const OUString& GetDdeAppl() const { return aDdeAppl; }
114 2 : const OUString& GetDdeTopic() const { return aDdeTopic; }
115 2 : const OUString& GetDdeItem() const { return aDdeItem; }
116 : sal_uInt8 GetDdeMode() const { return nDdeMode; }
117 1 : const ScAddress& GetDestPos() const { return aDestPos; }
118 : };
119 :
120 : //! move ScAutoStyleHint to a different file?
121 :
122 : class ScAutoStyleHint : public SfxHint
123 : {
124 : ScRange aRange;
125 : OUString aStyle1;
126 : OUString aStyle2;
127 : sal_uLong nTimeout;
128 :
129 : public:
130 : ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
131 : sal_uLong nT, const OUString& rSt2 );
132 : virtual ~ScAutoStyleHint();
133 :
134 0 : const ScRange& GetRange() const { return aRange; }
135 0 : const OUString& GetStyle1() const { return aStyle1; }
136 0 : sal_uInt32 GetTimeout() const { return nTimeout; }
137 0 : const OUString& GetStyle2() const { return aStyle2; }
138 : };
139 :
140 : class ScDBRangeRefreshedHint : public SfxHint
141 : {
142 : ScImportParam aParam;
143 :
144 : public:
145 : ScDBRangeRefreshedHint( const ScImportParam& rP );
146 : virtual ~ScDBRangeRefreshedHint();
147 :
148 0 : const ScImportParam& GetImportParam() const { return aParam; }
149 : };
150 :
151 : class ScDataPilotModifiedHint : public SfxHint
152 : {
153 : OUString maName;
154 :
155 : public:
156 : ScDataPilotModifiedHint( const OUString& rName );
157 : virtual ~ScDataPilotModifiedHint();
158 :
159 34 : const OUString& GetName() const { return maName; }
160 : };
161 :
162 : #endif
163 :
164 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|