android: Update app-specific/MIME type icons
[LibreOffice.git] / sc / inc / hints.hxx
blobd890072c1f81b137b2829a748e36e9a26fdbbfe0
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 #pragma once
22 #include "global.hxx"
23 #include "address.hxx"
24 #include <tools/solar.h>
25 #include <svl/hint.hxx>
27 class SC_DLLPUBLIC ScPaintHint final : public SfxHint
29 ScRange aRange;
30 PaintPartFlags nParts;
32 public:
33 ScPaintHint() = delete;
34 ScPaintHint( const ScRange& rRng, PaintPartFlags nPaint );
35 virtual ~ScPaintHint() override;
37 SCCOL GetStartCol() const { return aRange.aStart.Col(); }
38 SCROW GetStartRow() const { return aRange.aStart.Row(); }
39 SCTAB GetStartTab() const { return aRange.aStart.Tab(); }
40 SCCOL GetEndCol() const { return aRange.aEnd.Col(); }
41 SCROW GetEndRow() const { return aRange.aEnd.Row(); }
42 SCTAB GetEndTab() const { return aRange.aEnd.Tab(); }
43 PaintPartFlags GetParts() const { return nParts; }
46 class ScUpdateRefHint final : public SfxHint
48 UpdateRefMode eUpdateRefMode;
49 ScRange aRange;
50 SCCOL nDx;
51 SCROW nDy;
52 SCTAB nDz;
54 public:
55 ScUpdateRefHint( UpdateRefMode eMode, const ScRange& rR,
56 SCCOL nX, SCROW nY, SCTAB nZ );
57 virtual ~ScUpdateRefHint() override;
59 UpdateRefMode GetMode() const { return eUpdateRefMode; }
60 const ScRange& GetRange() const { return aRange; }
61 SCCOL GetDx() const { return nDx; }
62 SCROW GetDy() const { return nDy; }
63 SCTAB GetDz() const { return nDz; }
66 //! move ScLinkRefreshedHint to a different file?
67 enum class ScLinkRefType {
68 NONE, SHEET, AREA, DDE
71 class ScLinkRefreshedHint final : public SfxHint
73 ScLinkRefType nLinkType;
74 OUString aUrl; // used for sheet links
75 OUString aDdeAppl; // used for dde links:
76 OUString aDdeTopic;
77 OUString aDdeItem;
78 ScAddress aDestPos; // used to identify area links
79 //! also use source data for area links?
81 public:
82 ScLinkRefreshedHint();
83 virtual ~ScLinkRefreshedHint() override;
85 void SetSheetLink( const OUString& rSourceUrl );
86 void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI );
87 void SetAreaLink( const ScAddress& rPos );
89 ScLinkRefType GetLinkType() const { return nLinkType; }
90 const OUString& GetUrl() const { return aUrl; }
91 const OUString& GetDdeAppl() const { return aDdeAppl; }
92 const OUString& GetDdeTopic() const { return aDdeTopic; }
93 const OUString& GetDdeItem() const { return aDdeItem; }
94 const ScAddress& GetDestPos() const { return aDestPos; }
97 //! move ScAutoStyleHint to a different file?
99 class ScAutoStyleHint final : public SfxHint
101 ScRange aRange;
102 OUString aStyle1;
103 OUString aStyle2;
104 sal_uLong nTimeout;
106 public:
107 ScAutoStyleHint( const ScRange& rR, OUString aSt1,
108 sal_uLong nT, OUString aSt2 );
109 virtual ~ScAutoStyleHint() override;
111 const ScRange& GetRange() const { return aRange; }
112 const OUString& GetStyle1() const { return aStyle1; }
113 sal_uInt32 GetTimeout() const { return nTimeout; }
114 const OUString& GetStyle2() const { return aStyle2; }
117 class ScDBRangeRefreshedHint final : public SfxHint
119 ScImportParam aParam;
121 public:
122 ScDBRangeRefreshedHint( const ScImportParam& rP );
123 virtual ~ScDBRangeRefreshedHint() override;
125 const ScImportParam& GetImportParam() const { return aParam; }
128 class ScDataPilotModifiedHint final : public SfxHint
130 OUString maName;
132 public:
133 ScDataPilotModifiedHint( OUString aName );
134 virtual ~ScDataPilotModifiedHint() override;
136 const OUString& GetName() const { return maName; }
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */