Bump version to 6.4-15
[LibreOffice.git] / sc / inc / hints.hxx
blob04d853026c38cb64b712d36ae7a0478497cbc7d9
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 INCLUDED_SC_INC_HINTS_HXX
21 #define INCLUDED_SC_INC_HINTS_HXX
23 #include "global.hxx"
24 #include "address.hxx"
25 #include <tools/solar.h>
26 #include <svl/hint.hxx>
28 class SC_DLLPUBLIC ScPaintHint final : public SfxHint
30 ScRange const aRange;
31 PaintPartFlags const nParts;
32 bool bPrint; // flag indicating whether print/preview if affected
34 public:
35 ScPaintHint() = delete;
36 ScPaintHint( const ScRange& rRng, PaintPartFlags nPaint );
37 virtual ~ScPaintHint() override;
39 void SetPrintFlag(bool bSet) { bPrint = bSet; }
40 SCCOL GetStartCol() const { return aRange.aStart.Col(); }
41 SCROW GetStartRow() const { return aRange.aStart.Row(); }
42 SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
43 SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
44 SCROW GetEndRow() const { return aRange.aEnd.Row(); }
45 SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
46 PaintPartFlags GetParts() const { return nParts; }
47 bool GetPrintFlag() const { return bPrint; }
50 class ScUpdateRefHint final : public SfxHint
52 UpdateRefMode const eUpdateRefMode;
53 ScRange const aRange;
54 SCCOL const nDx;
55 SCROW const nDy;
56 SCTAB const nDz;
58 public:
59 ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
60 SCCOL nX, SCROW nY, SCTAB nZ );
61 virtual ~ScUpdateRefHint() override;
63 UpdateRefMode GetMode() const { return eUpdateRefMode; }
64 const ScRange& GetRange() const { return aRange; }
65 SCCOL GetDx() const { return nDx; }
66 SCROW GetDy() const { return nDy; }
67 SCTAB GetDz() const { return nDz; }
70 //! move ScLinkRefreshedHint to a different file?
71 enum class ScLinkRefType {
72 NONE, SHEET, AREA, DDE
75 class ScLinkRefreshedHint final : public SfxHint
77 ScLinkRefType nLinkType;
78 OUString aUrl; // used for sheet links
79 OUString aDdeAppl; // used for dde links:
80 OUString aDdeTopic;
81 OUString aDdeItem;
82 ScAddress aDestPos; // used to identify area links
83 //! also use source data for area links?
85 public:
86 ScLinkRefreshedHint();
87 virtual ~ScLinkRefreshedHint() override;
89 void SetSheetLink( const OUString& rSourceUrl );
90 void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI );
91 void SetAreaLink( const ScAddress& rPos );
93 ScLinkRefType GetLinkType() const { return nLinkType; }
94 const OUString& GetUrl() const { return aUrl; }
95 const OUString& GetDdeAppl() const { return aDdeAppl; }
96 const OUString& GetDdeTopic() const { return aDdeTopic; }
97 const OUString& GetDdeItem() const { return aDdeItem; }
98 const ScAddress& GetDestPos() const { return aDestPos; }
101 //! move ScAutoStyleHint to a different file?
103 class ScAutoStyleHint final : public SfxHint
105 ScRange const aRange;
106 OUString const aStyle1;
107 OUString const aStyle2;
108 sal_uLong const nTimeout;
110 public:
111 ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
112 sal_uLong nT, const OUString& rSt2 );
113 virtual ~ScAutoStyleHint() override;
115 const ScRange& GetRange() const { return aRange; }
116 const OUString& GetStyle1() const { return aStyle1; }
117 sal_uInt32 GetTimeout() const { return nTimeout; }
118 const OUString& GetStyle2() const { return aStyle2; }
121 class ScDBRangeRefreshedHint final : public SfxHint
123 ScImportParam const aParam;
125 public:
126 ScDBRangeRefreshedHint( const ScImportParam& rP );
127 virtual ~ScDBRangeRefreshedHint() override;
129 const ScImportParam& GetImportParam() const { return aParam; }
132 class ScDataPilotModifiedHint final : public SfxHint
134 OUString const maName;
136 public:
137 ScDataPilotModifiedHint( const OUString& rName );
138 virtual ~ScDataPilotModifiedHint() override;
140 const OUString& GetName() const { return maName; }
143 #endif
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */