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