/src/libreoffice/sc/inc/hints.hxx
Line | Count | Source |
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 | | #pragma once |
21 | | |
22 | | #include "global.hxx" |
23 | | #include "address.hxx" |
24 | | #include <tools/solar.h> |
25 | | #include <svl/hint.hxx> |
26 | | |
27 | | class SC_DLLPUBLIC ScPaintHint final : public SfxHint |
28 | | { |
29 | | ScRange aRange; |
30 | | PaintPartFlags nParts; |
31 | | tools::Long nWidthAffectedHint; |
32 | | |
33 | | public: |
34 | | ScPaintHint() = delete; |
35 | | ScPaintHint( const ScRange& rRng, PaintPartFlags nPaint, tools::Long nMaxWidthAffectedHint = -1); |
36 | | virtual ~ScPaintHint() override; |
37 | | |
38 | 0 | SCCOL GetStartCol() const { return aRange.aStart.Col(); } |
39 | 0 | SCROW GetStartRow() const { return aRange.aStart.Row(); } |
40 | 0 | SCTAB GetStartTab() const { return aRange.aStart.Tab(); } |
41 | 0 | SCCOL GetEndCol() const { return aRange.aEnd.Col(); } |
42 | 0 | SCROW GetEndRow() const { return aRange.aEnd.Row(); } |
43 | 0 | SCTAB GetEndTab() const { return aRange.aEnd.Tab(); } |
44 | 0 | PaintPartFlags GetParts() const { return nParts; } |
45 | 0 | tools::Long GetMaxWidthAffectedHint() const { return nWidthAffectedHint; } |
46 | | }; |
47 | | |
48 | | class ScUpdateRefHint final : public SfxHint |
49 | | { |
50 | | UpdateRefMode eUpdateRefMode; |
51 | | ScRange aRange; |
52 | | SCCOL nDx; |
53 | | SCROW nDy; |
54 | | SCTAB nDz; |
55 | | |
56 | | public: |
57 | | ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR, |
58 | | SCCOL nX, SCROW nY, SCTAB nZ ); |
59 | | virtual ~ScUpdateRefHint() override; |
60 | | |
61 | 0 | UpdateRefMode GetMode() const { return eUpdateRefMode; } |
62 | 0 | const ScRange& GetRange() const { return aRange; } |
63 | 0 | SCCOL GetDx() const { return nDx; } |
64 | 0 | SCROW GetDy() const { return nDy; } |
65 | 0 | SCTAB GetDz() const { return nDz; } |
66 | | }; |
67 | | |
68 | | //! move ScLinkRefreshedHint to a different file? |
69 | | enum class ScLinkRefType { |
70 | | NONE, SHEET, AREA, DDE |
71 | | }; |
72 | | |
73 | | class ScLinkRefreshedHint final : public SfxHint |
74 | | { |
75 | | ScLinkRefType nLinkType; |
76 | | OUString aUrl; // used for sheet links |
77 | | OUString aDdeAppl; // used for dde links: |
78 | | OUString aDdeTopic; |
79 | | OUString aDdeItem; |
80 | | ScAddress aDestPos; // used to identify area links |
81 | | //! also use source data for area links? |
82 | | |
83 | | public: |
84 | | ScLinkRefreshedHint(); |
85 | | virtual ~ScLinkRefreshedHint() override; |
86 | | |
87 | | void SetSheetLink( const OUString& rSourceUrl ); |
88 | | void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI ); |
89 | | void SetAreaLink( const ScAddress& rPos ); |
90 | | |
91 | 0 | ScLinkRefType GetLinkType() const { return nLinkType; } |
92 | 0 | const OUString& GetUrl() const { return aUrl; } |
93 | 0 | const OUString& GetDdeAppl() const { return aDdeAppl; } |
94 | 0 | const OUString& GetDdeTopic() const { return aDdeTopic; } |
95 | 0 | const OUString& GetDdeItem() const { return aDdeItem; } |
96 | 0 | const ScAddress& GetDestPos() const { return aDestPos; } |
97 | | }; |
98 | | |
99 | | //! move ScAutoStyleHint to a different file? |
100 | | |
101 | | class ScAutoStyleHint final : public SfxHint |
102 | | { |
103 | | ScRange aRange; |
104 | | OUString aStyle1; |
105 | | OUString aStyle2; |
106 | | sal_uLong nTimeout; |
107 | | |
108 | | public: |
109 | | ScAutoStyleHint( const ScRange& rR, OUString aSt1, |
110 | | sal_uLong nT, OUString aSt2 ); |
111 | | virtual ~ScAutoStyleHint() override; |
112 | | |
113 | 0 | const ScRange& GetRange() const { return aRange; } |
114 | 0 | const OUString& GetStyle1() const { return aStyle1; } |
115 | 0 | sal_uInt32 GetTimeout() const { return nTimeout; } |
116 | 0 | const OUString& GetStyle2() const { return aStyle2; } |
117 | | }; |
118 | | |
119 | | class ScDBRangeRefreshedHint final : public SfxHint |
120 | | { |
121 | | ScImportParam aParam; |
122 | | |
123 | | public: |
124 | | ScDBRangeRefreshedHint( const ScImportParam& rP ); |
125 | | virtual ~ScDBRangeRefreshedHint() override; |
126 | | |
127 | 0 | const ScImportParam& GetImportParam() const { return aParam; } |
128 | | }; |
129 | | |
130 | | class ScDataPilotModifiedHint final : public SfxHint |
131 | | { |
132 | | OUString maName; |
133 | | |
134 | | public: |
135 | | ScDataPilotModifiedHint( OUString aName ); |
136 | | virtual ~ScDataPilotModifiedHint() override; |
137 | | |
138 | 0 | const OUString& GetName() const { return maName; } |
139 | | }; |
140 | | |
141 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |